diff --git a/src/assets/floating-scrollbar/jquery.floatingscroll.css b/src/assets/floating-scrollbar/jquery.floatingscroll.css new file mode 100644 index 0000000..b15e029 --- /dev/null +++ b/src/assets/floating-scrollbar/jquery.floatingscroll.css @@ -0,0 +1 @@ +.fl-scrolls{overflow:auto;position:fixed}.fl-scrolls div{overflow:hidden;pointer-events:none}.fl-scrolls div::before{content:"\A0"}.fl-scrolls,.fl-scrolls div{font-size:1px;line-height:0;margin:0;padding:0}.fl-scrolls-hidden div::before{content:"\A0\A0"}.fl-scrolls-viewport{position:relative}.fl-scrolls-body{overflow:auto}.fl-scrolls-viewport .fl-scrolls{position:absolute}.fl-scrolls-hoverable .fl-scrolls{opacity:0;transition:opacity .5s .3s}.fl-scrolls-hoverable:hover .fl-scrolls{opacity:1}.fl-scrolls:not([data-orientation]),.fl-scrolls[data-orientation=horizontal]{bottom:0;min-height:17px}.fl-scrolls:not([data-orientation]) div,.fl-scrolls[data-orientation=horizontal] div{height:1px}.fl-scrolls-hidden.fl-scrolls:not([data-orientation]),.fl-scrolls-hidden.fl-scrolls[data-orientation=horizontal]{bottom:9999px}.fl-scrolls-viewport .fl-scrolls:not([data-orientation]),.fl-scrolls-viewport .fl-scrolls[data-orientation=horizontal]{left:0}.fl-scrolls[data-orientation=vertical]{right:0;min-width:17px}.fl-scrolls[data-orientation=vertical] div{width:1px}.fl-scrolls-hidden.fl-scrolls[data-orientation=vertical]{right:9999px}.fl-scrolls-viewport .fl-scrolls[data-orientation=vertical]{top:0} diff --git a/src/assets/floating-scrollbar/jquery.floatingscroll.min.js b/src/assets/floating-scrollbar/jquery.floatingscroll.min.js new file mode 100644 index 0000000..ccfef61 --- /dev/null +++ b/src/assets/floating-scrollbar/jquery.floatingscroll.min.js @@ -0,0 +1,6 @@ +/*! +floating-scroll v3.2.0 +https://amphiluke.github.io/floating-scroll/ +(c) 2024 Amphiluke +*/ +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";var n="horizontal",i="vertical",e={init:function(t,i){var e=this;e.orientationProps=function(t){var i=t===n;return{ORIENTATION:t,SIZE:i?"width":"height",X_SIZE:i?"height":"width",OFFSET_SIZE:i?"offsetWidth":"offsetHeight",OFFSET_X_SIZE:i?"offsetHeight":"offsetWidth",CLIENT_SIZE:i?"clientWidth":"clientHeight",CLIENT_X_SIZE:i?"clientHeight":"clientWidth",INNER_X_SIZE:i?"innerHeight":"innerWidth",SCROLL_SIZE:i?"scrollWidth":"scrollHeight",SCROLL_POS:i?"scrollLeft":"scrollTop",START:i?"left":"top",X_START:i?"top":"left",X_END:i?"bottom":"right"}}(i);var o=t.closest(".fl-scrolls-body");o.length&&(e.scrollBody=o),e.container=t[0],e.visible=!0,e.initWidget(),e.updateAPI(),e.addEventHandlers(),e.skipSyncContainer=e.skipSyncWidget=!1},initWidget:function(){var n=this,i=n.orientationProps,e=i.ORIENTATION,o=i.SIZE,r=i.SCROLL_SIZE,c=n.widget=t('
');t("
").appendTo(c)[o](n.container[r]),c.appendTo(n.container)},addEventHandlers:function(){var n=this;(n.eventHandlers=[{$el:t(window),handlers:{"destroyDetached.fscroll":function(t){"fscroll"===t.namespace&&n.destroyDetachedAPI()}}},{$el:n.scrollBody||t(window),handlers:{scroll:function(){n.updateAPI()},resize:function(){n.updateAPI()}}},{$el:n.widget,handlers:{scroll:function(){n.visible&&!n.skipSyncContainer&&n.syncContainer(),n.skipSyncContainer=!1}}},{$el:t(n.container),handlers:{scroll:function(){n.skipSyncWidget||n.syncWidget(),n.skipSyncWidget=!1},focusin:function(){setTimeout((function(){n.widget&&n.syncWidget()}),0)},"update.fscroll":function(t){"fscroll"===t.namespace&&n.updateAPI()},"destroy.fscroll":function(t){"fscroll"===t.namespace&&n.destroyAPI()}}}]).forEach((function(t){var n=t.$el,i=t.handlers;return n.bind(i)}))},checkVisibility:function(){var t=this,n=t.widget,i=t.container,e=t.scrollBody,o=t.orientationProps,r=o.SCROLL_SIZE,c=o.OFFSET_SIZE,s=o.X_START,l=o.X_END,d=o.INNER_X_SIZE,a=o.CLIENT_X_SIZE,f=n[0][r]<=n[0][c];if(!f){var u=i.getBoundingClientRect(),h=e?e[0].getBoundingClientRect()[l]:window[d]||document.documentElement[a];f=u[l]<=h||u[s]>h}t.visible===f&&(t.visible=!f,n.toggleClass("fl-scrolls-hidden"))},syncContainer:function(){var t=this,n=t.orientationProps.SCROLL_POS,i=t.widget[0][n];t.container[n]!==i&&(t.skipSyncWidget=!0,t.container[n]=i)},syncWidget:function(){var t=this,n=t.orientationProps.SCROLL_POS,i=t.container[n];t.widget[0][n]!==i&&(t.skipSyncContainer=!0,t.widget[0][n]=i)},updateAPI:function(){var n=this,i=n.orientationProps,e=i.SIZE,o=i.X_SIZE,r=i.OFFSET_X_SIZE,c=i.CLIENT_SIZE,s=i.CLIENT_X_SIZE,l=i.SCROLL_SIZE,d=i.START,a=n.widget,f=n.container,u=n.scrollBody,h=f[c],S=f[l];a[e](h),u||a.css(d,f.getBoundingClientRect()[d]+"px"),t("div",a)[e](S),S>h&&a[o](a[0][r]-a[0][s]+1),n.syncWidget(),n.checkVisibility()},destroyAPI:function(){var t=this;t.eventHandlers.forEach((function(t){var n=t.$el,i=t.handlers;return n.unbind(i)})),t.widget.remove(),t.eventHandlers=t.widget=t.container=t.scrollBody=null},destroyDetachedAPI:function(){t.contains(document.body,this.container)||this.destroyAPI()}};t.fn.floatingScroll=function(o,r){if(void 0===o&&(o="init"),void 0===r&&(r={}),"init"===o){var c=r.orientation,s=void 0===c?n:c;if(s!==n&&s!==i)throw new Error("Scrollbar orientation should be either “"+n+"” or “"+i+"”");this.each((function(n,i){return Object.create(e).init(t(i),s)}))}else Object.prototype.hasOwnProperty.call(e,o+"API")&&this.trigger(o+".fscroll");return this},t((function(){t("body [data-fl-scrolls]").each((function(n,i){var e=t(i);e.floatingScroll("init",e.data("flScrolls")||{})}))}))})); diff --git a/src/templates/index.html b/src/templates/index.html index 6d512b0..441c555 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -34,6 +34,9 @@ + + + @@ -138,6 +141,10 @@ + + + + diff --git a/src/templates/signals/signals.html b/src/templates/signals/signals.html index 6c19e12..141425d 100644 --- a/src/templates/signals/signals.html +++ b/src/templates/signals/signals.html @@ -4,197 +4,235 @@ {% load crispy_forms_tags %} {% block content %} -
-
+ +
-
+
-
Search
+
+ Search +
- +
-

