Skip to content

Commit

Permalink
refactor: refactor css/js inject to allow embeding
Browse files Browse the repository at this point in the history
  • Loading branch information
mutantsan committed Sep 1, 2023
1 parent 099a361 commit cf693e3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 27 deletions.
13 changes: 1 addition & 12 deletions ckanext/unfold/assets/webassets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ unfold-js:
output: ckanext-unfold/%(version)s-unfold.js
contents:
- unfold-init-jstree.js
- vendor/jstree.min.js
extra:
preload:
- base/main
Expand All @@ -12,16 +13,4 @@ unfold-css:
output: ckanext-unfold/%(version)s-unfold.css
contents:
- css/unfold.css


jstree-js:
filter: rjsmin
output: ckanext-unfold/%(version)s-js-tree.js
contents:
- vendor/jstree.min.js

jstree-css:
filter: cssrewrite
output: ckanext-unfold/%(version)s-css-tree.js
contents:
- vendor/jstree.min.css
15 changes: 0 additions & 15 deletions ckanext/unfold/templates/base.html

This file was deleted.

3 changes: 3 additions & 0 deletions ckanext/unfold/templates/unfold_preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@
<span>{{ _("Error loading archive. It's either empty or corrupted.") }}</span>
{% endif %}
</div>

{% asset 'unfold/unfold-js' %}
{% asset 'unfold/unfold-css' %}

0 comments on commit cf693e3

Please sign in to comment.