diff --git a/ckanext/embeddings/assets/script.js b/ckanext/embeddings/assets/script.js deleted file mode 100644 index a676ff1..0000000 --- a/ckanext/embeddings/assets/script.js +++ /dev/null @@ -1,10 +0,0 @@ -ckan.module("embedding-module", function ($, _) { - "use strict"; - return { - options: { - debug: false, - }, - - initialize: function () {}, - }; -}); diff --git a/ckanext/embeddings/assets/style.css b/ckanext/embeddings/assets/style.css index 9631595..83a84aa 100644 --- a/ckanext/embeddings/assets/style.css +++ b/ckanext/embeddings/assets/style.css @@ -1,5 +1,7 @@ -/* -body { - border-radius: 0; +.semantic-search-label { + font-size: 16px; +} + +.semantic-search-label:after { + content: ''; } -*/ diff --git a/ckanext/embeddings/assets/webassets.yml b/ckanext/embeddings/assets/webassets.yml index 6c26284..c90e510 100644 --- a/ckanext/embeddings/assets/webassets.yml +++ b/ckanext/embeddings/assets/webassets.yml @@ -1,14 +1,5 @@ -# embedding-js: -# filter: rjsmin -# output: ckanext-embedding/%(version)s-embedding.js -# contents: -# - js/embedding.js -# extra: -# preload: -# - base/main - -# embedding-css: -# filter: cssrewrite -# output: ckanext-embedding/%(version)s-embedding.css -# contents: -# - css/embedding.css +css: + filter: cssrewrite + output: ckanext-embeddings/%(version)s-embeddings.css + contents: + - style.css diff --git a/ckanext/embeddings/plugin.py b/ckanext/embeddings/plugin.py index 064d4bb..1002c1b 100644 --- a/ckanext/embeddings/plugin.py +++ b/ckanext/embeddings/plugin.py @@ -29,6 +29,7 @@ def update_config(self, config): self.backend = get_embeddings_backend() toolkit.add_template_directory(config, "templates") + toolkit.add_resource("assets", "ckanext-embeddings") # IClick diff --git a/ckanext/embeddings/templates/snippets/search_form.html b/ckanext/embeddings/templates/snippets/search_form.html index e02515e..52481bb 100644 --- a/ckanext/embeddings/templates/snippets/search_form.html +++ b/ckanext/embeddings/templates/snippets/search_form.html @@ -2,12 +2,14 @@ {% block search_title %} {{ super() }} + + {% asset "ckanext-embeddings/css" %}