User html5 semantic elements

main
Raymond Wanyoike 2016-11-07 10:18:02 +03:00
parent 99c13a39c7
commit 3ac5a83a2f
5 changed files with 30 additions and 36 deletions

View File

@ -49,7 +49,7 @@ a:hover {
} }
.header img, .header img,
.header ul { .header nav {
margin-bottom: 20px; margin-bottom: 20px;
} }

View File

@ -14,8 +14,8 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="article"> <article class="article">
<div class="article-header"> <header>
<ul class="list-inline"> <ul class="list-inline">
<li class="text-muted" title="{{ article.date.isoformat() }}">{{ article.locale_date }}</li> <li class="text-muted" title="{{ article.date.isoformat() }}">{{ article.locale_date }}</li>
<li>&middot;</li> <li>&middot;</li>
@ -33,10 +33,8 @@
</li> </li>
{% endif %} {% endif %}
</ul> </ul>
</div> </header>
<div class="article-main"> {{ article.content }}
{{ article.content }} </article>
</div>
</div>
{% include 'include/comments.html' %} {% include 'include/comments.html' %}
{% endblock %} {% endblock %}

View File

@ -55,7 +55,7 @@
</head> </head>
<body> <body>
<div class="header"> <header class="header">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-sm-4"> <div class="col-sm-4">
@ -68,7 +68,7 @@
<p>{{ SITE_TAGLINE }}</p> <p>{{ SITE_TAGLINE }}</p>
<hr> <hr>
{% if HEADER_LINKS or SHOW_HEADER_PAGES or EMAIL_ADDRESS or FACEBOOK_ADDRESS or GITHUB_ADDRESS or GOOGLE_ADDRESS or TWITTER_ADDRESS %} {% if HEADER_LINKS or SHOW_HEADER_PAGES or EMAIL_ADDRESS or FACEBOOK_ADDRESS or GITHUB_ADDRESS or GOOGLE_ADDRESS or TWITTER_ADDRESS %}
<ul class="list-inline"> <nav class="list-inline">
{% if HEADER_LINKS %} {% if HEADER_LINKS %}
{% for title, link in HEADER_LINKS %} {% for title, link in HEADER_LINKS %}
<li><a href="{{ link }}" target="_blank">{{ title }}</a></li> <li><a href="{{ link }}" target="_blank">{{ title }}</a></li>
@ -103,12 +103,12 @@
{% if TWITTER_ADDRESS %} {% if TWITTER_ADDRESS %}
<li><a class="fa fa-fw fa-twitter" href="{{ TWITTER_ADDRESS }}" target="_blank"></a></li> <li><a class="fa fa-fw fa-twitter" href="{{ TWITTER_ADDRESS }}" target="_blank"></a></li>
{% endif %} {% endif %}
</ul> </nav>
{% endif %} {% endif %}
</div> </div>
</div> </div>
</div> </div>
</div> </header>
<div class="main"> <div class="main">
<div class="container"> <div class="container">
@ -119,12 +119,12 @@
</div> </div>
</div> </div>
<div class="footer"> <footer class="footer">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
{% if SHOW_FOOTER_AUTHORS or SHOW_FOOTER_ARCHIVES or SHOW_FOOTER_CATEGORIES or SHOW_FOOTER_TAGS %} {% if SHOW_FOOTER_AUTHORS or SHOW_FOOTER_ARCHIVES or SHOW_FOOTER_CATEGORIES or SHOW_FOOTER_TAGS %}
<ul class="list-inline"> <nav class="list-inline">
{% if SHOW_ARTICLE_AUTHOR and SHOW_FOOTER_AUTHORS %} {% if SHOW_ARTICLE_AUTHOR and SHOW_FOOTER_AUTHORS %}
<li><a href="{{ SITEURL }}/authors.html">Authors</a></li> <li><a href="{{ SITEURL }}/authors.html">Authors</a></li>
{% endif %} {% endif %}
@ -137,7 +137,7 @@
{% if SHOW_FOOTER_TAGS %} {% if SHOW_FOOTER_TAGS %}
<li><a href="{{ SITEURL }}/tags.html">Tags</a></li> <li><a href="{{ SITEURL }}/tags.html">Tags</a></li>
{% endif %} {% endif %}
</ul> </nav>
{% endif %} {% endif %}
</div> </div>
<div class="col-sm-6 hidden-xs text-right text-muted"> <div class="col-sm-6 hidden-xs text-right text-muted">
@ -145,7 +145,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </footer>
</body> <!-- 42 --> </body>
</html> </html>

View File

@ -15,21 +15,19 @@ All Articles
{% block content %} {% block content %}
{% for article in articles_page.object_list %} {% for article in articles_page.object_list %}
<div class="teaser"> <article class="row teaser">
<div class="row"> <header class="col-sm-4 hidden-xs">
<div class="col-sm-4 hidden-xs teaser-header"> <div class="text-muted" title="{{ article.date.isoformat() }}">{{ article.locale_date }}</div>
<div class="text-muted teaser-date" title="{{ article.date.isoformat() }}">{{ article.locale_date }}</div> <div><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></div>
<div><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></div> {% if article.author and SHOW_ARTICLE_AUTHOR %}
{% if article.author and SHOW_ARTICLE_AUTHOR %} <div>By <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a></div>
<div>By <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a></div> {% endif %}
{% endif %} </header>
</div> <div class="col-sm-8">
<div class="col-sm-8 teaser-main"> <h3><a href="/{{ article.url }}" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h3>
<h2><a href="/{{ article.url }}" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> {{ article.summary }}
<p>{{ article.summary }}</p>
</div>
</div> </div>
</div> </article>
{% if not loop.last %} {% if not loop.last %}
<hr> <hr>
{% endif %} {% endif %}

View File

@ -14,9 +14,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="page"> <article class="page">
<div class="page-main"> {{ page.content }}
{{ page.content }} </article>
</div>
</div>
{% endblock %} {% endblock %}