- -

- {% if form.pathogen.value %} -
- {% else %} -
- {% endif %} -
-
-
- {{ form.pathogen|as_crispy_field }} +

+ +

+ {% if form.pathogen.value %} +
+ {% else %} +
+ {% endif %} +
+
+
+ {{ form.pathogen|as_crispy_field }} +
-
-

- -

- {% if form.active.value %} -
- {% else %} -
- {% endif %} -
- {{ form.active|as_crispy_field }} +
+

+ +

+ {% if form.active.value %} +
+ {% else %} +
+ {% endif %} +
+ {{ form.active|as_crispy_field}} +
+
-
-

- -

- {% if form.available_geography.value %} -
- {% else %} -
- {% endif %} -
-
- - +
+

+ +

+ {% if form.available_geography.value %} +
+ {% else %} +
+ {% endif %} +
+
+ + +
+ {{ form.available_geography|as_crispy_field }} +
- {{ form.available_geography|as_crispy_field }}
-
-

- -

- {% if form.signal_type.value %} +

+ +

+ {% if form.signal_type.value %}
- {% else %} + {% else %}
- {% endif %} -
-
- - + {% endif %} +
+
+ + +
+ {{ form.signal_type|as_crispy_field }}
- {{ form.signal_type|as_crispy_field }}
-
-
-

