Skip to content

Commit fa9d1ac

Browse files
authored
Merge pull request #41 from thiagoreis/master
Criando botão "ver mais eventos..." e adicionando paginação
2 parents b2c8e06 + 45122cd commit fa9d1ac

File tree

6 files changed

+74
-7
lines changed

6 files changed

+74
-7
lines changed

_config.yml

+4
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ markdown: kramdown
2222
# Google-analytics
2323
google-analytics:
2424
id: "UA-109844866-1"
25+
plugins:
26+
- jekyll-paginate
27+
paginate: 4
28+
paginate_path: "/eventos/page:num"

_includes/banner.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="inner">
22
<h2>
3-
<img id="logo" src="images/logo-cinza-azul.png" title="{{site.title}}" alt="logo do PHPDF" />
3+
<img id="logo" src="/images/logo-cinza-azul.png" title="{{site.title}}" alt="logo do PHPDF" />
44
</h2>
55

66
<p>

_includes/eventos.html

+13-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h2>Encontros e eventos</h2>
66
</p>
77
</header>
88
<ul class="features">
9-
{% for post in site.categories.eventos %}
9+
{% for post in site.categories.eventos limit:4 %}
1010
<li class="icon fa-{{ post.icon | escape }}">
1111
<h3>{{ post.title | escape }}</h3>
1212
{% assign date_format = site.minima.date_format | default: "%d/%m/%Y · %k:%M" %}
@@ -16,11 +16,22 @@ <h3>{{ post.title | escape }}</h3>
1616
{{ post.description }}
1717
</span>
1818

19-
{% if(post.link && post.link != '') %}
19+
{% if(post.link and post.link != '') %}
2020
<a href="{{ post.link }}" class="button fit" target="_blank">Saiba mais</a>
2121
{% endif %}
22+
2223
</p>
2324
</li>
2425
{% endfor %}
26+
2527
</ul>
28+
29+
</div>
30+
<div class="inner">
31+
<ul class="features">
32+
<li>
33+
<a href="/eventos" class="button fit">VER MAIS EVENTOS...</a>
34+
</li>
35+
</ul>
36+
2637
</div>

_includes/header.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<header id="header" class="alt">
33
<h1>
44
<a href="{{ site.baseurl }}">
5-
<img id="logo" src="images/logo-branca.png" title="{{site.title}}" alt="logo do PHPDF" />
5+
<img id="logo" src="/images/logo-branca.png" title="{{site.title}}" alt="logo do PHPDF" />
66
</a>
77
</h1>
88
<nav id="nav">

_includes/menu.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<ul>
22
<li>
3-
<a href="#palestrante" title="Quer ser um palestrante?">
3+
<a href="/#palestrante" title="Quer ser um palestrante?">
44
<span>Quer ser um palestrante?</span>
55
</a>
66
</li>
77
<li>
8-
<a href="#eventos" title="Eventos">
8+
<a href="/#eventos" title="Eventos">
99
<span>Eventos</span>
1010
</a>
1111
</li>
1212
<li>
13-
<a href="#patrocinadores" title="Parceiros">
13+
<a href="/#patrocinadores" title="Parceiros">
1414
<span>Parceiros</span>
1515
</a>
1616
</li>

eventos/index.html

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
layout: default
3+
---
4+
<!-- Banner -->
5+
<section id="banner">
6+
{% include banner.html %}
7+
</section>
8+
9+
<section id="eventos_board" class="wrapper eventos_board special">
10+
11+
<div class="inner">
12+
<header class="major">
13+
<h2>Encontros e eventos</h2>
14+
<p>
15+
Estes são nossos encontros e eventos mais recentes.
16+
</p>
17+
</header>
18+
<ul class="features">
19+
{% for post in paginator.posts %}
20+
<li class="icon fa-{{ post.icon | escape }}">
21+
<h3>{{ post.title | escape }}</h3>
22+
{% assign date_format = site.minima.date_format | default: "%d/%m/%Y · %k:%M" %}
23+
<small>{{ post.date | date: date_format }}</small>
24+
<p>
25+
<span>
26+
{{ post.description }}
27+
</span>
28+
29+
{% if(post.link and post.link != '') %}
30+
<a href="{{ post.link }}" class="button fit" target="_blank">Saiba mais</a>
31+
{% endif %}
32+
</p>
33+
</li>
34+
{% endfor %}
35+
</ul>
36+
<!-- Pagination links -->
37+
<div class="pagination">
38+
{% if paginator.previous_page %}
39+
<a href="{{ paginator.previous_page_path }}" class="previous">Anterior - </a>
40+
{% else %}
41+
<span class="previous">Anterior - </span>
42+
{% endif %}
43+
<span class="page_number ">Página: {{ paginator.page }} de {{ paginator.total_pages }}</span>
44+
{% if paginator.next_page %}
45+
<a href="{{ paginator.next_page_path }}" class="next">- Próxima</a>
46+
{% else %}
47+
<span class="next ">- Próxima</span>
48+
{% endif %}
49+
</div>
50+
</div>
51+
52+
</section>

0 commit comments

Comments
 (0)