commit dd4260c2c8e7a0474f48242c4134b5c7565e7f9b Author: a Date: Tue Oct 11 04:54:07 2022 -0500 first commit in new repo diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..147d594 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2022 YOUR_NAME_HERE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..ac36e06 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,2 @@ ++++ ++++ diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..76887d6 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,20 @@ + + + + + + + + + + {{ partial "seo.html" . }} + {{ block "head" . }} + {{ end }} + + + {{ partial "site-header.html" . }} + {{ block "main" . }} + {{ end }} + {{ partial "site-footer.html" . }} + + \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..1bd1ef3 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,26 @@ +{{ define "main" }} +
+ +
+
+ {{ range .Pages }} + + {{ end }} +
+
+
+{{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..df76936 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,25 @@ +{{ define "main" }} +
+
+ + +
+
+ {{ .Content }} +
+
+
+
+{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..43a9e71 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,25 @@ +{{ define "main" }} +
+
+ + +
+
+ {{ .Content }} +

Last modified {{ .Lastmod.Format "Mon Jan 2, 2006" }} - Edit this page on Github

+
+
+
+
+{{ end }} diff --git a/layouts/partials/docs-menu.html b/layouts/partials/docs-menu.html new file mode 100644 index 0000000..2f05364 --- /dev/null +++ b/layouts/partials/docs-menu.html @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/layouts/partials/i18nlist.html b/layouts/partials/i18nlist.html new file mode 100644 index 0000000..04aa517 --- /dev/null +++ b/layouts/partials/i18nlist.html @@ -0,0 +1,10 @@ +{{ if .IsTranslated }} +

Also available in:

+ +{{ end }} diff --git a/layouts/partials/seo.html b/layouts/partials/seo.html new file mode 100644 index 0000000..0bdf2eb --- /dev/null +++ b/layouts/partials/seo.html @@ -0,0 +1,102 @@ +{{ $icon := "images/icon.png" | absURL }} + +{{ if .IsPage }} + {{ with .Params.tags }} + + {{ end }} +{{ end }} +{{ if .IsHome }}{{ .Site.Title }} +{{ .Site.Title }} + + + +{{ else }}{{ .Title }} | {{ .Site.Title }} +{{ .Title }} | {{ .Site.Title }} + + +{{ end }} + + + + + + + + + + + +{{ with .Params.cover }} + + +{{ else }} + + + +{{ end }} + +{{ if isset .Params "date" }} + +{{ else }} + +{{ end }} + +{{ with.Params.author }} + +{{ end }} +{{ with.Params.category }} +{{ end }} + + + +{{ with .OutputFormats.Get "RSS" }} +{{ end }} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/layouts/partials/site-footer.html b/layouts/partials/site-footer.html new file mode 100644 index 0000000..00ad607 --- /dev/null +++ b/layouts/partials/site-footer.html @@ -0,0 +1,20 @@ + + +{{ define "breadcrumb" }} + {{ if .p1.Parent }} + {{ template "breadcrumb" (dict "p1" .p1.Parent "p2" .p2 ) }} + {{ else if not .p1.IsHome }} + {{ template "breadcrumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }} + {{ end }} + + {{ .p1.Title }} + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/site-header.html b/layouts/partials/site-header.html new file mode 100644 index 0000000..c7f438b --- /dev/null +++ b/layouts/partials/site-header.html @@ -0,0 +1,12 @@ + +
+
+
+{{ partial "docs-menu.html" .}} \ No newline at end of file diff --git a/layouts/shortcodes/caption-link.html b/layouts/shortcodes/caption-link.html new file mode 100644 index 0000000..0112657 --- /dev/null +++ b/layouts/shortcodes/caption-link.html @@ -0,0 +1 @@ +{{.Get "caption"}} \ No newline at end of file diff --git a/layouts/shortcodes/code.html b/layouts/shortcodes/code.html new file mode 100644 index 0000000..4082b3c --- /dev/null +++ b/layouts/shortcodes/code.html @@ -0,0 +1,8 @@ +
+
+ {{.Inner | markdownify}} +
+
+ {{.Get "title"}} +
+
\ No newline at end of file diff --git a/layouts/shortcodes/hint.html b/layouts/shortcodes/hint.html new file mode 100644 index 0000000..70253df --- /dev/null +++ b/layouts/shortcodes/hint.html @@ -0,0 +1,3 @@ +
+ {{.Inner | markdownify}} +
\ No newline at end of file diff --git a/layouts/shortcodes/page-ref.html b/layouts/shortcodes/page-ref.html new file mode 100644 index 0000000..797f6a1 --- /dev/null +++ b/layouts/shortcodes/page-ref.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/css/style.screen.css b/static/css/style.screen.css new file mode 100644 index 0000000..4c97413 --- /dev/null +++ b/static/css/style.screen.css @@ -0,0 +1,507 @@ +/*============================================================================== +Paradox - Hugo theme for simple, clean documentation + with an opinionated feature set. + +Table of contents: + + 0 - Reset + 1 - Base + 2 - Page content + 3 - Site structure +==============================================================================*/ + +/*============================================================================== +0 - Reset +*/ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; + box-sizing: border-box; +} + +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} + +/*============================================================================== +1 - Base + +This section contains foundational styles +for the structure of the website. +*/ + +:root { + --container-width: 1280px; + --nav-height: 4rem; + --header-height: 4rem; + --footer-height: 3rem; + --link-color: #3371cf; + --link-visited: #594288; + --primary-accent: rgb(0, 123, 255); + --primary-accent-transparent: rgba(0, 123, 255,0.25); + --primary-accent-text: #fff; + --ui-background: #fff; + --ui-text: #111; + --ui-text-muted: #666; + --ui-text-bold: #000; +} + +@media (prefers-color-scheme: dark) { + :root { + --link-color: #8fb1df; + --link-visited: #a089d4; + --primary-accent: rgb(0, 123, 255); + --primary-accent-transparent: rgba(0, 123, 255,0.25); + --primary-accent-text: #fff; + --ui-background: #212121; + --ui-text: #eee; + --ui-text-muted: #999; + --ui-text-bold: #fff; + } +} + +html { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; + scroll-behavior: smooth; + background: var(--ui-background); + color: var(--ui-text); +} + +/* Single column layout, where main content stretches to fill. */ +body { + display: flex; + flex-flow: column; + min-height: calc(var(--vh, 1vh) * 100); + max-width: var(--container-width); + margin: auto; +} +main {flex-grow: 1;} + +/* +Sections are primary block units, usually of type
. +Containers are an immediate child
, purely for constraining width. +*/ +.section { + padding: 2em 0; /* we apply a vertical padding only to sections */ +} +.container { + width: 100%; + max-width: var(--container-width); + margin: 0 auto; + padding: 0 1em; /* and we apply a horizontal padding only to containers */ +} + +/*============================================================================== +2 - Page content + +This section contains foundational styles +for a single web page's content. +*/ + +.page h1 {font-size: 1.8em} +.page h2 {font-size: 1.6em} +.page h3 {font-size: 1.423em} +.page h4 {font-size: 1.265em} +.page h5 {font-size: 1.125em} +.page h6 {font-size: 1em} + +.page h1, +.page h2, +.page h3, +.page h4, +.page h5, +.page h6 { + line-height: 1.2; + margin-bottom: 1rem; + margin-top: 2rem; + font-weight: 700; +} +.page p { + line-height: 2; + margin-bottom: 1em; +} +.page a {word-wrap: break-word;} +.page blockquote { + font-style: italic; + font-size: 1em; + margin: 1em 0; + border-left: 0.25rem solid black; + padding-left: 0.75em; + line-height: 1.4; +} +.page pre { + font-family: monospace; + background: #333; + color: white; + padding: 1em; + line-height: 1.4; + overflow-x: scroll; + margin-bottom: 1em; +} +.page ul {list-style: disc; margin: 1em 0;} +.page li {margin-bottom: 1em; line-height: 1.4; margin-left: 1em;} +.page ol {list-style: decimal; margin: 1em 0;} +.page dl {margin: 1em 0; line-height: 1.4;} +.page dt {font-weight: 700;} +.page dd {margin-left: 1em;} +.page em {font-style: italic} +.page strong {font-weight: 700} +.page sup { + position: relative; + font-size: 0.8em; +} +.page sup a {position: relative; top: -0.5em;} +.page table {text-align: center;} +.page thead {font-weight: 700;} +.page th, +.page td { + border: 1px solid black; + padding: 0.5em; +} + +.page img { + width: 100%; + margin-bottom: 1em; +} + +.page figure {margin-bottom: 1em;} +.page figure img { + width: 100%; + margin-bottom: -0.125em; +} +.page figcaption { + background: #212121; + color: white; + font-style: italic; + padding: 1em; + font-size: 0.8em; + line-height: 1.2; +} + +.page .hint { + padding: 1em; +} + +/*============================================================================== +3 - Site structure + +This section contains styles +for laying out the structural elements. +*/ + +/* site header */ +.site-header {padding: 1em 0;} + +.site-header a { + text-decoration: none; +} +.site-header .container { + display: flex; + flex-flow: row wrap; + justify-content: space-between; +} +.site-masthead { + display: inline-flex; + flex-flow: row; + align-items: center; + gap: 1em; +} +.site-icon { + height: 2em; +} +.site-title { + font-weight: 900; + letter-spacing: -0.5px; + font-size: 1.25em; +} + +/* navigation menu */ + +.site-nav { + padding: 1em 0; +} +.site-nav .menu {margin-top: 1em;} +.site-nav .menu > li { + margin-bottom: 1em; +} +#menu {margin-bottom: 1em;} +#menu:not(:focus) { + clip: rect(0 0 0 0); + clip-path: inset(50%); + height: 1px; + overflow: hidden; + position: absolute; + white-space: nowrap; + width: 1px; +} +.site-nav .section-title > a { + font-weight: 700; + text-decoration: none; + color: inherit; +} +.site-nav li {line-height: 2} +.site-nav .sub-menu {margin-left: 1em;} + +/* navigation menu toggle */ + +.toggle-menu { + display: none; +} + +.toggle-menu:not(:checked) ~ .menu { + display: none; +} +.toggle-menu__label { + display: flex; + align-items: center; +} + +/* page */ + +.page .content p { + max-width: 80ch; +} + +/* footer */ + +.site-footer { + height: var(--footer-height); + display: flex; + align-items: center; +} +.site-footer hr {display: none;} +.site-footer .container { + display: flex; + justify-content: space-between; +} +.breadcrumbs {display: flex; flex-flow: row wrap;} + +/*============================================================================== +4 - Aesthetic + +This section contains aesthetic styles +such as typography and color. +*/ + +a:link { + transition: all 0.1s ease-out; + color: var(--link-color); + text-decoration-thickness: .0625rem; + text-underline-offset: 0.125em; + text-decoration-skip-ink: none; +} + +a:visited { + color: var(--link-visited); +} + +a:focus { + outline: none; + background: var(--primary-accent); + color: var(--primary-accent-text); + padding: 4px; + border-radius: 2px; + text-decoration: none; +} + +a:hover { + text-decoration-thickness: 0.125em; + text-underline-offset: 0.25em; +} + +@media (prefers-reduced-motion) { + a:link {transition: none} +} + +.site-masthead, .site-masthead:visited { + color: inherit +} + +.site-masthead:focus { + color: var(--primary-accent-text); +} + +.toggle-menu__label { + font-weight: 900; + gap: 0.25rem; + text-transform: uppercase; +} + +.page .page-title { + margin-top: 0; +} + +.page .toc-title { + margin-bottom: 0.5em; + font-weight: 900; + text-transform: uppercase; + color: var(--ui-text-muted); +} +#TableOfContents ul { + list-style: none; + margin: 0; +} +#TableOfContents li { + margin: 0; + line-height: 1.5; +} +#TableOfContents li > ul { + margin: 0; + margin-left: 1em; +} + +.page blockquote { + border-color: var(--ui-text-bold) +} + +.page code { + font-family: monospace; + padding: 4px; + background: rgba(0,0,0,0.1); +} + +.page .hint { + line-height: 2; +} + +.page .hint, .page .hint.info, .page .hint.tip { + background: rgba(142, 226, 142, 0.2); + border-left: 4px solid rgb(142, 226, 142); +} + +.page .hint.warning { + background: rgba(218, 226, 142, 0.2); + border-left: 4px solid rgb(218, 226, 142); +} + +.page .hint.danger { + background: rgba(226, 142, 142, 0.2); + border-left: 4px solid rgb(226, 142, 142); +} + +.page ul.language-list { + display: flex; + flex-flow: wrap; + list-style: none; +} + +.page .lastmod { + margin-top: 1em; + color: var(--ui-text-muted) +} + +/*============================================================================== +5 - Responsive + +This section contains responsive styles +for wider screens. +*/ + +@media (min-width: 60rem) { + body { + display: grid; + grid-template-columns: 1fr 3fr; + height: 100 * var(--vh, 1vh); + } + .site-header, .scroll-margin, .site-footer { + grid-column: span 2 + } + .site-nav { + grid-column: 1; + height: calc(100 * var(--vh, 1vh) - var(--header-height) - var(--footer-height)); + overflow-y: auto; + scrollbar-width: none; + padding: 0; + } + main { + grid-column: 2; + height: calc(100 * var(--vh, 1vh) - var(--header-height) - var(--footer-height)); + overflow-y: auto; + scrollbar-width: none; + } + .site-nav::-webkit-scrollbar, + main::-webkit-scrollbar { + display: none; + } + + .site-nav .menu {margin-top: 0;} + + .page-header { + padding: 0; + } + + /* re-show the navigation menu as a sidebar */ + + .toggle-menu { + display: none; + } + + .toggle-menu:not(:checked) ~ .menu { + display: unset; + } + .toggle-menu__label { + display: none; + } + +} + +@media (min-width: 75rem) { + body { + grid-template-columns: 20rem 1fr; + } + .page { + display: grid; + grid-template-columns: 1fr 15rem; + } + .page .page-header { + grid-column: span 2 + } + .page .section { + grid-column: 1; + } + .page .toc { + grid-column: 2; + position: relative; + padding: 0; + } + .page .toc .container { + position: fixed; + width: 15rem; + } +} \ No newline at end of file diff --git a/static/js/script.js b/static/js/script.js new file mode 100644 index 0000000..8811c31 --- /dev/null +++ b/static/js/script.js @@ -0,0 +1,15 @@ +/* +Use a window's inner dimensions for viewport units. +This fixes +*/ + +var root = document.documentElement; +let vh = window.innerHeight * 0.01; +root.style.setProperty('--vh', `${vh}px`); + +// We listen to the resize event +window.addEventListener('resize', () => { + // We execute the same script as before + let vh = window.innerHeight * 0.01; + root.style.setProperty('--vh', `${vh}px`); +}); \ No newline at end of file diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..0f562b6 --- /dev/null +++ b/theme.toml @@ -0,0 +1,12 @@ +name = "paradox" +license = "MIT" +licenselink = "https://github.com/trwnh/hugo-theme-paradox/blob/main/LICENSE" +description = "A clean and simple documentation theme with all the right features and none of the wrong ones." +homepage = "http://github.com/trwnh/hugo-theme-paradox" +tags = ["documentation"] +features = [] +min_version = "0.41.0" + +[author] + name = "trwnh" + homepage = "https://trwnh.com" \ No newline at end of file