Commit 66b2ae81 authored by David Trattnig's avatar David Trattnig
Browse files

Display subtitle on show list

parent afd3f309
<script>
import { onMount } from 'svelte'
import Select, { Option } from '@smui/select';
import Select, { Option } from '@smui/select'
import { fetchApi } from './common/Common.svelte'
import ShowCardMedium from './cards/ShowCardMedium.svelte'
......@@ -21,14 +21,13 @@
let shows
let allCategories
let defaultCat = {
'id': null,
'name': labelAllShows,
'description': ''
}
id: null,
name: labelAllShows,
description: '',
}
let selectedCat
$: selectedCat && loadShows(query)
/* Initialize the component */
onMount(() => {
loadShows()
......@@ -112,7 +111,6 @@
}
return results
}
</script>
<style lang="scss">
......@@ -136,22 +134,24 @@
margin: 0;
color: #888;
}
</style>
<template>
<div class="show-list">
<h1 class="list-title">
{#if selectedCat}
<span class="category-wrapper">
<span class="category-prefix"></span>
<span class="category-title">{selectedCat.name}</span>
{#if selectedCat.id}
<i class="aura-icons">
<div class="icon-category-{selectedCat.id}" />
</i>
{/if}
</span>
<span class="category-wrapper">
<span class="category-prefix" />
<span class="category-title">
{selectedCat.name}
{#if selectedCat.subtitle}&nbsp;|&nbsp;{selectedCat.subtitle}{/if}
</span>
{#if selectedCat.id}
<i class="aura-icons">
<div class="icon-category-{selectedCat.id}" />
</i>
{/if}
</span>
{/if}
{#if language}
......@@ -162,17 +162,21 @@
</h1>
{#if selectedCat}
<p class="category-description cat-{selectedCat.id}">{selectedCat.description}</p>
<p class="category-description cat-{selectedCat.id}">
{selectedCat.description}
</p>
{/if}
{#if allCategories && enableCategoryDropdown}
<Select class="shaped-outlined" variant="outlined" bind:value={selectedCat}>
<Option value="{defaultCat}">{defaultCat.name}</Option>
{#each allCategories as cat}
<Option value={cat}>{cat.name}</Option>
{/each}
</Select>
<Select
class="shaped-outlined"
variant="outlined"
bind:value={selectedCat}>
<Option value={defaultCat}>{defaultCat.name}</Option>
{#each allCategories as cat}
<Option value={cat}>{cat.name}</Option>
{/each}
</Select>
{/if}
<div class="card-container list">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment