feat: add Channel component
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
This commit is contained in:
parent
8ce2d52044
commit
1d79f680df
1 changed files with 23 additions and 5 deletions
|
@ -1,14 +1,19 @@
|
|||
<template>
|
||||
<div>
|
||||
<a class="channel-list-link" :href="href">
|
||||
{{ name }}
|
||||
</a>
|
||||
<div v-if="current" class="channel-list-link-container">
|
||||
<NuxtLink class="channel-list-link" :href="props.href">
|
||||
# {{ name }}
|
||||
</NuxtLink>
|
||||
</div>
|
||||
<div v-else class="channel-list-link-container current-channel">
|
||||
<NuxtLink class="channel-list-link" :href="props.href">
|
||||
# {{ name }}
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
||||
const props = defineProps<{ name: string, href: string }>();
|
||||
const props = defineProps<{ name: string, href: string, current?: boolean }>();
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -16,5 +21,18 @@ const props = defineProps<{ name: string, href: string }>();
|
|||
.channel-list-link {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
padding-left: .5dvw;
|
||||
padding-right: .5dvw;
|
||||
}
|
||||
|
||||
.channel-list-link-container {
|
||||
text-align: left;
|
||||
display: flex;
|
||||
height: 4dvh;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.current-channel {
|
||||
background-color: rgb(70, 70, 70);
|
||||
}
|
||||
</style>
|
Loading…
Add table
Add a link
Reference in a new issue