mirror of
https://github.com/c0de-archive/pelican-mg.git
synced 2024-12-22 08:22:40 +00:00
Refacto + adding missing trmplate
This commit is contained in:
parent
38d243106e
commit
484a5ad227
@ -113,10 +113,13 @@ a {
|
||||
|
||||
.mg-tag {
|
||||
margin: 0 .5rem;
|
||||
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
color: #FF6600; }
|
||||
.mg-tag:hover {
|
||||
text-decoration: none;
|
||||
color: #FF6600; }
|
||||
.mg-tag > .uk-icon-tag {
|
||||
margin-right: .2rem; }
|
||||
|
||||
.mg-list-title {
|
||||
font-size: 2em;
|
||||
|
@ -74,8 +74,7 @@
|
||||
|
||||
{% if not MG_DISABLE_SUMMARY %}<p class="uk-article-lead" itemprop="description">{{ article.summary|striptags }}</p>{% endif %}
|
||||
<section class="uk-article-content" itemprop="articleBody">{{ article.content }}</section>
|
||||
{% set bullet = joiner(" • ") %}
|
||||
<div align="right" title="Tags">{% for tag in article.tags %}{{bullet()}}<a class="mg-tag" href="{{tag.url}}"><i class="uk-icon-tag"></i>{{tag.name}}</a>{% endfor %}</div>
|
||||
{% include "partials/inline-tags.html" %}
|
||||
<hr class="uk-article-divider">
|
||||
</article>
|
||||
|
||||
|
@ -3,8 +3,7 @@
|
||||
<p class="uk-article-meta"><time datetime="{{ article.date.strftime('%Y-%m-%d') }}" itemprop="datePublished">{{ article.locale_date }}</time> • <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% if DISQUS_SITENAME %} • <br class="uk-visible-small"><i class="uk-icon-comment"></i> <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread" itemprop="discussionUrl"></a>{% endif %}</p>
|
||||
{% if not MG_DISABLE_SUMMARY %}<p class="uk-article-lead" itemprop="description">{{ article.summary|striptags|striptags }}</p>{% endif %}
|
||||
<section class="uk-article-content" itemprop="articleBody">{{ article.content }}</section>
|
||||
{% set bullet = joiner(" • ") %}
|
||||
<div align="right" title="Tags">{% for tag in article.tags %}{{bullet()}}<a class="mg-tag" href="{{tag.url}}"><i class="uk-icon-tag"></i>{{tag.name}}</a>{% endfor %}</div>
|
||||
{% include "partials/inline-tags.html" %}
|
||||
<a href="{{ SITEURL }}/{{ article.url }}#disqus_thread"></a>
|
||||
<hr class="uk-article-divider">
|
||||
</article>
|
||||
|
@ -5,8 +5,7 @@
|
||||
<p class="uk-article-lead" itemprop="description">{{ article.summary|striptags|striptags }}</p>
|
||||
{% if not MG_DISABLE_SUMMARY %}<p>{{ ' '.join(article.content.split(' ')[:SUMMARY_MAX_LENGTH ])|striptags|striptags }}...</p>{% endif %}
|
||||
<a href="{{ SITEURL }}/{{ article.url }}">Read More</a>
|
||||
{% set bullet = joiner(" • ") %}
|
||||
<div align="right" title="Tags">{% for tag in article.tags %}{{bullet()}}<a class="mg-tag" href="{{tag.url}}"><i class="uk-icon-tag"></i>{{tag.name}}</a>{% endfor %}</div>
|
||||
{% include "partials/inline-tags.html" %}
|
||||
<hr class="uk-article-divider">
|
||||
</article>
|
||||
|
||||
|
3
templates/partials/inline-tags.html
Normal file
3
templates/partials/inline-tags.html
Normal file
@ -0,0 +1,3 @@
|
||||
{% set bullet = joiner(" • ") %}
|
||||
<div align="right" title="Tags">{% for tag in article.tags %}{{bullet()}}<a class="mg-tag" href="{{tag.url}}"><i class="uk-icon-tag"></i> {{tag.name}}</a>{% endfor %}</div>
|
||||
|
24
templates/tag.html
Normal file
24
templates/tag.html
Normal file
@ -0,0 +1,24 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content_title %}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="uk-width-medium-4-5">
|
||||
|
||||
{% if articles %}
|
||||
{% for article in (articles_page.object_list if articles_page else articles) %}
|
||||
|
||||
{% include "partials/article-short.html" %}
|
||||
|
||||
{% endfor %}
|
||||
{% if DEFAULT_PAGINATION and articles_paginator.num_pages > 1 %}
|
||||
<ul class="uk-pagination">
|
||||
{% if articles_previous_page %}<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}"><i class="uk-icon-angle-double-left"></i></a></li>{% endif %}
|
||||
{% if articles_previous_page %}<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">{{ articles_previous_page.number }}</a></li>{% endif %}
|
||||
<li class="uk-active"><span>{{ articles_page.number }}</span></li>
|
||||
{% if articles_next_page %}<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}"><i class="uk-icon-angle-double-right"></i></a></li>{% endif %}
|
||||
{% if articles_next_page %}<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}">{{ articles_next_page.number }}</a></li>{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user