Skip to content

Commit

Permalink
fix(template): missing post language tag
Browse files Browse the repository at this point in the history
  • Loading branch information
sparanoid committed Aug 26, 2015
1 parent 6dd7a77 commit ed468ee
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 26 deletions.
10 changes: 6 additions & 4 deletions _app/_includes/_amsf.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,12 @@
Page language tag
{% endcomment %}
{% capture amsf_page_lang %}
{% if page.languages and page.languages[0] != null %}
lang="{{ page.languages | first }}"
{% else %}
lang="{{ page.languages }}"
{% if page.languages %}
{% if page.languages[0] != null %}
lang="{{ page.languages | first }}"
{% else %}
lang="{{ page.languages }}"
{% endif %}
{% endif %}
{% endcapture %}

Expand Down
56 changes: 34 additions & 22 deletions _app/_includes/themes/curtana/includes/page-item.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
<!-- List snippets -->
<section class=list {% if post.lang %} lang={{ post.lang }}{% endif %}>
<h1>
<!-- Dynamic link color based on post color scheme -->
{% capture post_link_color %}
{% if post.scheme-bg %}
{% if post.scheme-bg-light %}
style="color: {{ post.scheme-text }};"
{% else %}
style="color: {{ post.scheme-bg }};"
{% endif %}
{% endif %}
{% endcapture %}

<!-- Dynamic background color based on post color scheme -->
{% capture post_link_bg %}
{% if post.scheme-bg %}
{% if post.scheme-bg-light %}
style="background: {{ post.scheme-text }};"
{% else %}
style="background: {{ post.scheme-bg }};"
{% endif %}
{% endif %}
{% endcapture %}
<!-- Post language -->
{% capture amsf_post_lang %}
{% if post.languages %}
{% if post.languages[0] != null %}
lang="{{ post.languages | first }}"
{% else %}
lang="{{ post.languages }}"
{% endif %}
{% endif %}
{% endcapture %}

<!-- Dynamic link color based on post color scheme -->
{% capture post_link_color %}
{% if post.scheme-bg %}
{% if post.scheme-bg-light %}
style="color: {{ post.scheme-text }};"
{% else %}
style="color: {{ post.scheme-bg }};"
{% endif %}
{% endif %}
{% endcapture %}

<!-- Dynamic background color based on post color scheme -->
{% capture post_link_bg %}
{% if post.scheme-bg %}
{% if post.scheme-bg-light %}
style="background: {{ post.scheme-text }};"
{% else %}
style="background: {{ post.scheme-bg }};"
{% endif %}
{% endif %}
{% endcapture %}

<section class=list {{ amsf_post_lang }}>
<h1>
<!-- Item title -->
<a href="{{ post.url | prepend: site.base }}" {% if site.data.curtana.colorful_list %}{{ post_link_color }}{% endif %}>{{ post.title }}</a>

Expand Down

0 comments on commit ed468ee

Please sign in to comment.