From 8223ecf631f76ec4069e5b4cd8766b6b389aa3f1 Mon Sep 17 00:00:00 2001 From: Norman Radtke Date: Mon, 12 Feb 2024 13:12:28 +0100 Subject: [PATCH] Select font size of submenu2 entries depending on item count. --- _includes/components/menu_sub2.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/_includes/components/menu_sub2.html b/_includes/components/menu_sub2.html index a51859e99..df44a94c5 100644 --- a/_includes/components/menu_sub2.html +++ b/_includes/components/menu_sub2.html @@ -9,8 +9,17 @@ {% assign current_page = page.rdf.render_path | relativize_url %} {% assign menu = menuResource | rdf_container %} +{%- if menu.size <= 6 -%} + {%- assign fontSize = 100 -%} +{%- elsif menu.size == 7 -%} + {% assign fontSize = 90 -%} +{%- elsif menu.size == 8 -%} + {% assign fontSize = 80 -%} +{%- else -%} + {%- assign fontSize = 70 -%} +{%- endif -%} -