Skip to content

Commit

Permalink
Merge pull request #8 from ricardonadao/dev-beatifyBreadCrumbs
Browse files Browse the repository at this point in the history
fontawesome update + breadcrumbs capitalization + post meta headers
  • Loading branch information
ricardonadao committed Nov 3, 2018
2 parents 1e36a37 + 6602dfd commit 1c213b9
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 9 deletions.
8 changes: 8 additions & 0 deletions _data/comments/blog-vexpert-2018/comment-1540452880610.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
_id: 6ed16bf0-d828-11e8-b5f8-4fb3266afb07
_parent: /blog/2018/09/18/blog-vexpert-2018.html
message: mais um
name: Ricardo
email: 01bc05b204144e8bff7148624e740ec0
url: ''
replying_to: ''
date: '2018-10-25T07:34:40.606Z'
2 changes: 1 addition & 1 deletion _data/ui-text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ en: &DEFAULT_EN
toc_label : "On this page"
ext_link_label : "Direct link"
less_than : "less than"
minute_read : "minute read"
minute_read : "min read"
share_on_label : "Share on"
meta_label :
tags_label : "Tags:"
Expand Down
15 changes: 12 additions & 3 deletions _includes/archive-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,18 @@ <h2 class="archive__item-title" itemprop="headline">
<a href="{{ post.url | relative_url }}" rel="permalink">{{ title }}</a>
{% endif %}
</h2>
{% if post.read_time %}
<p class="page__meta"><i class="far fa-clock" aria-hidden="true"></i> {% include read-time.html %}</p>
{% endif %}
<p class="page__meta">
{% if post.date %}
<i class="far fa-calendar" aria-hidden="true"></i> <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%B %d, %Y" }}</time>
&nbsp;
{% endif %}
{% if post.read_time %}
<i class="far fa-clock" aria-hidden="true"></i> {% include read-time.html %}
{% endif %}
{% if post.comments == true and site.data.comments[post.slug].size > 0 %}
&nbsp;<i class="far fa-comments" aria-hidden="true"></i> <a href="#comments">{{ site.data.comments[post.slug] | size }}&nbsp;Comment{% if site.data.comments[post.slug].size > 1 %}s{% endif %}</a>
{% endif %}
</p>
{% if post.excerpt %}<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify | strip_html | truncate: 160 }}</p>{% endif %}
</article>
</div>
2 changes: 1 addition & 1 deletion _includes/breadcrumbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{% else %}
{% assign i = i | plus: 1 %}
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
<a href="{{ crumb | downcase | replace: '%20', '-' | prepend: path_type | prepend: crumb_path | relative_url }}" itemprop="item"><span itemprop="name">{{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }}</span></a>
<a href="{{ crumb | downcase | replace: '%20', '-' | prepend: path_type | prepend: crumb_path | relative_url }}" itemprop="item"><span itemprop="name">{{ crumb | replace: '-', ' ' | replace: '%20', ' ' }}</span></a>
<meta itemprop="position" content="{{ i }}" />
</li>
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
Expand Down
2 changes: 1 addition & 1 deletion _includes/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% endfor %}
{% else %}
<script src="{{ '/assets/js/main.min.js' | relative_url }}"></script>
<script defer src="{{site.url}}/assets/js/fontawesome-all.js"></script>
<script defer src="{{site.url}}/assets/js/fontawesome-5.5.0-all.js"></script>

{% endif %}

Expand Down
16 changes: 13 additions & 3 deletions _layouts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,19 @@
{% unless page.header.overlay_color or page.header.overlay_image %}
<header>
{% if page.title %}<h1 id="page-title" class="page__title" itemprop="headline">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</h1>{% endif %}
{% if page.read_time %}
<p class="page__meta"><i class="far fa-clock" aria-hidden="true"></i> {% include read-time.html %}</p>
{% endif %}
<p class="page__meta">
{% if page.date %}
<i class="far fa-calendar" aria-hidden="true"></i> <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time>
&nbsp;
{% endif %}
{% if page.read_time %}
<i class="far fa-clock" aria-hidden="true"></i> {% include read-time.html %}
{% endif %}
{% if page.comments == true and site.data.comments[page.slug].size > 0 %}
&nbsp;
<i class="far fa-comments" aria-hidden="true"></i> <a href="#comments">{{ site.data.comments[page.slug] | size }}&nbsp;Comment{% if site.data.comments[page.slug].size > 1 %}s{% endif %}</a>
{% endif %}
</p>
</header>
{% endunless %}

Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions assets/js/fontawesome-5.5.0-all.js

Large diffs are not rendered by default.

0 comments on commit 1c213b9

Please sign in to comment.