mirror of
https://github.com/mgrove36/bbc-young-reporter.git
synced 2026-03-03 03:17:07 +00:00
Account for when no articles exist
When no articles exist, the navbar doesn't show the 'Articles' title, and the home page displays an appropriate message
This commit is contained in:
9
index.md
9
index.md
@@ -4,6 +4,7 @@ description: News articles written by Reading School students in year 8
|
||||
layout: article-list
|
||||
---
|
||||
|
||||
{% if site.categories.articles %}
|
||||
{% for article in site.categories.articles %}
|
||||
<div class="mdc-card">
|
||||
<div class="mdc-card__media mdc-card__media--16-9 {{ article.url | relative_url | replace: '/', '-' | replace: '.', '-' }}"></div>
|
||||
@@ -27,3 +28,11 @@ layout: article-list
|
||||
}
|
||||
</style>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<center>We haven't got any articles for you yet! Come back during this year's BBC Young Reporter day to see what Reading School's year 8 students have produced!</center>
|
||||
<style>
|
||||
center {
|
||||
margin: 25vh auto 25vh auto;
|
||||
}
|
||||
</style>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user