summaryrefslogtreecommitdiffstats
path: root/templates/partials/related.html
blob: 7d29c7ad7739be71f8d5d114aaa2efb3adfd8d58 (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
$if(related)$
    <footer>
        <hr class="u-mt-700" />
        
        <div class="l-card-list">
            <header class="l-card-list__header">
                <h2 class="s-invisible-links u-mt-0">
                    $if(related.url)$
                        <a href="$related.url.rel$">Related</a>
                    $else$
                        Related
                    $endif$
                </h2>
            </header>
            <div class="l-card-list__cards l-card-list__cards--$related.layout.id$">
                $if(related.layout.is_grid-2)$
                    $related.prev:partials/grid_card()$
                    $related.next:partials/grid_card()$
                $elseif(related.layout.is_grid-3)$
                    $related.prev:partials/grid_card()$
                    $related.next:partials/grid_card()$
                $elseif(related.layout.is_gallery-2)$
                    $related.prev:partials/gallery_card()$
                    $related.next:partials/gallery_card()$
                $elseif(related.layout.is_gallery-3)$
                    $related.prev:partials/gallery_card()$
                    $related.next:partials/gallery_card()$
                $else$
                    <div class="u-d-contents u-d-none@sm-lo">
                        $related.prev:partials/list_card()$
                        $related.next:partials/list_card()$
                    </div>
                    <div class="u-d-contents u-d-none@sm-hi">
                        $related.prev:partials/grid_card()$
                        $related.next:partials/grid_card()$
                    </div>
                $endif$
            </div>
        </div>
    </footer>
$endif$