Skip to content

Commit

Permalink
add tags to previews and headlines
Browse files Browse the repository at this point in the history
  • Loading branch information
LepkoQQ committed Apr 30, 2020
1 parent 204bf01 commit 0d289fe
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
16 changes: 16 additions & 0 deletions src/components/NgArticleHeadline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
></div>
</div>
<div class="article-content">
<div class="tags">
<div class="tag">FACT REPORTING AND ANALISYS</div>
</div>
<h4 class="article-title">Lorem ipsum dolor sit amet</h4>
<router-link class="read-more" :to="`/event/${articleId}`">
Read more
Expand Down Expand Up @@ -104,6 +107,19 @@ export default {
.article-content {
margin-left: 1rem;
.tags {
display: flex;
margin-bottom: 0.25rem;
.tag {
display: inline-block;
font-size: 0.65rem;
background-color: #07f;
color: #fff;
padding: 0.25rem 0.5rem;
}
}
.article-title {
display: inline;
margin: 0;
Expand Down
19 changes: 19 additions & 0 deletions src/components/NgArticlePreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<!-- TODO: replace (>) with icon -->
</router-link>
</div>
<div v-if="showTags" class="tags">
<div class="tag">FACT REPORTING AND ANALISYS</div>
</div>
<div class="article-content">
<h4 class="article-title">Lorem ipsum dolor sit amet</h4>
<div class="article-description">
Expand Down Expand Up @@ -49,6 +52,10 @@ export default {
type: String,
default: '',
},
showTags: {
type: Boolean,
default: false,
},
},
};
</script>
Expand Down Expand Up @@ -110,6 +117,18 @@ export default {
}
}
.tags {
margin: 0.75rem 0 0.5rem;
.tag {
display: inline-block;
font-size: 0.75rem;
background-color: #07f;
color: #fff;
padding: 0.25rem 0.5rem;
}
}
.article-info {
padding: 0 0.65rem 0.65rem;
Expand Down
7 changes: 6 additions & 1 deletion src/components/NgListing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
</div>
<div class="event-articles">
<div class="event-article-container" v-for="n in 3" :key="n">
<ng-article-preview v-if="i === 0" :article-id="event.id" :image="event.image" />
<ng-article-preview
v-if="i === 0"
:article-id="event.id"
:image="event.image"
show-tags
/>
<ng-article-headline v-else :article-id="event.id" :image="event.image" />
</div>
</div>
Expand Down

0 comments on commit 0d289fe

Please sign in to comment.