Browse Source

Candor hugo theme working initial code

master
Alexander William Wong 6 months ago
parent
commit
e6805bf902
Signed by: alex <alex@udia.ca> GPG Key ID: E90E5D6448C2C663
30 changed files with 1148 additions and 1 deletions
  1. +3
    -0
      .vscode/settings.json
  2. +1
    -1
      README.md
  3. +4
    -0
      archetypes/default.md
  4. +2
    -0
      assets/js/main.js
  5. +11
    -0
      assets/js/mathjax-tex-svg.js
  6. +74
    -0
      assets/sass/fonts.scss
  7. +503
    -0
      assets/sass/main.scss
  8. +349
    -0
      assets/sass/normalize.scss
  9. +9
    -0
      layouts/404.html
  10. +32
    -0
      layouts/_default/baseof.html
  11. +10
    -0
      layouts/_default/list.html
  12. +18
    -0
      layouts/_default/single.html
  13. +10
    -0
      layouts/_default/summary.html
  14. +15
    -0
      layouts/index.html
  15. +14
    -0
      layouts/partials/breadcrumbs.html
  16. +15
    -0
      layouts/partials/footer.html
  17. +8
    -0
      layouts/partials/header.html
  18. +23
    -0
      layouts/partials/page-metadata.html
  19. +11
    -0
      layouts/partials/pagination.html
  20. +14
    -0
      layouts/partials/sidebar.html
  21. BIN
      static/fonts/Raleway-SemiBold_latin-ext.woff2
  22. BIN
      static/fonts/Raleway-SemiBold_latin.woff2
  23. BIN
      static/fonts/SourceSerifPro-Bold_latin-ext.woff2
  24. BIN
      static/fonts/SourceSerifPro-Bold_latin.woff2
  25. BIN
      static/fonts/SourceSerifPro-Regular_latin-ext.woff2
  26. BIN
      static/fonts/SourceSerifPro-Regular_latin.woff2
  27. BIN
      static/fonts/SourceSerifPro-Semibold_latin-ext.woff2
  28. BIN
      static/fonts/SourceSerifPro-Semibold_latin.woff2
  29. +10
    -0
      static/images/logo.svg
  30. +12
    -0
      theme.toml

+ 3
- 0
.vscode/settings.json View File

@@ -0,0 +1,3 @@
{
"editor.tabSize": 2
}

+ 1
- 1
README.md View File

@@ -2,7 +2,7 @@

*To be unreserved, honest, with sincerity- free from prejudice or malice.*

A Hugo theme.
A Hugo theme. Hugo extended support is required to due scss.

## License



+ 4
- 0
archetypes/default.md View File

@@ -0,0 +1,4 @@
+++
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
+++

+ 2
- 0
assets/js/main.js View File

@@ -0,0 +1,2 @@
/** main.js */
// no-op

+ 11
- 0
assets/js/mathjax-tex-svg.js
File diff suppressed because it is too large
View File


+ 74
- 0
assets/sass/fonts.scss View File

@@ -0,0 +1,74 @@
@charset "UTF-8";

