mirror of
https://github.com/iptv-org/iptv-org.github.io.git
synced 2025-05-14 11:00:05 -04:00
Init
This commit is contained in:
parent
98495b1e7a
commit
59b459dcf7
27 changed files with 3149 additions and 299 deletions
65
src/components/CountryItem.svelte
Normal file
65
src/components/CountryItem.svelte
Normal file
|
@ -0,0 +1,65 @@
|
|||
<script>
|
||||
import ChannelItem from './ChannelItem.svelte'
|
||||
|
||||
export let country
|
||||
export let channels = []
|
||||
export let normQuery
|
||||
|
||||
function onExpand() {
|
||||
country.expanded = !country.expanded
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if channels && channels.length > 0}
|
||||
<div class="card mb-3 is-shadowless" style="border: 1px solid #dbdbdb">
|
||||
<div class="card-header is-shadowless is-clickable" on:click="{onExpand}">
|
||||
<span class="card-header-title">{country.flag} {country.name}</span>
|
||||
<button class="card-header-icon" aria-label="more options">
|
||||
<span class="icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512">
|
||||
{#if !country.expanded}
|
||||
<path
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="48"
|
||||
d="M112 184l144 144 144-144"
|
||||
/>
|
||||
{/if} {#if country.expanded}
|
||||
<path
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="48"
|
||||
d="M112 328l144-144 144 144"
|
||||
/>
|
||||
{/if}
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
{#if country.expanded || (channels && channels.length > 0 && normQuery.length)}
|
||||
<div class="card-content">
|
||||
<div class="table-container">
|
||||
<table class="table" style="min-width: 100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>TVG-ID</th>
|
||||
<th>EPG</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each channels as channel}
|
||||
<ChannelItem bind:channel="{channel}"></ChannelItem>
|
||||
{/each}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
Loading…
Add table
Add a link
Reference in a new issue