diff options
author | Volpeon <git@volpeon.ink> | 2024-11-23 12:35:42 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2024-11-23 12:35:42 +0100 |
commit | f5e2addd72ab0b4801fdb4745eae5cee01ae12fe (patch) | |
tree | 9f6cadd2d46a0ce9677f519e1f5b0370e3c10eb9 /tpl | |
parent | Update s-figures (diff) | |
download | iro-design-f5e2addd72ab0b4801fdb4745eae5cee01ae12fe.tar.gz iro-design-f5e2addd72ab0b4801fdb4745eae5cee01ae12fe.tar.bz2 iro-design-f5e2addd72ab0b4801fdb4745eae5cee01ae12fe.zip |
Add card image overlays
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/objects/card.pug | 11 | ||||
-rw-r--r-- | tpl/views/card.pug | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/tpl/objects/card.pug b/tpl/objects/card.pug index 2ab9bef..e0f6a15 100644 --- a/tpl/objects/card.pug +++ b/tpl/objects/card.pug | |||
@@ -26,7 +26,16 @@ mixin card-image | |||
26 | classes[attributes.class] = true; | 26 | classes[attributes.class] = true; |
27 | } | 27 | } |
28 | 28 | ||
29 | img(class=classes src=attributes.src style=attributes.style) | 29 | let imgClasses = { |
30 | 'o-card__image-img': true, | ||
31 | 'l-card-list__card-image': attributes.list | ||
32 | } | ||
33 | |||
34 | div(class=classes) | ||
35 | img(class=imgClasses src=attributes.src style=attributes.style) | ||
36 | if block | ||
37 | .o-card__image-overlay | ||
38 | block | ||
30 | 39 | ||
31 | mixin card-body | 40 | mixin card-body |
32 | .o-card__body(style=attributes.style) | 41 | .o-card__body(style=attributes.style) |
diff --git a/tpl/views/card.pug b/tpl/views/card.pug index 633cf01..61081a9 100644 --- a/tpl/views/card.pug +++ b/tpl/views/card.pug | |||
@@ -36,6 +36,7 @@ mixin view-card | |||
36 | 36 | ||
37 | +card(quiet=true href='#' class='l-card-list__card') | 37 | +card(quiet=true href='#' class='l-card-list__card') |
38 | +card-image(src='Drawing_Half.png' style={ 'aspect-ratio': '21 / 9' }) | 38 | +card-image(src='Drawing_Half.png' style={ 'aspect-ratio': '21 / 9' }) |
39 | +badge= 'Drawings' | ||
39 | +card-body | 40 | +card-body |
40 | +card-title= 'XS Heading' | 41 | +card-title= 'XS Heading' |
41 | +card-content | 42 | +card-content |
@@ -59,7 +60,7 @@ mixin view-card | |||
59 | div(class=classes) | 60 | div(class=classes) |
60 | each img, i in ['Drawing_Half.png', '0000 Cover@0.5x.webp', 'avatar.png', '01 Design Cody.png', 'avatar.png', 'Drawing_Half.png'] | 61 | each img, i in ['Drawing_Half.png', '0000 Cover@0.5x.webp', 'avatar.png', '01 Design Cody.png', 'avatar.png', 'Drawing_Half.png'] |
61 | +card(quiet=quiet href='#' class='l-card-list__card') | 62 | +card(quiet=quiet href='#' class='l-card-list__card') |
62 | +card-image(src=img class='l-card-list__card-image') | 63 | +card-image(src=img list=true) |
63 | +card-body | 64 | +card-body |
64 | .l-media | 65 | .l-media |
65 | .l-media__block.l-media__block--main | 66 | .l-media__block.l-media__block--main |