forked from Deuxfleurs/site
Rework css
This commit is contained in:
parent
c96f003767
commit
8063067f53
4 changed files with 19 additions and 8 deletions
|
@ -193,8 +193,8 @@ const do_pug = (prt, root) => async tree => {
|
||||||
if (tree.generate && tree.generate.cmd == 'pug') {
|
if (tree.generate && tree.generate.cmd == 'pug') {
|
||||||
const html = pug.renderFile(tree.generate.src, {
|
const html = pug.renderFile(tree.generate.src, {
|
||||||
markdown: tree.generate.markdown ? marked(await fs.readFile(tree.generate.markdown, 'utf-8')) : null,
|
markdown: tree.generate.markdown ? marked(await fs.readFile(tree.generate.markdown, 'utf-8')) : null,
|
||||||
prt: prt,
|
|
||||||
root: root,
|
root: root,
|
||||||
|
prt: prt,
|
||||||
element: tree
|
element: tree
|
||||||
})
|
})
|
||||||
await fs.writeFile(tree.generate.out, html)
|
await fs.writeFile(tree.generate.out, html)
|
||||||
|
|
|
@ -22,7 +22,7 @@ block root
|
||||||
img(src="/img/flower.svg", width="40")
|
img(src="/img/flower.svg", width="40")
|
||||||
|
|
|
|
||||||
img(src="/img/flower.svg", width="40")
|
img(src="/img/flower.svg", width="40")
|
||||||
+menu(root)
|
+menu(root, element)
|
||||||
|
|
||||||
main
|
main
|
||||||
block content
|
block content
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
mixin menu(o)
|
mixin menu(o, element)
|
||||||
ul
|
ul
|
||||||
each val in o.children
|
each val in o.children
|
||||||
- if (val.type == 'folder' && val.tags.includes('document'))
|
- if (val.type == 'folder' && val.tags.includes('document'))
|
||||||
li
|
li
|
||||||
- if (val.tags.includes('has_index'))
|
- if (val.tags.includes('has_index'))
|
||||||
a(href=val.url)= val.nice_name
|
a(href=val.url, class=val.index.url == element.url ? 'selected' : null)= val.nice_name
|
||||||
- else
|
- else
|
||||||
span= val.nice_name
|
span= val.nice_name
|
||||||
+menu(val)
|
+menu(val, element)
|
||||||
- else if (val.type == 'file' && val.tags.includes('document') && !val.tags.includes('is_index'))
|
- else if (val.type == 'file' && val.tags.includes('document') && !val.tags.includes('is_index'))
|
||||||
li
|
li
|
||||||
a(href=val.url)= val.nice_name
|
a(href=val.url, class=val.url == element.url ? 'selected' : null)= val.nice_name
|
||||||
|
|
|
@ -31,7 +31,7 @@ body {
|
||||||
*/
|
*/
|
||||||
.mobile_block, .mobile_inline { display: none }
|
.mobile_block, .mobile_inline { display: none }
|
||||||
|
|
||||||
@media screen and (max-width: 640px) {
|
@media screen and (max-width: 800px) {
|
||||||
body { flex-direction: column }
|
body { flex-direction: column }
|
||||||
.computer_block { display: none }
|
.computer_block { display: none }
|
||||||
.mobile_block { display: block }
|
.mobile_block { display: block }
|
||||||
|
@ -62,11 +62,21 @@ body > header a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body > header > nav ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
|
body > header > nav > ul { padding-left: 0px }
|
||||||
|
body > header > nav a:hover { text-decoration: underline }
|
||||||
|
body > header > nav .selected { font-weight: bold }
|
||||||
|
body > header > nav .selected::before { content: "» " }
|
||||||
|
|
||||||
body > main {
|
body > main {
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TEXT CORE (think markdown)
|
* TEXT CORE (think markdown)
|
||||||
*/
|
*/
|
||||||
|
@ -77,7 +87,8 @@ h3 { font-size: 1.75rem }
|
||||||
h4 { font-size: 1.50rem }
|
h4 { font-size: 1.50rem }
|
||||||
h5 { font-size: 1.25rem }
|
h5 { font-size: 1.25rem }
|
||||||
h6 { font-size: 1.10rem }
|
h6 { font-size: 1.10rem }
|
||||||
section, p { margin-bottom: 1rem }
|
section, p, ul, ol { margin-bottom: 1rem }
|
||||||
|
ul, ol { padding-left: 1.5em }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* UTILS
|
* UTILS
|
||||||
|
|
Loading…
Reference in a new issue