From 3798b63c4b0421bac98ab83cc5ee414b557d3dc9 Mon Sep 17 00:00:00 2001 From: blek Date: Sun, 1 Oct 2023 20:42:22 +1000 Subject: [PATCH] .js-only class --- filed/static/js-only.css | 1 + filed/static/js-only.js | 2 ++ filed/templates/base.html | 2 ++ 3 files changed, 5 insertions(+) create mode 100644 filed/static/js-only.css create mode 100644 filed/static/js-only.js diff --git a/filed/static/js-only.css b/filed/static/js-only.css new file mode 100644 index 0000000..fdd5029 --- /dev/null +++ b/filed/static/js-only.css @@ -0,0 +1 @@ +.js-only{display:none} \ No newline at end of file diff --git a/filed/static/js-only.js b/filed/static/js-only.js new file mode 100644 index 0000000..c80a5ef --- /dev/null +++ b/filed/static/js-only.js @@ -0,0 +1,2 @@ +// This script displays all elements with `js-only` class. +(()=>{let a=document.getElementsByClassName('js-only');for(let i=0;i!=a.length;i++)a[i].style.display='initial'}) \ No newline at end of file diff --git a/filed/templates/base.html b/filed/templates/base.html index 5c049d7..8b36b42 100644 --- a/filed/templates/base.html +++ b/filed/templates/base.html @@ -11,7 +11,9 @@ + + blek! File {% block head %}{% endblock %}