summaryrefslogtreecommitdiffstats
path: root/tpl/objects/card.pug
blob: d7595d1030c12a0c34c7f26aa2a9f433f8167c90 (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
mixin card
    -
        let classes = {
            'o-card':        true,
            'o-card--quiet': !!attributes.quiet,
        }

        if (attributes.class) {
            classes[attributes.class] = true;
        }

    if attributes.href
        a(href=attributes.href class=classes)
            block
    else
        div(class=classes)
            block

mixin card-image
    .o-card__image
        img.o-card__image-img(src=attributes.src style=attributes.style)

mixin card-body
    .o-card__body(style=attributes.style)
        block

mixin card-title 
    h1.o-card__title
        block

mixin card-avatar 
    +avatar(class='o-card__avatar' src=attributes.src size='xl')

mixin card-content 
    .o-card__content
        block
mixin card-footer
    footer.o-card__footer
        block