Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ckanext/markdown_view/assets/css/markdown_resource_styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.label[data-format=md],
.label[data-format*=markdown] {
background-color: #1A7EA3;
}
.format-label[data-format=md],
.format-label[data-format*=markdown] {
width: 32px;
height: 35px;
background: url(/img/markdown_icon.png);
background-size: cover;
transform: unset;
top: 25px !important;
left: 25px !important;
}
7 changes: 6 additions & 1 deletion ckanext/markdown_view/assets/webassets.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
markdown_view_css:
contents:
- markdown_view.css
- css/markdown_view.css
output: md_view_assets/%(version)s_markdown_view.css

markdown_resource_styles_css:
contents:
- css/markdown_resource_styles.css
output: md_view_assets/%(version)s_markdown_resource_styles.css

markdown_it:
contents:
- vendor/markdown-it.min.js
Expand Down
1 change: 1 addition & 0 deletions ckanext/markdown_view/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class MarkdownViewPlugin(plugins.SingletonPlugin):
# IConfigurer
def update_config(self, config):
tk.add_template_directory(config, 'templates')
tk.add_public_directory(config, 'public')
tk.add_resource('assets', 'md_view_assets')

def info(self):
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions ckanext/markdown_view/templates/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% ckan_extends %}

{% block styles %}
{{ super() }}
{% asset 'md_view_assets/markdown_resource_styles_css' %}
{% endblock %}