summaryrefslogtreecommitdiffstats
path: root/templates/layouts/categorized_list.html
blob: 6c3c7f3d30099bfd3b94b2cedaa75185a710e060 (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
<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">
        <h1 class="o-heading 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">
                    <h2 class="s-invisible-links 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$ 
                </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">
                        <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>