8000 feat(article): make article subtitle italic · Pelican-Elegant/elegant@7ca7331 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 7ca7331

Browse files
committed
feat(article): make article subtitle italic
fix #284
1 parent e1429c5 commit 7ca7331

File tree

8 files changed

+60
-9
lines changed

8 files changed

+60
-9
lines changed
Loading
Loading

static/css/elegant.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ a {
7171
hr {
7272
border-width: 3px;
7373
}
74-
74+
small.subtitle {
75+
font-style: italic;
76+
}
7577
/* site title */
7678
.site-name {
7779
font-family: "Monaco", "Inconsolata", "Andale Mono", "Lucida Console",

templates/archives.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,17 @@ <h2 id="{{year }}"><a href="#{{year}}">{{ year }}</a></h2>
5757
{% endif %}
5858
{% endif %}
5959

60-
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
61-
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
60+
<a href="{{ SITEURL }}/{{ article.url }}">
61+
{{ article.title }}
62+
{%if article.subtitle %}
63+
<small class="subtitle">
64+
{{ article.subtitle }}
65+
</small>
66+
{% endif %}
67+
</a>
68+
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">
69+
{{ article.locale_date }}
70+
</time>
6271
</article>
6372
{% endfor %}
6473
</div>

templates/article.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,16 @@
3232
<article itemscope>
3333
<div class="row-fluid">
3434
<header class="page-header span10 offset2">
35-
<h1><a href="{{ SITEURL }}/{{ article.url }}"> {{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></h1>
35+
<h1>
36+
<a href="{{ SITEURL }}/{{ article.url }}">
37+
{{ article.title }}
38+
{%if article.subtitle %}
39+
<small class="subtitle">
40+
{{ article.subtitle }}
41+
</small>
42+
{% endif %}
43+
</a>
44+
</h1>
3645
</header>
3746
</div>
3847

@@ -80,7 +89,7 @@ <h1>{{ title }}</h1>
8089
{% set ptitle = article.prev_article.title|striptags|e %}
8190
{% set pv_title = article.prev_article.title|striptags %}
8291
{%if article.prev_article.subtitle %}
83-
{% set pv_title = pv_title + ' ' + '<small>' + article.prev_article.subtitle|striptags + '</small>' %}
92+
{% set pv_title = pv_title + ' ' + '<small classs="subtitle">' + article.prev_article.subtitle|striptags + '</small>' %}
8493
{% set ptitle = ptitle + ' - ' + article.prev_article.subtitle|e %}
8594
{% endif %}
8695
<li class="previous-article">« <a href="{{ SITEURL }}/{{ article.prev_article.url }}" title="Previous: {{ ptitle }}">{{ pv_title }}</a></li>
@@ -89,7 +98,7 @@ <h1>{{ title }}</h1>
8998
{% set ntitle = article.next_article.title|striptags|e %}
9099
{% set nv_title = article.next_article.title|striptags %}
91100
{%if article.next_article.subtitle %}
92-
{% set nv_title = nv_title + ' ' + '<small>' + article.next_article.subtitle|striptags + '</small>' %}
101+
{% set nv_title = nv_title + ' ' + '<small class="subtitle">' + article.next_article.subtitle|striptags + '</small>' %}
93102
{% set ntitle = ntitle + ' - ' + article.next_article.subtitle|e %}
94103
{% endif %}
95104
<li class="next-article"><a href="{{ SITEURL }}/{{ article.next_article.url }}" title="Next: {{ ntitle }}">{{ nv_title }}</a> »</li>

templates/categories.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,19 @@ <h1><a href="{{ SITEURL }}/{{ CATEGORIES_URL|default('categories') }}">All Categ
5252
<div class="accordion-inner">
5353
<ul class="list-articles-category">
5454
{% for article in articles %}
55-
<li itemscope><time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></li>
55+
<li itemscope>
56+
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">
57+
{{ article.locale_date }}
58+
</time>
59+
<a href="{{ SITEURL }}/{{ article.url }}">
60+
{{ article.title }}
61+
{%if article.subtitle %}
62+
<small class="subtitle">
63+
{{ article.subtitle }}
64+
</small>
65+
{% endif %}
66+
</a>
67+
</li>
5668
{% endfor %}
5769
</ul>
5870
</div>

templates/index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,14 @@ <h1 id="recent-posts">Recent Posts <a id="allposts" href="{{ SITEURL }}/{{ ARCHI
101101
{% from '_includes/_defaults.html' import RECENT_ARTICLES_COUNT with context %}
102102
{% if loop.index0 < RECENT_ARTICLES_COUNT %}
103103
<article itemscope>
104-
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
104+
<a href="{{ SITEURL }}/{{ article.url }}">
105+
{{ article.title }}
106+
{%if article.subtitle %}
107+
<small class="subtitle">
108+
{{ article.subtitle }}
109+
</small>
110+
{% endif %}
111+
</a>
105112
<section>
106113
posted in
107114
<a href="{{ SITEURL }}/{{ CATEGORIES_URL|default('categories') }}#{{ article.category.slug }}-ref">{{ article.category }}</a>

templates/tags.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,19 @@ <h1><a href="{{ SITEURL }}/{{ TAGS_URL|default('tags') }}">All Tags</a></h1>
5858
<h2 id="{{ tag.slug }}-ref" class="tag-title">{{ tag }}</h2>
5959
<ul class="articles-in-tag list-articles-category">
6060
{% for article in articles|sort(reverse = true, attribute = 'date') %}
61-
<li itemscope><time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></li>
61+
<li itemscope>
62+
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">
63+
{{ article.locale_date }}
64+
</time>
65+
<a href="{{ SITEURL }}/{{ article.url }}">
66+
{{ article.title }}
67+
{%if article.subtitle %}
68+
<small class="subtitle">
69+
{{ article.subtitle }}
70+
</small>
71+
{% endif %}
72+
</a>
73+
</li>
6274
{% endfor %}
6375
</ul>
6476

0 commit comments

Comments
 (0)
0