/* latin-ext */
@font-face {
font-family: 'Source Serif Pro';
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Source Serif Pro'), local('SourceSerifPro-Regular'), url(/fonts/SourceSerifPro-Regular_latin-ext.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Serif Pro';
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Source Serif Pro'), local('SourceSerifPro-Regular'), url(/fonts/SourceSerifPro-Regular_latin.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
font-family: 'Source Serif Pro';
font-style: normal;
font-weight: 600;
font-display: swap;
src: local('Source Serif Pro Semibold'), local('SourceSerifPro-Semibold'), url(/fonts/SourceSerifPro-Semibold_latin-ext.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Serif Pro';
font-style: normal;
font-weight: 600;
font-display: swap;
src: local('Source Serif Pro Semibold'), local('SourceSerifPro-Semibold'), url(/fonts/SourceSerifPro-Semibold_latin.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
font-family: 'Source Serif Pro';
font-style: normal;
font-weight: 700;
font-display: swap;
src: local('Source Serif Pro Bold'), local('SourceSerifPro-Bold'), url(/fonts/SourceSerifPro-Bold_latin-ext.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Serif Pro';
font-style: normal;
font-weight: 700;
font-display: swap;
src: local('Source Serif Pro Bold'), local('SourceSerifPro-Bold'), url(/fonts/SourceSerifPro-Bold_latin.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 600;
font-display: swap;
src: local('Raleway SemiBold'), local('Raleway-SemiBold'), url(/fonts/Raleway-SemiBold_latin-ext.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 600;
font-display: swap;
src: local('Raleway SemiBold'), local('Raleway-SemiBold'), url(/fonts/Raleway-SemiBold_latin.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

+ 503
- 0
assets/sass/main.scss View File

@@ -0,0 +1,503 @@
@import "normalize.scss";
@import "fonts.scss";

html {
font-family: "Source Serif Pro", Baskerville, "Libre Baskerville", serif;
font-weight: 400;
color: #000000;
background-color: #ffffff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
font-family: "Raleway", "Source Serif Pro", serif;
font-weight: 600;
}

body {
max-width: 112ch;
}

@media only screen and (max-width: 65ch) {
html {
font-size: 18px;
}
}

@media only screen and (min-width: 65ch) {
body {
padding: 0 1.5ch 0 0.5ch;
margin: 0 auto;
}
@media only screen and (min-width: 118.5ch) {
body {
padding: 0 6ch 0 0.5ch;
}
}
main {
min-height: 95vh;
display: flex;
flex-flow: column;
}
@media only screen and (min-width: 176.1ch) {
main {
position: relative;
right: 4ch;
}
}
article {
flex: 1 1 auto;
}
#sidebar {
position: absolute;
}
article,
header {
margin-left: 15ch;
}
@media only screen and (max-width: 120ch) {
article,
header {
margin-left: 14.5ch;
}
}
@media only screen and (max-width: 112ch) {
article,
header {
margin-left: 14ch;
}
}
@media only screen and (max-width: 104ch) {
article,
header {
margin-left: 13.5ch;
}
}
@media only screen and (max-width: 96ch) {
article,
header {
margin-left: 13ch;
}
}
}

@media only screen and (max-width: 65ch) {
body {
margin: 0 1ch;
}
}

#sidebar {
font-family: "Raleway", "Source Sans Pro", sans-serif;
code {
border: none;
background-color: transparent;
padding: 0;
}
a {
display: block;
}
ul {
list-style: none;
margin: 0;
margin-block-start: 0;
margin-block-end: 0;
margin-inline-start: 0;
margin-inline-end: 0;
padding-inline-start: 0;
}
}

@media only screen and (min-width: 65ch) {
#sidebar {
font-variant: small-caps;
width: 10ch;
a#logo {
margin: 1em 0 1em 0;
}
a#logo img {
width: 5rem;
}
code {
font-variant: none;
text-transform: uppercase;
font-size: 0.7em;
}
}
}

@media only screen and (max-width: 65ch) {
#sidebar {
display: flex;
justify-content: center;
margin: 0 0 0.5em 0;
a {
border: 1px dotted #000;
padding: 3px 10px;
text-align: center;
margin: 1px;
}
a#logo {
padding: 8px 5px 3px 5px;
}
a.home,
a.links,
a.site {
flex: 1 1 20%;
}
#sidebar-links {
display: flex;
}
}
#sidebar-links {
flex-flow: row wrap;
margin: 0.5em 0 0 0;
}
#sidebar #logo {
margin: 1px;
}
#sidebar #logo img {
width: 5rem;
}
}

article {
align-self: flex-start;
flex-basis: 0;
.summary-title {
font-size: 150%;
display: inline;
}
}

header {
overflow: auto;
h1 {
margin: 0.2em 0 0.5em 0;
text-align: center;
text-transform: none;
font-variant: small-caps;
font-size: 2.5em;
line-height: 1.15;
font-weight: 600;
letter-spacing: -1px;
}
}

@media only screen and (max-width: 65ch) {
header h1 {
font-size: 2em;
}
}

ul#tags::before {
content: "topics:";
}

ul#tags {
display: inline;
list-style: none;
margin: 0;
margin-block-start: 0;
margin-block-end: 0;
margin-inline-start: 0;
margin-inline-end: 0;
padding-inline-start: 0;
li {
display: inline;
}
}

