Add static news entry on start page

This commit is contained in:
Ramon Wenger 2018-10-31 16:27:53 +01:00
parent bb5172bde5
commit 4deac16b5d
2 changed files with 12 additions and 17 deletions

View File

@ -1,19 +1,18 @@
<template> <template>
<div class="news-teaser"> <a class="news-teaser" :href="url" target="_blank">
<div class="news-teaser__image"> <img class="news-teaser__image" :src="imageUrl">
</div>
<div class="news-teaser__text teaser-text"> <div class="news-teaser__text teaser-text">
<h4 class="teaser__title small-emph">{{title}}</h4> <h4 class="teaser__title small-emph">{{title}}</h4>
<div class="teaser__date"> <div class="teaser__date">
<p>{{date}}</p> <p>{{date}}</p>
</div> </div>
</div> </div>
</div> </a>
</template> </template>
<script> <script>
export default { export default {
props: ['title', 'date', 'imageUrl'] props: ['title', 'date', 'imageUrl', 'url']
} }
</script> </script>
@ -22,11 +21,16 @@
@import "@/styles/_functions.scss"; @import "@/styles/_functions.scss";
.news-teaser { .news-teaser {
display: block;
@supports (display: grid) { @supports (display: grid) {
display: grid; display: grid;
} }
grid-template-columns: 1fr 2fr; grid-template-columns: 1fr 2fr;
grid-column-gap: 10px; grid-column-gap: 10px;
&__image {
width: 100px;
}
} }
.teaser { .teaser {

File diff suppressed because one or more lines are too long