summaryrefslogtreecommitdiffstats
path: root/templates/layouts/categorized_list.html
blob: 101f7592a8a77ae863b4a353b23cdaa070ea6d4a (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
<main itemprop="mainPart" itemscope itemtype="https://schema.org/DataFeed" itemid="$url.full$">
    <div class="l-container l-container--pad-x l-container--pad-y l-container--narrow h-feed">        
        <header class="s-colored-links">
            <h1 class="o-heading o-heading--xxl u-mt-0 p-name" itemprop="name headline">
                <span class="o-heading__primary">$title$</span>
            </h1>

$body$
        </header>

        $if(notoc)$$else$
            <nav class="c-hnav s-invisible-links" aria-label="Sections">
                <h2 class="u-mt-0">Jump to</h2>
                $for(list)$
                    <a class="c-hnav__item" href="#$it.slug$">$it.title$</a>
                $endfor$
            </nav>
        $endif$

        <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-colored-links">$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$
                            $it.items:partials/list_card()$
                        $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>
    </div>
</main>