/ ‘pelicanconf.py’

/ ‘theme/templates/analytics.html’
/ ‘theme/templates/archives.html’
/ ‘theme/templates/base.html’
/ ‘theme/templates/category.html’
/ ‘theme/templates/index.html’
/ ‘theme/templates/page.html’
/ ‘theme/templates/pagination.html’
/ ‘theme/templates/piwik.html’
/ ‘theme/templates/tags.html’
/ ‘theme/templates/translations.html’
/ ‘theme/templates/twitter.html’
This commit is contained in:
Dooho Yi 2020-05-05 20:19:48 +09:00
parent c34a5ec7dd
commit bb108f8602
12 changed files with 76 additions and 57 deletions

View file

@ -35,7 +35,8 @@ LINKS = (('Pelican', 'http://getpelican.com/'),
SOCIAL = (('You can add links in your config file', '#'),
('Another social link', '#'),)
DEFAULT_PAGINATION = 5
DEFAULT_PAGINATION = 20
PAGINATED_TEMPLATES = {'index': None, 'tag': None, 'category': None, 'author': None}
# Uncomment following line if you want document-relative URLs when developing
#RELATIVE_URLS = True

View file

@ -6,6 +6,7 @@
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("{{GOOGLE_ANALYTICS}}");
pageTracker._trackPageview();
} catch(err) {}</script>
pageTracker._trackPageview();
} catch(err) {}
</script>
{% endif %}

View file

@ -1,13 +1,18 @@
{% extends "base.html" %}
{% block content %}
<section id="content" class="body">
<h1>Archives for {{ SITENAME }}</h1>
<dl>
{% for article in dates %}
<dt>{{ article.locale_date }}</dt>
<dd><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title }}</a></dd>
{% endfor %}
</dl>
</section>
{% block content_title %}
<div class="fl o-50" style="font-size:0.4em;">@rchives<br/> {{ SITENAME }}</div>
<a class="fr o-10 pr1" style="font-size:0.8em;" href="{{ SITEURL }}">{{ SITENAME }}</a>
{% endblock %}
{% block content %}
<dl>
{% for article in dates %}
<dt>
<a class="archives" href='{{ SITEURL }}/{{ article.url }}'>
{{ article.date.isoformat() }} - {{ article.title }}
</a>
</dt>
{% endfor %}
</dl>
{% endblock %}

View file

@ -17,6 +17,10 @@
text-decoration: none;
}
a.archives:hover {
background-color: rgba(0, 0, 0, 0.1);
}
p {
margin: 0;
}

View file

@ -6,24 +6,26 @@
{% endblock %}
{% block content %}
{% for article in articles %}
{% for article in articles_page.object_list %}
<article class="title">
<a href="{{ SITEURL }}/{{ article.url }}" class="db b pb2 o-50">
{{ article.title }}
</a>
</article>
<article class="title">
<a href="{{ SITEURL }}/{{ article.url }}" class="db b pb2 o-50">
{{ article.title }}
</a>
</article>
<div>
{{ article.content }}
</div>
<div>
{{ article.content }}
</div>
{% if not HIDE_DATE %}
<time class="db w-100 tr pb4 o-30" datetime="{{ article.date.isoformat() }}">
{{ article.date.isoformat() }}
</time>
{% endif %}
{% if not HIDE_DATE %}
<time class="db w-100 tr pb4 o-30" datetime="{{ article.date.isoformat() }}">
{{ article.date.isoformat() }}
</time>
{% endif %}
{% endfor %}
{% include 'pagination.html' %}
{% endblock %}

View file

@ -5,26 +5,22 @@
{% endblock %}
{% block content %}
{% for category, articles in categories %}
{% if category.name == 'notes' %}
{% for article in articles %}
<article class="title">
<a href="{{ SITEURL }}/{{ article.url }}" class="db b pb2 o-50">
{{ article.title }}
</a>
</article>
<div>
{{ article.content }}
</div>
{% if not HIDE_DATE %}
<time class="db w-100 tr pb4 o-30" datetime="{{ article.date.isoformat() }}">
{{ article.date.isoformat() }}
</time>
{% endif %}
{% endfor %}
{% for article in articles_page.object_list | selectattr('category', '==', 'notes') %}
<article class="title">
<a href="{{ SITEURL }}/{{ article.url }}" class="db b pb2 o-50">
{{ article.title }}
</a>
</article>
<div>
{{ article.content }}
</div>
{% if not HIDE_DATE %}
<time class="db w-100 tr pb4 o-30" datetime="{{ article.date.isoformat() }}">
{{ article.date.isoformat() }}
</time>
{% endif %}
{% endfor %}
{% include 'pagination.html' %}
{% endblock %}

View file

@ -1,11 +1,22 @@
{% extends "base.html" %}
{% block title %}{{ page.title }}{% endblock %}
{% block content %}
{% block title %}
{{ page.title }}
{% endblock %}
{% block content %}
<header>
<h1><a href="{{ SITEURL }}" id="site-title">{# {{ SITENAME }} #} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}</a> {#:#}
<a href="{{ SITEURL }}/{{ page.url }}" id="page-title">{{ page.title }}</a></h1>
<h1>
<a href="{{ SITEURL }}" id="site-title">
{# {{ SITENAME }} #} {% if SITESUBTITLE %} <strong>{{ SITESUBTITLE }}</strong>{% endif %}
</a> {#:#}
<a href="{{ SITEURL }}/{{ page.url }}" id="page-title">
{{ page.title }}
</a>
</h1>
</header>
<article>
{{ page.content }}
<article>
{{ page.content }}
</article>
{% endblock %}

View file

@ -7,7 +7,7 @@
<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html">&laquo;</a>
{% endif %}
{% endif %}
Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}
{{ articles_page.number }} / {{ articles_paginator.num_pages }}
{% if articles_page.has_next() %}
<a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">&raquo;</a>
{% endif %}

View file

@ -13,4 +13,4 @@
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://{{ PIWIK_URL }}/piwik.php?idsite={{ PIWIK_SITE_ID }}" style="border:0" alt="" /></p></noscript>
{% endif %}
{% endif %}

View file

@ -6,4 +6,3 @@
{% endfor %}
</ul>
{% endblock %}

View file

@ -1,5 +1,5 @@
{% if article.translations %}
Translations:
Translations:
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
{% endfor %}

View file

@ -1,3 +1,3 @@
{% if TWITTER_USERNAME %}
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="{{TWITTER_USERNAME}}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
{% endif %}
{% endif %}