Skip to content

Commit 7c7bed2

Browse files
committed
Adotado {%- -%} para remover espaços excedentes
1 parent 80b7a3e commit 7c7bed2

21 files changed

+239
-220
lines changed

_includes/advertising.html

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
{% if site.ads.show %}
2-
{% assign show = true %}
3-
{% elsif page.ads.show %}
4-
{% assign show = true %}
5-
{% endif %}
1+
{%- if site.ads.show -%}
2+
{%- assign show = true -%}
3+
{%- elsif page.ads.show -%}
4+
{%- assign show = true -%}
5+
{%- endif -%}
66

7-
{% if show %}
7+
{%- if show -%}
88

9-
{% unless page.ads.style %}
10-
{% if page.layout == "categorylist" %}
11-
{% assign pageadsstyle = "horizontal" %}
12-
{% else %}
13-
{% assign pageadsstyle = "vertical" %}
14-
{% endif %}
15-
{% else %}
16-
{% assign pageadsstyle = page.ads.style %}
17-
{% endunless %}
9+
{%- unless page.ads.style -%}
10+
{%- if page.layout == "categorylist" -%}
11+
{%- assign pageadsstyle = "horizontal" -%}
12+
{%- else -%}
13+
{%- assign pageadsstyle = "vertical" -%}
14+
{%- endif -%}
15+
{%- else -%}
16+
{%- assign pageadsstyle = page.ads.style -%}
17+
{%- endunless -%}
1818

19-
{% if site.data.ads[pageadsstyle] %}
20-
{% assign style = site.data.ads[pageadsstyle].style %}
21-
{% assign slot = site.data.ads[pageadsstyle].slot %}
19+
{%- if site.data.ads[pageadsstyle] -%}
20+
{%- assign style = site.data.ads[pageadsstyle].style -%}
21+
{%- assign slot = site.data.ads[pageadsstyle].slot -%}
2222

23-
{% if site.data.ads[pageadsstyle].client %}
24-
{% assign client = site.data.ads[pageadsstyle].client %}
25-
{% else %}
26-
{% assign client = site.google.adsense.client %}
27-
{% endif %}
23+
{%- if site.data.ads[pageadsstyle].client -%}
24+
{%- assign client = site.data.ads[pageadsstyle].client -%}
25+
{%- else -%}
26+
{%- assign client = site.google.adsense.client -%}
27+
{%- endif -%}
2828

29-
{% if style.class %}
30-
{% assign divclassads = style.class %}
31-
{% else %}
32-
{% assign divclassads = "ads" %}
33-
{% endif %}
29+
{%- if style.class -%}
30+
{%- assign divclassads = style.class -%}
31+
{%- else -%}
32+
{%- assign divclassads = "ads" -%}
33+
{%- endif -%}
3434

35-
{% if pageadsstyle == "horizontal" %}
35+
{%- if pageadsstyle == "horizontal" -%}
3636
<div class="row">
37-
{% endif %}
37+
{%- endif -%}
3838
<aside class="{{ divclassads }}">
3939
<style>
4040
.responsive-ads {
41-
{% if style.display %}display: {{ style.display }};{% endif %}
41+
{%- if style.display -%}display: {{ style.display }};{%- endif -%}
4242
width: {{ style.width }}px;
4343
height: {{ style.height }}px; }
44-
{% for min in style.min %}@media(min-width: {{ min.basewidth }}px) { .responsive-ads { width: {{ min.width }}px; height: {{ min.height }}px; } }{% endfor %}
44+
{%- for min in style.min -%}@media(min-width: {{ min.basewidth }}px) { .responsive-ads { width: {{ min.width }}px; height: {{ min.height }}px; } }{%- endfor -%}
4545
</style>
4646
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
4747
<ins class="adsbygoogle responsive-ads"
@@ -52,10 +52,10 @@
5252
(adsbygoogle = window.adsbygoogle || []).push({});
5353
</script>
5454
</aside><!-- /.ads -->
55-
{% if pageadsstyle == "horizontal" %}
55+
{%- if pageadsstyle == "horizontal" -%}
5656
</div> <!-- end div class="row" -->
57-
{% endif %}
58-
{% else %}
57+
{%- endif -%}
58+
{%- else -%}
5959
<!-- Não estilo "{{ pageadsstyle }} defino para uso! veja a configuração "page.ads.style" para ver se está correto -->
60-
{% endif %}
61-
{% endif %}
60+
{%- endif -%}
61+
{%- endif -%}