#page-metadata {
margin: 0 0 1em 0;
overflow: visible;
font-size: 0.95em;
line-height: 1.1;
hr {
display: none;
}
#page-description {
display: block;
margin: 0 auto 0.5em auto;
}
#page-description + br {
display: none;
}
span:nth-of-type(n + 3) {
white-space: nowrap;
}
}

@media only screen and (max-width: 128ch) {
#TableOfContents {
font-size: 0.95rem;
}
}

@media only screen and (max-width: 120ch) {
#TableOfContents {
font-size: 0.9rem;
}
}

@media only screen and (max-width: 112ch) {
#TableOfContents {
font-size: 0.85rem;
margin: 0 1.5rem 1.25rem 0;
}
}

@media only screen and (max-width: 104ch) {
#TableOfContents {
font-size: 0.8rem;
margin: 0 1.25rem 1rem 0;
}
}

@media only screen and (max-width: 96ch) {
#TableOfContents {
margin: 0 1rem 1rem 0;
}
}

@media only screen and (min-width: 90ch) {
#TableOfContents {
float: left;
max-width: 30ch;
}
}

@media only screen and (max-width: 90ch) {
#TableOfContents {
float: none;
margin: 2em auto;
font-size: 1rem;
}
#TableOfContents > ul > li > ul {
column-count: 2;
}
}

@media only screen and (max-width: 64.9ch) {
#TableOfContents a {
display: inline-block;
}
#TableOfContents > ul > li > ul {
column-count: 1;
}
#TableOfContents li li a {
padding: 0 0 1px 0;
}
#TableOfContents li li li a {
padding: 0 0 2px 0;
}
#TableOfContents li li li li a {
padding: 0 0 3px 0;
}
#TableOfContents li li li li a {
padding: 0 0 4px 0;
}
}

#TableOfContents {
border: 1px solid #ccc;
background-color: #f9f9f9;
font-family: "Raleway", "Source Sans Pro", sans-serif;
margin: 0 2rem 1.5rem 0;
line-height: 1;
padding: 8px 8px 2px 7px;
position: relative;
z-index: 1;
:empty {
display: none;
}
ul {
list-style-type: none;
padding-left: 0;
margin-bottom: 0;
margin-top: 4px;
padding-left: 1.4em;
text-indent: 0;
padding: 0;
}
ul ul {
list-style-type: none;
padding-left: 0.7em;
margin-top: 2px;
}
li {
font-weight: 700;
margin: 5px 0 10px 0;
padding-left: 1.125em;
position: relative;
overflow-wrap: break-word;
}
li li {
margin-bottom: 0;
font-weight: 400;
font-size: 0.9em;
}
p {
margin-top: 9px;
margin-bottom: 3px;
}
a {
border: 0;
display: block;
position: relative;
:hover {
background-color: rgba(0, 0, 0, 0.05);
color: #000;
}
}
a:hover::after {
content: "";
display: inline-block;
position: absolute;
margin-left: 0.2em;
left: 100%;
top: 0;
background-color: #663399;
width: 0.25em;
height: 100%;
}
}

#TableOfContents > ul {
counter-reset: htoc_1;
}

#TableOfContents > ul > li::before {
counter-increment: htoc_1;
content: counter(htoc_1) "\2006 ";
}

#TableOfContents > ul ul {
counter-reset: htoc_2;
}

#TableOfContents > ul ul li::before {
counter-increment: htoc_2;
content: counter(htoc_1) "." counter(htoc_2) "\2006 ";
}

#TableOfContents > ul ul ul {
counter-reset: htoc_3;
}

#TableOfContents > ul ul ul li::before {
counter-increment: htoc_3;
content: counter(htoc_1) "." counter(htoc_2) "." counter(htoc_3) "\2006 ";
}

#TableOfContents > ul ul ul ul {
counter-reset: htoc_4;
}

#TableOfContents > ul ul ul ul li::before {
counter-increment: htoc_4;
content: counter(htoc_1) "." counter(htoc_2) "." counter(htoc_3) "." counter(htoc_4) "\2006 ";
}

#TableOfContents > ul ul ul ul ul {
counter-reset: htoc_5;
}

