artilecls list by tag and author
This commit is contained in:
parent
2db8e49cdb
commit
2fee5e9d3e
22 changed files with 962 additions and 4 deletions
46
templates/partials/analytics.js
Normal file
46
templates/partials/analytics.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
{% if GOOGLE_ANALYTICS %}
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', '{{GOOGLE_ANALYTICS}}']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
{% if GAUGES %}
|
||||
<script type="text/javascript">
|
||||
var _gauges = _gauges || [];
|
||||
(function() {
|
||||
var t = document.createElement('script');
|
||||
t.type = 'text/javascript';
|
||||
t.async = true;
|
||||
t.id = 'gauges-tracker';
|
||||
t.setAttribute('data-site-id', '{{GAUGES}}');
|
||||
t.src = '//secure.gaug.es/track.js';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(t, s);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
||||
{% if PIWIK_URL and PIWIK_SITE_ID %}
|
||||
<script type="text/javascript">
|
||||
{% if PIWIK_SSL_URL %}
|
||||
var pkBaseURL = "{{ PIWIK_SSL_URL }}";
|
||||
{% else %}
|
||||
var pkBaseURL = "{{ PIWIK_URL }}";
|
||||
{% endif %}
|
||||
var _paq = _paq || [];
|
||||
_paq.push(["trackPageView"]);
|
||||
_paq.push(["enableLinkTracking"]);
|
||||
(function() {
|
||||
var u=(("https:" == document.location.protocol) ? "https" : "http")+"://"+pkBaseURL+"/";
|
||||
_paq.push(["setTrackerUrl", u+"piwik.php"]);
|
||||
_paq.push(["setSiteId", "{{ PIWIK_SITE_ID }}"]);
|
||||
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
|
||||
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
{% endif %}
|
9
templates/partials/comments_count.html
Normal file
9
templates/partials/comments_count.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% if DISQUS_SITENAME %}
|
||||
<p>
|
||||
{% if article.disqus_identifier %}
|
||||
<a data-disqus-identifier="{{ article.disqus_identifier }}" href="{{ SITEURL }}/{{ article.url }}#disqus_thread">comments</a>
|
||||
{% else %}
|
||||
<a data-disqus-identifier="/{{ article.url }}" href="{{ SITEURL }}/{{ article.url }}#disqus_thread">comments</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
11
templates/partials/disqus.js
Normal file
11
templates/partials/disqus.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% if DISQUS_SITENAME %}
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ DISQUS_SITENAME }}';
|
||||
(function () {
|
||||
var s = document.createElement('script'); s.async = true;
|
||||
s.type = 'text/javascript';
|
||||
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
|
||||
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
||||
}());
|
||||
</script>
|
||||
{% endif %}
|
39
templates/partials/loop.html
Normal file
39
templates/partials/loop.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
<div class="extra-pagination">
|
||||
{% include "partials/pagination.html" %}
|
||||
</div>
|
||||
|
||||
{% for article in articles_page.object_list %}
|
||||
<article class="post">
|
||||
<div class="inner">
|
||||
<header class="post-header">
|
||||
<h2 class="post-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a>
|
||||
</h2>
|
||||
<span class="post-meta">
|
||||
{% for author in article.authors %}
|
||||
<a href="{{ SITEURL }}/{{ author.url }}">{{ author|capitalize }}</a>
|
||||
{% endfor %}
|
||||
| <time datetime="{{ article.locale_date }}">{{ article.locale_date }}</time>
|
||||
</span>
|
||||
<div class="clear"></div>
|
||||
</header>
|
||||
{% if SHOW_FULL_ARTICLE %}
|
||||
<section class="post-content">
|
||||
{{ article.content }}
|
||||
</section>
|
||||
{% else %}
|
||||
<section class="post-excerpt">
|
||||
<p>
|
||||
{% if article.has_summary %}
|
||||
{{ article.summary }}
|
||||
{% elif article.summary %}
|
||||
{{ article.summary|striptags|truncate(250) }}
|
||||
{% endif %}
|
||||
</p>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% include 'partials/comments_count.html' %}
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
|
||||
{% include "partials/pagination.html" %}
|
|
@ -0,0 +1,27 @@
|
|||
<nav id="menu">
|
||||
<a class="close-button">Close</a>
|
||||
<div class="nav-wrapper">
|
||||
<p class="nav-label">Menu</p>
|
||||
<ul>
|
||||
{% for title, link in MENUITEMS %}
|
||||
<li><a href="{{ link }}" role="presentation">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
|
||||
{% if DISPLAY_PAGES_ON_MENU %}
|
||||
{% for p in PAGES %}
|
||||
<li{% if p == page %} class="nav-{{p.slug}} active"{% endif %} role="presentation"><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU %}
|
||||
{% for cat, null in categories %}
|
||||
<li{% if cat == category %} class="nav-{{cat.slug}} active"{% endif %} role="presentation"><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% for name,link in SOCIAL if name in ['rss', 'rss-square', 'feed'] %}
|
||||
<li class="nav-rss"><a href="{{ link }}"><i class="ic ic-rss"></i> Subscribe</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
|
@ -0,0 +1,14 @@
|
|||
{% if DEFAULT_PAGINATION %}
|
||||
<nav class="pagination" role="pagination">
|
||||
<div class="inner">
|
||||
{% if articles_page.has_previous() %}
|
||||
<a class="pagination-next" href="{{ SITEURL }}/{{ articles_previous_page.url }}"><i class="ic ic-arrow-left"></i> <span class="pagination-label">Newer Posts</span></a>
|
||||
{% endif %}
|
||||
<span class="pagination-info">Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}</span>
|
||||
{% if articles_page.has_next() %}
|
||||
<a class="pagination-prev" href="{{ SITEURL }}/{{ articles_next_page.url }}"><span class="pagination-label">Older Posts</span> <i class="ic ic-arrow-right"></i></a>
|
||||
{% endif %}
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</nav>
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue