Browse Source

header content footer structure added

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

85
theme/wttf/templates/base.html

@ -1,49 +1,58 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}"> <html lang="{{ DEFAULT_LANG }}">
<head> <head>
{% block head %} {% block head %}
<title>{% block title %}{{ SITENAME }}{% endblock title %}</title> <title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="/{{ THEME_STATIC_DIR }}{{ CSS_FILE }}" /> <link rel="stylesheet" type="text/css" href="/{{ THEME_STATIC_DIR }}{{ CSS_FILE }}" />
<link rel="icon" href="{{ SITEURL}}/favicon.ico" type="image/x-icon"> <link rel="icon" href="{{ SITEURL}}/favicon.ico" type="image/x-icon">
{% if FEED_ALL_ATOM %} {% if FEED_ALL_ATOM %}
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" /> <link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
{% endif %} {% endif %}
{% if FEED_ALL_RSS %} {% if FEED_ALL_RSS %}
<link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" /> <link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" />
{% endif %} {% endif %}
{% if FEED_ATOM %} {% if FEED_ATOM %}
<link href="{{ FEED_DOMAIN }}/{%if FEED_ATOM_URL %}{{ FEED_ATOM_URL }}{% else %}{{ FEED_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" /> <link href="{{ FEED_DOMAIN }}/{%if FEED_ATOM_URL %}{{ FEED_ATOM_URL }}{% else %}{{ FEED_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
{% endif %} {% endif %}
{% if FEED_RSS %} {% if FEED_RSS %}
<link href="{{ FEED_DOMAIN }}/{% if FEED_RSS_URL %}{{ FEED_RSS_URL }}{% else %}{{ FEED_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" /> <link href="{{ FEED_DOMAIN }}/{% if FEED_RSS_URL %}{{ FEED_RSS_URL }}{% else %}{{ FEED_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
{% endif %} {% endif %}
{% if CATEGORY_FEED_ATOM and category %} {% if CATEGORY_FEED_ATOM and category %}
<link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_ATOM_URL %}{{ CATEGORY_FEED_ATOM_URL|format(category.slug) }}{% else %}{{ CATEGORY_FEED_ATOM|format(category.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" /> <link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_ATOM_URL %}{{ CATEGORY_FEED_ATOM_URL|format(category.slug) }}{% else %}{{ CATEGORY_FEED_ATOM|format(category.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" />
{% endif %} {% endif %}
{% if CATEGORY_FEED_RSS and category %} {% if CATEGORY_FEED_RSS and category %}
<link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_RSS_URL %}{{ CATEGORY_FEED_RSS_URL|format(category.slug) }}{% else %}{{ CATEGORY_FEED_RSS|format(category.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" /> <link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_RSS_URL %}{{ CATEGORY_FEED_RSS_URL|format(category.slug) }}{% else %}{{ CATEGORY_FEED_RSS|format(category.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" />
{% endif %} {% endif %}
{% if TAG_FEED_ATOM and tag %} {% if TAG_FEED_ATOM and tag %}
<link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_ATOM_URL %}{{ TAG_FEED_ATOM_URL|format(tag.slug) }}{% else %}{{ TAG_FEED_ATOM|format(tag.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" /> <link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_ATOM_URL %}{{ TAG_FEED_ATOM_URL|format(tag.slug) }}{% else %}{{ TAG_FEED_ATOM|format(tag.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" />
{% endif %} {% endif %}
{% if TAG_FEED_RSS and tag %} {% if TAG_FEED_RSS and tag %}
<link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL|format(tag.slug) }}{% else %}{{ TAG_FEED_RSS|format(tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" /> <link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL|format(tag.slug) }}{% else %}{{ TAG_FEED_RSS|format(tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" />
{% endif %} {% endif %}
{% endblock head %} {% endblock head %}
</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>
</header><!-- /#banner --> <h1 id="menu">
{% block content %} Welcome to the
{% endblock %} <select onchange="window.location.href=this.value">
<footer> {%- for t, article in tags|sort %}
{% for page in pages %} <option value="/{{ t.url }}" {% if t == tag %}selected{% endif %}>{{ t }}</option>
{{ page.title }} {% endfor %}
{{ page.content }} </select>
{% endfor %} Federation
</footer> </h1>
</header><!-- /#banner -->
{% block content %}
{% endblock %}
<footer>
{% for page in pages %}
{{ page.title }}
{{ page.content }}
{% endfor %}
</footer>
</body> </body>
</html> </html>

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