mirror of
https://github.com/arsenetar/pelican-red.git
synced 2026-01-23 15:11:38 +00:00
Update base template
Base template now figures out the page title property & heading title. This allows the title block to be not be used in sub templates. The feed and navigation sections of the base template are now in seperate files to make it easier to navigate the source.
This commit is contained in:
84
templates/_navigation.html
Normal file
84
templates/_navigation.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<header id="nav" class="contain-to-grid">
|
||||
<nav class="top-bar">
|
||||
<ul class="title-area">
|
||||
<!-- Title Area -->
|
||||
<li class="name">
|
||||
<h1><a href="{{ SITEURL }}">{{ SITENAME }}</a></h1>
|
||||
</li>
|
||||
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
|
||||
</ul>
|
||||
<section class="top-bar-section" itemscope itemtype="http://schema.org/SiteNavigationElement">
|
||||
<meta itemprop="name" content="{{ SITENAME }} Navigation"/>
|
||||
<!-- Menu -->
|
||||
<ul class="left" itemscope itemtype="http://schema.org/ItemList">
|
||||
<meta itemprop="name" content="{{ SITENAME }} Menu Items"/>
|
||||
<meta itemprop="ItemListOrder" content="Unordered"/>
|
||||
{% for item, url in MENUITEMS %}
|
||||
<li itemprop="itemListElement">
|
||||
<a href="{{ url }}">{{ item|title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% if DISPLAY_PAGES_ON_MENU != False %}
|
||||
{% if DISPLAY_PAGES_ON_MENU == 'Compact' %}
|
||||
<li class="has-dropdown" itemprop="itemListElement" itemscope itemtype="http://schema.org/ItemList"><a>Pages</a>
|
||||
<meta itemprop="name" content="Pages"/>
|
||||
<meta itemprop="url" content="{{SITEURL}}/Pages.html"/>
|
||||
<meta itemprop="ItemListOrder" content="Unordered"/>
|
||||
<ul class="dropdown">
|
||||
{% for p in PAGES if not p.status == 'hidden' %}
|
||||
<li {% if p == page %} class='active'{% endif %} itemprop="itemListElement">
|
||||
<a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if DISPLAY_PAGES_ON_MENU == 'Expanded' %}
|
||||
{% for p in PAGES if not p.status == 'hidden' %}
|
||||
<li {% if p == page %} class='active'{% endif %} itemprop="itemListElement">
|
||||
<a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU != False %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU == 'Compact' %}
|
||||
<li class="has-dropdown" itemprop="itemListElement" itemscope itemtype="http://schema.org/ItemList"><a>Categories</a>
|
||||
<meta itemprop="name" content="Categories"/>
|
||||
<meta itemprop="url" content="{{SITEURL}}/Categories.html"/>
|
||||
<meta itemprop="ItemListOrder" content="Unordered"/>
|
||||
<ul class="dropdown">
|
||||
{% for cat, null in categories %}
|
||||
<li {% if cat == category %} class='active'{% endif %} itemprop="itemListElement">
|
||||
<a href="{{ SITEURL }}/{{ cat.url }}">{{ cat.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU == 'Expanded' %}
|
||||
{% for cat, null in categories %}
|
||||
<li {% if cat == category %} class='active'{% endif %} itemprop="itemListElement">
|
||||
<a href="{{ SITEURL }}/{{ cat.url }}">{}{ cat.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if DISPLAY_ARCHIVE_ON_MENU %}
|
||||
<li itemprop="itemListElement">
|
||||
<a href="{{ SITEURL }}/archives.html">Archives</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<!-- Social Links -->
|
||||
{% if SOCIAL %}
|
||||
<ul class="right" itemscope itemtype="http://schema.org/ItemList">
|
||||
<meta itemprop="name" content="site-social"/>
|
||||
<meta itemprop="ItemListOrder" content="Unordered"/>
|
||||
{% for network, url in SOCIAL %}
|
||||
<li itemprop="itemListElement"><a href="{{ url }}" title="{{ network|title }}"><i class="huge icon-{{ network }}"></i></a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</section>
|
||||
</nav>
|
||||
</header>
|
||||
Reference in New Issue
Block a user