fix unstyled elements and small bugs

This commit is contained in:
a 2022-10-17 09:46:58 -05:00
parent 53a48eecc4
commit 1af0feeffd
18 changed files with 115 additions and 66 deletions

View file

@ -94,7 +94,7 @@
background: var(--ui-overlay); background: var(--ui-overlay);
color: var(--ui-overlay-text); color: var(--ui-overlay-text);
padding: 1em; padding: 1em;
line-height: 1.4; line-height: 2;
overflow-x: auto; overflow-x: auto;
white-space: pre; white-space: pre;
display: grid; display: grid;
@ -149,27 +149,6 @@
border: 1px solid var(--ui-text); border: 1px solid var(--ui-text);
padding: 0.5em; padding: 0.5em;
} }
/* {{<hint>}} shortcode */
.hint {
padding: 1em;
line-height: 2;
}
.hint,
.hint.info,
.hint.tip {
background: rgba(142, 226, 142, 0.2);
border-left: 4px solid rgb(142, 226, 142);
}
.hint.warning {
background: rgba(218, 226, 142, 0.2);
border-left: 4px solid rgb(218, 226, 142);
}
.hint.danger {
background: rgba(226, 142, 142, 0.2);
border-left: 4px solid rgb(226, 142, 142);
}
/* hugo-specific citation footnote */ /* hugo-specific citation footnote */
cite sup { cite sup {
position: inherit; position: inherit;

View file

@ -1,9 +1,11 @@
.breadcrumbs { .breadcrumbs {
display: flex; display: flex;
flex-flow: row wrap; flex-flow: row wrap;
li {
margin-bottom: 1rem;
}
li:not(:first-child) { li:not(:first-child) {
margin-left: 1rem; margin-left: 1rem;
margin-bottom: 1rem;
} }
li::marker { li::marker {
content: "> "; content: "> ";

View file

@ -11,13 +11,14 @@
text-decoration: none; text-decoration: none;
background: var(--ui-overlay); background: var(--ui-overlay);
color: var(--ui-overlay-text); color: var(--ui-overlay-text);
box-shadow: 2px 2px 6px rgba(0,0,0,0.25);
&:focus { &:focus {
padding: 1em; padding: 1em;
border: none; border: none;
} }
} }
.previous { .previous, .next {
justify-content: start; justify-content: space-between;
} }
.arrow { .arrow {
text-decoration: none; text-decoration: none;

View file

@ -1,20 +0,0 @@
.page {
.page-title {
font-size: 2em;
margin-bottom: 1rem;
}
.page-summary {
line-height: 1.5;
max-width: 80ch;
}
.lastmod {
margin-top: 1rem;
line-height: 1.5;
color: var(--ui-text-muted);
}
.language-list {
display: flex;
flex-flow: wrap;
list-style: none;
}
}

View file

@ -32,4 +32,9 @@
margin-left: auto; margin-left: auto;
} }
.copyright a {
text-decoration: none;
color: var(--ui-text-bold);
}
} }

View file

@ -70,5 +70,11 @@ article[autonumbering] {
#TableOfContents li:before { #TableOfContents li:before {
content: counters(item, ".") ". "; content: counters(item, ".") ". ";
counter-increment: item; counter-increment: item;
font-family: monospace;
}
#TableOfContents ol ol,
#TableOfContents ul ul
{
margin-left: 0;
} }
} }

View file

@ -45,6 +45,7 @@
#search-input { #search-input {
background: var(--ui-overlay); background: var(--ui-overlay);
color: var(--ui-overlay-text); color: var(--ui-overlay-text);
filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.15));
border-radius: 100rem; border-radius: 100rem;
border: 0; border: 0;
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
@ -61,4 +62,5 @@
color: var(--primary-accent-text); color: var(--primary-accent-text);
border-radius: 4px; border-radius: 4px;
height: 2rem; height: 2rem;
filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.15));
} }

View file