#TableOfContents > ul ul ul ul ul li::before {
counter-increment: htoc_5;
content: counter(htoc_1) "." counter(htoc_2) "." counter(htoc_3) "." counter(htoc_4) "." counter(htoc_5) "\2006 ";
}

#TableOfContents > ul ul ul ul ul ul {
counter-reset: htoc_6;
}

#TableOfContents > ul ul ul ul ul ul li::before {
counter-increment: htoc_6;
content: counter(htoc_1) "." counter(htoc_2) "." counter(htoc_3) "." counter(htoc_4) "." counter(htoc_5) "."
counter(htoc_6) "\2006 ";
}

#TableOfContents ul li::before {
position: absolute;
right: calc(100% - 1em);
width: 12ch;
text-align: right;
font-weight: 400;
opacity: 0.4;
pointer-events: none;
}

#TableOfContents ul li:hover::before {
opacity: 0.7;
}

#markdownBody {
overflow-wrap: break-word;
}

@media only screen and (min-width: 176.1ch) {
#markdownBody {
position: relative;
}
}

@media only screen and (min-width: 65ch) {
@media only screen and (max-width: 100ch) {
#markdownBody {
line-height: 1.45;
}
}
@media only screen and (min-width: 100.1ch) and (max-width: 120ch) {
#markdownBody {
line-height: 1.5;
}
}
@media only screen and (min-width: 120.1ch) {
#markdownBody {
line-height: 1.55;
}
}
}

@supports (-webkit-hyphens: auto) or (-ms-hyphens: auto) or (hyphens: auto) {
#markdownBody li,
#markdownBody p {
text-align: justify;
-webkit-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
}
}

#markdownBody p {
font-variant-numeric: oldstyle-nums;
}

@media (prefers-color-scheme: dark) {
body::before,
body > * {
filter: invert(95%);
}
}

ol#breadcrumb {
display: relative;
list-style-type: none;
margin: 0 0 0.5em 0;
padding: 0;
li {
display: inline;
&:before {
content: "∕ ";
}
}
}

#paginator {
margin-top: 0.5em;
}

+ 349
- 0
assets/sass/normalize.scss View File

@@ -0,0 +1,349 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
========================================================================== */

/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/

html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}

/* Sections
========================================================================== */

/**
* Remove the margin in all browsers.
*/

body {
margin: 0;
}

/**
* Render the `main` element consistently in IE.
*/

main {
display: block;
}

/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/

h1 {
font-size: 2em;
margin: 0.67em 0;
}

/* Grouping content
========================================================================== */

/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/

hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}

/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/

pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}

/* Text-level semantics
========================================================================== */

/**
* Remove the gray background on active links in IE 10.
*/

a {
background-color: transparent;
}

/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/

abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}

/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/

b,
strong {
font-weight: bolder;
}

/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}

/**
* Add the correct font size in all browsers.
*/

small {
font-size: 80%;
}

/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/

sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}

sub {
bottom: -0.25em;
}

sup {
top: -0.5em;
}

/* Embedded content
========================================================================== */

/**
* Remove the border on images inside links in IE 10.
*/

img {
border-style: none;
}

/* Forms
========================================================================== */

/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/

button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}

/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/

button,
input { /* 1 */
overflow: visible;
}

/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/

button,
select { /* 1 */
text-transform: none;
}

/**
* Correct the inability to style clickable types in iOS and Safari.
*/

button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}

/**
* Remove the inner border and padding in Firefox.
*/

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}

/**
* Restore the focus styles unset by the previous rule.
*/

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}

/**
* Correct the padding in Firefox.
*/

fieldset {
padding: 0.35em 0.75em 0.625em;
}

/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/

legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}

/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/

progress {
vertical-align: baseline;
}

/**
* Remove the default vertical scrollbar in IE 10+.
*/

textarea {
overflow: auto;
}

/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/

[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}

/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}

/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/

[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}

/**
* Remove the inner padding in Chrome and Safari on macOS.
*/

[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}

/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}

/* Interactive
========================================================================== */

/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/

details {
display: block;
}

/*
* Add the correct display in all browsers.
*/

summary {
display: list-item;
}

