summaryrefslogtreecommitdiffstats
path: root/partials/_figure.p
blob: df7c6535dfa8c7e3acac6431acb1fdb08efe16c3 (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
@USE
/partials/_picture.p

@figure[images;default_type;.caption;.alt;.height;.href]
^if(def $alt){
    $resolved_alt[$alt]
}(def $caption){
    $resolved_alt[$caption]
}

<figure class="figure">
# HACK боже какое оно вонючее
    ^if(def $href){
        <a href="$href">
    }
    ^picture[$images;$default_type;
        $.alt[$resolved_alt]
        $.height[$height]
        $.class[image]
    ]
    ^if(def $href){
        </a>
    }

    ^if(def $caption){
        <figcaption class="caption">$caption</figcaption>
    }
</figure>
#end @figure[]