@ -6,19 +6,19 @@
--keyword: #3361a7; --keyword: #3361a7;
--class: #f57900; --class: #f57900;
--variable: #c049dd; --variable: #c049dd;
--number: #53ca24; --number: #32940b;
--operator: #5400c2; --operator: #5400c2;
--highlight: rgb(196, 196, 196); --highlight: rgb(230, 230, 196);
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
--error: #cc0000; --error: #f85e5e;
--keyword: #e0d56e; --keyword: #e0d56e;
--class: #8700f5; --class: #b872f1;
--variable: #008eb9; --variable: #68aff1;
--number: #53ca24; --number: #53ca24;
--operator: #fffd6f; --operator: #fffd6f;
--highlight: #555; --highlight: #444;
} }
} }
@ -42,7 +42,7 @@
/* KeywordReserved */ .chroma .kr { color: var(--keyword); font-weight: bold } /* KeywordReserved */ .chroma .kr { color: var(--keyword); font-weight: bold }
/* KeywordType */ .chroma .kt { color: var(--keyword); font-weight: bold } /* KeywordType */ .chroma .kt { color: var(--keyword); font-weight: bold }
/* Name */ .chroma .n { color: var(--ui-text-bold) } /* Name */ .chroma .n { color: var(--ui-text-bold) }
/* NameAttribute */ .chroma .na { color: var(--ui-text-bold) } /* NameAttribute */ .chroma .na { color: var(--keyword) }
/* NameBuiltin */ .chroma .nb { color: var(--name) } /* NameBuiltin */ .chroma .nb { color: var(--name) }
/* NameBuiltinPseudo */ .chroma .bp { color: #3465a4 } /* NameBuiltinPseudo */ .chroma .bp { color: #3465a4 }
/* NameClass */ .chroma .nc { color: var(--ui-text-bold) } /* NameClass */ .chroma .nc { color: var(--ui-text-bold) }
@ -54,7 +54,7 @@
/* NameFunctionMagic */ .chroma .fm { color: var(--ui-text-bold) } /* NameFunctionMagic */ .chroma .fm { color: var(--ui-text-bold) }
/* NameLabel */ .chroma .nl { color: var(--name) } /* NameLabel */ .chroma .nl { color: var(--name) }
/* NameNamespace */ .chroma .nn { color: var(--ui-text-bold) } /* NameNamespace */ .chroma .nn { color: var(--ui-text-bold) }
/* NameOther */ .chroma .nx { color: var(--ui-text-bold)} /* NameOther */ .chroma .nx { color: var(--class)}
/* NameProperty */ .chroma .py { color: var(--ui-text-bold) } /* NameProperty */ .chroma .py { color: var(--ui-text-bold) }
/* NameTag */ .chroma .nt { color: var(--keyword); font-weight: bold } /* NameTag */ .chroma .nt { color: var(--keyword); font-weight: bold }
/* NameVariable */ .chroma .nv { color: var(--variable) } /* NameVariable */ .chroma .nv { color: var(--variable) }
@ -76,7 +76,7 @@
/* LiteralStringInterpol */ .chroma .si { color: var(--variable) } /* LiteralStringInterpol */ .chroma .si { color: var(--variable) }
/* LiteralStringOther */ .chroma .sx { color: var(--variable) } /* LiteralStringOther */ .chroma .sx { color: var(--variable) }
/* LiteralStringRegex */ .chroma .sr { color: var(--variable) } /* LiteralStringRegex */ .chroma .sr { color: var(--variable) }
/* LiteralStringSingle */ .chroma .s1 { color: var(--variable) } /* LiteralStringSingle */ .chroma .s1 { color: var(--number) }
/* LiteralStringSymbol */ .chroma .ss { color: var(--variable) } /* LiteralStringSymbol */ .chroma .ss { color: var(--variable) }
/* LiteralNumber */ .chroma .m { color: var(--number); font-weight: bold } /* LiteralNumber */ .chroma .m { color: var(--number); font-weight: bold }
/* LiteralNumberBin */ .chroma .mb { color: var(--number); font-weight: bold } /* LiteralNumberBin */ .chroma .mb { color: var(--number); font-weight: bold }
@ -87,7 +87,7 @@
/* LiteralNumberOct */ .chroma .mo { color: var(--number); font-weight: bold } /* LiteralNumberOct */ .chroma .mo { color: var(--number); font-weight: bold }
/* Operator */ .chroma .o { color: var(--operator); font-weight: bold } /* Operator */ .chroma .o { color: var(--operator); font-weight: bold }
/* OperatorWord */ .chroma .ow { color: var(--keyword); font-weight: bold } /* OperatorWord */ .chroma .ow { color: var(--keyword); font-weight: bold }
/* Punctuation */ .chroma .p { color: var(--ui-text-bold); font-weight: bold } /* Punctuation */ .chroma .p { color: var(--variable); font-weight: bold }
/* Comment */ .chroma .c { color: var(--ui-text-muted); font-style: italic } /* Comment */ .chroma .c { color: var(--ui-text-muted); font-style: italic }
/* CommentHashbang */ .chroma .ch { color: var(--ui-text-muted); font-style: italic } /* CommentHashbang */ .chroma .ch { color: var(--ui-text-muted); font-style: italic }
/* CommentMultiline */ .chroma .cm { color: var(--ui-text-muted); font-style: italic } /* CommentMultiline */ .chroma .cm { color: var(--ui-text-muted); font-style: italic }
@ -107,4 +107,4 @@
/* GenericSubheading */ .chroma .gu { color: var(--ui-text-bold); font-weight: bold } /* GenericSubheading */ .chroma .gu { color: var(--ui-text-bold); font-weight: bold }
/* GenericTraceback */ .chroma .gt { color: var(--error); font-weight: bold } /* GenericTraceback */ .chroma .gt { color: var(--error); font-weight: bold }
/* GenericUnderline */ .chroma .gl { color: var(--ui-text-bold); text-decoration: underline } /* GenericUnderline */ .chroma .gl { color: var(--ui-text-bold); text-decoration: underline }
/* TextWhitespace */ .chroma .w { color: var(--ui-text-muted); text-decoration: underline } /* TextWhitespace */ .chroma .w { color: var(--ui-text-muted); }

View file

@ -0,0 +1,19 @@
.list .container {
}
.list-item {
margin-bottom: 2rem;
&__title {
display: inline-block;
margin-bottom: 0.5rem;
font-size: 1.25em;
}
&__summary {
margin-bottom: 0.5rem;
line-height: 1.5;
}
&__date {
color: var(--ui-text-muted);
}
}

View file

@ -118,7 +118,9 @@
/* also make the page header line up */ /* also make the page header line up */
.page-header { .page-header,
.list
{
display: grid; display: grid;
grid-template-columns: minmax(0, 1fr) minmax(auto, 80ch) minmax(0, 1fr); grid-template-columns: minmax(0, 1fr) minmax(auto, 80ch) minmax(0, 1fr);
> .container { > .container {

View file

@ -0,0 +1,21 @@
.breadcrumbs {
margin-bottom: 1rem;
}
.page-title {
font-size: 2em;
margin-bottom: 1rem;
}
.page-summary {
line-height: 1.5;
max-width: 80ch;
}
.lastmod {
margin-top: 1rem;
line-height: 1.5;
color: var(--ui-text-muted);
}
.language-list {
display: flex;
flex-flow: wrap;
list-style: none;
}

View file

@ -4,10 +4,13 @@
@import "common/content"; @import "common/content";
@import "components/site-header"; @import "components/site-header";
@import "components/single/page-header";
@import "components/breadcrumbs"; @import "components/breadcrumbs";
@import "components/table-of-contents"; @import "components/table-of-contents";
@import "features/headings"; @import "features/headings";
@import "shortcodes/hint";
@import "layouts/list";
@import "layouts/single";
#search-form, #search-form,
.header-nav, .header-nav,

View file

@ -7,7 +7,6 @@
@import "components/nav-docs"; @import "components/nav-docs";
@import "components/site-footer"; @import "components/site-footer";
@import "components/single/page-header";
@import "components/breadcrumbs"; @import "components/breadcrumbs";
@import "components/table-of-contents"; @import "components/table-of-contents";
@import "components/nav-section"; @import "components/nav-section";
@ -15,6 +14,10 @@
@import "features/headings"; @import "features/headings";
@import "features/syntax-highlighting"; @import "features/syntax-highlighting";
@import "features/search"; @import "features/search";
@import "features/links";
@import "screen/layout"; @import "shortcodes/hint";
@import "screen/links";
@import "layouts/list";
@import "layouts/single";
@import "layouts/responsive";

View file

@ -0,0 +1,21 @@
.hint {
padding: 1em;
line-height: 2;
margin: 1rem 0;
}
.hint,
.hint.info,
.hint.tip {
background: rgba(142, 226, 142, 0.2);
border-left: 4px solid rgb(142, 226, 142);
}
.hint.warning {
background: rgba(218, 226, 142, 0.2);
border-left: 4px solid rgb(218, 226, 142);
}
.hint.danger {
background: rgba(226, 142, 142, 0.2);
border-left: 4px solid rgb(226, 142, 142);
}

View file

@ -3,7 +3,7 @@
{{ $currentPage := . }} {{ $currentPage := . }}
{{ range .Site.Menus.footer }} {{ range .Site.Menus.footer }}
<li <li
class='{{ if or ($currentPage.IsMenuCurrent "footer" .) (eq $currentPage.Section .Identifier) }}active{{ end }}'> class='{{ .Identifier }}{{ if or ($currentPage.IsMenuCurrent "footer" .) (eq $currentPage.Section .Identifier) }} active{{ end }}'>
<a href="{{ .URL | relLangURL }}"> <a href="{{ .URL | relLangURL }}">
{{ .Pre }} {{ .Pre }}
<span>{{ .Name }}</span> <span>{{ .Name }}</span>

View file

@ -3,7 +3,7 @@
{{ $currentPage := . }} {{ $currentPage := . }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<li <li
class='{{ if or ($currentPage.IsMenuCurrent "main" .) (eq $currentPage.Section .Identifier) }}active{{ end }}'> class='{{ .Identifier }}{{ if or ($currentPage.IsMenuCurrent "main" .) (eq $currentPage.Section .Identifier) }}active{{ end }}'>
<a href="{{ .URL | relLangURL }}"> <a href="{{ .URL | relLangURL }}">
{{ .Pre }} {{ .Pre }}
<span>{{ .Name }}</span> <span>{{ .Name }}</span>

View file

@ -1,10 +1,15 @@
<nav class="section-nav"> <nav class="section-nav">
<div class="container"> <div class="container">
{{ with .PrevInSection }} {{ $page := .Page }}
{{ with .Next }}
{{ if eq .FirstSection $page.FirstSection }}
<a class="previous" href="{{.Permalink}}"><span class="arrow"></span><span class="text">Previous page:<br/>{{.Title}}</span></a> <a class="previous" href="{{.Permalink}}"><span class="arrow"></span><span class="text">Previous page:<br/>{{.Title}}</span></a>
{{ end }} {{ end }}
{{ with .NextInSection }} {{ end }}
{{ with .Prev }}
{{ if eq .FirstSection $page.FirstSection }}
<a class="next" href="{{.Permalink}}"><span class="text">Next page:<br/>{{.Title}}</span><span class="arrow"></span></a> <a class="next" href="{{.Permalink}}"><span class="text">Next page:<br/>{{.Title}}</span><span class="arrow"></span></a>
{{ end }} {{ end }}
{{ end }}
</div> </div>
</nav> </nav>