-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add explanatory text above the cards on /projects page
- Loading branch information
1 parent
150e2c1
commit 8ea17f0
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
+++ | ||
title = "Projects" | ||
sort_by = "weight" | ||
template = "cards.html" | ||
template = "cards-with-pre-text.html" | ||
|
||
[extra] | ||
pre_cards_text = """ | ||
Here is an overview of most of my hobby projects. | ||
Note that projects I have worked on professionally (i.e. for clients) are not shown here. | ||
""" | ||
+++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{% extends "base.html" %} | ||
|
||
<!-- Based on cards.html from apollo, but with an explanatory text before the cards come --> | ||
|
||
{% block main_content %} | ||
{% if section.extra.section_path -%} | ||
{% set section = get_section(path=section.extra.section_path) %} | ||
{% endif -%} | ||
|
||
{{ post_macros::page_header(title=section.title) }} | ||
|
||
<main> | ||
<p> | ||
{{ section.extra.pre_cards_text }} | ||
</p> | ||
|
||
{%- if paginator %} | ||
{%- set show_pages = paginator.pages -%} | ||
{% else %} | ||
{%- set show_pages = section.pages -%} | ||
{% endif -%} | ||
|
||
{{ post_macros::cards_posts(pages=show_pages) }} | ||
</main> | ||
|
||
{% if paginator %} | ||
<ul class="pagination"> | ||
{% if paginator.previous %} | ||
<span class="page-item page-prev"> | ||
<a href={{ paginator.previous }} class="page-link" aria-label="Previous"><span aria-hidden="true">← Prev</span></a> | ||
</span> | ||
{% endif %} | ||
|
||
{% if paginator.next %} | ||
<span class="page-item page-next"> | ||
<a href={{ paginator.next }} class="page-link" aria-label="Next"><span aria-hidden="true">Next →</span></a> | ||
</span> | ||
{% endif %} | ||
</ul> | ||
{% endif %} | ||
{% endblock main_content %} |