Merge commit '5ac0f751aa47e52625662215f66efa99a6abfc2e'

This commit is contained in:
Bjørn Erik Pedersen 2019-10-21 10:52:23 +02:00
commit de8ca7e4d4
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
228 changed files with 9645 additions and 0 deletions

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,16 @@
.header-link:after {
position: relative;
left: 0.5em;
opacity: 0;
font-size: 0.8em;
-moz-transition: opacity 0.2s ease-in-out 0.1s;
-ms-transition: opacity 0.2s ease-in-out 0.1s;
}
h2:hover .header-link,
h3:hover .header-link,
h4:hover .header-link,
h5:hover .header-link,
h6:hover .header-link {
opacity: 1;
}

View file

@ -0,0 +1,21 @@
.animated {
animation-duration: .5s;
animation-fill-mode: forwards;
animation-timing-function: ease-in-out;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.fadeIn {
animation-name: fadeIn;
}
.animated-delay-1 {
animation-delay: 0.5s;
}

View file

@ -0,0 +1,25 @@
/* These styles enhance the home page carousel, located here: themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html */
.overflow-x-scroll{
-webkit-overflow-scrolling: touch;
}
.row {
transition: 450ms transform;
font-size: 0;
}
.tile {
transition: 450ms all;
}
.details {
background: -webkit-gradient(linear, left bottom, left top, from(rgba(0,0,0,0.9)), to(rgba(0,0,0,0)));
background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
transition: 450ms opacity;
}
.tile:hover .details {
opacity: 1;
}
.row:hover .tile {
opacity: 0.3;
}
.row:hover .tile:hover {
opacity: 1;
}

View file

@ -0,0 +1,65 @@
/* Background */ .chroma { background-color: #ffffff }
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; }
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; }
/* Keyword */ .chroma .k { font-weight: bold }
/* KeywordConstant */ .chroma .kc { font-weight: bold }
/* KeywordDeclaration */ .chroma .kd { font-weight: bold }
/* KeywordNamespace */ .chroma .kn { font-weight: bold }
/* KeywordPseudo */ .chroma .kp { font-weight: bold }
/* KeywordReserved */ .chroma .kr { font-weight: bold }
/* KeywordType */ .chroma .kt { color: #445588; font-weight: bold }
/* NameAttribute */ .chroma .na { color: #008080 }
/* NameBuiltin */ .chroma .nb { color: #999999 }
/* NameClass */ .chroma .nc { color: #445588; font-weight: bold }
/* NameConstant */ .chroma .no { color: #008080 }
/* NameEntity */ .chroma .ni { color: #800080 }
/* NameException */ .chroma .ne { color: #990000; font-weight: bold }
/* NameFunction */ .chroma .nf { color: #990000; font-weight: bold }
/* NameNamespace */ .chroma .nn { color: #555555 }
/* NameTag */ .chroma .nt { color: #000080 }
/* NameVariable */ .chroma .nv { color: #008080 }
/* LiteralString */ .chroma .s { color: #bb8844 }
/* LiteralStringAffix */ .chroma .sa { color: #bb8844 }
/* LiteralStringBacktick */ .chroma .sb { color: #bb8844 }
/* LiteralStringChar */ .chroma .sc { color: #bb8844 }
/* LiteralStringDelimiter */ .chroma .dl { color: #bb8844 }
/* LiteralStringDoc */ .chroma .sd { color: #bb8844 }
/* LiteralStringDouble */ .chroma .s2 { color: #bb8844 }
/* LiteralStringEscape */ .chroma .se { color: #bb8844 }
/* LiteralStringHeredoc */ .chroma .sh { color: #bb8844 }
/* LiteralStringInterpol */ .chroma .si { color: #bb8844 }
/* LiteralStringOther */ .chroma .sx { color: #bb8844 }
/* LiteralStringRegex */ .chroma .sr { color: #808000 }
/* LiteralStringSingle */ .chroma .s1 { color: #bb8844 }
/* LiteralStringSymbol */ .chroma .ss { color: #bb8844 }
/* LiteralNumber */ .chroma .m { color: #009999 }
/* LiteralNumberBin */ .chroma .mb { color: #009999 }
/* LiteralNumberFloat */ .chroma .mf { color: #009999 }
/* LiteralNumberHex */ .chroma .mh { color: #009999 }
/* LiteralNumberInteger */ .chroma .mi { color: #009999 }
/* LiteralNumberIntegerLong */ .chroma .il { color: #009999 }
/* LiteralNumberOct */ .chroma .mo { color: #009999 }
/* Operator */ .chroma .o { font-weight: bold }
/* OperatorWord */ .chroma .ow { font-weight: bold }
/* Comment */ .chroma .c { color: #999988; font-style: italic }
/* CommentHashbang */ .chroma .ch { color: #999988; font-style: italic }
/* CommentMultiline */ .chroma .cm { color: #999988; font-style: italic }
/* CommentSingle */ .chroma .c1 { color: #999988; font-style: italic }
/* CommentSpecial */ .chroma .cs { color: #999999; font-weight: bold; font-style: italic }
/* CommentPreproc */ .chroma .cp { color: #999999; font-weight: bold }
/* CommentPreprocFile */ .chroma .cpf { color: #999999; font-weight: bold }
/* GenericDeleted */ .chroma .gd { color: #000000; background-color: #ffdddd }
/* GenericEmph */ .chroma .ge { font-style: italic }
/* GenericError */ .chroma .gr { color: #aa0000 }
/* GenericHeading */ .chroma .gh { color: #999999 }
/* GenericInserted */ .chroma .gi { color: #000000; background-color: #ddffdd }
/* GenericOutput */ .chroma .go { color: #888888 }
/* GenericPrompt */ .chroma .gp { color: #555555 }
/* GenericStrong */ .chroma .gs { font-weight: bold }
/* GenericSubheading */ .chroma .gu { color: #aaaaaa }
/* GenericTraceback */ .chroma .gt { color: #aa0000 }
/* TextWhitespace */ .chroma .w { color: #bbbbbb }

View file

@ -0,0 +1,97 @@
.chroma .lntable pre {
padding: 0;
margin: 0;
border: 0;
}
.chroma .lntable pre code {
padding: 0;
margin: 0;
}
pre, .pre {
overflow-x: auto;
overflow-y: hidden;
overflow: scroll;
}
code {
padding: 0.2em;
margin: 0;
font-size: 85%;
background-color: rgba(27,31,35,0.05);
border-radius: 3px;
}
pre code {
display: block;
padding: 1.5em 1.5em;
font-size: .875rem;
line-height: 2;
overflow-x: auto;
}
pre {
background-color: #fff;
color: #333;
white-space: pre;
hyphens: none;
position: relative;
border-width: 1px;
border-color: #ccc;
border-style: solid;
}
/* The Pygments highlighter comes with its own styles. */
.highlight pre {
background-color: inherit;
color: inherit;
padding: 0.5em;
font-size: .875rem;
}
/*We are adding the copy button content here so we can change it with javascript. See the "Clipboard scripts"*/
.copy:after {
content: "Copy"
}
.copied:after {
content: "Copied"
}
@media (--breakpoint-large) {
.full-width, pre.expand:hover
{
/*width: 100vw;
position: relative;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right: -50vw;*/
/*width: 60vw;*/
/*position: relative;
left: 50%;
right: 50%;*/
/*margin-left: -30vw;*/
margin-right: -30vw;
max-width: 100vw;
}
}
.code-block .line-numbers-rows {
background: #2f3a46;
border: none;
bottom: -50px;
color: #98a4b3;
left: -178px;
padding: 50px 0;
top: -50px;
width: 138px
}
.code-block .line-numbers-rows>span:before {
color: inherit;
padding-right: 30px
}

View file

@ -0,0 +1,38 @@
.primary-color {color: var(--primary-color)}
.bg-primary-color {background-color: var(--primary-color)}
.hover-bg-primary-color:hover {background-color: var(--primary-color)}
.primary-color-dark {color: var(--primary-color-dark)}
.bg-primary-color-dark {background-color: var(--primary-color-dark)}
.hover-bg-primary-color-dark:hover {background-color: var(--primary-color-dark)}
.primary-color-light {color: var(--primary-color-light)}
.bg-primary-color-light {background-color: var(--primary-color-light)}
.hover-bg-primary-color-light:hover {background-color: var(--primary-color-light)}
.accent-color {color: var(--accent-color)}
.bg-accent-color {background-color: var(--accent-color)}
.hover-bg-accent-color:hover {background-color: var(--accent-color)}
.accent-color-light {color: var(--accent-color-light)}
.hover-accent-color-light:hover {color: var(--accent-color-light)}
.bg-accent-color-light {background-color: var(--accent-color-light)}
.hover-bg-accent-color-light:hover {background-color: var(--accent-color-light)}
.accent-color-dark {color: var(--accent-color-dark)}
.bg-accent-color-dark {background-color: var(--accent-color-dark)}
.hover-bg-accent-color-dark:hover {background-color: var(--accent-color-dark)}
.text-color-primary {color: var(--text-color-primary)}
.text-on-primary-color {color: var(--text-on-primary-color)}
.text-color-secondary {color: var(--text-color-secondary)}
.text-color-disabled {color: var(--text-color-disabled)}
.divider-color {color: var(--divider-color)}
.warn-color {color: var(--warn-color)}
.nested-links a {
color: var(--primary-color);
text-decoration: none;
}

View file

@ -0,0 +1,11 @@
.column-count-2 {column-count: 1}
.column-gap-1 {column-gap: 0}
.break-inside-avoid {break-inside: auto}
@media (--breakpoint-large) {
.column-count-3-l {column-count: 3}
.column-count-2-l {column-count: 2}
.column-gap-1-l {column-gap: 1}
.break-inside-avoid-l {break-inside: avoid}
}

View file

@ -0,0 +1,28 @@
.prose table {
width: 100%;
margin-bottom: 3em;
border-collapse: collapse;
border-spacing: 0;
font-size: 1em;
border: 1px solid var(--light-gray);
& th {
background-color: var(--primary-color);
border-bottom: 1px solid var(--primary-color);
color: white;
font-weight: 400;
text-align: left;
padding: .375em .5em;
}
& td, & tc {
padding: .75em .5em;
text-align: left;
border-right: 1px solid var(--light-gray);
}
}
.prose table tr:nth-child(even) {
background-color: var(--light-gray);
}

View file

@ -0,0 +1,41 @@
.prose ul, .prose ol {
margin-bottom: 2em;
}
.prose ul li, .prose ol li {
margin-bottom: .5em;
}
.prose li:hover {
background-color: var(--light-gray)
}
.prose ::selection {
background: var(--primary-color); /* WebKit/Blink Browsers */
color: white;
}
body {
line-height: 1.45;
}
p {margin-bottom: 1.3em;}
h1, h2, h3, h4 {
margin: 1.414em 0 0.5em;
line-height: 1.2;
}
h1 {
margin-top: 0;
font-size: 2.441em;
}
h2 {font-size: 1.953em;}
h3 {font-size: 1.563em;}
h4 {font-size: 1.25em;}
small, .font_small {font-size: 0.8em;}

View file

@ -0,0 +1,9 @@
dl dt {
font-weight: bold;
font-size: 1.125rem;
}
dd {
margin: .5em 0 2em 0;
padding: 0;
}

View file

@ -0,0 +1,54 @@
.note,
.warning {
border-left-width: 4px;
border-left-style: solid;
position: relative;
border-color: var(--primary-color);
display: block;
}
.note #exclamation-icon,
.warning #exclamation-icon {
fill: var(--primary-color);
position: absolute;
top: 35%;
left: -12px;
/*background-color: white;*/
}
.admonition-content {
display: block;
margin: 0px;
padding: .125em 1em;
/*margin-left: 1em;*/
margin-top: 2em;
margin-bottom: 2em;
overflow-x: auto;
/*font-size: .9375em;*/
background-color: var(--black-05);
}
.hide-child-menu .child-menu {
display: none;
}
.hide-child-menu:hover .child-menu,
.hide-child-menu:focus .child-menu,
.hide-child-menu:active .child-menu {
display: block;
}
/*documentation-copy headings exaggerate spacing and size to chunk content */
.documentation-copy h2 {
margin-top: 3em;
&.minor {
font-size: inherit;
margin-top: inherit;
border-bottom: none;
}
}

View file

@ -0,0 +1,10 @@
.f2-fluid {
font-size: 2.25rem;
}
@media (--breakpoint-large) {
.f2-fluid {
font-size: 1.25rem;
font-size: calc(0.875rem + 0.5 * ((100vw - 20rem) / 60));
}
}

View file

@ -0,0 +1,80 @@
/* From http://cssfontstack.com */
code, .code, pre code, .highlight pre {
font-family: 'inconsolata',Menlo,Monaco,'Courier New',monospace;
}
.sans-serif {
font-family: 'Muli',
avenir,
'helvetica neue', helvetica,
ubuntu,
roboto, noto,
'segoe ui', arial,
sans-serif;
}
.serif {
font-family: Palatino,"Palatino Linotype","Palatino LT STD","Book Antiqua",Georgia,serif;
}
/* Monospaced Typefaces (for code) */
.courier {
font-family: 'Courier Next',
courier,
monospace;
}
/* Sans-Serif Typefaces */
.helvetica {
font-family: 'helvetica neue', helvetica,
sans-serif;
}
.avenir {
font-family: 'avenir next', avenir,
sans-serif;
}
/* Serif Typefaces */
.athelas {
font-family: athelas,
georgia,
serif;
}
.georgia {
font-family: georgia,
serif;
}
.times {
font-family: times,
serif;
}
.bodoni {
font-family: "Bodoni MT",
serif;
}
.calisto {
font-family: "Calisto MT",
serif;
}
.garamond {
font-family: garamond,
serif;
}
.baskerville {
font-family: baskerville,
serif;
}

View file

@ -0,0 +1,11 @@
/* modified from:*/
@import 'highlight.js/styles/atom-one-light.css';
/* hljs-template-variable covers the handlebars templating*/
.hljs-template-variable {
color: var(--primary-color);
}
.hljs-attr {
color: var(--accent-color-light);
}

View file

@ -0,0 +1,52 @@
/* pagination.html: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */
.pagination {
margin: 3rem 0;
}
.pagination li {
display: inline-block;
margin-right: .375rem;
font-size: .875rem;
margin-bottom: 2.5em;
}
.pagination li a {
padding: .5rem .625rem;
background-color: white;
color: #333;
border: 1px solid #ddd;
border-radius: 3px;
text-decoration: none;
}
.pagination li.disabled {
display: none;
}
.pagination li.active a:link,
.pagination li.active a:active,
.pagination li.active a:visited {
background-color: #ddd;
}
/* Hides non-meaningful TOC items*/
#TableOfContents ul li ul li ul li{
display: none;
}
#TableOfContents ul li {
color: black;
display: block;
margin-bottom: .375em;
line-height: 1.375;
}
#TableOfContents ul li a{
width: 100%;
padding: .25em .375em;
margin-left: -.375em;
}
#TableOfContents ul li a:hover {
background-color: #999;
color: white;
}

View file

@ -0,0 +1,7 @@
.no-js .needs-js {
opacity: 0
}
.js .needs-js {
opacity: 1;
transition: opacity .15s ease-in;
}

View file

@ -0,0 +1,23 @@
.facebook, .twitter, .instagram, .youtube {
fill: #BABABA;
}
.facebook:hover {
fill: #3b5998;
}
.twitter {
fill: #55acee;
}
.twitter:hover {
fill: #BABABA;
}
.instagram:hover {
fill: #e95950;
}
.youtube:hover {
fill: #bb0000;
}

View file

@ -0,0 +1,15 @@
@media (min-width: 75em) {
[data-scrolldir="down"] .sticky {
position: fixed;
top:100px;
right:0;
}
[data-scrolldir="up"] .sticky {
position: fixed;
top:100px;
right:0;
}
}

View file

@ -0,0 +1 @@
.fill-current { fill: currentColor; }

View file

@ -0,0 +1,34 @@
.tab-button{
margin-bottom:1px;
position: relative;
z-index: 1;
color:#333;
border-color:#ccc;
outline: none;
background-color:white;
}
.tab-pane code{
background:#f1f2f2;
border-radius:0;
}
.tab-pane .chroma{
background:none;
padding:0;
}
.tab-button.active{
border-bottom-color:#f1f2f2;
background-color: #f1f2f2;
}
.tab-content .tab-pane{
display: none;
}
.tab-content .tab-pane.active{
display: block;
}
/* Treatment of copy buttons inside a tab module */
.tab-content .copy, .tab-content .copied{
display: none;
}
.tab-content .tab-pane.active + .copy, .tab-content .tab-pane.active + .copied{
display: block;
}

View file

@ -0,0 +1,94 @@
/*! TACHYONS v4.7.0 | http://tachyons.io */
/*
* NOTE: The Tachyons folder is for backup/reference only. This file references the module
* ________ ______
* ___ __/_____ _________ /______ ______________________
* __ / _ __ `/ ___/_ __ \_ / / / __ \_ __ \_ ___/
* _ / / /_/ // /__ _ / / / /_/ // /_/ / / / /(__ )
* /_/ \__,_/ \___/ /_/ /_/_\__, / \____//_/ /_//____/
* /____/
*
* TABLE OF CONTENTS
*
* 1. External Library Includes
* - Normalize.css | http://normalize.css.github.io
* 2. Tachyons Modules
* 3. Variables
* - Media Queries
* - Colors
* 4. Debugging
* - Debug all
* - Debug children
*
*/
/* External Library Includes */
@import 'tachyons/src/_normalize';
/* Modules */
@import 'tachyons/src/_box-sizing';
/*@import 'tachyons/src/_aspect-ratios';*/
@import 'tachyons/src/_images';
@import 'tachyons/src/_background-size';
@import 'tachyons/src/_background-position';
/*@import 'tachyons/src/_outlines';*/
@import 'tachyons/src/_borders';
@import 'tachyons/src/_border-colors';
@import 'tachyons/src/_border-radius';
@import 'tachyons/src/_border-style';
@import 'tachyons/src/_border-widths';
@import 'tachyons/src/_box-shadow';
/*@import 'tachyons/src/_code';*/
@import 'tachyons/src/_coordinates';
@import 'tachyons/src/_clears';
@import 'tachyons/src/_display';
@import 'tachyons/src/_flexbox';
@import 'tachyons/src/_floats';
/*@import 'tachyons/src/_font-family';*/
@import 'tachyons/src/_font-style';
@import 'tachyons/src/_font-weight';
@import 'tachyons/src/_forms';
@import 'tachyons/src/_heights';
@import 'tachyons/src/_letter-spacing';
@import 'tachyons/src/_line-height';
@import 'tachyons/src/_links';
@import 'tachyons/src/_lists';
@import 'tachyons/src/_max-widths';
@import 'tachyons/src/_widths';
@import 'tachyons/src/_overflow';
@import 'tachyons/src/_position';
@import 'tachyons/src/_opacity';
/*@import 'tachyons/src/_rotations';*/
@import 'tachyons/src/_skins';
@import 'tachyons/src/_skins-pseudo';
@import 'tachyons/src/_spacing';
@import 'tachyons/src/_negative-margins';
@import 'tachyons/src/_tables';
@import 'tachyons/src/_text-decoration';
@import 'tachyons/src/_text-align';
@import 'tachyons/src/_text-transform';
@import 'tachyons/src/_type-scale';
@import 'tachyons/src/_typography';
@import 'tachyons/src/_utilities';
@import 'tachyons/src/_visibility';
@import 'tachyons/src/_white-space';
@import 'tachyons/src/_vertical-align';
@import 'tachyons/src/_hovers';
@import 'tachyons/src/_z-index';
@import 'tachyons/src/_nested';
/*@import 'tachyons/src/_styles';*/
/* Variables */
/* Importing here will allow you to override any variables in the modules */
@import 'tachyons/src/_colors';
@import 'tachyons/src/_media-queries';
/* Debugging */
/*@import 'tachyons/src/_debug-children';
@import 'tachyons/src/_debug-grid';*/
/* Uncomment out the line below to help debug layout issues */
/* @import 'tachyons/src/_debug'; */

View file

@ -0,0 +1,16 @@
:root {
--primary-color: #0594CB;
--primary-color-dark: #0A1922;
--primary-color-light: #f9f9f9;
--accent-color: #EBB951;
--accent-color-light: #FF4088;
--accent-color-dark: #33ba91;
--text-color-primary: #373737;
--text-on-primary-color: #fff;
--text-color-secondary: #ccc;
--text-color-disabled: #F7f7f7;
--divider-color: #f6f6f6;
--warn-color: red;
--blue: var(--primary-color);
}

View file

@ -0,0 +1,39 @@
/*Base Styles*/
@import '_tachyons';
/* purgecss start ignore */
@import '_anchorforid';
@import '_animation';
@import '_documentation-styles';
@import 'docsearch.js/dist/cdn/docsearch.min';
@import '_carousel';
@import '_code';
@import '_tabs';
@import '_color-scheme';
@import '_columns';
@import '_content';
@import '_content-tables';
@import '_definition-lists';
@import '_fluid-type';
@import '_font-family';
@import '_hugo-internal-template-styling';
@import '_no-js';
@import '_social-icons';
@import '_stickyheader';
@import '_svg';
@import '_chroma';
@import '_variables';
.nested-blockquote blockquote {
border-left: 4px solid var(--primary-color);
padding-left: 1em;
/*margin: 0;*/
}
.mw-90 {
max-width:90%;
}
/* purgecss end ignore */

View file

@ -0,0 +1,16 @@
require("typeface-muli")
import styles from './css/main.css';
import './js/anchorforid.js'
import './js/clipboardjs.js'
import './js/codeblocks.js'
import './js/docsearch.js'
import './js/hljs.js'
import './js/lazysizes.js'
import './js/menutoggle.js'
import './js/scrolldir.js'
import './js/smoothscroll.js'
import './js/tabs.js'
import './js/nojs.js'

View file

@ -0,0 +1,34 @@
/**
* Anchor for ID BPNY
**/
var anchorForId = function (id) {
var anchor = document.createElement("a");
anchor.className = "header-link";
anchor.href = "#" + id;
anchor.innerHTML = ' <svg class="fill-current o-60 hover-accent-color-light" height="22px" viewBox="0 0 24 24" width="22px" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>';
return anchor;
};
var linkifyAnchors = function (level, containingElement) {
var headers = containingElement.getElementsByTagName("h" + level);
for (var h = 0; h < headers.length; h++) {
var header = headers[h];
if (typeof header.id !== "undefined" && header.id !== "") {
header.appendChild(anchorForId(header.id));
}
}
};
document.onreadystatechange = function () {
if (this.readyState === "complete") {
var contentBlock = document.getElementsByClassName("prose")[0]
if (!contentBlock) {
return;
}
for (var level = 2; level <= 4; level++) {
linkifyAnchors(level, contentBlock);
}
}
};

View file

@ -0,0 +1,30 @@
var Clipboard = require('clipboard/dist/clipboard.js');
new Clipboard('.copy', {
target: function(trigger) {
if(trigger.classList.contains('copy-toggle')){
return trigger.previousElementSibling;
}
return trigger.nextElementSibling;
}
}).on('success', function(e) {
successMessage(e.trigger, 'Copied!');
e.clearSelection();
}).on('error', function(e) {
successMessage(e.trigger, fallbackMessage(e.action));
});
function successMessage(elem, msg) {
elem.setAttribute('class', 'copied bg-primary-color-dark f6 absolute top-0 right-0 lh-solid hover-bg-primary-color-dark bn white ph3 pv2');
elem.setAttribute('aria-label', msg);
}
function fallbackMessage(elem, action) {
var actionMsg = '';
var actionKey = (action === 'cut' ? 'X' : 'C');
if (isMac) {
actionMsg = 'Press ⌘-' + actionKey;
} else {
actionMsg = 'Press Ctrl-' + actionKey;
}
return actionMsg;
}

View file

@ -0,0 +1,10 @@
let article = document.getElementById('prose')
if (article) {
let codeBlocks = article.getElementsByTagName('code')
for (let [key, codeBlock] of Object.entries(codeBlocks)){
var widthDif = codeBlock.scrollWidth - codeBlock.clientWidth
if (widthDif > 0)
codeBlock.parentNode.classList.add('expand')
}
}

View file

@ -0,0 +1,7 @@
var docsearch = require('docsearch.js/dist/cdn/docsearch.js');
docsearch({
apiKey: '167e7998590aebda7f9fedcf86bc4a55',
indexName: 'hugodocs',
inputSelector: '#search-input',
debug: true // Set debug to true if you want to inspect the dropdown
});

View file

@ -0,0 +1,19 @@
var hljs = require('highlight.js/lib/highlight.js');
hljs.registerLanguage('bash', require('highlight.js/lib/languages/bash'));
hljs.registerLanguage('css', require('highlight.js/lib/languages/css'));
hljs.registerLanguage('markdown', require('highlight.js/lib/languages/markdown'));
hljs.registerLanguage('diff', require('highlight.js/lib/languages/diff'));
// hljs.registerLanguage('go', require('highlight.js/lib/languages/go'));
hljs.registerLanguage('javascript', require('highlight.js/lib/languages/javascript'));
hljs.registerLanguage('json', require('highlight.js/lib/languages/json'));
hljs.registerLanguage('yaml', require('highlight.js/lib/languages/yaml'));
hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml'));
hljs.registerLanguage('html', require('highlight.js/lib/languages/handlebars'));
hljs.registerLanguage("go", function(e) {
var t = { keyword: "code output note warning break default func interface select case map struct chan else goto package switch const fallthrough if range end type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune id autoplay Get", literal: "file download copy true false iota nil Pages with", built_in: "append cap close complex highlight copy imag len make new panic print println real recover delete Site Data tweet youtube ref relref vimeo instagram gist figure innershortcode" };
return { aliases: ["golang","hugo"], k: t, i: "</", c: [e.CLCM, e.CBCM, { cN: "string", v: [e.QSM, { b: "'", e: "[^\\\\]'" }, { b: "`", e: "`" }] }, { cN: "number", v: [{ b: e.CNR + "[dflsi]", r: 1 }, e.CNM] }, { b: /:=/ }, { cN: "function", bK: "func", e: /\s*\{/, eE: !0, c: [e.TM, { cN: "params", b: /\(/, e: /\)/, k: t, i: /["']/ }] }] }
});
hljs.initHighlightingOnLoad();

View file

@ -0,0 +1,3 @@
var lazysizes = require('lazysizes');
// var lsnoscript = require('lazysizes/plugins/noscript/ls.noscript.js');
var unveilhooks = require('lazysizes/plugins/unveilhooks/ls.unveilhooks.js');

View file

@ -0,0 +1,25 @@
import styles from './../css/main.css';
import './anchorforid.js'
import './clipboardjs.js'
import './codeblocks.js'
import './docsearch.js'
import './lazysizes.js'
import './menutoggle.js'
import './scrolldir.js'
import './smoothscroll.js'
import './tabs.js'
import './nojs.js'
// TO use Jquery, just call the modules you want
// var $ = require('jquery/src/core');
// require('jquery/src/core/init');
// require('jquery/src/manipulation');
// OR, use all of them
// var $ = require('jquery/src/jquery');
// And write your code
// $('body').append('<p>Jquery is working</p>');
//

View file

@ -0,0 +1,31 @@
// Grab any element that has the 'js-toggle' class and add an event listner for the toggleClass function
var toggleBtns = document.getElementsByClassName('js-toggle')
for (var i = 0; i < toggleBtns.length; i++) {
toggleBtns[i].addEventListener('click', toggleClass, false)
}
function toggleClass() {
// Define the data target via the dataset "target" (e.g. data-target=".docsmenu")
var content = this.dataset.target.split(' ')
// Find any menu items that are open
var mobileCurrentlyOpen = document.querySelector('.mobilemenu:not(.dn)')
var desktopCurrentlyOpen = document.querySelector('.desktopmenu:not(.dn)')
var desktopActive = document.querySelector('.desktopmenu:not(.dn)')
// Loop through the targets' divs
for (var i = 0; i < content.length; i++) {
var matches = document.querySelectorAll(content[i]);
//for each, if the div has the 'dn' class (which is "display:none;"), remove it, otherwise, add that class
[].forEach.call(matches, function(dom) {
dom.classList.contains('dn') ?
dom.classList.remove('dn') :
dom.classList.add('dn');
return false;
});
// close the currently open menu items
if (mobileCurrentlyOpen) mobileCurrentlyOpen.classList.add('dn')
if (desktopCurrentlyOpen) desktopCurrentlyOpen.classList.add('dn')
if (desktopActive) desktopActive.classList.remove('db')
}
}

View file

@ -0,0 +1 @@
document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/, 'js');

View file

@ -0,0 +1 @@
var scrollDir = require('scrolldir/dist/scrolldir.auto.min.js');

View file

@ -0,0 +1,80 @@
// query selector targets Hugo TOC
(function() {
'use strict';
// Feature Test
if ('querySelector' in document && 'addEventListener' in window && Array.prototype.forEach) {
// Function to animate the scroll
var smoothScroll = function(anchor, duration) {
// Calculate how far and how fast to scroll
var startLocation = window.pageYOffset;
var endLocation = anchor.offsetTop;
var distance = endLocation - startLocation;
var increments = distance / (duration / 16);
var stopAnimation;
// Scroll the page by an increment, and check if it's time to stop
var animateScroll = function() {
window.scrollBy(0, increments);
stopAnimation();
};
// If scrolling down
if (increments >= 0) {
// Stop animation when you reach the anchor OR the bottom of the page
stopAnimation = function() {
var travelled = window.pageYOffset;
if ((travelled >= (endLocation - increments)) || ((window.innerHeight + travelled) >= document.body.offsetHeight)) {
clearInterval(runAnimation);
}
};
}
// If scrolling up
else {
// Stop animation when you reach the anchor OR the top of the page
stopAnimation = function() {
var travelled = window.pageYOffset;
if (travelled <= (endLocation || 0)) {
clearInterval(runAnimation);
}
};
}
// Loop the animation function
var runAnimation = setInterval(animateScroll, 16);
};
// Define smooth scroll links
var scrollToggle = document.querySelectorAll('#TableOfContents ul li a');
// For each smooth scroll link
[].forEach.call(scrollToggle, function(toggle) {
// When the smooth scroll link is clicked
toggle.addEventListener('click', function(e) {
// Prevent the default link behavior
e.preventDefault();
// Get anchor link and calculate distance from the top
var dataID = toggle.getAttribute('href');
var dataTarget = document.querySelector(dataID);
var dataSpeed = toggle.getAttribute('data-speed');
// If the anchor exists
if (dataTarget) {
// Scroll to the anchor
smoothScroll(dataTarget, dataSpeed || 500);
}
}, false);
});
}
})();

View file

@ -0,0 +1,43 @@
/**
* Scripts which manages Code Toggle tabs.
*/
var i;
// store tabs variable
var allTabs = document.querySelectorAll("[data-toggle-tab]");
var allPanes = document.querySelectorAll("[data-pane]");
function toggleTabs(event) {
if(event.target){
event.preventDefault();
var clickedTab = event.currentTarget;
var targetKey = clickedTab.getAttribute("data-toggle-tab")
}else {
var targetKey = event
}
// We store the config language selected in users' localStorage
if(window.localStorage){
window.localStorage.setItem("configLangPref", targetKey)
}
var selectedTabs = document.querySelectorAll("[data-toggle-tab='" + targetKey + "']");
var selectedPanes = document.querySelectorAll("[data-pane='" + targetKey + "']");
for (var i = 0; i < allTabs.length; i++) {
allTabs[i].classList.remove("active");
allPanes[i].classList.remove("active");
}
for (var i = 0; i < selectedTabs.length; i++) {
selectedTabs[i].classList.add("active");
selectedPanes[i].classList.add("active");
}
}
for (i = 0; i < allTabs.length; i++) {
allTabs[i].addEventListener("click", toggleTabs)
}
// Upon page load, if user has a preferred language in its localStorage, tabs are set to it.
if(window.localStorage.getItem('configLangPref')) {
toggleTabs(window.localStorage.getItem('configLangPref'))
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,4 @@
[module]
[module.hugoVersion]
min = "0.56.0"

View file

@ -0,0 +1,17 @@
[[banners]]
name = "Forestry.io"
link = "https://forestry.io/"
logo = "/images/sponsors/forestry-logotype.svg"
copy = ""
[[banners]]
name = "Linode"
link = "https://www.linode.com/"
logo = "/images/sponsors/linode-logo_standard_light_medium.png"
copy = ""
[[banners]]
name = "eSolia"
link = "https://esolia.com/post/why-did-esolia-choose-hugo/"
logo = "/images/sponsors/esolia-logo.svg"
copy = ""

View file

@ -0,0 +1,10 @@
{{ define "main" }}
<main class="cf pa5 pa4-l f4 tc center measure-wide lh-copy gray">
<h1 class="f3 f2-ns">The page you're looking for doesn't exist. Perhaps you'd like to gopher something else? Sorry.</h1>
<div class="h6">
<img src="/images/gopher-hero.svg" alt="" class="h5">
</div>
{{ .Content }}
</main>
{{ end }}

View file

@ -0,0 +1,70 @@
<!DOCTYPE html>
<html class="no-js" lang="{{ with $.Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
<head>
<meta charset="utf-8">
{{/* https://www.zachleat.com/web/preload/ */}}
<link rel="preload" href="{{ "fonts/muli-latin-200.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/muli-latin-400.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/muli-latin-800.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{{/* NOTE: the Site's title, and if there is a page title, that is set too */}}
<title>{{ block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
<meta name="viewport" content="width=device-width,minimum-scale=1">
{{ hugo.Generator }}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
{{ else }}
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
{{ end }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
{{ $isDev := eq hugo.Environment "development" }}
{{ $stylesheet := resources.Get "output/css/app.css" }}
{{ if not $isDev }}
{{ $stylesheet = $stylesheet | minify | fingerprint }}
{{ end }}
{{ with $stylesheet }}
{{ if $isDev }}
<link rel="stylesheet" href="{{ .RelPermalink }}" crossorigin="anonymous">
{{ else }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ end }}
{{ $.Scratch.Set "stylesheet" . }}
{{end}}
{{ block "scripts" . }}
{{- partial "site-scripts.html" . -}}
{{ end }}
{{ partial "site-manifest.html" . }}
{{- partial "head-additions.html" . -}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ partial "gtag" . }}
{{ end }}
</head>
<body class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}">
{{ block "nav" . }}{{ partial "site-nav.html" . }}{{ end }}
{{ block "header" . }}{{ end }}
<main role="main" class="content-with-sidebar min-vh-100 pb7 pb0-ns">
{{ block "main" . }}{{ end }}
</main>
{{ block "footer" . }}{{ partialCached "site-footer.html" . }}{{ end }}
</body>
</html>

View file

@ -0,0 +1,5 @@
{{ define "main" }}
{{ $paginator := .Paginate (.Pages | lang.Merge (where .Sites.First.RegularPages "Section" .Section)) }}
{{ $section_to_display := .Sections | default $paginator.Pages }}
{{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }}
{{ end }}

View file

@ -0,0 +1,37 @@
<header class="flex-none w-100">
{{ if .Params.categories }}
{{ range .Params.categories }}
<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" class="f6 fw8 mb0 link mid-gray dim mr3">
{{ humanize . | upper }}
</a>
{{ end }}
{{end}}
<h1 class="lh-title mb3 mv0 pt3 primary-color-dark">
{{- if eq .Section "functions" -}}
{{ .LinkTitle }}
{{- else -}}
{{ .Title }}
{{- end -}}
</h1>
</header>
<aside class="bt bw1 pt3 mt2 mid-gray b--mid-gray fn w-100">
{{ with .Params.description }}
<div class="f4 fw4 lh-copy">
{{ . | markdownify }}
</div>
{{ end }}
<!--
NOTE: Removed to test builds without it.
partial "components/author-github-data" (dict "context" . "size" "110") -->
</aside>
{{ with .Params.featured_image_path }}
<img src="{{ . }}" alt="Featured Image for {{ $.Title }}" class="mw-100">
{{ end }}
<div class="prose" id="prose">
{{- partial "docs/functions-signature.html" . -}}
{{ .Content }}
</div>

View file

@ -0,0 +1,31 @@
{{ define "main" }}
<article class="w-100 ph4 pb5 pb6-ns pt1 pt5-ns">
<div class="flex-l">
<div class="order-2 w-100 w-20-l ph5-m ph0-l mb4 sticky">
{{- partial "toc.html" . -}}
</div>
<div class="order-1 w-60-l mw7 ph0 ph5-ns mid-gray nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote mt0-ns" style="flex-grow:1;">
<div class="documentation-copy center measure-wide-l">
<div id="readout" class="fixed right-0 bottom-0">
</div>
{{ .Render "page" }}
{{ partial "related.html" . }}
</div>
</div>
<div class="order-0 w-20 dn db-l">
{{ partial "nav-links-docs.html" . }}
</div>
</div>
</article>
<div class="w-100 bg-light-gray">
<div class="mw7 pa4 center nested-lh-copy lh-copy">
{{ partial "docs/page-meta-data.html" . }}
{{ partial "page-edit.html" . }}
{{ partial "tags.html" . }}
</div>
</div>
{{ end }}

View file

@ -0,0 +1,4 @@
{{ define "main" }}
{{ $section_to_display := .Pages }}
{{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }}
{{ end }}

View file

@ -0,0 +1,49 @@
{{/* {{ define "header" }}{{ partial "page-header" . }}{{ end }} */}}
{{ define "main" }}
{{ $section_to_display := .Pages }}
<div class="w-100 ph4 pb5 pb6-ns pt1 pt3-ns">
<div class="flex">
<div class="dn db-l w-20">
{{ partial "nav-links-docs.html" . }}
</div>
<div class="w-100 w-80-l ph0 ph4-l">
<article class="w-100 nested-copy-line-height nested-links nested-img">
<h1 class="primary-color-dark f2">
{{ .Title }}
</h1>
</article>
<div class="pa3 pa4-ns w-100 v-top column-count-3-l column-gap-1-l">
{{ range $key, $value := .Data.Terms }}
<div class="break-inside-avoid-l nested-copy-line-height mb5">
<h2 class="f3">
<a href="{{ "/" | relLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}" class="link black hover-blue">
{{ $key }} <span class="f6 gray"> &#8599;</span>
</a>
</h2>
{{ range $value.Pages }}
<h3>
<a href="{{ .Permalink }}" class="link blue">
{{ .Title }}
</a>
</h3>
{{ end }}
</div>
{{ end }}
</div>
</div>
</div>
</div>
{{ end }}

View file

@ -0,0 +1,8 @@
/*
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Referrer-Policy: origin-when-cross-origin
/*
Link: <{{ "dist/app.bundle.js" | relURL }}>; rel=preload; as=script
Link: <{{ "dist/main.css" | relURL }}>; rel=preload; as=style

View file

@ -0,0 +1,27 @@
{{ define "header" }}
{{ partial "hero" . }}
{{ partial "boxes-small-news" . }}
{{ end }}
{{ define "main" }}
<section class="w-100 ph4 ph5-ns pv4">
{{- partial "home-page-sections/features-icons" . -}}
</section>
{{ partial "home-page-sections/sponsors.html" (dict "cx" . "gtag" "home" ) }}
{{- partial "home-page-sections/features-single" . -}}
{{- partial "home-page-sections/showcase.html" . -}}
<section class="w-100 ph4 ph5-ns pv4 pv6-ns mid-gray bg-white bb bt b--light-gray">
{{- partial "home-page-sections/installation" . -}}
</section>
<section class="w-100 ph4 ph5-ns pv4 pv6-ns mid-gray bg-accent-color-dark">
{{- partial "home-page-sections/tweets" . -}}
</section>
<section class="w-100 ph4 ph5-ns pt4 pb5 mid-gray bg-primary-color-light bb bt b--light-gray ">
{{- partial "home-page-sections/open-source-involvement" . -}}
</section>
{{ end }}

View file

@ -0,0 +1,6 @@
# Netlify redirects. See https://www.netlify.com/docs/redirects/
{{ range $p := .Site.Pages -}}
{{ range .Aliases }}
{{ . | printf "%-35s" }} {{ $p.RelPermalink -}}
{{ end -}}
{{- end -}}

View file

@ -0,0 +1,43 @@
{{/* TODO: think about adding these tags back in, but they need to be limited to news
{{ define "header" }}{{ partial "page-header" . }}{{ end }} */}}
{{ define "main" }}
<div class="w-100 ph4 ph5-ns pb5 pb6-ns pt1 pt3-ns ">
<article class="cf pa3 pa4-m pa4-l nested-copy-line-height nested-img">
<h1 class="primary-color-dark">
{{ .Title }}
</h1>
<div class="nested-copy-line-height">
{{ .Content }}
</div>
</article>
<!-- TODO: May be a good idea in this case to add monthly archives -->
<div class="flex flex-wrap">
{{/* [wip] add archive lists
<div class="w-100 w-20-ns dn">
<ul>
<li>
<a href="#">
archive section
</a>
</li>
</ul>
</div> */}}
{{ $interior_classes := $.Site.Params.flex_box_interior_classes }}
<section class="flex-ns flex-wrap justify-between w-100 w-80-nsTK v-top">
{{ $paginator := .Paginate (.Pages | lang.Merge (where .Sites.First.RegularPages "Section" .Section)) -}}
{{ range $paginator.Pages }}
{{ partial "boxes-section-summaries" (dict "context" . "classes" $interior_classes "fullcontent" false) }}
{{ end }}
</section>
</div>
<div class="nested-list-reset nested-links">
{{/* pagination.html: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */}}
{{ template "_internal/pagination.html" . }}
</div>
</div>
{{ end }}

View file

@ -0,0 +1,88 @@
{{ define "main" }}
{{ $currentPageUrl := .RelPermalink }}
<article class="cf ph4 pv3 pv5-ns">
<!-- header spans the full width -->
<header class="flex-none w-100 pb3">
{{ if .Params.categories }}
{{ range .Params.categories }}
<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" class="f6 fw8 mb0 link mid-gray dim mr3">
{{ humanize . | upper }}
</a>
{{ end }}
{{end}}
<h1 class="lh-title fw9 mb7 mv0 pt3">
<a href="{{ .RelPermalink }}" class="link primary-color dim">
{{ .Title }}
</a>
</h1>
</header>
<div class="flex-l">
<aside class="mid-gray fn w-100 w-25-l">
{{ with .Params.description }}
<h2 class="f3 lh-title">
{{ . | markdownify }}
</h2>
{{ end }}
<time class="f6 mt2 db ttu tracked" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ .Date.Format "January 2, 2006" }}
</time>
{{ if in .Params.categories "Releases" }}
<p>
Go to <a href="https://github.com/gohugoio/hugo/releases" class="link primary-color dim">Hugo Releases</a> for the release downloads.
</p>
{{ end }}
<!--
NOTE: Removed to test builds without it.
partial "components/author-github-data" (dict "context" . "size" "110") -->
<div class="nested-links mt4">
{{- partial "previous-next-links-in-section.html" . -}}
</div>
</aside>
<div class="fn pl5-l pt3 mid-gray w-100 w-two-third-l sans-serif nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote measure-wide-l"><!-- TODO: Can the content top and the description top line up more precisely, or is just winging it with padding the best we've got? -->
{{ with .Params.featured_image_path }}
<img src="{{ . }}" alt="Featured Image for {{ $.Title }}" class="mw-100">
{{ else }}
{{ $featured := (.Resources.ByType "image").GetMatch "*featured*" }}
{{ with $featured }}
{{ $featured := .Resize "480x" }}
<img src="{{ $featured.RelPermalink }}" alt="Featured Image for {{ $.Title }}" class="mw-100">
{{ end }}
{{ end }}
{{ .Content }}
</div>
</div>
{{ if and .Params.tags .Site.Taxonomies.tags }}
<div class="mt5 f6 gray nested-lh-copy bg-light-gray ph3 pv2 measure-wide-l">
{{ $name := index .Params.tags 0 }}
{{ $name := $name | urlize }}
{{ $tags := index .Site.Taxonomies.tags $name }}
<ul class="list dib nested-links ml0 pl0">
<li class="dib mb2 mr2">Related:</li>
{{ range $tags.Pages }}
{{ if ne .RelPermalink $currentPageUrl }}
<li class="mb2 mr3">
<a href="{{ .RelPermalink }}" class="link">
{{ .LinkTitle }}
</a>
</li>
{{ end }}
{{end}}
</ul>
</div>
{{end}}
<div class="gray f6 mv6">
Last Update: {{ .Lastmod.Format "January 2, 2006" }} <br>
{{ partial "page-edit.html" . }}
</div>
</article>
{{ end }}

View file

@ -0,0 +1,4 @@
{{ define "main" }}
{{ $section_to_display := (.Site.Taxonomies.categories.fundamentals).Pages | lang.Merge (.Sites.First.Taxonomies.categories.fundamentals).Pages }}
{{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }}
{{ end }}

View file

@ -0,0 +1,35 @@
<div class="relative {{ .classes }} weight-{{ .context.Weight }}">
<div class="bg-white mb2 pa3 pa4-l gray">
{{ if eq .context.Section "news" }}
<date class="f6 db" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ .context.Date.Format "January 2, 2006" }}
</date>
{{ end }}
<h1 class="near-black f3">
<a href="{{ .context.RelPermalink }}" class="link primary-color dim">
{{- if eq .context.Section "functions" -}}
{{ .context.LinkTitle }}
{{- else -}}
{{ .context.Title }}
{{- end -}}
</a>
</h1>
<div class="lh-copy links">
{{ if .context.Params.description }}
{{ .context.Params.description | markdownify }}
{{ else }}
{{ .context.Summary }}
{{ end }}
<a href="{{ .context.RelPermalink }}" class="f6 mt2 db link primary-color dim">
Read More &raquo;
</a>
</div>
</div>
</div>

View file

@ -0,0 +1,18 @@
<section class="relative w-100 bg-black white">
<div class="flex flex-wrap w-90-l center center mw9">
<!-- <a href="/news/" class="link accent-color tr-ns f6 w-100 w-50-m w-10-l bg-animate hover-bg-accent-color hover-white pv3 pv4-l ph3 ph4-l dib">
Latest News:
</a> -->
{{ range first 4 ( sort (where .Site.RegularPages "Section" "news") "Date" "desc" ) }}
<!-- only show 2 boxes on mobile -->
{{ $.Scratch.Add "i" 1 }}{{ $i := $.Scratch.Get "i" }}
<a href="{{ .RelPermalink }}" class="link lh-copy light-gray f6 w-100 w-50-m w-25-l bg-animate hover-bg-accent-color hover-white pv3 pv4-ns ph3 ph4-ns{{ if ge $i 3 }} dn dib-l{{ else }} dib{{ end }}">
<span class="f6 gray pb1 db">
{{ .Date.Format "January 2, 2006" }}
</span>
{{ .Params.description | markdownify | truncate 100 "…"}}
</a>
{{ end }}
</div>
</section>

View file

@ -0,0 +1,33 @@
{{ $author := .context.Params.author }}
{{ if $author }}
<aside class="mw5 center bg-white br3 pa3 pa4-ns mv3 ba b--black-10 nested-links">
{{ $urlPre := "https://api.github.com" }}
{{ $user_json := getJSON $urlPre "/users/" $author }}
<div class="tc">
{{ if $user_json.avatar_url }}
<a href="{{ $user_json.html_url }}" class="link hover-bg-light-gray pa1 br-100">
<img src="{{ $user_json.avatar_url }}&size={{ .size }}" alt="" class="br-100 ba b--light-gray">
</a>
{{ end }}
{{ if $user_json.name }}
<h3 class="f4">
<a href="{{ $user_json.html_url }}" class="link dim">
{{ $user_json.name }}
</a>
</h3>
<hr class="mw3 bb bw1 b--black-10">
{{ end }}
{{ if $user_json.bio }}
<p class="lh-copy measure center f6 black-70">
{{ $user_json.bio }}
</p>
{{ end }}
</div>
</aside>
{{ end }}

View file

@ -0,0 +1,21 @@
{{ $author := .context.Params.author }}
{{ if $author }}
<aside class="mw5 br3 mv3 nested-links">
{{ $urlPre := "https://api.github.com" }}
{{ $user_json := getJSON $urlPre "/users/" $author }}
{{ if $user_json.name }}
<h3 class="f4 dib">
{{ $user_json.name | htmlEscape }}
</h3>
{{ end }}
{{ if $user_json.bio }}
<p class="lh-copy measure center mt0 f6 black-60">
{{ $user_json.bio | htmlEscape }}
</p>
{{ end }}
<a href="{{ $user_json.html_url }}" class="link dim v-mid dib">
{{ partial "svg/github-squared.svg" (dict "fill" "gray" "width" "16" "height" "18") }}
</a>
</aside>
{{ end }}

View file

@ -0,0 +1,11 @@
{{ if isset .Params "signature" -}}
{{- with .Params.signature }}
<h2 class="minor mb1 pt4 primary-color-dark">Syntax</h2>
{{- range . }}
<pre class="f5 mb4 ph3 pv2 bg-light-gray" style="border-left:4px solid #0594CB;">
{{- . -}}
</pre>
{{- end }}
{{- end -}}
{{ end }}
{{/* The inline style overrides `pre` styling defaults */}}

View file

@ -0,0 +1,6 @@
<h6 class="f4 dark-gray mb2">
<a href="{{ .Permalink }}" class="hide-child link primary-color">
<span class="nl3 child">{{ partial "svg/link-permalink.svg" (dict "size" "14px") }}</span>
“{{ .Title }}”
</a> was last updated: {{ .Lastmod.Format "January 2, 2006" }}{{ with .GitInfo }}: <a class="hide-child link primary-color" href="{{$.Site.Params.ghrepo}}commit/{{ .Hash }}">{{ .Subject }} ({{ .AbbreviatedHash }})</a>{{end }}
</h6>

View file

@ -0,0 +1,13 @@
<div class="relative w-100 mb4 bg-white nested-copy-line-height">
<div class="bg-white mb3 pa4 gray overflow-hidden">
<span class="f6 db">{{ humanize .Section }}</span>
<h1 class="f3 near-black">
<a href="{{ .RelPermalink }}" class="link black dim">
{{ .Title }}
</a>
</h1>
<div class="nested-links f5 lh-copy nested-copy-line-height">
{{ .Summary }}
</div>
</div>
</div>

View file

@ -0,0 +1,26 @@
{{ with .Site.GoogleAnalytics }}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
{{ $site := $.Site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+).*" "$2" }}
gtag('config', '{{ . }}', {'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'});
/**
* Function that tracks a click on an outbound link in Analytics.
* Setting the transport method to 'beacon' lets the hit be sent
* using 'navigator.sendBeacon' in browser that support it.
*/
var trackOutboundLink = function(id, url) {
gtag('event', 'click', {
'event_category': 'outbound',
'event_label': id,
'transport_type': 'beacon',
'event_callback': function(){document.location = url;}
});
}
</script>
{{ end }}

View file

@ -0,0 +1 @@
<!-- EMPTY -->

View file

@ -0,0 +1,18 @@
<header class="bg-primary-color-dark ph4 tc" role="banner">
<section class="center pb4 pb5-l ph4-l pt3 pt5-ns w-90 w-60-l">
<div class="center w-100 w-50-ns">
<img src="/images/hugo-logo-wide.svg" alt="Hugo Logo">
</div>
{{ with .Site.Params.description }}
<h2 class="f3 f1-l fw4 white-90 m0 lh-title pt2 pb3 pv0-ns">
{{ . }}
</h2>
{{ end }}
<div class="lh-copy f4 w-90-ns center fw2 silver tc tc-ns">
{{ .Content }}
</div>
<div class="w4 mv4 center">
<a class="f5 db link grow tc v-mid bg-blue white ba b--blue ph3 pv2 br1" href="/getting-started/quick-start/">Quick Start</a>
</div>
</section>
</header>

View file

@ -0,0 +1,34 @@
<div class="w-90-l center">
{{ if .Params.features }}
<div class=" flex-ns flex-wrap justify-center center mw9">
{{ $features := .Params.features }}
{{ range $i, $e := $features }}
{{ $features_count := $e | len }}
<div class="w-100{{ if and (eq $i $features_count) (ne (modBool $features_count 2) true) }} w-70-ns {{ else }} w-50-ns {{ end }}ph5-l pv5-l nested-copy-line-height">
<!-- NOTE: "if eq $i $features_count" makes the last item a bit wider for balance. If we use an even number of items, we'll want to remove this -->
<div class="flex-l flex-wrap justify-between">
<div class="flex-auto w-100 w-20-ns pt1 ">
{{ with .image_path }}
<img src="{{ . }}" alt="icon depicting {{ $e.heading }}" class="h3 o-80 v-mid center w-100">
{{ end }}
</div>
<div class="flex-auto tc tl-ns w-100 w-80-ns">
<h3 class="lh-title gray o-80 f4 f5-ns mb2 fw8 bmt1 mt0-l">
{{ .heading }}
</h3>
<div class="db v-mid w-100 gray measure-wide mb5 mb0-l">
<p class="f3 primary-color mt0 mb2">{{.tagline}}</p>
<div class="lh-copy">
{{ .copy }}
</div>
</div>
</div>
</div>
</div>
{{ end }}
</div>
{{ end }}
</div>

View file

@ -0,0 +1,32 @@
{{ if .Params.sections }}
{{ range .Params.sections }}
{{ $.Scratch.Add "i" 1 }}{{ $i := $.Scratch.Get "i" }}
<section class="w-100 ph4 ph5-ns pv4 pv6-ns mid-gray {{ .color_classes }}">
<div class="flex-ns flex-wrap center mw9">
<div class="w-100 w-50-l {{ if modBool $i 2 }}order-1{{ else }}order-0{{ end }}">
<div class="w-90-ns center">
<img src="{{ .image }}" alt="image depicting an example of {{ .heading }}" class="img shadow-5">
</div>
</div>
<div class="w-100 w-50-l">
<div class="w-80-ns center tc">
<h3 class="f1 fw4 black ma0 pt4 lh-title pt0-l">{{ .heading }}</h3>
<p class="f3 lh-copy">
{{ .copy }}
</p>
<p class="f4 lh-copy nested-linksTK">
<a href="{{ .link | absURL }}" class="link black dim">
{{ .cta }} {{ partial "svg/link-ext.svg" (dict "fill" "#333" "size" "14") }}
</a>
</p>
</div>
</div>
</div>
</section>
{{ end }}
{{ end }}

View file

@ -0,0 +1,39 @@
<div class="flex-ns flex-wrap center mw9">
<!-- LEFT -->
<div class="w-100 w-50-ns">
<div class="w-80 center tc nested-copy-line-height">
<h3 class="f2 black">Install in seconds, build in milliseconds.</h3>
<p class="f3">Hugo works on macOS, Windows, Linux, FreeBSD, and others.</p>
<p class="f3">Host on any server or your favorite CDN.</p>
</div>
</div>
<!-- RIGHT -->
<div class="w-100 w-50-ns tc">
<div class="h4">
<img src="/images/gopher-hero.svg" alt="Hugo Gopher" class="h4">
</div>
<p class="f6 mid-gray m0 p0 pt3">Mac OS</p>
<div class="code f6 bg-black light-green lh-copy pv3 ph3 br2 w-100 w-50-ns center mb2 tl">
$ brew install hugo <br />
</div>
<p class="f6 mid-gray">Windows</p>
<div class="code f6 bg-black light-green lh-copy pv3 ph3 br2 w-100 w-50-ns center tl">
$ choco install hugo -confirm <br />
</div>
<p class="f6 mid-gray">Linux</p>
<div class="code f6 bg-black light-green lh-copy pv3 ph3 br2 w-100 w-50-ns center tl">
$ snap install hugo <br />
</div>
<p class="f5 nested-links"><a href="{{ "getting-started/installing/" | absURL }}" class="link">See the Getting Started Guide for other methods. {{ partial "svg/link-ext.svg" (dict "fill" "#333" "size" "14") }}</a></p>
</div>
<!-- TODO: the install section should have a tab menu for selecting the preferred installation method, i.e. the binaries from GitHub or the commands for the installation via a package manager https://github.com/rdwatters/hugo-docs-concept/issues/3#issuecomment-287498412 -->
<!-- TODO: Animate the gopher https://github.com/rdwatters/hugo-docs-concept/issues/3#issuecomment-287194777 -->
</div>

View file

@ -0,0 +1,59 @@
<div class="w-100 center pt5">
<div class="w-100 w-40-l tc center">
<img src="/images/GitHub-Mark-64px.png" alt="Github Logo" class="tc center">
</div>
</div>
<div class="flex-ns flex-wrap center pb4 center mw9">
<!-- LEFT -->
<div class="w-100 tc w-third-l">
<h3 class="f3 mv3 accent-color-light">We welcome all contributions</h3>
<ul class="list ma0 pa0">
<li class="mb3 f4">
<a href="https://github.com/gohugoio/hugo/blob/master/CONTRIBUTING.md" class="link mid-gray dim">
Fork the repo and work on an issue {{ partial "svg/link-ext.svg" (dict "fill" "#333" "size" "14") }}
</a>
</li>
<li class="mb3 f4">
<a href="https://themes.gohugo.io/" class="link mid-gray dim">
Design a theme {{ partial "svg/link-ext.svg" (dict "fill" "#333" "size" "14") }}
</a>
</li>
</ul>
</div>
<div class="w-100 w-third-l tc">
<div class="w-60-l center">
<p class="f4">Hugo is open-source and completely free.</p>
<p class="f4">Our hundreds of contributors make Hugo great.</p>
</div>
</div>
<div class="w-100 tc w-third-l">
<h3 class="f3 mv3 accent-color-light">More ways to contribute</h3>
<ul class="list ma0 pa0">
<li class="mb3 f4">
<a href="https://gohugo.io/overview/introduction/" class="link mid-gray dim">
Help improve the docs {{ partial "svg/link-ext.svg" (dict "fill" "#333" "size" "14") }}
</a>
</li>
<li class="mb3 f4">
<a href="https://discourse.gohugo.io/" class="link mid-gray dim">
Help others in the forums {{ partial "svg/link-ext.svg" (dict "fill" "#333" "size" "14") }}
</a>
</li>
</ul>
</div>
<!-- RIGHT -->
</div>

View file

@ -0,0 +1,44 @@
<section class="bg-near-white mid-gray pb5 ph4 ph5-ns pt4 w-100">
<h3 class="black f1 fw4 lh-title ma0 pb3 pt0-l pt4">Showcase</h3>
{{/* NOTE: transitions for this section are in themes/gohugoioTheme/src/css/_carousel.css */}}
<div class="w-100">
<div class="w-100 overflow-x-scroll">
<div class="row nowrap mv2 pb1">
{{ $showcasePages := where .Site.RegularPages "Section" "showcase" }}
{{ if $showcasePages }}
{{ template "home_showcase_item" (index $showcasePages 0) }}
{{ range $p := first 10 ($showcasePages | after 1 | shuffle) }}
{{template "home_showcase_item" $p }}
{{end}}
{{end}}
</div>
</div>
</div>
{{/* END */}}
<div class="flex w-100 mt4 justify-end">{{/* using Flex to make the button show up on the right side */}}
<a href="/showcase/" class="br2 f6 bg-primary-color-dark hover-bg-primary-color link ph3 pv2 ttu white">See All</a>
</div>
</section>
{{ define "home_showcase_item" }}
{{ $img := (.Resources.ByType "image").GetMatch "*featured*" }}
{{ with $img }}
{{ $big := .Fill "1024x512 top" }}
{{ $small := $big.Resize "512x" }}
<a href="{{ $.RelPermalink}}" class="tile lazyload cover dib f4 h5 ml1 mr4 bg-black relative mw-100 shadow-5" style="width:{{ $small.Width }}px;"
data-bg="{{ $img.RelPermalink }}"
data-sizes="auto"
data-srcset="{{ $small.RelPermalink }} 1x,
{{ $big.RelPermalink }} 2x" data-src="small"
>
{{with $.Title}}
<div class="details absolute bottom-0 f3-ns f4 left-0 o-0 right-0 top-0">
<div class="absolute bottom-0 pa2 tc white">
{{.}} &#8594;
</div>
</div>
{{end}}
</a>
{{ end }}
{{ end }}

View file

@ -0,0 +1,38 @@
{{$classes_box := "ba b--light-gray bg-light-gray br3 flex flex-column flex-wrap items-center justify-center ph3 pv4 mb4 w-100 w-30-l "}}
{{$gtag := .gtag | default "unknown" }}
{{ with .cx.Site.Data.sponsors }}
<section class="{{ $.classes_section | default "bg-primary-color-dark b--dark-gray bb bt ph5 pv4 w-100"}}">
<div class="center mw9"> 
<h3 class="b f3 mv0 light-gray">Hugo Sponsors</h3>
<div class="flex-ns flex-wrap center justify-between pt3">
{{ range .banners }}
{{ $banner := . }}
{{if .logo}}
<div class="{{$classes_box}} o-100">
{{with .link -}}
{{ $url := printf "%s?%s" . (querify "utm_source" "homepage" "utm_medium" "banner" "utm_campaign" "hugosponsor") | safeURL }}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq $.cx.Site.Params.env "production") }}
{{ $gtagID := printf "Sponsor %s %s" $banner.name $gtag | title }}
<a href="{{ $url }}" onclick="trackOutboundLink({{ printf "'%s', '%s'" $gtagID $url | safeJS }}); return false;" class="grow">
{{ else }}
<a href="{{ $url }}" class="grow">
{{ end }}
{{- end}}
<img src="{{ .logo }}" alt="Logo for {{ .name }}" class="img h3 center" />
{{with .link}}</a>{{end}}
{{with .copy}}
<p class="center lh-copy gray mv1 tc {{$.classes_copy | default "f5 w-70-ns"}}">
{{- . -}}
</p>
{{end}}
</div>
{{else}}
<div class="{{$classes_box}} o-10">
<p class="b black tc">Your Logo Here</p>
</div>
{{end}}
{{end}}
</div>
</div>
</section>
{{end}}

View file

@ -0,0 +1,25 @@
<div class="flex-ns flex-wrap center mw9">
{{ $interior_classes := $.Site.Params.flex_box_interior_classes }}
<h3 class="f2 fw4 white">See what others are saying about Hugo…</h3>
<div class="flex-ns flex-wrap justify-between">
{{ range first 4 (sort $.Site.Data.homepagetweets.tweet "date" "desc" ) }}
<div class="homepage-tweet relative {{ $interior_classes }} br1 mid-gray pv3 nested-links shadow-5">
<div class="absolute top-0 left-0 ma2 o-10">
{{ partial "svg/twitter.svg" . }}
</div>
<blockquote>
<p class="f4">
{{.quote | safeHTML}}
</p>
<cite class="homepage-tweet-attribution gray f6">&#9472; {{ .name }} ({{ .twitter_handle }}) <a href="{{ .link }}">
{{ dateFormat "January 2, 2006" .date }}</a>
</cite>
</blockquote>
</div>
{{ end }}
</div>
</div>

View file

@ -0,0 +1 @@
<a href="{{ .url }}" class="dim"><svg class="grow" fill="{{ .color }}" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg></a>

View file

@ -0,0 +1,11 @@
{{ $currentPage := . }}
{{ $menu := .Site.Menus.docs.ByWeight }}
<ul class="list dib ph0 ma0 scrolling-touch tc">
{{ range $menu }}{{ $post := printf "%s" .Post }}
<li class="tl dib ma0 hover-bg-black w-100{{ if eq $post "break" }} mb2 bb b--mid-gray{{ end }}">
<a href="{{.URL}}" class="ttu f6 link primary-color-light hover-white db brand-font mb1 ma0 w-100 pv2 ph4{{if $currentPage.IsMenuCurrent "main" . }} bg-primary-color{{end}}">
{{ .Name }}
</a>
</li>
{{end}}
</ul>

View file

@ -0,0 +1,23 @@
{{ $currentPage := . }}
<nav role="navigation">
<ul class="list pa0 nl2">
{{ range .Site.Menus.docs.ByWeight }}
{{ $post := printf "%s" .Post }}
<li class="f5 w-100 hover-bg-light-gray hover-accent-color-light fw8{{ if eq $post "break" }} mb1 bb b--moon-gray{{ end }}">
<a href="{{ if .HasChildren }}javascript:void(0){{ else }}{{ .URL }}{{ end }}" class="js-toggle dib w-100 link mid-gray hover-accent-color-light pl2 pr2 pv2 {{if or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) }} primary-color{{end}}" data-target=".{{ .Identifier }}">{{ .Name }}</a>
{{- if .HasChildren }}
<ul class="{{ .Identifier }} desktopmenu animated fadeIn list pl0 bg-light-gray{{if $currentPage.HasMenuCurrent "docs" . }} db{{ else }} dn{{ end }}">
{{- range .Children }}
<li class="f6 fw4">
<a href="{{.URL}}" class="db link hover-bg-gray hover-white pl3 pr2 pv2 {{if $currentPage.IsMenuCurrent "docs" . }}primary-color {{ else }}black {{end}}">
{{ .Name }}
</a>
</li>
{{- end}}
</ul>
{{- end}}
</li>
{{- end}}
</ul>
</nav>

View file

@ -0,0 +1,11 @@
{{ $currentPage := . }}
{{ $menu := .Site.Menus.global }}
<ul class="list hidden dib ph0 ma0 scrolling-touch tc">
{{ range $menu }}
<li class="tl dib ma0 hover-bg-black w-100">
<a href="{{.URL}}" class="ttu f6 link primary-color-light overflow hover-white db brand-font ma0 w-100 pv3 ph4{{if $currentPage.IsMenuCurrent "main" . }} bg-primary-color{{end}}">
{{ .Name }}
</a>
</li>
{{end}}
</ul>

View file

@ -0,0 +1,37 @@
{{ $currentPage := . }}
{{ $.Scratch.Add "listlinkClasses" "f6 link primary-color-dark hover-white db brand-font ma0 w-100 pv3 ph4" }}
<!-- TODO: Not getting ismenucurrent -->
<ul class="list dib ph0 ma0 scrolling-touch tc">
{{ range .Site.Menus.main }}
<li class="tl-l dib ma0 hover-bg-black w-100{{ if .HasChildren }} dont-display-child-until-click{{end}}">
{{ if .HasChildren }}
<a href="#{{ .Name | urlize }}" class="ttu {{ $.Scratch.Get "listlinkClasses" }}{{if $currentPage.IsMenuCurrent "main" . }} o-50{{end}}">
{{ .Name }}
<!-- <img src="/images/ic_keyboard_arrow_down_white_24px.svg" alt="" class="static v-mid f6 ma0 pa0"> -->
</a>
<ul id="{{ .Name | urlize}}" class="list pa0 ma0">
<li class="ma0 pl3 brand-font">
<a href="{{.URL}}" class="{{ $.Scratch.Get "listlinkClasses" }}{{if $currentPage.IsMenuCurrent "main" . }} o-50{{end}}">
{{ .Name }} Overview
</a>
</li>
{{ range .Children }}
<li class="ma0 pl3 brand-font{{if $currentPage.IsMenuCurrent "main" . }} o-50{{end}}">
<a href="{{.URL}}" class="{{ $.Scratch.Get "listlinkClasses" }}">
{{ .Name }}
</a>
</li>
{{ end }}
</ul>
{{ else }}
<a href="{{.URL}}" class="ttu {{ $.Scratch.Get "listlinkClasses" }}{{if $currentPage.IsMenuCurrent "main" . }} bg-primary-color{{end}}">
{{ .Name }}
</a>
{{end}}
</li>
{{end}}
</ul>

View file

@ -0,0 +1,12 @@
<div class="globalmenu mobilemenu pb3 dn">
{{ partial "nav-links-global-mobile.html" . }}
</div>
<div class="docsmenu mobilemenu pb3 dn">
{{ partial "nav-links-docs-mobile.html" . }}
</div>
<div class="flex dn-l justify-between">
<button class="js-toggle flex-auto dib dn-l f6 tc db mt4-ns ph3 pv2 link mr2 white bg-primary-color-dark hover-bg-primary-color ba b--white-40 w-auto" data-target=".globalmenu">Menu</button>
<button class="js-toggle flex-auto dib dn-l f6 tc db mt4-ns ph3 pv2 link white bg-primary-color-dark hover-bg-primary-color ba b--white-40 w-auto" data-target=".docsmenu">Docs Menu</button>
</div>

View file

@ -0,0 +1,16 @@
{{ $currentPage := . }}
<header class="dn-lTK relative cf bg-primary-color-dark pl4 w-100 z-5">
<div class="flexTK items-centerTK dib ">
<a class="absolute top-0 left-0 ml4 w4 w4-ns ph3 mr3" href="/">
<img src="{{ .Site.Params.logo }}" alt="" class="w-100 shadow-2">
</a>
<a class="f4 f3-ns lh-solid brand-font fw7 link white hover-white no-underline dib mv0 ml6 pl3 mr5" href="/">
{{ .Site.Title | markdownify }}
</a>
</div>
{{ partial "nav-links" .}}
<div class="dn-l">
{{ partial "nav-button-open" .}}
</div>
</header>

View file

@ -0,0 +1,3 @@
<a href="{{.Site.Params.ghrepo}}edit/master/content/{{ .Lang }}/{{.File.Path}}" class="
f6 ph3 pv1 br2 dib tc ttu mv3 bg-primary-color white hover-bg-green link
">Improve this page</a>

View file

@ -0,0 +1,20 @@
{{ $currentPage := . }}
{{ $currentURL := .RelPermalink }}
<header class="ph4 flex pv4 bg-light-gray">
<ul class="list ma0 pa0 ">
<!-- TODO: Active classes -->
<li class="f5 dib mr3 mb3 mb0-ns v-top white">
<a href="/news/" class="link primary-color-dark dim">
News:
</a>
</li>
{{ range $name, $taxonomy := .Site.Taxonomies.categories }}
{{ $link := $name | printf "%s%s" "/categories/" | printf "%s/" }}
<li class="f5 dib mr3 v-top mr3 mb3 mb0-ns">
<a href="{{ $link }}" class="link {{ if eq $currentURL $link }} bg-primary-color-dark {{ else }} bg-primary-color-dark {{ end }} white ph3 pv1 br2 hover-bg-accent-color-light">
{{ $name | humanize }}
</a>
</li>
{{ end }}
</ul>
</header>

View file

@ -0,0 +1,34 @@
{{ $section_to_display := .section_to_display }}
<div class="w-100 ph4 pb5 pb6-ns pt1 mt4 pt3-ns">
<div class="flex">
<div class="dn db-l w-20">
{{ partial "nav-links-docs.html" .context }}
</div>
<div class="w-100 w-80-l ph0 ph4-l">
<article class="w-100 nested-copy-line-height nested-links nested-img">
<h1 class="primary-color-dark f2">
{{ with $.context.Data.Singular }}{{ . | humanize }}: {{ end }}{{ .context.Title }}
</h1>
<div class="{{ .Site.Params.copyClass }} mid-gray f5 f4-l">
{{ .context.Content }}
</div>
</article>
<!-- TODO: May be a good idea in this case to add monthly archives -->
<div class="flex flex-wrap">
{{ $interior_classes := .context.Site.Params.flex_box_interior_classes }}
<section class="flex-ns flex-wrap justify-between w-100">
{{ range $section_to_display }}
{{ partial "boxes-section-summaries" (dict "context" . "classes" $interior_classes "fullcontent" true) }}
{{ end }}
</section>
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,14 @@
{{ if or .PrevInSection .NextInSection }}
{{/* this div holds these a tags as a unit for flex-box display */}}
<div date-pref class="white">
{{if .NextInSection}}
<a href="{{.NextInSection.Permalink }}" class="br2 db f6 ph2 pv2 bg-light-gray white" title="{{ .NextInSection.Title }} ">{{ partial "svg/ic_chevron_left_black_24px.svg" (dict "fill" "#fff" "size" "12px") }} {{.NextInSection.Title}}</a>
{{end}}
{{if .PrevInSection}}
<a href="{{ .PrevInSection.Permalink }}" class="br2 db f6 pr1 mt3 bg-light-gray ph2 pv2 white" title="{{ .PrevInSection.Title }}">
{{.PrevInSection.Title}} {{ partial "svg/ic_chevron_right_black_24px.svg" (dict "fill" "#fff" "size" "12px") }}
</a>
{{end}}
</div>
{{ end }}

View file

@ -0,0 +1,16 @@
{{ if or .PrevInSection .NextInSection }}
{{/* this div holds these a tags as a unit for flex-box display */}}
<div date-pref>
{{if .NextInSection}}
<a href="{{.NextInSection.Permalink }}" class="dib f6 pl1 hover-bg-light-gray br-100" title="{{ .NextInSection.Title }} ">
{{ partial "svg/ic_chevron_left_black_24px.svg" (dict "fill" "#0594CB" "size" "30px") }}
</a>
{{end}}
{{if .PrevInSection}}
<a href="{{ .PrevInSection.Permalink }}" class="dib f6 pr1 hover-bg-light-gray br-100" title="{{ .PrevInSection.Title }}">
{{ partial "svg/ic_chevron_right_black_24px.svg" (dict "fill" "#0594CB" "size" "30px") }}
</a>
{{end}}
</div>
{{ end }}

View file

@ -0,0 +1,25 @@
{{if .Prev }}
<a href="{{ .Prev.Permalink }}" class="db-l f4 f3-ns link primary-color hover-black fw8 mr4">
<span class="v-mid dib">{{ partial "svg/ic_chevron_left_black_24px.svg" (dict "size" "30px") }}</span> {{ .Prev.Title }}
</a>
{{end}}
{{if .Next }}
<a href="{{.Next.Permalink }}" class="db-l f4 f3-ns link primary-color hover-black fw8">
{{ .Next.Title }} <span class="v-mid dib">{{ partial "svg/ic_chevron_right_black_24px.svg" (dict "size" "30px") }}</span>
</a>
{{end}}
<script>
document.body.onkeyup = function(e){
if (!(e.ctrlKey || e.shiftKey || e.altKey || e.metaKey)) {
{{- if .Prev }}
if (e.keyCode == '37') { window.location = '{{ .Prev.Permalink }}'; }
{{- end }}
{{- if .Next }}
if (e.keyCode == '39') { window.location = '{{ .Next.Permalink }}'; }
{{- end }}
}
};
</script>

View file

@ -0,0 +1,9 @@
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<h2>See Also</h2>
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}

View file

@ -0,0 +1,48 @@
<footer class="bg-primary-color-dark ph4-ns pt4 relative w-100" role="contentinfo">
<div class="center flex-ns flex-wrap justify-between mw9 w-90">
<div class="pb3 pt4 w-100 w-50-ns">
<div class="b f3 light-gray mb3 nested-links tc">
By the <a href="https://github.com/gohugoio/hugo/graphs/contributors" class="link">Hugo Authors</a><br />
</div>
<div class="center w4">
<img src="/images/hugo-logo-wide.svg" alt="Hugo Logo">
</div>
<ul class="center f6 list ma0 mv3 pa0 tc">
{{- with .Site.Params.github_repo -}}<li class="dib mr3"><a href="{{ . }}" class="dim link light-gray pv2">File an Issue</a></li>{{- end -}}
{{- with .Site.Params.forum -}}<li class="dib mr3"><a href="{{ . }}" class="dim link light-gray pv2">Get Help</a></li>{{- end -}}
{{- with .Site.Params.gitter -}}<li class="dib"><a href="{{ . }}" class="dim link light-gray pv2">Discuss Source Code</a></li>{{- end -}}
</ul>
<ul class="center f6 list ma0 mv4 pa0 tc">
<li class="dib mr3"><a href="https://twitter.com/gohugoio" class="dim link light-gray pv2">@GoHugoIO</a></li>
<li class="dib mr3"><a href="https://twitter.com/spf13" class="dim link light-gray pv2">@spf13</a></li>
<li class="dib"><a href="https://twitter.com/bepsays" class="dim link light-gray pv2">@bepsays</a></li>
</ul>
{{ with getenv "REPOSITORY_URL" -}}
<p class="center f6 tc w-70"><a href="https://www.netlify.com"><img src="/images/netlify-dark.svg" alt="Netlify badge"></a></p>
{{- end }}
</div>
<div class="w-100 w-50-l"> 
{{ partial "home-page-sections/sponsors.html" (dict "cx" . "gtag" "footer" "classes_section" "pb3 w-100" "classes_copy" "f7 w-90-ns") }}
</div>
</div>
<div class="f7 gray mb5 mb0-ns ph3 w-100"> 
<p class="dib mr4">The Hugo logos are copyright © Steve Francia 2013{{ now.Year }}.</p>
<p class="dib">The Hugo Gopher is based on an original work by Renée French.</p>
</div>
<img src="/images/gopher-side_color.svg" class="absolute-l bottom-0 dn db-l h4 right-0 z-999"/>
<div class="bg-primary-color-dark bottom-0 left-0 right-0 dn-l fixed pb3 ph3 w-100">
{{- partial "nav-mobile.html" . -}}
</div>
</footer>

View file

@ -0,0 +1,7 @@
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0594cb">
<meta name="theme-color" content="#ffffff">

View file

@ -0,0 +1,38 @@
{{ $currentPage := . }}
<nav class="bg-primary-color-dark pv4 w-100" role="navigation">
<div class="center flex-ns flex-wrap items-center justify-start mw9">
<h1 class="dim f3 lh-solid ml0-ns mr0 mr4-l mv0 pl3 pl4-ns">
<a href="https://gohugo.io/" class="link white">
HUGO
</a>
</h1>
<ul class="list ma0 pa0 dn dib-l">
{{ range .Site.Menus.global }}
<li class="f5 dib mr4" role="menuitem">
{{/* TODO: Create an "Global" active class to show which site one is currently at */}}
<a href="{{ .URL }}" class="dim link{{ if $currentPage.IsMenuCurrent "global" . }} gray {{else}} light-silver{{ end }}">
{{ .Name }}
{{/* using ".Post" from the menu system to determine if we should show an icon for external links */}}
{{ $post_status := printf "%s" .Post }}
{{ if eq $post_status "external" }}
<span class="pl1">
{{ partial "svg/link-ext.svg" (dict "size" "10") }}
</span>
{{ end }}
</a>
</li>
{{ end }}
</ul>
<div class="db dib-ns pl3">
{{- partial "site-search.html" . -}}
</div>
<span class="absolute mt1 mt2-l pr3 right-0 top-0">
{{- partialCached "social-follow.html" . -}}
</span>
</div>
</nav>

View file

@ -0,0 +1,17 @@
<!-- scripts -->
{{ $scripts := resources.Get "output/js/app.js" }}
{{ $isDev := eq hugo.Environment "development" }}
{{ if not $isDev }}
{{ $scripts = $scripts | fingerprint }}
{{ end }}
{{ with $scripts }}
{{ if $isDev }}
<script type="text/javascript" src="{{ .RelPermalink }}" crossorigin="anonymous" defer></script>
{{ else }}
<script type="text/javascript" src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous" defer></script>
{{ end }}
{{ $.Scratch.Set "scripts" . }}
{{end}}
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>

View file

@ -0,0 +1,6 @@
<form id="site-search-form" action="" role="search">
<fieldset class="bn ma0 pa0">
<label class="clip" for="search-input">Search</label>
<input type="search" id="search-input" class="needs-js bg-left bn f5 input-reset lh-solid mt3 mt0-ns pl4 pv2 w5 white" placeholder="Search the Docs" name="search-input" value="" style="background: transparent url('/images/icon-search.png') no-repeat 0 8px /16px 16px;">
</fieldset>
</form>

View file

@ -0,0 +1,7 @@
<!-- TODO: Add follow intents where available TODO: Revisit color and hover color -->
{{ with .Site.Social.twitter }}
<a href="https://twitter.com/intent/follow?screen_name={{ . }}" title="Follow on Twitter" class="link-transition twitter link dib z-999 pt3 pt0-l mr2">
{{ partial "svg/twitter.svg" (dict "size" "32px") }}
</a>
{{ end }}
<a class="github-button needs-js link primary-color-dark" href="https://github.com/gohugoio/hugo" data-size="large" data-show-count="false" aria-label="Star gohugoio/hugo on GitHub">Star</a>

View file

@ -0,0 +1,13 @@
<div class="relative w-100 mb4 bg-white nested-copy-line-height">
<div class="bg-white mb3 pa4 gray overflow-hidden">
<span class="f6 db">{{ humanize .Section }}</span>
<h1 class="f3 near-black">
<a href="{{ .URL }}" class="link black dim">
{{ .Title }}
</a>
</h1>
<div class="nested-links f5 lh-copy nested-copy-line-height">
{{ .Summary }}
</div>
</div>
</div>

View file

@ -0,0 +1 @@
<svg id="Logo_FIXED" data-name="Logo — FIXED" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><defs><style>.cls-1{fill:none;}.cls-2{fill:#1da1f2;}</style></defs><title>Twitter_Logo_Blue</title><rect class="cls-1" width="400" height="400"/><path class="cls-2" d="M153.62,301.59c94.34,0,145.94-78.16,145.94-145.94,0-2.22,0-4.43-.15-6.63A104.36,104.36,0,0,0,325,122.47a102.38,102.38,0,0,1-29.46,8.07,51.47,51.47,0,0,0,22.55-28.37,102.79,102.79,0,0,1-32.57,12.45,51.34,51.34,0,0,0-87.41,46.78A145.62,145.62,0,0,1,92.4,107.81a51.33,51.33,0,0,0,15.88,68.47A50.91,50.91,0,0,1,85,169.86c0,.21,0,.43,0,.65a51.31,51.31,0,0,0,41.15,50.28,51.21,51.21,0,0,1-23.16.88,51.35,51.35,0,0,0,47.92,35.62,102.92,102.92,0,0,1-63.7,22A104.41,104.41,0,0,1,75,278.55a145.21,145.21,0,0,0,78.62,23"/></svg>

After

Width:  |  Height:  |  Size: 791 B

View file

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" fill="#444" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M8.112 4.59c.54 0 1.544-.743 2.85-.743 2.25 0 3.135 1.6 3.135 1.6s-1.73.885-1.73 3.032c0 2.42 2.155 3.25 2.155 3.25s-1.507 4.24-3.542 4.24c-.935 0-1.662-.63-2.647-.63-1.004 0-2 .65-2.648.65-1.86 0-4.207-4.03-4.207-7.26 0-3.19 1.988-4.85 3.852-4.85 1.21 0 2.152.69 2.782.69zm.563-3.198C9.725.007 11.188 0 11.188 0s.217 1.303-.827 2.558c-1.11 1.34-2.38 1.12-2.38 1.12s-.24-1.054.7-2.286z"/></svg>

After

Width:  |  Height:  |  Size: 566 B

View file

@ -0,0 +1,3 @@
<svg height="1024" width="896" xmlns="http://www.w3.org/2000/svg">
<path d="M128 768h256v64H128v-64z m320-384H128v64h320v-64z m128 192V448L384 640l192 192V704h320V576H576z m-288-64H128v64h160v-64zM128 704h160v-64H128v64z m576 64h64v128c-1 18-7 33-19 45s-27 18-45 19H64c-35 0-64-29-64-64V192c0-35 29-64 64-64h192C256 57 313 0 384 0s128 57 128 128h192c35 0 64 29 64 64v320h-64V320H64v576h640V768zM128 256h512c0-35-29-64-64-64h-64c-35 0-64-29-64-64s-29-64-64-64-64 29-64 64-29 64-64 64h-64c-35 0-64 29-64 64z" />
</svg>

After

Width:  |  Height:  |  Size: 519 B

View file

@ -0,0 +1,3 @@
<svg height="1024" width="896" xmlns="http://www.w3.org/2000/svg">
<path d="M128 768h256v64H128v-64z m320-384H128v64h320v-64z m128 192V448L384 640l192 192V704h320V576H576z m-288-64H128v64h160v-64zM128 704h160v-64H128v64z m576 64h64v128c-1 18-7 33-19 45s-27 18-45 19H64c-35 0-64-29-64-64V192c0-35 29-64 64-64h192C256 57 313 0 384 0s128 57 128 128h192c35 0 64 29 64 64v320h-64V320H64v576h640V768zM128 256h512c0-35-29-64-64-64h-64c-35 0-64-29-64-64s-29-64-64-64-64 29-64 64-29 64-64 64h-64c-35 0-64 29-64 64z" />
</svg>

After

Width:  |  Height:  |  Size: 519 B

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
<g transform="matrix(1.47445,0,0,1.47445,-125.537,-123.683)">
<path d="M332.615,235.15C330.448,235.15 328.317,235.312 326.213,235.56C317.01,197.167 282.482,168.62 241.264,168.62C200.043,168.62 165.521,197.17 156.305,235.56C154.214,235.312 152.08,235.15 149.913,235.15C120.025,235.15 95.793,259.376 95.793,289.267C95.793,319.151 120.025,343.38 149.916,343.38L332.617,343.38C362.505,343.38 386.737,319.151 386.737,289.267C386.735,259.376 362.503,235.15 332.615,235.15Z" style="fill:white;fill-rule:nonzero;"/>
</g>
<g transform="matrix(1.47445,0,0,1.47445,-125.537,-123.683)">
<path d="M386.141,219.714C384.939,219.714 383.753,219.803 382.59,219.942C377.47,198.61 358.288,182.751 335.393,182.751C312.485,182.751 293.31,198.61 288.193,219.942C287.024,219.803 285.838,219.714 284.642,219.714C268.033,219.714 254.569,233.175 254.569,249.78C254.569,266.385 268.03,279.846 284.642,279.846L386.144,279.846C402.749,279.846 416.21,266.385 416.21,249.78C416.21,233.175 402.749,219.714 386.141,219.714Z" style="fill:rgb(0,131,192);fill-rule:nonzero;"/>
</g>
<g transform="matrix(1.47445,0,0,1.47445,-125.537,-123.683)">
<path d="M307.474,231.173C306.965,231.173 306.443,231.11 305.928,230.985C302.38,230.136 300.194,226.572 301.043,223.024C304.862,207.089 318.989,195.964 335.393,195.964C339.04,195.964 341.999,198.924 341.999,202.57C341.999,206.216 339.039,209.176 335.393,209.176C325.123,209.176 316.281,216.136 313.892,226.102C313.166,229.135 310.457,231.173 307.474,231.173Z" style="fill:white;fill-rule:nonzero;"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1,18 @@
<svg id="content-icon" class="focus-row-icon"width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
<circle id="content-halo" cx="256" cy="256" r="256" style="fill:rgb(252,216,4);"/>
<path d="M256,100.748C197.49,100.758 150.082,148.166 150.082,206.676C150.082,237.664 163.414,265.546 184.617,284.923C185.621,285.759 186.625,286.641 187.666,287.552C204.215,302.651 214.604,324.36 214.604,348.503L214.604,357.719L297.396,357.719L297.396,348.503C297.396,324.356 307.762,302.651 324.36,287.552C325.371,286.64 326.378,285.758 327.386,284.923C348.56,265.546 361.918,237.66 361.918,206.676C361.918,148.166 314.513,100.758 256,100.748Z" style="fill:white;fill-rule:nonzero;"/>
<path d="M327.019,206.67C327.019,245.883 295.212,277.65 256.013,277.65C216.764,277.653 184.98,245.886 184.98,206.67C184.98,167.461 216.764,135.614 256.013,135.614C295.213,135.617 327.019,167.46 327.019,206.67Z" style="fill:rgb(230,229,229);fill-rule:nonzero;"/>
<path d="M256.017,437.677L227.378,420.587L284.652,420.587L256.017,437.677Z" style="fill:white;fill-rule:nonzero;"/>
<path d="M303.167,413.851C303.167,415.572 302.51,417.296 301.192,418.611C299.874,419.926 298.153,420.586 296.432,420.586L215.572,420.586C213.851,420.586 212.123,419.929 210.809,418.611C209.495,417.293 208.834,415.572 208.834,413.851L208.834,357.72L303.171,357.72L303.171,413.852L303.167,413.852L303.167,413.851Z" style="fill:rgb(52,59,67);fill-rule:nonzero;"/>
<g>
<rect x="208.83" y="364.709" width="94.337" height="6.95" style="fill:rgb(73,80,87);"/>
<rect x="208.83" y="378.682" width="94.337" height="6.976" style="fill:rgb(73,80,87);"/>
<rect x="208.83" y="392.621" width="94.337" height="6.98" style="fill:rgb(73,80,87);"/>
<rect x="208.83" y="406.594" width="94.337" height="7.016" style="fill:rgb(73,80,87);"/>
</g>
<rect x="229.574" y="252.366" width="17.606" height="105.353" style="fill:rgb(253,131,105);"/>
<rect x="247.18" y="252.366" width="17.613" height="105.353" style="fill:rgb(234,101,82);"/>
<rect x="264.787" y="252.366" width="17.616" height="105.353" style="fill:rgb(226,79,59);"/>
<path d="M282.426,252.37L264.773,221.864L247.207,221.864L229.601,252.37L282.426,252.37Z" style="fill:white;fill-rule:nonzero;"/>
<path d="M264.773,221.864L255.97,206.633L247.207,221.864L264.773,221.864Z" style="fill:rgb(52,59,67);fill-rule:nonzero;"/>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1,5 @@
<svg id="design-icon" class="focus-row-icon" width="100%" height="100%" viewBox="0 0 51 51" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
<path d="M50.956,14.456L25.5,29L0.044,14.456L25.5,0L50.956,14.456Z" style="fill:rgb(252,216,4);fill-rule:nonzero;"/>
<path d="M25.5,29L9.7,19.973L0.044,25.456L25.5,40L50.956,25.456L41.3,19.973L25.5,29Z" style="fill:rgb(51,186,145);fill-rule:nonzero;"/>
<path d="M25.5,40L9.7,30.973L0.044,36.456L25.5,51L50.956,36.456L41.3,30.973L25.5,40Z" style="fill:rgb(255,64,136);fill-rule:nonzero;"/>
</svg>

After

Width:  |  Height:  |  Size: 707 B

Some files were not shown because too many files have changed in this diff Show more