diff options
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/objects/card.pug | 8 | ||||
-rw-r--r-- | tpl/views/card.pug | 32 | ||||
-rw-r--r-- | tpl/views/divider.pug | 13 |
3 files changed, 44 insertions, 9 deletions
diff --git a/tpl/objects/card.pug b/tpl/objects/card.pug index 1db2fe5..feb1441 100644 --- a/tpl/objects/card.pug +++ b/tpl/objects/card.pug | |||
@@ -1,9 +1,11 @@ | |||
1 | mixin card | 1 | mixin card |
2 | - | 2 | - |
3 | let classes = { | 3 | let classes = { |
4 | 'o-card': true, | 4 | 'o-card': true, |
5 | 'o-card--quiet': !!attributes.quiet, | 5 | 'o-card--borderless': !!attributes.borderless, |
6 | 'o-card--thumbnail': !!attributes.thumbnail, | 6 | 'o-card--shadow': !!attributes.shadow, |
7 | 'o-card--quiet': !!attributes.quiet, | ||
8 | 'o-card--thumbnail': !!attributes.thumbnail, | ||
7 | } | 9 | } |
8 | 10 | ||
9 | if (attributes.class) { | 11 | if (attributes.class) { |
diff --git a/tpl/views/card.pug b/tpl/views/card.pug index 5e48dde..9a35b37 100644 --- a/tpl/views/card.pug +++ b/tpl/views/card.pug | |||
@@ -5,11 +5,15 @@ mixin view-card | |||
5 | +card-body | 5 | +card-body |
6 | strong= 'Lorem ipsum dolor' | 6 | strong= 'Lorem ipsum dolor' |
7 | = 'sit amet' | 7 | = 'sit amet' |
8 | +card(href='#' class='l-card-list__card') | 8 | +card(href='#' class='l-card-list__card' shadow=true) |
9 | +card-body | 9 | +card-body |
10 | strong= 'Lorem ipsum dolor' | 10 | strong= 'Lorem ipsum dolor' |
11 | = 'sit amet' | 11 | = 'sit amet' |
12 | +card(href='#' class='l-card-list__card') | 12 | +card(href='#' class='l-card-list__card' borderless=true) |
13 | +card-body | ||
14 | strong= 'Lorem ipsum dolor' | ||
15 | = 'sit amet' | ||
16 | +card(href='#' class='l-card-list__card' shadow=true borderless=true) | ||
13 | +card-body | 17 | +card-body |
14 | strong= 'Lorem ipsum dolor' | 18 | strong= 'Lorem ipsum dolor' |
15 | = 'sit amet' | 19 | = 'sit amet' |
@@ -17,15 +21,31 @@ mixin view-card | |||
17 | +divider('faint')(class='u-mb-700') | 21 | +divider('faint')(class='u-mb-700') |
18 | 22 | ||
19 | .l-card-list.l-card-list--merge | 23 | .l-card-list.l-card-list--merge |
20 | +card(href='#' class='l-card-list__card') | 24 | +card(href='#' class='l-card-list__card' borderless=true) |
21 | +card-body | 25 | +card-body |
22 | strong= 'Lorem ipsum dolor' | 26 | strong= 'Lorem ipsum dolor' |
23 | = 'sit amet' | 27 | = 'sit amet' |
24 | +card(href='#' class='l-card-list__card') | 28 | +card(href='#' class='l-card-list__card' borderless=true) |
25 | +card-body | 29 | +card-body |
26 | strong= 'Lorem ipsum dolor' | 30 | strong= 'Lorem ipsum dolor' |
27 | = 'sit amet' | 31 | = 'sit amet' |
28 | +card(href='#' class='l-card-list__card') | 32 | +card(href='#' class='l-card-list__card' borderless=true) |
33 | +card-body | ||
34 | strong= 'Lorem ipsum dolor' | ||
35 | = 'sit amet' | ||
36 | |||
37 | +divider('faint')(class='u-mb-700') | ||
38 | |||
39 | .l-card-list.l-card-list--merge.l-card-list--borderless.l-card-list--shadow | ||
40 | +card(href='#' class='l-card-list__card' borderless=true) | ||
41 | +card-body | ||
42 | strong= 'Lorem ipsum dolor' | ||
43 | = 'sit amet' | ||
44 | +card(href='#' class='l-card-list__card' borderless=true) | ||
45 | +card-body | ||
46 | strong= 'Lorem ipsum dolor' | ||
47 | = 'sit amet' | ||
48 | +card(href='#' class='l-card-list__card' borderless=true) | ||
29 | +card-body | 49 | +card-body |
30 | strong= 'Lorem ipsum dolor' | 50 | strong= 'Lorem ipsum dolor' |
31 | = 'sit amet' | 51 | = 'sit amet' |
@@ -86,7 +106,7 @@ mixin view-card | |||
86 | 106 | ||
87 | let classes = { | 107 | let classes = { |
88 | 'l-card-list': true, | 108 | 'l-card-list': true, |
89 | 'l-card-list--aspect-5/4': layout === 'grid', | 109 | 'l-card-list--aspect-5/4': ['grid', 'grid-sm'].includes(layout), |
90 | 'l-card-list--quiet': quiet, | 110 | 'l-card-list--quiet': quiet, |
91 | } | 111 | } |
92 | classes[`l-card-list--${layout}`] = true; | 112 | classes[`l-card-list--${layout}`] = true; |
diff --git a/tpl/views/divider.pug b/tpl/views/divider.pug index ea08984..5429ab5 100644 --- a/tpl/views/divider.pug +++ b/tpl/views/divider.pug | |||
@@ -12,34 +12,45 @@ mixin view-divider | |||
12 | 12 | ||
13 | .c-box | 13 | .c-box |
14 | +div-heading('xs')= 'Heading' | 14 | +div-heading('xs')= 'Heading' |
15 | +divider('quiet') | ||
16 | p= loremIpsum | ||
17 | |||
18 | .c-box | ||
19 | +div-heading('xs')= 'Heading' | ||
15 | +divider('faint') | 20 | +divider('faint') |
16 | p= loremIpsum | 21 | p= loremIpsum |
17 | 22 | ||
18 | .c-box | 23 | .c-box |
19 | +divider('strong')= 'Strong' | 24 | +divider('strong')= 'Strong' |
20 | +divider('medium')= 'Medium' | 25 | +divider('medium')= 'Medium' |
26 | +divider('quiet')= 'Quiet' | ||
21 | +divider('faint')= 'Faint' | 27 | +divider('faint')= 'Faint' |
22 | +divider('strong') | 28 | +divider('strong') |
23 | +divider('medium') | 29 | +divider('medium') |
30 | +divider('quiet') | ||
24 | +divider('faint') | 31 | +divider('faint') |
25 | 32 | ||
26 | .c-box | 33 | .c-box |
27 | .l-media(style="height: 1em") | 34 | .l-media(style="height: 1em") |
28 | +divider('strong')(vertical=true class="l-media__block") | 35 | +divider('strong')(vertical=true class="l-media__block") |
29 | +divider('medium')(vertical=true class="l-media__block") | 36 | +divider('medium')(vertical=true class="l-media__block") |
37 | +divider('quiet')(vertical=true class="l-media__block") | ||
30 | +divider('faint')(vertical=true class="l-media__block") | 38 | +divider('faint')(vertical=true class="l-media__block") |
31 | .l-media(style="height: 1em") | 39 | .l-media(style="height: 1em") |
32 | +divider('strong')(dot=true class="l-media__block") | 40 | +divider('strong')(dot=true class="l-media__block") |
33 | +divider('medium')(dot=true class="l-media__block") | 41 | +divider('medium')(dot=true class="l-media__block") |
42 | +divider('quiet')(dot=true class="l-media__block") | ||
34 | +divider('faint')(dot=true class="l-media__block") | 43 | +divider('faint')(dot=true class="l-media__block") |
35 | 44 | ||
36 | each theme in ['accent', 'negative'] | 45 | each theme in ['accent', 'negative'] |
37 | .c-box | 46 | .c-box |
38 | +divider('strong')(color=theme)= 'Strong' | 47 | +divider('strong')(color=theme)= 'Strong' |
39 | +divider('medium')(color=theme)= 'Medium' | 48 | +divider('medium')(color=theme)= 'Medium' |
49 | +divider('quiet')(color=theme)= 'Quiet' | ||
40 | +divider('faint')(color=theme)= 'Faint' | 50 | +divider('faint')(color=theme)= 'Faint' |
41 | +divider('strong')(color=theme) | 51 | +divider('strong')(color=theme) |
42 | +divider('medium')(color=theme) | 52 | +divider('medium')(color=theme) |
53 | +divider('quiet')(color=theme) | ||
43 | +divider('faint')(color=theme) | 54 | +divider('faint')(color=theme) |
44 | 55 | ||
45 | each theme in ['static-black', 'static-white'] | 56 | each theme in ['static-black', 'static-white'] |
@@ -49,7 +60,9 @@ mixin view-divider | |||
49 | .c-box(style=`background-color: var(--colors--blue-static--${bg});`) | 60 | .c-box(style=`background-color: var(--colors--blue-static--${bg});`) |
50 | +divider('strong')(color=theme)= 'Strong' | 61 | +divider('strong')(color=theme)= 'Strong' |
51 | +divider('medium')(color=theme)= 'Medium' | 62 | +divider('medium')(color=theme)= 'Medium' |
63 | +divider('quiet')(color=theme)= 'Quiet' | ||
52 | +divider('faint')(color=theme)= 'Faint' | 64 | +divider('faint')(color=theme)= 'Faint' |
53 | +divider('strong')(color=theme) | 65 | +divider('strong')(color=theme) |
54 | +divider('medium')(color=theme) | 66 | +divider('medium')(color=theme) |
67 | +divider('quiet')(color=theme) | ||
55 | +divider('faint')(color=theme) | 68 | +divider('faint')(color=theme) |