Skip to content

Commit

Permalink
feat(article): make article subtitle italic
Browse files Browse the repository at this point in the history
fix #284
  • Loading branch information
talha131 committed Jul 5, 2019
1 parent e1429c5 commit 7ca7331
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 9 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified documentation/content/images/elegant-theme_article-subtitle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion static/css/elegant.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ a {
hr {
border-width: 3px;
}

small.subtitle {
font-style: italic;
}
/* site title */
.site-name {
font-family: "Monaco", "Inconsolata", "Andale Mono", "Lucida Console",
Expand Down
13 changes: 11 additions & 2 deletions templates/archives.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,17 @@ <h2 id="{{year }}"><a href="#{{year}}">{{ year }}</a></h2>
{% endif %}
{% endif %}

<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
<a href="{{ SITEURL }}/{{ article.url }}">
{{ article.title }}
{%if article.subtitle %}
<small class="subtitle">
{{ article.subtitle }}
</small>
{% endif %}
</a>
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">
{{ article.locale_date }}
</time>
</article>
{% endfor %}
</div>
Expand Down
15 changes: 12 additions & 3 deletions templates/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,16 @@
<article itemscope>
<div class="row-fluid">
<header class="page-header span10 offset2">
<h1><a href="{{ SITEURL }}/{{ article.url }}"> {{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a></h1>
<h1>
<a href="{{ SITEURL }}/{{ article.url }}">
{{ article.title }}
{%if article.subtitle %}
<small class="subtitle">
{{ article.subtitle }}
</small>
{% endif %}
</a>
</h1>
</header>
</div>

Expand Down Expand Up @@ -80,7 +89,7 @@ <h1>{{ title }}</h1>
{% set ptitle = article.prev_article.title|striptags|e %}
{% set pv_title = article.prev_article.title|striptags %}
{%if article.prev_article.subtitle %}
{% set pv_title = pv_title + ' ' + '<small>' + article.prev_article.subtitle|striptags + '</small>' %}
{% set pv_title = pv_title + ' ' + '<small classs="subtitle">' + article.prev_article.subtitle|striptags + '</small>' %}
{% set ptitle = ptitle + ' - ' + article.prev_article.subtitle|e %}
{% endif %}
<li class="previous-article">« <a href="{{ SITEURL }}/{{ article.prev_article.url }}" title="Previous: {{ ptitle }}">{{ pv_title }}</a></li>
Expand All @@ -89,7 +98,7 @@ <h1>{{ title }}</h1>
{% set ntitle = article.next_article.title|striptags|e %}
{% set nv_title = article.next_article.title|striptags %}
{%if article.next_article.subtitle %}
{% set nv_title = nv_title + ' ' + '<small>' + article.next_article.subtitle|striptags + '</small>' %}
{% set nv_title = nv_title + ' ' + '<small class="subtitle">' + article.next_article.subtitle|striptags + '</small>' %}
{% set ntitle = ntitle + ' - ' + article.next_article.subtitle|e %}
{% endif %}
<li class="next-article"><a href="{{ SITEURL }}/{{ article.next_article.url }}" title="Next: {{ ntitle }}">{{ nv_title }}</a> »</li>
Expand Down
14 changes: 13 additions & 1 deletion templates/categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,19 @@ <h1><a href="{{ SITEURL }}/{{ CATEGORIES_URL|default('categories') }}">All Categ
<div class="accordion-inner">
<ul class="list-articles-category">
{% for article in articles %}
<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>
<li itemscope>
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">
{{ article.locale_date }}
</time>
<a href="{{ SITEURL }}/{{ article.url }}">
{{ article.title }}
{%if article.subtitle %}
<small class="subtitle">
{{ article.subtitle }}
</small>
{% endif %}
</a>
</li>
{% endfor %}
</ul>
</div>
Expand Down
9 changes: 8 additions & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,14 @@ <h1 id="recent-posts">Recent Posts <a id="allposts" href="{{ SITEURL }}/{{ ARCHI
{% from '_includes/_defaults.html' import RECENT_ARTICLES_COUNT with context %}
{% if loop.index0 < RECENT_ARTICLES_COUNT %}
<article itemscope>
<a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
<a href="{{ SITEURL }}/{{ article.url }}">
{{ article.title }}
{%if article.subtitle %}
<small class="subtitle">
{{ article.subtitle }}
</small>
{% endif %}
</a>
<section>
posted in
<a href="{{ SITEURL }}/{{ CATEGORIES_URL|default('categories') }}#{{ article.category.slug }}-ref">{{ article.category }}</a>
Expand Down
14 changes: 13 additions & 1 deletion templates/tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,19 @@ <h1><a href="{{ SITEURL }}/{{ TAGS_URL|default('tags') }}">All Tags</a></h1>
<h2 id="{{ tag.slug }}-ref" class="tag-title">{{ tag }}</h2>
<ul class="articles-in-tag list-articles-category">
{% for article in articles|sort(reverse = true, attribute = 'date') %}
<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>
<li itemscope>
<time itemprop="dateCreated" datetime="{{ article.date.isoformat() }}">
{{ article.locale_date }}
</time>
<a href="{{ SITEURL }}/{{ article.url }}">
{{ article.title }}
{%if article.subtitle %}
<small class="subtitle">
{{ article.subtitle }}
</small>
{% endif %}
</a>
</li>
{% endfor %}
</ul>

Expand Down

0 comments on commit 7ca7331

Please sign in to comment.