summaryrefslogtreecommitdiffstats
path: root/templates/layouts/categorized_list.html
blob: 58a6dcc515f76bc941886ff1b47f0b9b24849cbe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<main
    class="c-main l-container l-container--pad-x l-container--pad-y l-container--narrow-125 h-feed"
    itemprop="mainPart"
    itemscope
    itemtype="https://schema.org/DataFeed"
    itemid="$url.full$"
>
    <header class="c-subheader s-links s-links--colored">
        <h1 class="c-subheader__title p-name" itemprop="name headline">
            $title$.
        </h1>
        $body$
    </header>

    <div class="l-card-list">
        $for(list)$
            <section class="h-entry h-feed" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/DataFeed">
                <header class="l-card-list__header">
                    <div class="l-card-list__header-section">
                        <h2 class="s-links s-links--invisible u-mt-0 p-name" id="$it.slug$" itemprop="name headline">
                            $if(it.url)$
                                <a href="$it.url.rel$">$it.title$</a>
                            $else$
                                $it.title$
                            $endif$
                        </h2>
                        $if(it.description)$
                            <div class="s-small s-links s-links--colored">$it.description$</div>
                        $endif$
                    </div>
                    $if(it.omitted)$
                        <div class="l-card-list__header-section u-d-none@sm-lo">
                            <a class="o-badge o-badge--200" href="$it.url.rel$" aria-label="$it.omitted$ more items in '$it.title$'">
                                $it.omitted$ more items <span class="u-ml-10">→</span>
                            </a>
                        </div>
                    $endif$
                </header>
                <div class="l-card-list__cards l-card-list__cards--$it.layout.id$">
                    $if(it.layout.is_grid-2)$
                        $it.items:partials/grid_card()$
                    $elseif(it.layout.is_grid-3)$
                        $it.items:partials/grid_card()$
                    $elseif(it.layout.is_gallery-2)$
                        $it.items:partials/gallery_card()$
                    $elseif(it.layout.is_gallery-3)$
                        $it.items:partials/gallery_card()$
                    $else$
                        <div class="u-d-contents u-d-none@sm-lo">
                            $it.items:partials/list_card()$
                        </div>
                        <div class="u-d-contents u-d-none@sm-hi">
                            $it.items:partials/grid_card()$
                        </div>
                    $endif$
                </div>
                $if(it.omitted)$
                    <footer class="l-card-list__footer u-d-none@sm-hi">
                        <a class="l-media__block o-badge o-badge--200" href="$it.url.rel$" aria-label="$it.omitted$ more items in '$it.title$'">
                            $it.omitted$ more items <span class="u-ml-10">→</span>
                        </a>
                    </footer>
                $endif$
            </section>
        $endfor$
    </div>
</main>