- -

- {% if form.category.value %} +
+

+ +

+ {% if form.category.value %}
- {% else %} + {% else %}
- {% endif %} -
-
- - + {% endif %} +
+
+ + +
+ {{ form.category|as_crispy_field }}
- {{ form.category|as_crispy_field }}
-
-

- -

- {% if form.format_type.value %} +

+ +

+ {% if form.format_type.value %}
- {% else %} + {% else %}
- {% endif %} -
-
- - + {% endif %} +
+
+ + +
+ {{ form.format_type|as_crispy_field }}
- {{ form.format_type|as_crispy_field }}
-
-

- -

- {% if form.source.value %} +

+ +

+ {% if form.source.value %}
- {% else %} + {% else %}
- {% endif %} -
-
- - + {% endif %} +
+
+ + +
+ {{ form.source|as_crispy_field }}
- {{ form.source|as_crispy_field }}
-
-

- -

+

+ +

{% if form.time_type.value %} -
+
{% else %} -
+
{% endif %} -
- {{ form.time_type|as_crispy_field }} +
+ {{ form.time_type|as_crispy_field }} +
-

@@ -222,31 +260,34 @@

-
+
+
-
-
-
- - Showing {{ signals|length }} row{{ signals|length|pluralize:"s" }}. - +
+
+
+
+ + Showing {{ signals|length }} row{{ signals|length|pluralize:"s" }}. + +
-
-
-
- - {{ form.order_by|as_crispy_field }} +
+
+ + {{ form.order_by|as_crispy_field }} +
-
+
-
- +
+
- + @@ -259,39 +300,43 @@

{% for signal in signals %} - - {% if signal.base %} - - {% else %} - --/-- - {% endif %} - {% if signal.active == True %} - - {% else %} - - {% endif %} - - - + + + + - - @@ -300,10 +345,10 @@

Name Active Data Source
+ {{ form.id|as_crispy_field }} {{ signal.base.display_name }}{{ signal.source.data_source }}{{ signal.description }} + + {{ signal.display_name }} + + {% if signal.active == True%} + + {% else %} + + {% endif %} + + {{ signal.source.data_source }} + + {{ signal.description}} + {% for pathogen in signal.pathogen.all %} {{ pathogen|title }} {% endfor %} + {% if signal.base %} {{ signal.display_name }} {% else %} - --/-- + --/-- {% endif %} + {% if signal.last_updated %} - {{ signal.last_updated|date:"Y-m-d" }} + {{ signal.last_updated|date:"Y-m-d" }} {% else %} - --/-- + --/-- {% endif %}
+
-