Skip to content

Commit

Permalink
Add support for multi_parts plugin
Browse files Browse the repository at this point in the history
Fix #95
  • Loading branch information
talha131 committed Jan 22, 2014
1 parent 2306f16 commit 7b484dd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions static/css/elegant.css
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,15 @@ i.fa-bitbucket:hover {
i.fa-stack-exchange:hover {
background-color: #3A7BC8;
}
ul.multi-parts-list a {
color: black;
}
ul.multi-parts-list a:hover {
text-decoration: none;
}
ul.multi-parts-list li.active-part {
font-style: italic;
}
.table-of-content .toc {
font-size: .7em;
}
Expand Down
14 changes: 14 additions & 0 deletions templates/_includes/multi_parts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% if article.metadata.parts_articles %}
<h4>Series</h4>
<ul class="multi-parts-list">
{% for part_article in article.metadata.parts_articles %}
<li {% if part_article == article %}class="active-part"{% endif %}>
{% if part_article != article %}
<a href='{{ SITEURL }}/{{ part_article.url }}'>Part {{loop.index}}</a>

This comment has been minimized.

Copy link
@calfzhou

calfzhou Jan 23, 2014

Contributor

coding style: Use double ("") quotation marks around HTML attributes 😃

This comment has been minimized.

Copy link
@talha131

talha131 Jan 23, 2014

Author Member

Thank you sir! 😄 It's fixed!

{% else %}
Part {{loop.index}}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
1 change: 1 addition & 0 deletions templates/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ <h4>Published</h4>
<time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.date.strftime('%b') }} {{ day }} {{- article.date.strftime(', %Y') }}</time>
{% endif %}
{% include '_includes/last_updated.html' %}
{% include '_includes/multi_parts.html' %}
{% if article.category|trim|count > 0 %}
<h4>Category</h4>
<a class="category-link" href="{{ SITEURL }}/categories.html#{{ category.slug }}-ref">{{ article.category }}</a>
Expand Down

0 comments on commit 7b484dd

Please sign in to comment.