diff options
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/index.pug | 5 | ||||
-rw-r--r-- | tpl/layouts/container.pug | 8 | ||||
-rw-r--r-- | tpl/objects/action-button.pug | 7 | ||||
-rw-r--r-- | tpl/objects/backdrop.pug | 5 | ||||
-rw-r--r-- | tpl/objects/card.pug | 11 | ||||
-rw-r--r-- | tpl/objects/divider.pug | 2 | ||||
-rw-r--r-- | tpl/objects/lightbox.pug | 29 | ||||
-rw-r--r-- | tpl/objects/navbar.pug | 37 | ||||
-rw-r--r-- | tpl/views/card.pug | 9 | ||||
-rw-r--r-- | tpl/views/divider.pug | 12 | ||||
-rw-r--r-- | tpl/views/lightbox.pug | 14 | ||||
-rw-r--r-- | tpl/views/navbar.pug | 19 |
12 files changed, 132 insertions, 26 deletions
diff --git a/tpl/index.pug b/tpl/index.pug index c4baa64..7d73c75 100644 --- a/tpl/index.pug +++ b/tpl/index.pug | |||
@@ -24,6 +24,7 @@ include objects/avatar.pug | |||
24 | include objects/card.pug | 24 | include objects/card.pug |
25 | include objects/popover.pug | 25 | include objects/popover.pug |
26 | include objects/menu.pug | 26 | include objects/menu.pug |
27 | include objects/navbar.pug | ||
27 | include objects/side-nav.pug | 28 | include objects/side-nav.pug |
28 | include objects/icon-nav.pug | 29 | include objects/icon-nav.pug |
29 | include objects/emoji.pug | 30 | include objects/emoji.pug |
@@ -40,7 +41,7 @@ mixin view(id, title) | |||
40 | - | 41 | - |
41 | views.push({ id, title }); | 42 | views.push({ id, title }); |
42 | 43 | ||
43 | +container(narrow=!attributes.wide class='u-p-700 c-view' id=id) | 44 | +container(fixed=!attributes.wide class='u-p-700 c-view' id=id) |
44 | +h1-heading('xl')(class='u-mt-0')= title | 45 | +h1-heading('xl')(class='u-mt-0')= title |
45 | +divider('medium') | 46 | +divider('medium') |
46 | block | 47 | block |
@@ -76,6 +77,7 @@ include views/avatar.pug | |||
76 | include views/card.pug | 77 | include views/card.pug |
77 | include views/popover.pug | 78 | include views/popover.pug |
78 | include views/menu.pug | 79 | include views/menu.pug |
80 | include views/navbar.pug | ||
79 | include views/side-nav.pug | 81 | include views/side-nav.pug |
80 | include views/icon-nav.pug | 82 | include views/icon-nav.pug |
81 | include views/backdrop.pug | 83 | include views/backdrop.pug |
@@ -124,6 +126,7 @@ html | |||
124 | +view-side-nav | 126 | +view-side-nav |
125 | +view-popover | 127 | +view-popover |
126 | +view-menu | 128 | +view-menu |
129 | +view-navbar | ||
127 | //+view-icon-nav | 130 | //+view-icon-nav |
128 | +view-backdrop | 131 | +view-backdrop |
129 | //+view-dialog | 132 | //+view-dialog |
diff --git a/tpl/layouts/container.pug b/tpl/layouts/container.pug index 56c0b86..522eb1a 100644 --- a/tpl/layouts/container.pug +++ b/tpl/layouts/container.pug | |||
@@ -1,10 +1,10 @@ | |||
1 | mixin container | 1 | mixin container |
2 | - | 2 | - |
3 | let classes = { | 3 | let classes = { |
4 | 'l-container': true, | 4 | 'l-container': true, |
5 | 'l-container--narrow': attributes.narrow, | 5 | 'l-container--fixed': attributes.fixed, |
6 | 'l-container--narrow-75': attributes.narrow50, | 6 | 'l-container--fixed-75': attributes.fixed50, |
7 | 'u-themed': !!attributes.theme | 7 | 'u-themed': !!attributes.theme |
8 | } | 8 | } |
9 | if (!!attributes.theme) { | 9 | if (!!attributes.theme) { |
10 | classes['t-' + attributes.theme] = true | 10 | classes['t-' + attributes.theme] = true |
diff --git a/tpl/objects/action-button.pug b/tpl/objects/action-button.pug index c3a9b53..e9b6fe3 100644 --- a/tpl/objects/action-button.pug +++ b/tpl/objects/action-button.pug | |||
@@ -26,4 +26,9 @@ mixin action-button | |||
26 | if attributes.icon | 26 | if attributes.icon |
27 | +icon(attributes.icon) | 27 | +icon(attributes.icon) |
28 | = ' ' | 28 | = ' ' |
29 | block | 29 | if block |
30 | span.o-action-button__label | ||
31 | block | ||
32 | if attributes.postIcon | ||
33 | = ' ' | ||
34 | +icon(attributes.postIcon) | ||
diff --git a/tpl/objects/backdrop.pug b/tpl/objects/backdrop.pug index 227700c..f577961 100644 --- a/tpl/objects/backdrop.pug +++ b/tpl/objects/backdrop.pug | |||
@@ -8,7 +8,10 @@ mixin backdrop | |||
8 | classes[attributes.class] = true; | 8 | classes[attributes.class] = true; |
9 | } | 9 | } |
10 | 10 | ||
11 | let styles = { width: '100%', 'min-height': '5em', 'max-height': '40em' } | 11 | let styles = { width: '100%', 'min-height': '5em' } |
12 | if (attributes.maxHeight) { | ||
13 | styles['max-height'] = '40em'; | ||
14 | } | ||
12 | if (attributes.pad) { | 15 | if (attributes.pad) { |
13 | styles['padding'] = '2em'; | 16 | styles['padding'] = '2em'; |
14 | } | 17 | } |
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/objects/divider.pug b/tpl/objects/divider.pug index 46425cd..ed4d27a 100644 --- a/tpl/objects/divider.pug +++ b/tpl/objects/divider.pug | |||
@@ -3,6 +3,8 @@ mixin divider(level) | |||
3 | let classes = { | 3 | let classes = { |
4 | 'o-divider': true, | 4 | 'o-divider': true, |
5 | 'o-divider--labelled': !!block, | 5 | 'o-divider--labelled': !!block, |
6 | 'o-divider--vertical': !!attributes.vertical, | ||
7 | 'o-divider--dot': !!attributes.dot, | ||
6 | ['o-divider--' + level]: true, | 8 | ['o-divider--' + level]: true, |
7 | ['o-divider--' + attributes.color]: !!attributes.color | 9 | ['o-divider--' + attributes.color]: !!attributes.color |
8 | } | 10 | } |
diff --git a/tpl/objects/lightbox.pug b/tpl/objects/lightbox.pug index 02a3200..842d44a 100644 --- a/tpl/objects/lightbox.pug +++ b/tpl/objects/lightbox.pug | |||
@@ -4,14 +4,19 @@ mixin lightbox(images) | |||
4 | - | 4 | - |
5 | let classes = { | 5 | let classes = { |
6 | 'o-lightbox': true, | 6 | 'o-lightbox': true, |
7 | 'o-lightbox--interactive': attributes.interactive, | ||
7 | } | 8 | } |
8 | let linksClasses = { | 9 | let linksClasses = { |
9 | 's-links': true, | 10 | 's-links': true, |
10 | } | 11 | } |
12 | let thumbnailClasses = { | ||
13 | 'o-thumbnail': true, | ||
14 | } | ||
11 | 15 | ||
12 | if (attributes.theme) { | 16 | if (attributes.theme) { |
13 | classes[`o-lightbox--${attributes.theme}`] = true; | 17 | classes[`o-lightbox--${attributes.theme}`] = true; |
14 | linksClasses[`s-links--${attributes.theme}`] = true; | 18 | linksClasses[`s-links--${attributes.theme}`] = true; |
19 | thumbnailClasses[`o-thumbnail--${attributes.theme}`] = true; | ||
15 | } | 20 | } |
16 | 21 | ||
17 | div(class=classes) | 22 | div(class=classes) |
@@ -19,21 +24,23 @@ mixin lightbox(images) | |||
19 | div(class=linksClasses) | 24 | div(class=linksClasses) |
20 | block | 25 | block |
21 | +action-button(theme=attributes.theme pill=true quiet=true icon='x' class='o-lightbox__close-btn') | 26 | +action-button(theme=attributes.theme pill=true quiet=true icon='x' class='o-lightbox__close-btn') |
27 | |||
22 | each img, i in images | 28 | each img, i in images |
23 | img.o-lightbox__img(src=images[i] id='image-' + i) | 29 | img(src=images[i] id=('image-' + i) class=`o-lightbox__img ${attributes.interactive && !i ? 'is-visible' : ''}`) |
24 | +action-button(theme=attributes.theme pill=true quiet=true icon='chevron-left' class='o-lightbox__nav-btn o-lightbox__nav-btn--prev') | ||
25 | +action-button(theme=attributes.theme pill=true quiet=true icon='chevron-right' class='o-lightbox__nav-btn o-lightbox__nav-btn--next') | ||
26 | 30 | ||
27 | img.o-lightbox__img.o-lightbox__img--default(src=images[0]) | ||
28 | if images.length > 1 | 31 | if images.length > 1 |
29 | +action-button(theme=attributes.theme pill=true quiet=true icon='chevron-left' class='o-lightbox__nav-btn o-lightbox__nav-btn--prev') | 32 | +action-button(theme=attributes.theme pill=true quiet=true icon='chevron-left' class='o-lightbox__nav-btn o-lightbox__nav-btn--prev') |
30 | +action-button(theme=attributes.theme pill=true quiet=true icon='chevron-right' class='o-lightbox__nav-btn o-lightbox__nav-btn--next') | 33 | +action-button(theme=attributes.theme pill=true quiet=true icon='chevron-right' class='o-lightbox__nav-btn o-lightbox__nav-btn--next') |
34 | |||
31 | .o-lightbox__thumbnails | 35 | .o-lightbox__thumbnails |
32 | each img, i in images | 36 | each img, i in images |
33 | - classes = i === 0 ? 'is-selected' : '' | 37 | - |
34 | a.o-lightbox__thumbnail(class=classes href='#image-' + i) | 38 | let classes = { 'is-selected': i === 0 } |
35 | img.o-lightbox__thumbnail-img(src=img) | 39 | Object.assign(classes, thumbnailClasses) |
36 | button.o-lightbox__thumbnail | 40 | |
37 | +icon('volume-2')(class='o-lightbox__thumbnail-icon') | 41 | a.o-thumbnail(class=classes href='#image-' + i) |
38 | button.o-lightbox__thumbnail | 42 | img.o-thumbnail__image(src=img) |
39 | +icon('video')(class='o-lightbox__thumbnail-icon') | 43 | button(class=thumbnailClasses) |
44 | +icon('volume-2')(class='o-thumbnail__icon') | ||
45 | button(class=thumbnailClasses) | ||
46 | +icon('video')(class='o-thumbnail__icon') | ||
diff --git a/tpl/objects/navbar.pug b/tpl/objects/navbar.pug new file mode 100644 index 0000000..5c7642c --- /dev/null +++ b/tpl/objects/navbar.pug | |||
@@ -0,0 +1,37 @@ | |||
1 | include icon.pug | ||
2 | include status-indicator.pug | ||
3 | include action-button.pug | ||
4 | |||
5 | mixin navbar | ||
6 | - | ||
7 | let classes = { | ||
8 | 'o-navbar': true, | ||
9 | 'o-navbar--quiet': attributes.quiet, | ||
10 | } | ||
11 | if (attributes.class) { | ||
12 | classes[attributes.class] = true; | ||
13 | } | ||
14 | |||
15 | div(class=classes)&attributes(attributes) | ||
16 | block | ||
17 | |||
18 | mixin navbar-item | ||
19 | - | ||
20 | let classes = { | ||
21 | 'o-navbar__item': true, | ||
22 | 'is-selected': attributes.selected, | ||
23 | } | ||
24 | if (attributes.class) { | ||
25 | classes[attributes.class] = true; | ||
26 | } | ||
27 | |||
28 | #{!!attributes.tag ? attributes.tag : 'button'}(class=classes)&attributes(attributes) | ||
29 | .o-navbar__item-content | ||
30 | if attributes.icon | ||
31 | +icon(attributes.icon) | ||
32 | = ' ' | ||
33 | span.o-navbar__item-content-text | ||
34 | block | ||
35 | if attributes.postIcon | ||
36 | = ' ' | ||
37 | +icon(attributes.postIcon) | ||
diff --git a/tpl/views/card.pug b/tpl/views/card.pug index 3163b00..61081a9 100644 --- a/tpl/views/card.pug +++ b/tpl/views/card.pug | |||
@@ -27,17 +27,16 @@ mixin view-card | |||
27 | .l-media | 27 | .l-media |
28 | .l-media__block | 28 | .l-media__block |
29 | +badge('positive')(quiet=true icon='repeat' href='#') | 29 | +badge('positive')(quiet=true icon='repeat' href='#') |
30 | +icon('repeat') | 30 | strong= '12' |
31 | strong.u-mis-50= '12' | ||
32 | .l-media__block | 31 | .l-media__block |
33 | +badge('warning')(quiet=true icon='star' href='#') | 32 | +badge('warning')(quiet=true icon='star' href='#') |
34 | +icon('star') | 33 | strong= '34' |
35 | strong.u-mis-50= '34' | ||
36 | .l-media__block.u-mis-auto | 34 | .l-media__block.u-mis-auto |
37 | +a-button(primary=true)= 'Reply' | 35 | +a-button(primary=true)= 'Reply' |
38 | 36 | ||
39 | +card(quiet=true href='#' class='l-card-list__card') | 37 | +card(quiet=true href='#' class='l-card-list__card') |
40 | +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' | ||
41 | +card-body | 40 | +card-body |
42 | +card-title= 'XS Heading' | 41 | +card-title= 'XS Heading' |
43 | +card-content | 42 | +card-content |
@@ -61,7 +60,7 @@ mixin view-card | |||
61 | div(class=classes) | 60 | div(class=classes) |
62 | 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'] |
63 | +card(quiet=quiet href='#' class='l-card-list__card') | 62 | +card(quiet=quiet href='#' class='l-card-list__card') |
64 | +card-image(src=img class='l-card-list__card-image') | 63 | +card-image(src=img list=true) |
65 | +card-body | 64 | +card-body |
66 | .l-media | 65 | .l-media |
67 | .l-media__block.l-media__block--main | 66 | .l-media__block.l-media__block--main |
diff --git a/tpl/views/divider.pug b/tpl/views/divider.pug index ee7b372..ea08984 100644 --- a/tpl/views/divider.pug +++ b/tpl/views/divider.pug | |||
@@ -23,7 +23,17 @@ mixin view-divider | |||
23 | +divider('medium') | 23 | +divider('medium') |
24 | +divider('faint') | 24 | +divider('faint') |
25 | 25 | ||
26 | each theme in ['blue', 'purple', 'red', 'green', 'yellow'] | 26 | .c-box |
27 | .l-media(style="height: 1em") | ||
28 | +divider('strong')(vertical=true class="l-media__block") | ||
29 | +divider('medium')(vertical=true class="l-media__block") | ||
30 | +divider('faint')(vertical=true class="l-media__block") | ||
31 | .l-media(style="height: 1em") | ||
32 | +divider('strong')(dot=true class="l-media__block") | ||
33 | +divider('medium')(dot=true class="l-media__block") | ||
34 | +divider('faint')(dot=true class="l-media__block") | ||
35 | |||
36 | each theme in ['accent', 'negative'] | ||
27 | .c-box | 37 | .c-box |
28 | +divider('strong')(color=theme)= 'Strong' | 38 | +divider('strong')(color=theme)= 'Strong' |
29 | +divider('medium')(color=theme)= 'Medium' | 39 | +divider('medium')(color=theme)= 'Medium' |
diff --git a/tpl/views/lightbox.pug b/tpl/views/lightbox.pug index 4eb234a..7e366c0 100644 --- a/tpl/views/lightbox.pug +++ b/tpl/views/lightbox.pug | |||
@@ -1,5 +1,5 @@ | |||
1 | mixin view-lightbox | 1 | mixin view-lightbox |
2 | +view('lightbox', 'Lightbox') | 2 | +view('lightbox', 'Lightbox')(wide=true) |
3 | .c-box | 3 | .c-box |
4 | +lightbox(['avatar.png', 'ava_feralbot.png', 'volpeon_spooky.png']) | 4 | +lightbox(['avatar.png', 'ava_feralbot.png', 'volpeon_spooky.png']) |
5 | = "Let's try multiple links! " | 5 | = "Let's try multiple links! " |
@@ -37,3 +37,15 @@ mixin view-lightbox | |||
37 | = ' ' | 37 | = ' ' |
38 | a(href="https://mk.vulpes.one/files/081e0684-08dc-4a42-b810-b0ac63ec7d06") | 38 | a(href="https://mk.vulpes.one/files/081e0684-08dc-4a42-b810-b0ac63ec7d06") |
39 | = "https://mk.vulpes.one/files/081e0684-08dc-4a42-b810-b0ac63ec7d06" | 39 | = "https://mk.vulpes.one/files/081e0684-08dc-4a42-b810-b0ac63ec7d06" |
40 | |||
41 | +backdrop(maxHeight=true) | ||
42 | +lightbox(['avatar.png', 'ava_feralbot.png', 'volpeon_spooky.png'])(theme='static-white' interactive=true) | ||
43 | = "Let's try multiple links! " | ||
44 | a(href="https://mk.vulpes.one/files/3023f361-124a-4c80-bb69-9535e47c2925") | ||
45 | = "https://mk.vulpes.one/files/3023f361-124a-4c80-bb69-9535e47c2925" | ||
46 | = ' ' | ||
47 | a(href="https://mk.vulpes.one/files/741dcfd3-6a26-48ae-8985-d0c3ccca016c") | ||
48 | = "https://mk.vulpes.one/files/741dcfd3-6a26-48ae-8985-d0c3ccca016c" | ||
49 | = ' ' | ||
50 | a(href="https://mk.vulpes.one/files/081e0684-08dc-4a42-b810-b0ac63ec7d06") | ||
51 | = "https://mk.vulpes.one/files/081e0684-08dc-4a42-b810-b0ac63ec7d06" | ||
diff --git a/tpl/views/navbar.pug b/tpl/views/navbar.pug new file mode 100644 index 0000000..345a22b --- /dev/null +++ b/tpl/views/navbar.pug | |||
@@ -0,0 +1,19 @@ | |||
1 | mixin view-navbar | ||
2 | +view('navbar', 'Navbar') | ||
3 | .c-box | ||
4 | +navbar | ||
5 | +navbar-item= 'Home' | ||
6 | +navbar-item(selected=true)= 'Art' | ||
7 | +navbar-item= 'Emojis' | ||
8 | |||
9 | .c-box | ||
10 | +navbar(quiet=true) | ||
11 | +navbar-item= 'Home' | ||
12 | +navbar-item(selected=true)= 'Art' | ||
13 | +navbar-item= 'Emojis' | ||
14 | |||
15 | .c-box | ||
16 | +navbar(quiet=true) | ||
17 | +navbar-item(selected=true icon="arrow-left")= 'Home' | ||
18 | +navbar-item= 'Art' | ||
19 | +navbar-item= 'Emojis' | ||