Skip to content

Commit

Permalink
Tv/live last min (#138)
Browse files Browse the repository at this point in the history
* Live highlights in new tab

* Add card text
  • Loading branch information
phazonoverload committed Mar 3, 2024
1 parent 9aa8997 commit be7ddfe
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
1 change: 1 addition & 0 deletions components/Tv/TVCategory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
:tile="show.shows_id.tile"
:title="show.shows_id.title"
:description="show.shows_id.one_liner"
:overlay="show.shows_id.card_text"
/>
</li>
</ul>
Expand Down
23 changes: 21 additions & 2 deletions components/Tv/TVShow.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<NuxtLink :to="`/tv/${slug}`" class="show">
<img :src="`${directusUrl}/assets/${tile}?width=600`" :alt="title" />
<div class="tile" :style="`background-image: url(${directusUrl}/assets/${tile}?width=600)`">
<span v-if="overlay">{{ overlay }}</span>
</div>
<h3>{{ title }}</h3>
<p>{{ description }}</p>
</NuxtLink>
Expand All @@ -18,6 +20,7 @@ defineProps({
tile: String,
title: String,
description: String,
overlay: String,
});
</script>

Expand All @@ -26,9 +29,25 @@ defineProps({
width: 100%;
display: block;
text-decoration: none;
img {
.tile {
width: 100%;
aspect-ratio: 16/9;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
border-radius: var(--rounded-lg);
position: relative;
span {
background: var(--tv-background);
position: absolute;
right: 0;
top: 13px;
padding: 0 6px;
color: white;
border-top-left-radius: var(--rounded-md);
border-bottom-left-radius: var(--rounded-md);
font-size: 0.8rem;
}
}
h3 {
color: white;
Expand Down
2 changes: 1 addition & 1 deletion pages/tv/live/[event].vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<h2>Live Highlights</h2>
<ol v-if="highlights.length">
<li v-for="(highlight, index) in highlights" :key="highlight.title">
<a :href="highlight.url">
<a :href="highlight.url" target="_blank">
<BaseBadge v-if="index === 0" label="Latest" color="gray" />
<span>{{ highlight.title }}</span>
</a>
Expand Down

0 comments on commit be7ddfe

Please sign in to comment.