aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-08-02 22:04:17 +0200
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-08-02 22:04:17 +0200
commit25394160f2621bc701bbb635fb53572a44574847 (patch)
treeb0bfe5f6ac4210dea08077acd9380d728a605780
parentdf54a40bd7251ed9eb43bea48a870dc54ce9e7ff (diff)
downloadpelican-themes-25394160f2621bc701bbb635fb53572a44574847.zip
pelican-themes-25394160f2621bc701bbb635fb53572a44574847.tar.gz
pelican-themes-25394160f2621bc701bbb635fb53572a44574847.tar.bz2
don't collapse the menu if javascript is disabled
thanks to Adrian Aulbach for the code snippet gist: https://gist.github.com/AdrianAulbach/9bb79f6e5d9b1ed0cff3
-rw-r--r--pelican-bootstrap3/static/css/noscript.css10
-rw-r--r--pelican-bootstrap3/templates/base.html8
2 files changed, 15 insertions, 3 deletions
diff --git a/pelican-bootstrap3/static/css/noscript.css b/pelican-bootstrap3/static/css/noscript.css
new file mode 100644
index 0000000..47f2aed
--- /dev/null
+++ b/pelican-bootstrap3/static/css/noscript.css
@@ -0,0 +1,10 @@
+.collapse {
+ display: block;
+ visibility: visible;
+}
+
+.dropdown-menu {
+ display: block;
+ position: relative;
+ float: none;
+}
diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html
index d1a75e5..e7ebc33 100644
--- a/pelican-bootstrap3/templates/base.html
+++ b/pelican-bootstrap3/templates/base.html
@@ -77,9 +77,11 @@
{% if CUSTOM_CSS %}
<link href="{{ SITEURL }}/{{ CUSTOM_CSS }}" rel="stylesheet">
{% endif %}
- {% if SHARIFF %}
- <link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/shariff/shariff.min.css" rel="stylesheet">
- {% endif %}
+
+ <!-- link the noscript.css stylesheet only if javascript is disabled -->
+ <noscript>
+ <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/noscript.css" />
+ </noscript>
{% if FEED_ALL_ATOM %}
<link href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate"