hide DM category except on localhost

This commit is contained in:
evilchili 2022-08-07 12:14:53 -07:00
parent 5edf5f2283
commit 8dd0c8458c
4 changed files with 11 additions and 3 deletions

View File

@ -3,6 +3,8 @@
{% block title %}{{ article.title|capitalize }} - {{SITENAME}}{% endblock title %}
{% block key_image %}{{ macros.key_image(article) }}{% endblock key_image %}
{% block content %}
{% if not self.is_dm() and article.category == 'dm' %}
{% else %}
<section id="content">
<div class='box curled'>
<h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
@ -18,4 +20,5 @@
{% include "bottom-nav.html" %}
</div>
</section>
{% endif %}
{% endblock content %}

View File

@ -23,8 +23,13 @@
<div class='sun'></div>
<div class='title'><h1><a href="/">{{ SITENAME }}</a></h1></div>
<ul class="nav">
{% if self.is_dm() %}
<li><a href="{{ SITEURL }}/dm">DM</a></li>
{% endif %}
{% for category, articles in categories %}
{% if category != 'dm' %}
<li><a href="{{ SITEURL }}/{{ category.name }}">{{ category }}</a></li>
{% endif %}
{% endfor %}
{% for p in pages %}
<li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>

View File

@ -2,6 +2,8 @@
{% block title %}{{ category if category else tag if tag else "" |capitalize }} - {{SITENAME}}{% endblock title %}
{% block navclass %}active{%endblock%}
{% block content %}
{% if not self.is_dm() and category == 'dm' %}
{% else %}
<section id="content" class="content">
{% if category %}
{% with key='category', values=[category], title=category %}{% include "category-index.html" %}{% endwith %}
@ -9,5 +11,6 @@
{% include "tag-index.html" %}
{% endif %}
</section>
{% endif %}
{% endblock content %}

View File

@ -6,8 +6,6 @@ THEME = 'deadsands-theme'
SLUGIFY_SOURCE = 'basename'
DISPLAY_PAGES_ON_MENU = True
PATH = 'content'
TIMEZONE = 'America/Los_Angeles'
@ -56,7 +54,6 @@ MENU_ITEMS = (
("Index", "archives/"),
)
SITEMAP = {
'format': 'xml',
"exclude": ["tag/"],