_includes/authorbox.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
{% if author %}
2-
{% assign author = site.data.authors[author[0]] %}
3-
{% elsif page.author %}
4-
{% assign author = site.data.authors[page.author] %}
5-
{% else %}
6-
{% assign author = site.data.authors[site.author] %}
7-
{% endif %}
1+
{%- if author -%}
2+
{%- assign author = site.data.authors[author[0]] -%}
3+
{%- elsif page.author -%}
4+
{%- assign author = site.data.authors[page.author] -%}
5+
{%- else -%}
6+
{%- assign author = site.data.authors[site.author] -%}
7+
{%- endif -%}
88
<!-- Author Box -->
9-
{% if author %}
9+
{%- if author -%}
1010
<div class="row post-top-meta">
1111
<div class="col-md-2">
1212
<img class="author-thumb" src="https://www.gravatar.com/avatar/{{ author.gravatar }}?s=250&d=mm&r=x" alt="{{ author.display_name }}">
@@ -16,4 +16,4 @@
1616
<span class="author-description">{{ author.description }}</span>
1717
</div>
1818
</div>
19-
{% endif %}
19+
{%- endif -%}

_includes/featuredbox.html

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
<!-- begin post -->
2-
{% if post.author %}
3-
{% assign author = site.data.authors[page.author] %}
4-
{% else %}
5-
{% assign author = site.data.authors[site.author] %}
6-
{% endif %}
7-
2+
{%- if post.author -%}
3+
{%- assign author = site.data.authors[page.author] -%}
4+
{%- else -%}
5+
{%- assign author = site.data.authors[site.author] -%}
6+
{%- endif -%}
7+
{%- if post.image.feature -%}
8+
{%- assign imageurl = post.image.feature -%}
9+
{%- elsif post.image -%}
10+
{%- assign imageurl = post.image -%}
11+
{%- endif -%}
812
<div class="col-sm-6">
913
<div class="card">
1014
<div class="row">
11-
{% if post.image %}
15+
{%- if imageurl -%}
1216
<div class="col-md-5 wrapthumbnail">
1317
<a href="{{ post.url | absolute_url }}">
14-
<div class="thumbnail" style="background-image:url({{ site.baseurl }}/{{ post.image }});">
18+
<div class="thumbnail" style="background-image:url({{ site.baseurl }}/{{ imageurl }});">
1519
</div>
1620
</a>
1721
</div>
18-
{% endif %}
22+
{%- endif -%}
1923
<div class="col-md-7">
2024
<div class="card-block">
2125
<h2 class="card-title"><a href="{{ post.url | absolute_url }}">{{ post.title }}</a></h2>
2226
<h4 class="card-text">{{ post.excerpt | strip_html | truncatewords:25 }}</h4>
2327
<div class="metafooter">
2428
<div class="wrapfooter">
25-
{% if post.author %}
29+
{%- if post.author -%}
2630
<span class="meta-footer-thumb">
2731
<img class="author-thumb" src="https://www.gravatar.com/avatar/{{ author.gravatar }}?s=250&d=mm&r=x" alt="{{ author.display_name }}">
2832
</span>
2933
<span class="author-meta">
3034
<span class="post-name"><a target="_blank" href="{{ author.web }}">{{ author.display_name }}</a></span><br/>
31-
{% endif %}
35+
{%- endif -%}
3236
<span class="post-date">{{ post.date | date_to_string }}</span>
3337
</span>
3438
<span class="post-read-more"><a href="{{ post.url | absolute_url }}" title="Read Story"><i class="fa fa-link"></i></a></span>

