aboutsummaryrefslogtreecommitdiff
path: root/templates/base.html
diff options
context:
space:
mode:
authorJieiku2022-09-19 10:51:12 -0700
committerJieiku2022-09-19 10:51:12 -0700
commitbca64259827edb25a19c4b910ab28907b0b29d93 (patch)
tree62756e530cb1a618e96a40b37a20b0de32b0b6a7 /templates/base.html
parent7d691159df6e0f64129d3c11f4e8026dca3a72d1 (diff)
downloadabridge-bca64259827edb25a19c4b910ab28907b0b29d93.tar.gz
abridge-bca64259827edb25a19c4b910ab28907b0b29d93.tar.bz2
abridge-bca64259827edb25a19c4b910ab28907b0b29d93.zip
menu-draft-check
Diffstat (limited to 'templates/base.html')
-rw-r--r--templates/base.html18
1 files changed, 17 insertions, 1 deletions
diff --git a/templates/base.html b/templates/base.html
index 0177ea1..a250d2d 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -52,8 +52,24 @@
<div>
<ul>
{%- for i in config.extra.menu -%}
- <li> <h2><a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}{%- if i.slash and config.extra.uglyurls %}index.html{%- endif %}"{% if i.blank %} target="_blank"{% endif %}>{{ i.name | safe }}</a></h2> </li>
+
+ {%- if i.md -%}{# check if page is draft #}
+
+ {%- set pagecheck = get_page(path=i.md, metadata_only=true) -%}
+ {%- if pagecheck.draft -%}
+ {%- else -%}
+ <li> <h2><a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}{%- if i.slash and config.extra.uglyurls %}index.html{%- endif %}"{% if i.blank %} target="_blank"{% endif %}>{{ i.name | safe }}</a></h2> </li>
+ {%- endif -%}
+
+ {%- else -%}
+
+ <li> <h2><a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}{%- if i.slash and config.extra.uglyurls %}index.html{%- endif %}"{% if i.blank %} target="_blank"{% endif %}>{{ i.name | safe }}</a></h2> </li>
+
+ {%- endif -%}{# end check if page is draft #}
+
{%- endfor -%}
+
+
{%- if config.extra.js_theme -%}
<li class="js">{%- if config.extra.icon_adjust -%}<i type="reset" id="mode" class="{{ config.extra.icon_adjust }}"></i>{%- else -%}<i type="reset" id="mode" class="mode">&#9728;</i>{%- endif -%}</li>
{%- endif -%}