/* Misc
========================================================================== */

/**
* Add the correct display in IE 10+.
*/

template {
display: none;
}

/**
* Add the correct display in IE 10.
*/

[hidden] {
display: none;
}

+ 9
- 0
layouts/404.html View File

@@ -0,0 +1,9 @@
{{ define "main" }}
{{ partial "sidebar.html" . }}
{{ partial "header" . }}
<main>
<article>
<p><a href="{{ "/" | relURL }}">Go Home</a></p>
</article>
</main>
{{ end }}

+ 32
- 0
layouts/_default/baseof.html View File

@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode | default "en-us" }}">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ .Title }}</title>
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ with .Page.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
<!-- SCSS Style assets -->
{{ $scssOpts := (dict "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $styles := resources.Get "sass/main.scss" | resources.ToCSS $scssOpts | fingerprint }}
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}">
<!-- JavaScript assets -->
{{ $appJs := resources.Get "js/main.js" }}
{{ $mathJs := resources.Get "js/mathjax-tex-svg.js" }}
{{ $js := slice $appJs $mathJs | resources.Concat "js/bundle.js" | minify | fingerprint }}
<script type="text/javascript" src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}" defer async></script>
<!-- RSS -->
{{ with .OutputFormats.Get "RSS" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{- end }}
</head>

<body>
{{ block "main" . }}{{ end }}
{{ partial "footer" . }}
</body>

</html>

+ 10
- 0
layouts/_default/list.html View File

@@ -0,0 +1,10 @@
{{ define "main" }}
{{ partial "sidebar.html" . }}
<main>
{{ partial "header" . }}
{{ range .Paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
{{ partial "pagination.html" . }}
</main>
{{ end }}

+ 18
- 0
layouts/_default/single.html View File

@@ -0,0 +1,18 @@
{{ define "main" }}
{{ partial "sidebar.html" . }}
<main>
{{ partial "header" . }}
<article>
{{ partial "page-metadata" . }}
{{ .TableOfContents }}
<div id="markdownBody">
{{ .Content }}
</div>

<div>
{{ template "_internal/disqus.html" . }}
</div>
<!-- {{ partial "breadcrumbs" . }} -->
</article>
</main>
{{ end }}

+ 10
- 0
layouts/_default/summary.html View File

@@ -0,0 +1,10 @@
<article>
<h1 class="summary-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
{{ partial "page-metadata" . }}
<div>
{{ .Summary }}
{{ if .Truncated }}
<a href="{{ .Permalink }}">Read more...</a>
{{ end }}
</div>
</article>

+ 15
- 0
layouts/index.html View File

@@ -0,0 +1,15 @@
{{ define "main" }}
<main>
{{ partial "sidebar.html" . }}
<article>
<div id="homepage-content">
{{ with .Content }}<div>{{ . }}</div>{{ end }}
</div>
</article>
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
{{ partial "pagination.html" . }}
</main>
{{ end }}

+ 14
- 0
layouts/partials/breadcrumbs.html View File

@@ -0,0 +1,14 @@
{{ if not .IsHome }}
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ $.Scratch.Add "path" .Site.BaseURL }}
<ol id="breadcrumb">
<li><a href="/">root</a></li>
{{ range $index, $element := split $url "/" }}
{{ $.Scratch.Add "path" $element }}
{{ if ne $element "" }}
<li><a href='{{ $.Scratch.Get "path" }}'>{{ . }}</a></li>
{{ $.Scratch.Add "path" "/" }}
{{ end }}
{{ end }}
</ol>
{{ end }}

+ 15
- 0
layouts/partials/footer.html View File

@@ -0,0 +1,15 @@
<footer>
<!-- <div>
<h3>Latest Posts</h3>
<ul>
{{ range first 5 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
</div> -->

<p>
&copy; {{ now.Year }} <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
{{ .Site.Copyright }}
</p>
</footer>

+ 8
- 0
layouts/partials/header.html View File

@@ -0,0 +1,8 @@
<header>
{{ if .Title }}
<h1>
{{ with .Data.Singular }}{{ . }}:{{ end }}
{{ with .Title }}{{ . }}{{ end }}
</h1>
{{ end }}
</header>

+ 23
- 0
layouts/partials/page-metadata.html View File

@@ -0,0 +1,23 @@
<div id="page-metadata">
<!-- <span id="kind-type">kind: {{ .Kind }}/{{ .Type }};</span> -->
{{ if .PublishDate }}
<span id="page-published" title="{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 MST" }}">
created: <time datetime="{{ .PublishDate.Format "2006-01-02T15:04:05-0700" }}">{{ .PublishDate.Format "02 Jan 2006" }}</time>;
</span>
{{ end }}
{{ if .Lastmod }}
<span id="page-modified" title="{{ .Lastmod.Format "Mon, 02 Jan 2006 15:04:05 MST" }}">
modified: <time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05-0700" }}">{{ .Lastmod.Format "02 Jan 2006" }}</time>;
</span>
{{ end }}
{{ if .ReadingTime }}
<span id="reading-time">reading time: {{ .ReadingTime }} min(s);</span>
{{ end }}
{{ with .Params.tags }}
<ul id="tags">
{{ range . }}
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
{{ end }}
</ul>
{{ end }}
</div>

+ 11
- 0
layouts/partials/pagination.html View File

@@ -0,0 +1,11 @@
{{ if gt .Paginator.TotalPages 1 }}
<div id="paginator">
{{ if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL }}">Previous Page</a>
{{ end }}
{{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}
{{ if .Paginator.HasNext }}
<a href="{{ .Paginator.Next.URL }}">Next Page</a>
{{ end }}
</div>
{{ end }}

+ 14
- 0
layouts/partials/sidebar.html View File

@@ -0,0 +1,14 @@
<aside id="sidebar">
<a id="logo" rel="home me contents" href="{{ .Site.BaseURL }}">
<img alt="{{ .Site.Title }}" src="/images/logo.svg">
</a>
{{ with .Site.Menus.main }}
<nav>
<ul>
{{ range . }}
<li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</nav>
{{ end }}
</aside>

BIN
static/fonts/Raleway-SemiBold_latin-ext.woff2 View File


BIN
static/fonts/Raleway-SemiBold_latin.woff2 View File


BIN
static/fonts/SourceSerifPro-Bold_latin-ext.woff2 View File


BIN
static/fonts/SourceSerifPro-Bold_latin.woff2 View File


BIN
static/fonts/SourceSerifPro-Regular_latin-ext.woff2 View File


BIN
static/fonts/SourceSerifPro-Regular_latin.woff2 View File


BIN
static/fonts/SourceSerifPro-Semibold_latin-ext.woff2 View File


BIN
static/fonts/SourceSerifPro-Semibold_latin.woff2 View File


+ 10
- 0
static/images/logo.svg View File

@@ -0,0 +1,10 @@
<!--
Copyright 2016-2018 Udia Software Incorporated.
Please see https://api.udia.ca/static/logo/README.md for license and usage information.
-->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="0 0 90 90">
<polygon points="38.182,57.753 20.18,47.91 20.18,42.455 38.182,32.652 38.182,39.074 25.625,45.113 38.182,51.379 "/>
<polygon points="39.848,62.08 46.351,27.918 50.136,27.918 43.56,62.08 "/>
<polygon points="51.8,57.78 51.8,51.4 64.372,45.181 51.8,39.028 51.8,32.696 69.82,42.5 69.82,47.91 "/>
<path d="M44.999,86.031L9.465,65.517V24.484L44.999,3.969l35.536,20.516v41.029L44.999,86.031L44.999,86.031z M13.07,63.434 l31.929,18.434L76.93,63.434V26.566L44.999,8.131L13.07,26.565V63.434L13.07,63.434z"/>
</svg>

+ 12
- 0
theme.toml View File

@@ -0,0 +1,12 @@
name = "Candor"
license = "MIT"
licenselink = "https://git.udia.ca/alex/candor/LICENSE"
description = "A minimalist Hugo theme."
homepage = "https://git.udia.ca/alex/candor"
tags = ["blog", "plain", "math"]
features = ["blog"]
min_version = "0.62"

[author]
name = "Alexander Wong"
homepage = "https://git.udia.ca/alex"

Loading…
Cancel
Save