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:
Matthew Grove
2019-01-28 14:06:27 +00:00
parent 2480703ba1
commit 607ec3990c
6 changed files with 17 additions and 163 deletions

View File

@@ -70,15 +70,7 @@
<i class="material-icons mdc-list-item__graphic" aria-hidden="true">home</i>
<span class="mdc-list-item__text">Home Page</span>
</a>
<div class="mdc-list-group">
<h3 class="mdc-list-group__subheader">Articles</h3>
<a class="mdc-list-item" href="/articles/2019/01/01/article-name.html" data-mdc-auto-init="MDCRipple">
<i class="material-icons mdc-list-item__graphic" aria-hidden="true">assignment</i>
<span class="mdc-list-item__text">Title</span>
</a>
</div>
</nav>
</div>
</aside>
@@ -105,25 +97,10 @@
<main class="main-content" id="main-content">
<div class="mdc-top-app-bar--short-fixed-adjust">
<div class="mdc-card">
<div class="mdc-card__media mdc-card__media--16-9 -articles-2019-01-01-article-name-html"></div>
<div class="mdc-card-content">
<h2 class="mdc-typography--headline6">Title</h2>
<h3 class="mdc-typography--subtitle2">
<time class="timeago" datetime="2019-01-01T07:01:00">Tuesday 1 January 2019</time>
| by Name
</h3>
</div>
<div class="mdc-card__actions">
<div class="mdc-card__action-buttons">
<button class="mdc-button mdc-card__action mdc-card__action--button" data-mdc-auto-init="MDCRipple" onclick="window.location='/articles/2019/01/01/article-name.html';">Read</button>
</div>
</div>
</div>
<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>
.-articles-2019-01-01-article-name-html {
background-image: url("/images/2019-01-01-article-name--cover.jpg");
center {
margin: 25vh auto 25vh auto;
}
</style>