_includes/pagination.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<nav class="pagination" role="pagination">
2-
{% if paginator.previous_page %}
3-
{% if paginator.previous_page == 1 %}
2+
{%- if paginator.previous_page -%}
3+
{%- if paginator.previous_page == 1 -%}
44
<a class="newer-posts" href="{{site.baseurl}}/" title="Previous Page">&laquo; Newer</a>
5-
{% else %}
5+
{%- else -%}
66
<a class="newer-posts" href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" title="Previous Page">&laquo; Newer </a>
7-
{% endif %}
8-
{% endif %}
7+
{%- endif -%}
8+
{%- endif -%}
99
<span class="page-number"> &nbsp; &nbsp; Page {{paginator.page}} of {{paginator.total_pages}} &nbsp; &nbsp; </span>
10-
{% if paginator.next_page %}
10+
{%- if paginator.next_page -%}
1111
<a class="older-posts" href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" title="Next Page">Older &raquo;</a>
12-
{% endif %}
12+
{%- endif -%}
1313
</nav>

_includes/postbox.html

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
11
<!-- begin post -->
2-
{% if page.author %}
3-
{% assign author = site.data.authors[page.author] %}
4-
{% else %}
5-
{% assign author = site.data.authors[site.author] %}
6-
{% endif %}
7-
2+
{%- if page.author -%}
3+
{%- assign author = site.data.authors[page.author] -%}
4+
{%- else -%}
5+
{%- assign author = site.data.authors[site.author] -%}
6+
{%- endif -%}
7+
{%- if post.image.feature -%}
8+
{%- assign imageurl = post.image.feature -%}
9+
{%- elsif post.image -%}
10+
{%- assign imageurl = post.image -%}
11+
{%- endif -%}
812
<div class="col-md-6 grid-item">
913
<div class="card">
14+
{%- if posturl -%}
1015
<a href="{{ post.url | absolute_url }}">
11-
{% if post.image %} <img class="img-fluid" src="{{ site.baseurl }}/{{ post.image }}" alt="{{ post.title }}"> {% endif %}
16+
<img class="img-fluid" src="{{ site.baseurl }}/{{ imageurl }}" alt="{{ post.title }}">
1217
</a>
18+
{%- endif -%}
1319
<div class="card-block">
1420
<h2 class="card-title"><a href="{{ post.url | absolute_url }}">{{ post.title }}</a></h2>
1521
<h4 class="card-text">{{ post.excerpt | strip_html | truncatewords:30 }}</h4>
1622
<div class="metafooter">
1723
<div class="wrapfooter">
18-
{% if post.author %}
24+
{%- if post.author -%}
1925
<span class="meta-footer-thumb">
2026
<img class="author-thumb" src="https://www.gravatar.com/avatar/{{ author.gravatar }}?s=250&d=mm&r=x" alt="{{ author.display_name }}">
2127
</span>
2228
<span class="author-meta">
2329
<span class="post-name"><a target="_blank" href="{{ author.web }}">{{ author.display_name }}</a></span><br/>
24-
{% endif %}
30+
{%- endif -%}
2531
<span class="post-date">{{ post.date | date_to_string }}</span>
2632
</span>
2733
<span class="post-read-more"><a href="{{ post.url | absolute_url }}" title="Read Story"><i class="fa fa-link"></i></a></span>

