1
0
mirror of https://github.com/danbee/danbarber.me synced 2025-03-04 08:59:10 +00:00
danbarber.me/_includes/article.html

40 lines
1.9 KiB
HTML

{% unless page.no_header %}
<header>
{% if index %}
{% if post.external-url %}<!-- This defines how Octopress will use posts with external-url. -->
<h1 class="entry-title"><a href="{{ post.external-url }}">{% if site.titlecase %}{{ post.title | titlecase }} &rarr;{% else %}{{ post.title }}{% endif %}</a></h1>
{% else %}<!-- Now we're back to normal posts. Note the links used under href in both headers.-->
<h1 class="entry-title"><a href="{{ root_url }}{{ post.url }}">{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}</a></h1>
{% endif %}
{% else %}
{% if page.external-url %}
<h1 class="entry-title"><a href="{{ page.external-url }}">{% if site.titlecase %}{{ page.title | titlecase }} &rarr;{% else %}{{ page.title }}{% endif %}</a></h1>
{% else %}
<h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h1>
{% endif %}
{% endif %}
{% if post.date %}<p class="meta">{% include post/date.html date=post.date %}{{ time }}</p>{% endif %}
</header>
{% endunless %}
{% if index %}
<div class="entry-content">{{ post.excerpt }}</div>
{% if post.content contains site.excerpt_separator %}
<footer>
<a rel="full-article" href="{{ root_url }}{{ post.url }}">{{ site.excerpt_link }}</a>
</footer>
{% endif %}
{% else %}
<div class="entry-content">{{ content }}</div>
<footer>
<p class="meta">
{% if page.date %}{% include post/date.html date=page.date %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %}{% endif %}
|
{% include post/categories.html %}
</p>
</footer>
{% endif %}
{% if post.external-url %}
<div class="entry-content"><p><a href="{{ root_url }}{{ post.url }}">Permalink</a></p><!-- add permalink at end of link posts; could be text or glyph -->
</div>
{% endif %}