mirror of
https://github.com/trwnh/hugo-theme-paradox.git
synced 2024-11-24 10:21:21 +00:00
first commit in new repo
This commit is contained in:
commit
dd4260c2c8
20
LICENSE
Normal file
20
LICENSE
Normal file
|
@ -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.
|
2
archetypes/default.md
Normal file
2
archetypes/default.md
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
+++
|
||||||
|
+++
|
0
layouts/404.html
Normal file
0
layouts/404.html
Normal file
20
layouts/_default/baseof.html
Normal file
20
layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{.Site.Language.Lang }}" xml:lang="{{.Site.Language.Lang }}">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
|
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.screen.css" media="screen" />
|
||||||
|
<script type="text/javascript" href="{{ .Site.BaseURL }}js/script.js"></script>
|
||||||
|
{{ partial "seo.html" . }}
|
||||||
|
{{ block "head" . }}
|
||||||
|
{{ end }}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{ partial "site-header.html" . }}
|
||||||
|
{{ block "main" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ partial "site-footer.html" . }}
|
||||||
|
</body>
|
||||||
|
</html>
|
26
layouts/_default/list.html
Normal file
26
layouts/_default/list.html
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<main>
|
||||||
|
<header class="section page-header">
|
||||||
|
<div class="container">
|
||||||
|
<h1 class="page-title">{{ .Title }}</h1>
|
||||||
|
{{ partial "i18nlist.html" . }}
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<section class="section list">
|
||||||
|
<div class="container">
|
||||||
|
{{ range .Pages }}
|
||||||
|
<article class="list-item">
|
||||||
|
<a class="list-item__link" href="{{ .Permalink }}">
|
||||||
|
{{ with .Params.cover }}
|
||||||
|
<img class="list-item__image" src="{{.}}">
|
||||||
|
{{end}}
|
||||||
|
<h2 class="list-item__title">{{ .Title }}</h2>
|
||||||
|
</a>
|
||||||
|
<p class="list-item__summary">{{.Summary}}</p>
|
||||||
|
<datetime class="list-item__date">{{ .Date.Format "January 2, 2006" }}</datetime>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
{{ end }}
|
25
layouts/_default/single.html
Normal file
25
layouts/_default/single.html
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<main>
|
||||||
|
<article class="page">
|
||||||
|
<header class="section page-header">
|
||||||
|
<div class="container">
|
||||||
|
<h1 class="page-title">{{ .Title }}</h1>
|
||||||
|
<p class="page-summary">{{.Summary}}</p>
|
||||||
|
<p class="lastmod">Last modified <datetime class="date"> {{ .Lastmod.Format "Mon Jan 2, 2006" }} </datetime> - <a href="{{.Site.Params.repo}}/edit/{{.Site.Params.branch}}/content/{{.File.Lang}}/{{.File.Path}}">Edit this page on Github</a></p>
|
||||||
|
{{ partial "i18nlist.html" . }}
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="toc section">
|
||||||
|
<div class="container">
|
||||||
|
<p class="toc-title">Page outline</p>
|
||||||
|
{{ .TableOfContents }}
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<section class="content section">
|
||||||
|
<div class="container">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
</main>
|
||||||
|
{{ end }}
|
25
layouts/index.html
Normal file
25
layouts/index.html
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<main>
|
||||||
|
<article class="page">
|
||||||
|
<header class="section page-header">
|
||||||
|
<div class="container">
|
||||||
|
<h1 class="page-title">{{ .Title }}</h1>
|
||||||
|
<p class="page-summary">{{.Summary}}</p>
|
||||||
|
{{ partial "i18nlist.html" . }}
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="toc section">
|
||||||
|
<div class="container">
|
||||||
|
<p class="toc-title">Page outline</p>
|
||||||
|
{{ .TableOfContents }}
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<section class="content section">
|
||||||
|
<div class="container">
|
||||||
|
{{ .Content }}
|
||||||
|
<p class="lastmod">Last modified <datetime class="date"> {{ .Lastmod.Format "Mon Jan 2, 2006" }} </datetime> - <a href="{{.Site.Params.repo}}/edit/{{.Site.Params.branch}}/content/{{.File.Lang}}/{{.File.Path}}">Edit this page on Github</a></p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
</main>
|
||||||
|
{{ end }}
|
42
layouts/partials/docs-menu.html
Normal file
42
layouts/partials/docs-menu.html
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<nav class="site-nav">
|
||||||
|
<div class="container">
|
||||||
|
<input type="checkbox" class="toggle-menu" name="toggle" id="toggle">
|
||||||
|
<label class="toggle-menu__label" for="toggle"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h7" />
|
||||||
|
</svg> Menu</label>
|
||||||
|
<ul class="menu">
|
||||||
|
<a id="menu" href="#top">Skip menu</a>
|
||||||
|
{{ $currentPage := . }}
|
||||||
|
{{ range .Site.Menus.docs }}
|
||||||
|
{{ if .HasChildren}}
|
||||||
|
<li class='section-title{{ if or ($currentPage.IsMenuCurrent "docs" .) (eq $currentPage.Section .Identifier) }} active{{ end }}'>
|
||||||
|
<a href="{{ .URL | absLangURL }}">
|
||||||
|
{{ .Pre }}
|
||||||
|
<span>{{ .Name }}</span>
|
||||||
|
{{ .Post }}
|
||||||
|
</a>
|
||||||
|
<ul class="sub-menu">
|
||||||
|
{{ range .Children }}
|
||||||
|
<li class='{{ if or ($currentPage.IsMenuCurrent "docs" .) (eq $currentPage.Section .Identifier) }}active{{ end }}'>
|
||||||
|
<a href="{{ .URL | absLangURL }}">
|
||||||
|
{{ .Pre }}
|
||||||
|
<span>{{ .Name }}</span>
|
||||||
|
{{ .Post }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
{{ else }}
|
||||||
|
<li class='{{ if or ($currentPage.IsMenuCurrent "docs" .) (eq $currentPage.Section .Identifier) }}active{{ end }}'>
|
||||||
|
<a href="{{ .URL | absLangURL }}">
|
||||||
|
{{ .Pre }}
|
||||||
|
<span>{{ .Name }}</span>
|
||||||
|
{{ .Post }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
10
layouts/partials/i18nlist.html
Normal file
10
layouts/partials/i18nlist.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{{ if .IsTranslated }}
|
||||||
|
<p>Also available in:</p>
|
||||||
|
<ul class="language-list">
|
||||||
|
{{ range .Translations }}
|
||||||
|
<li>
|
||||||
|
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
102
layouts/partials/seo.html
Normal file
102
layouts/partials/seo.html
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
{{ $icon := "images/icon.png" | absURL }}
|
||||||
|
<link rel="shortcut icon" href='{{ $icon }}' sizes="765x765">
|
||||||
|
{{ if .IsPage }}
|
||||||
|
{{ with .Params.tags }}
|
||||||
|
<meta name="keywords" content='{{ delimit . " "}}'>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if .IsHome }}<title>{{ .Site.Title }}</title>
|
||||||
|
<title itemprop="name">{{ .Site.Title }}</title>
|
||||||
|
<meta property="og:title" content="{{ .Site.Title }}" />
|
||||||
|
<meta name="twitter:title" content="{{ .Site.Title }}" />
|
||||||
|
<meta itemprop="name" content="{{ .Site.Title }}" />
|
||||||
|
{{ else }}<title>{{ .Title }} | {{ .Site.Title }}</title>
|
||||||
|
<title itemprop="name">{{ .Title }} | {{ .Site.Title }}</title>
|
||||||
|
<meta property="og:title" content="{{ .Title }} | {{ .Site.Title }}" />
|
||||||
|
<meta name="twitter:title" content="{{ .Title }} | {{ .Site.Title }}" />
|
||||||
|
<meta itemprop="name" content="{{ .Title }} | {{ .Site.Title }}" />{{ end }}
|
||||||
|
<meta name="application-name" content="{{ .Site.Title }}" />
|
||||||
|
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
||||||
|
<meta name="description" content="{{ .Summary }}">
|
||||||
|
<meta itemprop="description" content="{{ .Summary }}" />
|
||||||
|
<meta property="og:description" content="{{ .Summary }}" />
|
||||||
|
<meta name="twitter:description" content="{{ .Summary }}" />
|
||||||
|
<base href="{{ .Permalink }}">
|
||||||
|
<link rel="canonical" href="{{ .Permalink }}" itemprop="url" />
|
||||||
|
<meta name="url" content="{{ .Permalink }}" />
|
||||||
|
<meta name="twitter:url" content="{{ .Permalink }}" />
|
||||||
|
<meta property="og:url" content="{{ .Permalink }}" />
|
||||||
|
{{ with .Params.cover }}<meta itemprop="image" content="{{ . | absURL }}" />
|
||||||
|
<meta property="og:image" content="{{ . | absURL }}" />
|
||||||
|
<meta name="twitter:image" content="{{ . | absURL }}" />
|
||||||
|
<meta name="twitter:image:src" content="{{ . | absURL }}" />{{ else }}
|
||||||
|
<meta itemprop="image" content='{{ $icon }}' />
|
||||||
|
<meta property="og:image" content='{{ $icon }}' />
|
||||||
|
<meta name="twitter:image" content='{{ $icon }}' />
|
||||||
|
<meta name="twitter:image:src" content='{{ $icon }}' />{{ end }}
|
||||||
|
<meta property="og:updated_time" content={{ .Lastmod.Format "2006-01-02T15:04:05Z0700" | safeHTML }} />
|
||||||
|
{{ if isset .Params "date" }}<meta property="og:type" content="article" />
|
||||||
|
<script defer type="application/ld+json">
|
||||||
|
{
|
||||||
|
"@context": "http://schema.org",
|
||||||
|
"@type": "Article",
|
||||||
|
"headline": {{ .Title }},
|
||||||
|
"author": {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": "{{ .Params.author }}"
|
||||||
|
},
|
||||||
|
"datePublished": "{{ .Date.Format "2006-01-02" }}",
|
||||||
|
"description": {{ .Summary }},
|
||||||
|
"wordCount": {{ .WordCount }},
|
||||||
|
"mainEntityOfPage": "True",
|
||||||
|
"dateModified": "{{ .Lastmod.Format "2006-01-02" }}",
|
||||||
|
"image": {
|
||||||
|
"@type": "imageObject",
|
||||||
|
"url": "{{ with .Params.cover }}{{ . }}{{ end }}"
|
||||||
|
},
|
||||||
|
"publisher": {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": "{{ .Site.Title }}",
|
||||||
|
"logo": {
|
||||||
|
"@type": "imageObject",
|
||||||
|
"url": {{ $icon }}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{{ else }}<meta property="og:type" content="website" />
|
||||||
|
<meta name="author" content="{{ .Params.author }}" />
|
||||||
|
<script defer type="application/ld+json">
|
||||||
|
{
|
||||||
|
"@context": "http://schema.org",
|
||||||
|
"@type": "WebSite",
|
||||||
|
"url": {{ .Permalink }},
|
||||||
|
"name": "{{ .Title }}",
|
||||||
|
"logo": {{ $icon }}
|
||||||
|
}
|
||||||
|
</script>{{ end }}
|
||||||
|
<meta property="article:publisher" content="{{ .Params.author }}" />
|
||||||
|
{{ with.Params.author }}<meta property="og:article:author" content="{{ . }}" />
|
||||||
|
<meta property="article:author" content="{{ . }}" />
|
||||||
|
<meta name="author" content="{{ . }}" />{{ end }}
|
||||||
|
{{ with.Params.category }}<meta name="news_keywords" content="{{ . }}" />
|
||||||
|
<meta property="article:section" content="{{ . }}" />{{ end }}
|
||||||
|
<meta property="og:article:published_time" content={{ .Date.Format "2006-01-02T15:04:05Z0700" | safeHTML }} />
|
||||||
|
<meta property="article:published_time" content={{ .Date.Format "2006-01-02T15:04:05Z0700" | safeHTML }} />
|
||||||
|
<link rel="sitemap" type="application/xml" title="Sitemap" href="{{ .Site.BaseURL }}sitemap.xml" />
|
||||||
|
{{ with .OutputFormats.Get "RSS" }}<link href="{{ .Permalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||||
|
<link href="{{ .Permalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />{{ end }}
|
||||||
|
<meta name="robots" content="index,follow" />
|
||||||
|
<meta name="googlebot" content="index,follow" />
|
||||||
|
<link rel="manifest" href="{{ .Site.BaseURL }}manifest.json" />
|
||||||
|
<meta name="theme-color" content="#ffffff" />
|
||||||
|
<meta name="msapplication-TileColor" content="#ffffff" />
|
||||||
|
<meta name="imagemode" content="force" />
|
||||||
|
<meta name="coverage" content="Worldwide" />
|
||||||
|
<meta name="distribution" content="Global" />
|
||||||
|
<meta name="HandheldFriendly" content="True" />
|
||||||
|
<meta name="msapplication-tap-highlight" content="no" />
|
||||||
|
<meta name="apple-mobile-web-app-title" content="{{ .Site.Title }}" />
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
|
<meta name="apple-touch-fullscreen" content="yes" />
|
20
layouts/partials/site-footer.html
Normal file
20
layouts/partials/site-footer.html
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<footer class="site-footer">
|
||||||
|
<hr>
|
||||||
|
<div class="container">
|
||||||
|
<ul class="breadcrumbs">
|
||||||
|
{{ template "breadcrumb" (dict "p1" . "p2" .) }}
|
||||||
|
</ul>
|
||||||
|
<a href="#top">back to top</a>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
{{ 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 }}
|
||||||
|
<li{{ if eq .p1 .p2 }} class="active"{{ end }}>
|
||||||
|
<a href="{{ .p1.RelPermalink }}">{{ .p1.Title }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
12
layouts/partials/site-header.html
Normal file
12
layouts/partials/site-header.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<header class="site-header">
|
||||||
|
<div class="container">
|
||||||
|
<a href="/" class="site-masthead">
|
||||||
|
<img class="site-icon" height="32" src="{{.Site.Params.icon}}">
|
||||||
|
<p class="site-title">{{.Site.Params.title}}</p>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<div class="scroll-margin" style="position: relative;">
|
||||||
|
<div id="top" style="scroll-margin-top: var(--header-height);"></div>
|
||||||
|
</div>
|
||||||
|
{{ partial "docs-menu.html" .}}
|
1
layouts/shortcodes/caption-link.html
Normal file
1
layouts/shortcodes/caption-link.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<a class="caption-link" href='{{.Get "url"}}'>{{.Get "caption"}}</a>
|
8
layouts/shortcodes/code.html
Normal file
8
layouts/shortcodes/code.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<figure>
|
||||||
|
<div>
|
||||||
|
{{.Inner | markdownify}}
|
||||||
|
</div>
|
||||||
|
<figcaption>
|
||||||
|
{{.Get "title"}}
|
||||||
|
</figcaption>
|
||||||
|
</figure>
|
3
layouts/shortcodes/hint.html
Normal file
3
layouts/shortcodes/hint.html
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<div class='{{with .Get "style"}}{{.}} {{end}}hint'>
|
||||||
|
{{.Inner | markdownify}}
|
||||||
|
</div>
|
1
layouts/shortcodes/page-ref.html
Normal file
1
layouts/shortcodes/page-ref.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<a href='{{.Get "page"}}'></a>
|
507
static/css/style.screen.css
Normal file
507
static/css/style.screen.css
Normal file
|
@ -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 <section>.
|
||||||
|
Containers are an immediate child <div>, 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;
|
||||||
|
}
|
||||||
|
}
|
15
static/js/script.js
Normal file
15
static/js/script.js
Normal file
|
@ -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`);
|
||||||
|
});
|
12
theme.toml
Normal file
12
theme.toml
Normal file
|
@ -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"
|
Loading…
Reference in a new issue