_includes/postlistbox.html

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,46 @@
1-
{% if include.featured and include.featured == true %}
2-
{% assign featured = include.featured %}
1+
{%- if include.featured == true -%}
2+
{%- assign featured = true -%}
33
<section class="featured-posts">
44
<div class="section-title">
55
<h2><span>Em Destaque</span></h2>
66
</div>
77
<div class="row listfeaturedtag">
8-
{% else %}
9-
{% assign featured = false %}
10-
{% if paginator.previous_page %}
11-
{% if paginator.previous_page > 0 %}
8+
{%- else -%}
9+
{%- assign featured = false -%}
10+
{%- if paginator.previous_page and paginator.previous_page > 0 -%}
1211
<div id="jumptopageof"></div>
13-
{% endif %}
14-
{% endif %}
12+
{%- endif -%}
1513
<section class="recent-posts row">
1614
<div class="col-sm-4">
17-
{% include sidebar.html ads='true' %}
15+
{%- include sidebar.html ads='true' -%}
1816
</div>
1917
<div class="col-sm-8">
2018
<div class="section-title">
2119
<h2><span>Nossas Publicações</span></h2>
2220
</div>
2321
<div class="masonrygrid row listrecent">
24-
{% endif %}
25-
{% if featured == true %}
26-
{% for post in site.posts %}
27-
{% if post.featured == true %}
28-
{% include featuredbox.html %}
29-
{% endif %}
30-
{% endfor %}
31-
{% else %}
32-
{% for post in paginator.posts %}
33-
{% unless post.featured %}
34-
{% include postbox.html %}
35-
{% endunless %}
36-
{% endfor %}
37-
{% endif %}
22+
{%- endif -%}
23+
{%- if featured == true -%}
24+
{%- for post in site.posts -%}
25+
{%- if post.featured == true -%}
26+
{%- include featuredbox.html -%}
27+
{%- endif -%}
28+
{%- endfor -%}
29+
{%- else -%}
30+
{%- for post in paginator.posts -%}
31+
{%- unless post.featured -%}
32+
{%- include postbox.html -%}
33+
{%- endunless -%}
34+
{%- endfor -%}
35+
{%- endif -%}
3836
</div>
39-
{% if featured != true %}
37+
{%- if featured != true -%}
4038
<!-- Pagination -->
4139
<div class="bottompagination">
4240
<span class="navigation" role="navigation">
43-
{% include pagination.html %}
41+
{%- include pagination.html -%}
4442
</span>
4543
</div>
46-
{% endif %}
44+
{%- endif -%}
4745
</div>
4846
</section>

_includes/repositorybox.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
<!-- begin post -->
2-
{% if page.author %}
3-
{% assign author = site.data.authors[page.author] %}
4-
{% else %}
5-
{% assign author = site.data.authors[site.author] %}
6-
{% endif %}
2+
{%- if page.author -%}
3+
{%- assign author = site.data.authors[page.author] -%}
4+
{%- else -%}
5+
{%- assign author = site.data.authors[site.author] -%}
6+
{%- endif -%}
77

88
<div class="col-sm-6">
99
<div class="card">
1010
<div class="row">
11-
{% if post.image %}
11+
{%- if post.image -%}
1212
<div class="col-md-5 wrapthumbnail">
1313
<a href="{{ post.url | absolute_url }}">
1414
<div class="thumbnail" style="background-image:url({{ site.baseurl }}/{{ post.image }});">
1515
</div>
1616
</a>
1717
</div>
18-
{% endif %}
18+
{%- endif -%}
1919
<div class="col-md-7">
2020
<div class="card-block">
2121
<h2 class="card-title"><a href="{{ post.url | absolute_url }}">{{ post.title }}</a></h2>
2222
<h4 class="card-text">{{ post.excerpt | strip_html | truncatewords:25 }}</h4>
2323
<div class="metafooter">
2424
<div class="wrapfooter">
25-
{% if post.author %}
25+
{%- if post.author -%}
2626
<span class="meta-footer-thumb">
2727
<img class="author-thumb" src="https://www.gravatar.com/avatar/{{ author.gravatar }}?s=250&d=mm&r=x" alt="{{ author.display_name }}">
2828
</span>
2929
<span class="author-meta">
3030
<span class="post-name"><a target="_blank" href="{{ author.web }}">{{ author.display_name }}</a></span><br/>
31-
{% endif %}
31+
{%- endif -%}
3232
<span class="post-date">{{ post.date | date_to_string }}</span>
3333
</span>
3434
<span class="post-read-more"><a href="{{ post.url | absolute_url }}" title="Read Story"><i class="fa fa-link"></i></a></span>

0 commit comments

Comments
 (0)