Use front matter to define page icon/description

This commit is contained in:
Spotlight 2022-07-16 16:38:18 -05:00
commit ad87ea36aa
No known key found for this signature in database
GPG key ID: 874AA355B3209BDC
5 changed files with 27 additions and 7 deletions

View file

@ -2,5 +2,26 @@
layout: no-section
---
<div class="section">
<div class="center">
{% comment %}
Only set an icon if one is available for the page.
{% endcomment %}
{% if page.icon %}
<h1><i class="mdi mdi-{{ page.icon }}"></i> {{ page.title }}</h1>
{% else %}
<h1>{{ page.title }}</h1>
{% endif %}
{% comment %}
We'd rather not provide an empty tag for the description
wherever possible.
{% endcomment %}
{% if page.description %}
<p>{{ page.description }}</p>
{% endif %}
</div>
<h1 class="center"></h1>
{{ content }}
</div>

View file

@ -1,9 +1,9 @@
---
title: Donators
icon: account-multiple
description: We thank all of our donators. They ensure that WiiLink will thrive for years to come!
---
<h1 class="center"><i class="mdi mdi-account-multiple"></i> Donators</h1>
<p class="center">We thank all of our donators. They ensure that WiiLink will thrive for years to come!</p>
<table>
<tr>
<th style="text-align:center">Thank you!</th>

3
faq.md
View file

@ -1,5 +1,6 @@
---
title: FAQ
icon: help-circle
---
<!-- Special styling to permit readability. -->
@ -21,8 +22,6 @@ body {
}
</style>
<h1 class="center"><i class="mdi mdi-help-circle"></i> FAQ</h1>
{% include table-of-contents.html %}
<div class="title-pair">

View file

@ -1,8 +1,8 @@
---
title: News
icon: newspaper-variant
---
<h1 class="center"><i class="mdi mdi-newspaper-variant"></i> News</h1>
<!-- Example layout of a news post
<div>
<h1>Date (MM DD, YY)</h1>

View file

@ -1,9 +1,9 @@
---
title: Services
icon: cogs
description: These are the services that we (either now or in the future) maintain and their current state in development.
---
<h1 class="center"><i class="mdi mdi-cogs"></i> Services</h1>
<p class="center">These are the services that we (either now or in the future) maintain and their current state in development.</p>
<!-- TESTING TABLE
<table>