summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2021-06-06 13:26:42 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2021-06-06 13:29:02 (GMT)
commit8a679ee7a9806b2f5d3a598a661fea3035eb0d93 (patch)
treef5543c8f096b671d6b620c2179c4f64b0d3baaa5
parenta321afde04fac4509287a257267facc42bbfc2d8 (diff)
downloadpublik-website-8a679ee7a9806b2f5d3a598a661fea3035eb0d93.zip
publik-website-8a679ee7a9806b2f5d3a598a661fea3035eb0d93.tar.gz
publik-website-8a679ee7a9806b2f5d3a598a661fea3035eb0d93.tar.bz2
add support for submenus (#53208)
-rw-r--r--static/css/combo-style.css34
-rw-r--r--templates/combo/page_template.html2
2 files changed, 34 insertions, 2 deletions
diff --git a/static/css/combo-style.css b/static/css/combo-style.css
index b8e63dc..ae3438e 100644
--- a/static/css/combo-style.css
+++ b/static/css/combo-style.css
@@ -100,7 +100,39 @@ ul li:before {
}
#menu ul li a:hover {
- border-bottom: 1px dotted #ccf;
+ border-bottom: 1px dotted #008;
+}
+
+#menu ul li ul {
+ display: none;
+ position: absolute;
+ z-index: 1000;
+ margin-left: -1rem;
+}
+
+#menu ul li ul li {
+ display: block;
+ margin-right: 0;
+}
+
+#menu ul li ul li:first-child {
+ padding-top: 1rem;
+}
+
+#menu ul li ul li a {
+ display: block;
+ background: white;
+ padding: 0.5rem 1rem;
+ border-bottom: 1px solid white;
+}
+
+#menu ul li ul li a:hover {
+ background: #eee;
+ border-bottom: 1px solid white;
+}
+
+#menu ul li:hover ul {
+ display: block;
}
div.textcell.intro {
diff --git a/templates/combo/page_template.html b/templates/combo/page_template.html
index 23c9d29..0d094d5 100644
--- a/templates/combo/page_template.html
+++ b/templates/combo/page_template.html
@@ -21,7 +21,7 @@
<body class="page-{{ page.slug }}">
<div class="container">
<div id="title"><a href="/"><img height="100" width="274" src="{{ STATIC_URL }}img/logo-publik.png"/></a></div>
- <div id="menu">{% block menu %}{% show_menu %}{% endblock %}</div>
+ <nav id="menu">{% block menu %}{% show_menu depth=2 %}{% endblock %}</div>
</div>
<div id="content">
{% block combo-content %}