diff options
author | Volpeon <git@volpeon.ink> | 2024-06-21 23:07:50 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2024-06-21 23:07:50 +0200 |
commit | 48cb00040763459fc46d4aa108bf72c12f48f422 (patch) | |
tree | 9609470d56bb31d55697ef0c42f1c908804dd3f1 /tpl | |
parent | Update (diff) | |
download | iro-design-48cb00040763459fc46d4aa108bf72c12f48f422.tar.gz iro-design-48cb00040763459fc46d4aa108bf72c12f48f422.tar.bz2 iro-design-48cb00040763459fc46d4aa108bf72c12f48f422.zip |
WIP: Refactoring
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/index.pug | 7 | ||||
-rw-r--r-- | tpl/objects/palette.pug | 12 | ||||
-rw-r--r-- | tpl/views/list.pug | 2 | ||||
-rw-r--r-- | tpl/views/palette.pug | 5 |
4 files changed, 23 insertions, 3 deletions
diff --git a/tpl/index.pug b/tpl/index.pug index efa29c5..a93418c 100644 --- a/tpl/index.pug +++ b/tpl/index.pug | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | include layouts/container.pug | 7 | include layouts/container.pug |
8 | 8 | ||
9 | include objects/palette.pug | ||
9 | include objects/heading.pug | 10 | include objects/heading.pug |
10 | include objects/divider.pug | 11 | include objects/divider.pug |
11 | include objects/badge.pug | 12 | include objects/badge.pug |
@@ -51,6 +52,7 @@ mixin user-card(name, hue) | |||
51 | = avaName | 52 | = avaName |
52 | = name | 53 | = name |
53 | 54 | ||
55 | include views/palette.pug | ||
54 | include views/heading.pug | 56 | include views/heading.pug |
55 | include views/divider.pug | 57 | include views/divider.pug |
56 | include views/links.pug | 58 | include views/links.pug |
@@ -92,8 +94,9 @@ html | |||
92 | link(rel="stylesheet" href="style.css") | 94 | link(rel="stylesheet" href="style.css") |
93 | script(src="script.js") | 95 | script(src="script.js") |
94 | 96 | ||
95 | body | 97 | body.t-l1 |
96 | .c-content.l-overflow | 98 | .c-content.l-overflow |
99 | +view-palette | ||
97 | +view-heading | 100 | +view-heading |
98 | +view-divider | 101 | +view-divider |
99 | +view-links | 102 | +view-links |
@@ -125,7 +128,7 @@ html | |||
125 | +view-message | 128 | +view-message |
126 | +view-message-group | 129 | +view-message-group |
127 | 130 | ||
128 | .c-sidebar.l-overflow.u-themed.t-lo.u-p-75 | 131 | .c-sidebar.l-overflow.t-base.u-p-75 |
129 | +menu | 132 | +menu |
130 | each view in views | 133 | each view in views |
131 | +menu-item(tag='a' href='#' + view.id)= view.title | 134 | +menu-item(tag='a' href='#' + view.id)= view.title |
diff --git a/tpl/objects/palette.pug b/tpl/objects/palette.pug new file mode 100644 index 0000000..77e6e9e --- /dev/null +++ b/tpl/objects/palette.pug | |||
@@ -0,0 +1,12 @@ | |||
1 | mixin palette(palette) | ||
2 | - | ||
3 | let classes = { | ||
4 | 'o-palette': true, | ||
5 | } | ||
6 | classes['o-palette--' + palette] = true | ||
7 | |||
8 | let i = 0, n = palette == 'base' ? 11 : 13 | ||
9 | |||
10 | div(class=classes) | ||
11 | while i++ < n | ||
12 | .o-palette__item | ||
diff --git a/tpl/views/list.pug b/tpl/views/list.pug index e3e82bb..ce09b27 100644 --- a/tpl/views/list.pug +++ b/tpl/views/list.pug | |||
@@ -22,4 +22,4 @@ mixin view-list | |||
22 | dt= 'JavaScript' | 22 | dt= 'JavaScript' |
23 | dd= 'A client side scripting language.' | 23 | dd= 'A client side scripting language.' |
24 | p= loremIpsum | 24 | p= loremIpsum |
25 | </dl> | 25 | |
diff --git a/tpl/views/palette.pug b/tpl/views/palette.pug new file mode 100644 index 0000000..384fe03 --- /dev/null +++ b/tpl/views/palette.pug | |||
@@ -0,0 +1,5 @@ | |||
1 | mixin view-palette | ||
2 | +view('palette', 'Palettes') | ||
3 | each palette in ['base', 'blue', 'purple', 'red', 'green', 'yellow'] | ||
4 | .c-box | ||
5 | +palette(palette) | ||