Skip to content

Commit

Permalink
Pagination style
Browse files Browse the repository at this point in the history
  • Loading branch information
martins-rafael committed Nov 19, 2020
1 parent 8a8a068 commit 90ec16b
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 17 deletions.
29 changes: 22 additions & 7 deletions public/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ body {
max-width: 940px;
}

.list {
margin-bottom: auto;
}

header .container {
display: grid;
grid-template-columns: 92px 1fr 1fr;
Expand Down Expand Up @@ -231,18 +235,29 @@ button.btn-delete:hover {
==== PAGINATION ====
================= */

.container .pagination {
margin: 16px 0;
.pagination {
margin: auto 0 32px;
text-align: center;
}

.container .pagination a,
.container .pagination span {
.pagination a {
padding: 4px 8px;
border-radius: 4px;
border: 2px solid var(--color-purple);
}

.pagination a,
.pagination span {
margin-right: 16px;
transition: .2s;
}

.container .pagination a:hover {
font-weight: bold;
border-bottom: 1px solid var(--color-default-black);
.pagination a.active {
background-color: var(--color-purple);
color: var(--color-white-paper);
}

.pagination a:hover {
color: var(--color-white-paper);
background-color: var(--color-purple);
}
4 changes: 4 additions & 0 deletions public/styles/main/about.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.about {
margin: auto;
}

.about h1 {
font-size: 24px;
}
Expand Down
2 changes: 1 addition & 1 deletion public/styles/main/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ section.banner {

section.most-popular {
margin-top: 40px;
margin-bottom: auto;
}

footer {
margin-top: auto;
background-color: #eee;
}

Expand Down
1 change: 1 addition & 0 deletions public/styles/sessions/index.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
section.session.container {
margin-bottom: auto;
max-width: 500px;
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/views/admin/chefs/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
</div>

{{ section.chefs("", chefs) }}
{% include "templates/includes/pagination.njk" %}
</section>
{% include "templates/includes/pagination.njk" %}
{% endblock %}
2 changes: 1 addition & 1 deletion src/app/views/admin/recipes/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
</div>
{% endfor %}
</div>
{% include "templates/includes/pagination.njk" %}
</section>
{% include "templates/includes/pagination.njk" %}
{% endblock %}
4 changes: 2 additions & 2 deletions src/app/views/main/chefs.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
{% endblock %}

{% block content %}
<section class="container">
<section class="container list">
{{ section.chefs("total_recipes", chefs) }}
{% include "templates/includes/pagination.njk" %}
</section>
{% include "templates/includes/pagination.njk" %}
{% endblock %}
5 changes: 2 additions & 3 deletions src/app/views/main/recipes.njk
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
{% endblock %}

{% block content %}
<section class="container">
<section class="container list">
<div class="recipe-container">
{% for recipe in recipes %}
{% include "templates/includes/recipes/recipe-card.njk" %}
{% endfor %}
</div>

{% include "templates/includes/pagination.njk" %}
</section>
{% include "templates/includes/pagination.njk" %}
{% endblock %}
3 changes: 1 addition & 2 deletions src/app/views/users/list.njk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
</div>
{% endfor %}
</div>

{% include "templates/includes/pagination.njk" %}
</section>
{% include "templates/includes/pagination.njk" %}
{% endblock %}

0 comments on commit 90ec16b

Please sign in to comment.