Skip to content

Commit

Permalink
improve indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bmos committed Mar 17, 2024
1 parent e4f3aba commit da7f02c
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 39 deletions.
12 changes: 6 additions & 6 deletions _includes/calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
{% assign current_date = post.created_at | date: '%D' %}
{% if forloop.first == post or previous_date != current_date %}
<h3 class="text-center font-weight-bold">
{% include icons/calendar.svg %}
{% if page.locale.id == 'en' %}
{{ post.created_at | date: '%a' }}, {{ post.created_at | date_to_string: "ordinal", "US" }}
{% else %}
{{ post.created_at | localize_date }}
{% endif %}
{% include icons/calendar.svg %}
{% if page.locale.id == 'en' %}
{{ post.created_at | date: '%a' }}, {{ post.created_at | date_to_string: "ordinal", "US" }}
{% else %}
{{ post.created_at | localize_date }}
{% endif %}
</h3>
{% endif %}
10 changes: 5 additions & 5 deletions _includes/main-info.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ <h2>{% if page.locale.name == 'Global' %}{{ locale.welcome }}{% else %}{{ locale
<h5>{{ locale.subtitle | replace: '$project', project }}</h5>
</div>
<div class="col-12 text-center">
{% assign sorted = site.tags | sort %}
{% for tag in sorted %}
{% assign lang = site.localization.locales_set[tag.first] %}
<a class="mx-2" href="{{ site.baseurl }}/{{ tag.first }}/">{{ lang.name }}</a>
{% endfor %}
{% assign sorted = site.tags | sort %}
{% for tag in sorted %}
{% assign lang = site.localization.locales_set[tag.first] %}
<a class="mx-2" href="{{ site.baseurl }}/{{ tag.first }}/">{{ lang.name }}</a>
{% endfor %}
</div>
</div>
</div>
Expand Down
48 changes: 24 additions & 24 deletions _includes/single-post.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@
<div class="col-12 col-md-8 p-0">
<div class="card mb-3 card-sm-border-0">
<div class="row m-0 border-bottom">
<div class="col-auto d-md-none d-flex p-0">
{% include avatar.html width="48px" class="my-auto mr-2" %}
</div>
<div class="col card-header d-flex justify-content-between pl-1 pl-md-3 border-0">
<div>
{% capture post_author %}
<a href="{{ post.link }}">{{ post.author }}</a>
<a href="{{ post.rss }}">{% include icons/feed.svg %}</a>
{% endcapture %}
{% capture post_language %}
{% assign lang = site.localization.locales_set[post.tags.first] %}
<a class="text-muted" href="{{ site.baseurl }}/{{ post.tags.first }}/">{{ lang.name }}</a>
{% endcapture %}
{% capture post_time %}
<a class="text-muted" href="{{ post.original_link }}">{{ post.created_at | date: "%H:%M" }}</a>
{% endcapture %}
<span class="text-muted">
{% if include.language %}
{{ locale.postedinat | replace: '$author', post_author | replace: '$language', post_language | replace: '$time', post_time }}
{% else %}
{{ locale.postedat | replace: '$author', post_author | replace: '$time', post_time }}
{% endif %}
</span>
<div class="col-auto d-md-none d-flex p-0">
{% include avatar.html width="48px" class="my-auto mr-2" %}
</div>
<div class="col card-header d-flex justify-content-between pl-1 pl-md-3 border-0">
<div>
{% capture post_author %}
<a href="{{ post.link }}">{{ post.author }}</a>
<a href="{{ post.rss }}">{% include icons/feed.svg %}</a>
{% endcapture %}
{% capture post_language %}
{% assign lang = site.localization.locales_set[post.tags.first] %}
<a class="text-muted" href="{{ site.baseurl }}/{{ post.tags.first }}/">{{ lang.name }}</a>
{% endcapture %}
{% capture post_time %}
<a class="text-muted" href="{{ post.original_link }}">{{ post.created_at | date: "%H:%M" }}</a>
{% endcapture %}
<span class="text-muted">
{% if include.language %}
{{ locale.postedinat | replace: '$author', post_author | replace: '$language', post_language | replace: '$time', post_time }}
{% else %}
{{ locale.postedat | replace: '$author', post_author | replace: '$time', post_time }}
{% endif %}
</span>
</div>
</div>
</div>
</div>
<div class="card-body">
<a href="{{ post.original_link }}">
Expand Down
8 changes: 4 additions & 4 deletions _layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<link rel="alternate" type="application/rss+xml" title="{{ locale[site.title] }} - {{ page.locale.name }}" href="{{ page.locale.id | append: '/rss20.xml' | absolute_url }}">
<link rel="alternate" type="application/atom+xml" title="{{ locale[site.title] }} - {{ page.locale.name }}" href="{{ page.locale.id | append: '/atom.xml' | absolute_url }}">
<script>
// Replace rss and atom links with the local versions
var header_links = document.querySelectorAll('.nav-link');
header_links[1].href = "{{ page.locale.id | append: '/atom.xml' | absolute_url }}";
header_links[2].href = "{{ page.locale.id | append: '/rss20.xml' | absolute_url }}";
var header_links = document.querySelectorAll('.nav-link');
// Replace rss and atom links with the local versions
header_links[1].href = "{{ page.locale.id | append: '/atom.xml' | absolute_url }}";
header_links[2].href = "{{ page.locale.id | append: '/rss20.xml' | absolute_url }}";
</script>
{% if paginator.page == 1 %}
{% include main-info.html %}
Expand Down

0 comments on commit da7f02c

Please sign in to comment.