Browse Source

header content footer structure added

master
mb@mb 7 years ago
parent
commit
b343ec12dd
  1. 11
      theme/wttf/templates/base.html
  2. 21
      theme/wttf/templates/index.html

11
theme/wttf/templates/base.html

@ -34,8 +34,17 @@
</head> </head>
<body id="index" class="home"> <body id="index" class="home">
<header id="banner" class="body"> <header id="banner">
<h1><a href="{{ SITEURL }}/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a></h1> <h1><a href="{{ SITEURL }}/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a></h1>
<h1 id="menu">
Welcome to the
<select onchange="window.location.href=this.value">
{%- for t, article in tags|sort %}
<option value="/{{ t.url }}" {% if t == tag %}selected{% endif %}>{{ t }}</option>
{% endfor %}
</select>
Federation
</h1>
</header><!-- /#banner --> </header><!-- /#banner -->
{% block content %} {% block content %}
{% endblock %} {% endblock %}

21
theme/wttf/templates/index.html

@ -1,10 +1,11 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
{% if articles %} {% if articles %}
<section id="content">
{% for article in articles_page.object_list %} {% for article in articles_page.object_list %}
{# First item #} {# First item #}
{% if loop.index <= 3 %} {% if loop.index <= 3 %}
<div id="featured" class="body"> <div class="featured">
<article> <article>
<h1 class="entry-title p-name"> <h1 class="entry-title p-name">
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a> <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
@ -29,15 +30,15 @@
</article> </article>
</div><!-- /#featured --> </div><!-- /#featured -->
{% if loop.index == 3 %} {% if loop.index == 3 %}
<section id="content" class="body"> <section id="list">
<h1>Other articles</h1> <h1>Other articles</h1>
<hr /> <hr />
<ol id="posts-list" class="hfeed"> <ul id="posts-list">
{% endif %} {% endif %}
{# other items #} {# other items #}
{% else %} {% else %}
{% if loop.first %} {% if loop.first %}
<section id="content" class="body"> <section id="other">
<ol id="posts-list" class="hfeed" start="{{ articles_paginator.per_page -1 }}"> <ol id="posts-list" class="hfeed" start="{{ articles_paginator.per_page -1 }}">
{% endif %} {% endif %}
<li> <li>
@ -73,7 +74,7 @@
{% endif %} {% endif %}
{% if loop.last %} {% if loop.last %}
{% if loop.length > 1 or articles_page.has_other_pages() %} {% if loop.length > 1 or articles_page.has_other_pages() %}
</ol><!-- /#posts-list --> </ul><!-- /#posts-list -->
{% if articles_page.has_other_pages() %} {% if articles_page.has_other_pages() %}
{% include 'pagination.html' %} {% include 'pagination.html' %}
{% endif %} {% endif %}
@ -81,18 +82,8 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% else %}
<section id="content" class="body">
<h2>Pages</h2>
{% for page in pages %}
<li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
{% endfor %}
</section> </section>
{% endif %} {% endif %}
{% endblock content %} {% endblock content %}
<section id="content">
{% block content_title %}
<h2>All articles</h2>
{% endblock %}

Loading…
Cancel
Save