Add new theme

This commit is contained in:
Bjørn Erik Pedersen 2025-02-08 16:02:51 +01:00
parent b19d68ee55
commit bdf97b7b45
152 changed files with 4679 additions and 291 deletions

15
.gitignore vendored
View File

@ -1,10 +1,13 @@
.DS_Store
.hugo_build.lock
/.idea
/.vscode
/public
/dist
node_modules
/public
hugo_stats.json
node_modules/
nohup.out
.DS_Store
trace.out
.hugo_build.lock
resources/_gen/images/
package-lock.json
public/
resources/
trace.out

View File

@ -1,201 +1,3 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
See [content/LICENSE.md](content/LICENSE.md) for the license of the content of this repository.
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
The theme (layouts, CSS, JavaScript etc.) of this repository has no open source license. It is custom made for the Hugo sites and is not meant for reuse.

View File

@ -16,3 +16,12 @@ Please see the [contributing] section for guidelines, examples, and process.
[friends]: https://github.com/gohugoio/hugo/graphs/contributors
[go]: https://go.dev/
[contributing]: https://gohugo.io/contribute/documentation
# Install
```bash
npm i
hugo server
```
**Note:** We're working on removing the need to run `npm i` for local development. Stay tuned.

View File

@ -0,0 +1,7 @@
/* The ordeer of these does not matter. */
@import "./content.css";
@import "./fonts.css";
@import "./helpers.css";
@import "./shortcodes.css";
@import "./tableofcontents.css";
@import "./view-transitions.css";

View File

@ -0,0 +1,85 @@
/* Background */ .bg { background-color: var(--color-light); }
/* PreWrapper */ .chroma { background-color: var(--color-light); }
/* Other */ .chroma .x { }
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
/* CodeLine */ .chroma .cl { }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* Line */ .chroma .line { display: flex; }
/* 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 }
/* Name */ .chroma .n { }
/* NameAttribute */ .chroma .na { color: #008080 }
/* NameBuiltin */ .chroma .nb { color: #999999 }
/* NameBuiltinPseudo */ .chroma .bp { }
/* NameClass */ .chroma .nc { color: #445588; font-weight: bold }
/* NameConstant */ .chroma .no { color: #008080 }
/* NameDecorator */ .chroma .nd { }
/* NameEntity */ .chroma .ni { color: #800080 }
/* NameException */ .chroma .ne { color: #990000; font-weight: bold }
/* NameFunction */ .chroma .nf { color: #990000; font-weight: bold }
/* NameFunctionMagic */ .chroma .fm { }
/* NameLabel */ .chroma .nl { }
/* NameNamespace */ .chroma .nn { color: #555555 }
/* NameOther */ .chroma .nx { }
/* NameProperty */ .chroma .py { }
/* NameTag */ .chroma .nt { color: #000080 }
/* NameVariable */ .chroma .nv { color: #008080 }
/* NameVariableClass */ .chroma .vc { }
/* NameVariableGlobal */ .chroma .vg { }
/* NameVariableInstance */ .chroma .vi { }
/* NameVariableMagic */ .chroma .vm { }
/* Literal */ .chroma .l { }
/* LiteralDate */ .chroma .ld { }
/* 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 }
/* Punctuation */ .chroma .p { }
/* 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 }
/* Generic */ .chroma .g { }
/* 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 }
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
/* TextWhitespace */ .chroma .w { color: #bbbbbb }

View File

@ -0,0 +1,85 @@
/* Background */.dark .bg { background-color: var(--color-dark); }
/* PreWrapper */ .dark .chroma { background-color: var(--color-dark); }
/* Other */ .dark .chroma .x { }
/* Error */ .dark .chroma .err { color: #ef6155 }
/* CodeLine */ .dark .chroma .cl { }
/* LineTableTD */ .dark .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .dark .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* LineHighlight */ .dark .chroma .hl { background-color: #ffffcc }
/* LineNumbersTable */ .dark .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* LineNumbers */ .dark .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* Line */ .dark .chroma .line { display: flex; }
/* Keyword */ .dark .chroma .k { color: #815ba4 }
/* KeywordConstant */ .dark .chroma .kc { color: #815ba4 }
/* KeywordDeclaration */ .dark .chroma .kd { color: #815ba4 }
/* KeywordNamespace */ .dark .chroma .kn { color: #5bc4bf }
/* KeywordPseudo */ .dark .chroma .kp { color: #815ba4 }
/* KeywordReserved */ .dark .chroma .kr { color: #815ba4 }
/* KeywordType */ .dark .chroma .kt { color: #fec418 }
/* Name */ .dark .chroma .n { }
/* NameAttribute */ .dark .chroma .na { color: #06b6ef }
/* NameBuiltin */ .dark .chroma .nb { }
/* NameBuiltinPseudo */ .dark .chroma .bp { }
/* NameClass */ .dark .chroma .nc { color: #fec418 }
/* NameConstant */ .dark .chroma .no { color: #ef6155 }
/* NameDecorator */ .dark .chroma .nd { color: #5bc4bf }
/* NameEntity */ .dark .chroma .ni { }
/* NameException */ .dark .chroma .ne { color: #ef6155 }
/* NameFunction */ .dark .chroma .nf { color: #06b6ef }
/* NameFunctionMagic */ .dark .chroma .fm { }
/* NameLabel */ .dark .chroma .nl { }
/* NameNamespace */ .dark .chroma .nn { color: #fec418 }
/* NameOther */ .dark .chroma .nx { color: #06b6ef }
/* NameProperty */ .dark .chroma .py { }
/* NameTag */ .dark .chroma .nt { color: #5bc4bf }
/* NameVariable */ .dark .chroma .nv { color: #ef6155 }
/* NameVariableClass */ .dark .chroma .vc { }
/* NameVariableGlobal */ .dark .chroma .vg { }
/* NameVariableInstance */ .dark .chroma .vi { }
/* NameVariableMagic */ .dark .chroma .vm { }
/* Literal */ .dark .chroma .l { color: #f99b15 }
/* LiteralDate */ .dark .chroma .ld { color: #48b685 }
/* LiteralString */ .dark .chroma .s { color: #48b685 }
/* LiteralStringAffix */ .dark .chroma .sa { color: #48b685 }
/* LiteralStringBacktick */ .dark .chroma .sb { color: #48b685 }
/* LiteralStringChar */ .dark .chroma .sc { }
/* LiteralStringDelimiter */ .dark .chroma .dl { color: #48b685 }
/* LiteralStringDoc */ .dark .chroma .sd { color: #776e71 }
/* LiteralStringDouble */ .dark .chroma .s2 { color: #48b685 }
/* LiteralStringEscape */ .dark .chroma .se { color: #f99b15 }
/* LiteralStringHeredoc */ .dark .chroma .sh { color: #48b685 }
/* LiteralStringInterpol */ .dark .chroma .si { color: #f99b15 }
/* LiteralStringOther */ .dark .chroma .sx { color: #48b685 }
/* LiteralStringRegex */ .dark .chroma .sr { color: #48b685 }
/* LiteralStringSingle */ .dark .chroma .s1 { color: #48b685 }
/* LiteralStringSymbol */ .dark .chroma .ss { color: #48b685 }
/* LiteralNumber */ .dark .chroma .m { color: #f99b15 }
/* LiteralNumberBin */ .dark .chroma .mb { color: #f99b15 }
/* LiteralNumberFloat */ .dark .chroma .mf { color: #f99b15 }
/* LiteralNumberHex */ .dark .chroma .mh { color: #f99b15 }
/* LiteralNumberInteger */ .dark .chroma .mi { color: #f99b15 }
/* LiteralNumberIntegerLong */ .dark .chroma .il { color: #f99b15 }
/* LiteralNumberOct */ .dark .chroma .mo { color: #f99b15 }
/* Operator */ .dark .chroma .o { color: #5bc4bf }
/* OperatorWord */ .dark .chroma .ow { color: #5bc4bf }
/* Punctuation */ .dark .chroma .p { }
/* Comment */ .dark .chroma .c { color: #776e71 }
/* CommentHashbang */ .dark .chroma .ch { color: #776e71 }
/* CommentMultiline */ .dark .chroma .cm { color: #776e71 }
/* CommentSingle */ .dark .chroma .c1 { color: #776e71 }
/* CommentSpecial */ .dark .chroma .cs { color: #776e71 }
/* CommentPreproc */ .dark .chroma .cp { color: #776e71 }
/* CommentPreprocFile */ .dark .chroma .cpf { color: #776e71 }
/* Generic */ .dark .chroma .g { }
/* GenericDeleted */ .dark .chroma .gd { color: #ef6155 }
/* GenericEmph */ .dark .chroma .ge { font-style: italic }
/* GenericError */ .dark .chroma .gr { }
/* GenericHeading */ .dark .chroma .gh { font-weight: bold }
/* GenericInserted */ .dark .chroma .gi { color: #48b685 }
/* GenericOutput */ .dark .chroma .go { }
/* GenericPrompt */ .dark .chroma .gp { color: #776e71; font-weight: bold }
/* GenericStrong */ .dark .chroma .gs { font-weight: bold }
/* GenericSubheading */ .dark .chroma .gu { color: #5bc4bf; font-weight: bold }
/* GenericTraceback */ .dark .chroma .gt { }
/* GenericUnderline */ .dark .chroma .gl { }
/* TextWhitespace */ .dark .chroma .w { }

View File

@ -0,0 +1,38 @@
@import "./chroma_dark.css";
@import "./chroma.css";
@import "./highlight.css";
/* Some contrast ratio fixes as reported by Google Page Speed. */
.chroma .c1 {
@apply text-gray-500;
}
.dark .chroma .c1 {
@apply text-gray-400;
}
.content {
@apply prose prose-stone max-w-none dark:prose-invert dark:text-slate-400;
/* headings */
@apply prose-h6:font-bold;
/* lead */
@apply prose-lead:text-slate-500 prose-lead:text-xl prose-lead:mt-2 sm:prose-lead:mt-4 prose-lead:leading-relaxed dark:prose-lead:text-slate-400;
/* links */
@apply prose-a:text-primary prose-a:hover:text-primary/70 prose-a:underline;
@apply prose-a:prose-code:underline prose-a:prose-code:hover:text-primary/70 prose-a:prose-code:hover:underline;
/* pre */
@apply prose-pre:text-gray-800 prose-pre:border-1 prose-pre:border-gray-100 prose-pre:bg-light dark:prose-pre:bg-dark dark:prose-pre:ring-1 dark:prose-pre:ring-slate-300/10;
/* code */
@apply prose-code:px-0.5 prose-code:text-gray-900 prose-code:dark:text-gray-300 border-none;
@apply prose-code:before:hidden prose-code:after:hidden prose-code:font-mono;
/* tables */
@apply prose-table:border-2 prose-table:border-gray-100 prose-table:dark:border-gray-800 prose-table:relative prose-table:overflow-scroll prose-table:prose-th:font-bold prose-table:prose-th:bg-blue-500 dark:prose-table:prose-th:bg-blue-500/50 prose-table:prose-th:p-2 prose-table:prose-td:p-2 prose-table:prose-th:text-white;
/* hr */
@apply dark:prose-hr:border-slate-800;
}
/* This will not match highlighting inside e.g. the code-toggle shortcode. */
/* For more fine grained control of this, see components/shortcodes.css. */
.content > .highlight {
@apply border-1 border-gray-200 dark:border-slate-600 mt-6 mb-8;
}

View File

@ -0,0 +1,15 @@
@font-face {
font-family: "Mulish";
font-style: normal;
src: url("../fonts/Mulish-VariableFont_wght.ttf") format("truetype");
font-weight: 1 999;
font-display: swap;
}
@font-face {
font-family: "Mulish";
font-style: italic;
src: url("../fonts/Mulish-Italic-VariableFont_wght.ttf") format("truetype");
font-weight: 1 999;
font-display: swap;
}

View File

@ -0,0 +1,19 @@
/* Helper class to limit a text block to two lines. */
.two-lines-ellipsis {
display: block;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
/* Helper class to limit a text block to three lines. */
.three-lines-ellipsis {
display: block;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}

View File

@ -0,0 +1,11 @@
.highlight {
@apply bg-light dark:bg-dark rounded-none;
}
.highlight pre {
@apply m-0 p-3 w-full h-full overflow-x-auto dark:border-black rounded-none;
}
.highlight pre code {
@apply m-0 p-0 w-full h-full;
}

View File

@ -0,0 +1,4 @@
.shortcode-code {
.highlight {
}
}

View File

@ -0,0 +1,14 @@
.tableofcontents {
ul {
@apply list-none;
li {
@apply mb-2;
a {
@apply text-primary;
&:hover {
@apply text-primary/60;
}
}
}
}
}

View File

@ -0,0 +1,22 @@
/* Global slight fade */
::view-transition-old(root),
::view-transition-new(root) {
animation-duration: 200ms;
}
::view-transition-old(qr),
::view-transition-new(qr) {
animation-duration: 800ms;
animation-delay: 250ms;
}
.view-transition-qr {
view-transition-name: qr;
}
/* Turbo styles */
.turbo-progress-bar {
@apply bg-blue-500;
opacity: 0.35;
height: 3px;
}

120
assets/css/styles.css Normal file
View File

@ -0,0 +1,120 @@
@import "tailwindcss";
@plugin "@tailwindcss/typography";
@variant dark (&:where(.dark, .dark *));
@import "components/all.css";
/* TailwindCSS ignores files in .gitignore, so make it explicit. */
@source "hugo_stats.json";
@theme {
/* Breakpoints. */
--breakpoint-sm: 40rem;
--breakpoint-md: 48rem;
--breakpoint-lg: 68rem; /* Default 64rem; */
--breakpoint-xl: 80rem;
--breakpoint-2xl: 96rem;
/* Colors. */
--color-primary: var(--color-blue-600);
--color-dark: #000;
--color-light: var(--color-gray-50);
--color-accent: var(--color-orange-500);
--color-accent-light: var(--color-pink-500);
--color-accent-dark: var(--color-green-500);
/* https://www.tints.dev/blue/0594CB */
--color-blue-50: #e1f6fe;
--color-blue-100: #c3edfe;
--color-blue-200: #88dbfc;
--color-blue-300: #4cc9fb;
--color-blue-400: #15b9f9;
--color-blue-500: #0594cb;
--color-blue-600: #0477a4;
--color-blue-700: #035677;
--color-blue-800: #023a50;
--color-blue-900: #011d28;
--color-blue-950: #000e14;
/* https://www.tints.dev/orange/EBB951 */
--color-orange-50: #fdf8ed;
--color-orange-100: #fbf1da;
--color-orange-200: #f7e4ba;
--color-orange-300: #f3d596;
--color-orange-400: #efc976;
--color-orange-500: #ebb951;
--color-orange-600: #e5a51a;
--color-orange-700: #a97a13;
--color-orange-800: #72520d;
--color-orange-900: #372806;
--color-orange-950: #1b1403;
/* https://www.tints.dev/pink/FF4088 */
--color-pink-50: #ffebf2;
--color-pink-100: #ffdbe9;
--color-pink-200: #ffb3d0;
--color-pink-300: #ff8fba;
--color-pink-400: #ff66a1;
--color-pink-500: #ff4088;
--color-pink-600: #ff0062;
--color-pink-700: #c2004a;
--color-pink-800: #800031;
--color-pink-900: #420019;
--color-pink-950: #1f000c;
/* https://www.tints.dev/green/33BA91 */
--color-green-50: #ebfaf5;
--color-green-100: #d3f3e9;
--color-green-200: #abe8d6;
--color-green-300: #7fdcc0;
--color-green-400: #53d0aa;
--color-green-500: #33ba91;
--color-green-600: #299474;
--color-green-700: #1f7058;
--color-green-800: #154c3b;
--color-green-900: #0a241c;
--color-green-950: #051410;
/* Fonts. */
--font-sans: "Mulish", ui-sans-serif, system-ui, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
html {
scroll-padding-top: 100px;
}
body {
@apply antialiased font-sans text-black dark:text-gray-100;
}
.p-safe-area-x {
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
}
.p-safe-area-y {
padding-top: env(safe-area-inset-top);
padding-bottom: env(safe-area-inset-bottom);
}
.px-main {
padding-left: max(env(safe-area-inset-left), 1rem);
padding-right: max(env(safe-area-inset-right), 1rem);
}
@media screen(md) {
.px-main {
padding-left: max(env(safe-area-inset-left), 2rem);
padding-right: max(env(safe-area-inset-right), 2rem);
}
}
@media screen(lg) {
.px-main {
padding-left: max(env(safe-area-inset-left), 3rem);
padding-right: max(env(safe-area-inset-right), 3rem);
}
}
/* flex-1 mx-auto lg:mx-0 px-4 md:px-8 lg:px-12 w-full max-w-3x lg:max-w-3x py-8 sm:py-14 */

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,15 @@
<svg width="150" height="36" viewBox="0 0 150 36" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M38.9337 13.4895H41.1147C41.4378 13.4895 41.8417 13.4895 42.1648 13.4895C42.5686 13.4895 42.8917 13.4087 43.2148 13.2472C43.5379 13.0856 43.7803 12.9241 43.9418 12.6818C44.1034 12.4394 44.2649 12.0355 44.2649 11.6317C44.2649 11.2278 44.1841 10.8239 44.0226 10.5816C43.861 10.3393 43.6187 10.0969 43.3764 10.0162C43.1341 9.85461 42.811 9.77384 42.4879 9.77384C42.1648 9.69306 41.7609 9.69306 41.4378 9.69306H39.0145V13.4895H38.9337ZM35.2181 6.46204H41.7609C42.6494 6.46204 43.4572 6.54282 44.1841 6.70437C44.9919 6.86592 45.6381 7.18902 46.2035 7.51212C46.769 7.916 47.2536 8.40065 47.5767 9.12763C47.8998 9.77384 48.0614 10.6624 48.0614 11.6317C48.0614 12.8433 47.7383 13.8934 47.0921 14.7011C46.4459 15.5089 45.5573 16.0743 44.3457 16.3166L48.6268 23.5057H44.1841L40.63 16.7205H38.7722V23.5057H35.0565V6.46204H35.2181Z" fill="#425277"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M53.3926 17.6091C53.3926 18.4976 53.6349 19.2246 54.1195 19.79C54.6042 20.3554 55.3312 20.5977 56.2197 20.5977C57.1082 20.5977 57.8352 20.3554 58.3199 19.79C58.8045 19.2246 59.0468 18.4976 59.0468 17.6091C59.0468 16.7205 58.8045 15.9935 58.3199 15.4281C57.8352 14.8627 57.1082 14.6204 56.2197 14.6204C55.3312 14.6204 54.6042 14.8627 54.1195 15.4281C53.6349 16.0743 53.3926 16.7205 53.3926 17.6091ZM49.8384 17.6091C49.8384 16.6397 50 15.832 50.3231 15.105C50.6462 14.378 51.1308 13.7318 51.6963 13.1664C52.2617 12.601 52.9887 12.1971 53.7157 11.9548C54.5234 11.6317 55.3312 11.5509 56.2197 11.5509C57.1082 11.5509 57.916 11.7124 58.7237 11.9548C59.5315 12.2779 60.1777 12.6818 60.7431 13.1664C61.3086 13.7318 61.7932 14.378 62.1163 15.105C62.4394 15.832 62.601 16.7205 62.601 17.6091C62.601 18.5784 62.4394 19.3861 62.1163 20.1131C61.7932 20.8401 61.3086 21.4863 60.7431 22.0517C60.1777 22.6171 59.4507 23.021 58.7237 23.2633C57.916 23.5864 57.1082 23.6672 56.2197 23.6672C55.3312 23.6672 54.5234 23.5057 53.7157 23.2633C52.9079 22.9402 52.2617 22.5364 51.6963 22.0517C51.1308 21.4863 50.6462 20.8401 50.3231 20.1131C50 19.3861 49.8384 18.5784 49.8384 17.6091Z" fill="#425277"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M75.929 23.5057H72.4556V21.8902H72.3748C72.2133 22.1325 72.0517 22.3748 71.8902 22.5364C71.7286 22.7787 71.4863 22.9403 71.1632 23.1826C70.8401 23.3441 70.517 23.5057 70.1939 23.5865C69.79 23.6672 69.4669 23.748 68.9823 23.748C68.0937 23.748 67.3668 23.5865 66.8013 23.3441C66.2359 23.1018 65.832 22.6979 65.5089 22.2133C65.1858 21.7286 65.0243 21.1632 64.8627 20.4362C64.782 19.79 64.7012 19.063 64.7012 18.2553V11.7932H68.2553V17.5283C68.2553 17.8514 68.2553 18.1745 68.2553 18.5784C68.2553 18.9015 68.3361 19.3054 68.4976 19.5477C68.6592 19.79 68.8207 20.1131 69.063 20.2747C69.3054 20.4362 69.6285 20.5978 70.1131 20.5978C70.5978 20.5978 70.9209 20.517 71.244 20.3554C71.5671 20.1939 71.7286 19.9516 71.8902 19.7092C72.0517 19.4669 72.1325 19.1438 72.2133 18.7399C72.2941 18.4168 72.2941 18.013 72.2941 17.6091V11.7932H75.929V23.5057Z" fill="#425277"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M86.3489 14.7011H83.1987V18.5784C83.1987 18.9015 83.1987 19.2246 83.2794 19.4669C83.2794 19.7092 83.3602 19.9515 83.5218 20.1131C83.6026 20.2746 83.7641 20.4362 84.0064 20.5977C84.2488 20.6785 84.5719 20.7593 84.895 20.7593C85.0565 20.7593 85.2988 20.7593 85.6219 20.6785C85.945 20.6785 86.1874 20.517 86.3489 20.4362V23.4249C85.945 23.5864 85.5412 23.6672 85.1373 23.748C84.7334 23.8288 84.2488 23.8288 83.8449 23.8288C83.2795 23.8288 82.714 23.748 82.1486 23.6672C81.6639 23.5057 81.1793 23.3441 80.7754 23.021C80.3715 22.7787 80.1292 22.3748 79.8869 21.8902C79.6446 21.4055 79.5638 20.9208 79.5638 20.2746V14.7011H77.3021V11.7932H79.5638V8.31988H83.1179V11.7932H86.2681V14.7011H86.3489Z" fill="#425277"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M96.1228 16.3166C96.1228 15.6704 95.9612 15.1858 95.5573 14.7819C95.1535 14.378 94.588 14.1357 93.9418 14.1357C93.5379 14.1357 93.2148 14.2165 92.8917 14.2973C92.5686 14.4588 92.3263 14.6204 92.084 14.7819C91.8417 15.0242 91.6801 15.1858 91.5993 15.5089C91.5186 15.7512 91.4378 16.0743 91.357 16.3166H96.1228ZM99.1922 21.4863C98.6268 22.2133 97.8998 22.7787 97.0113 23.1826C96.1228 23.5864 95.2342 23.748 94.2649 23.748C93.3764 23.748 92.5686 23.5864 91.7609 23.3441C90.9531 23.021 90.3069 22.6171 89.7415 22.1325C89.1761 21.567 88.6914 20.9208 88.3683 20.1939C88.0452 19.4669 87.8837 18.5784 87.8837 17.6898C87.8837 16.7205 88.0452 15.9128 88.3683 15.1858C88.6914 14.4588 89.1761 13.8126 89.7415 13.2472C90.3069 12.6817 91.0339 12.2779 91.7609 12.0355C92.5686 11.7124 93.3764 11.6317 94.2649 11.6317C95.0727 11.6317 95.8804 11.7932 96.5266 12.0355C97.1728 12.3586 97.7383 12.7625 98.2229 13.2472C98.7076 13.8126 99.0307 14.4588 99.273 15.1858C99.5153 15.9128 99.6769 16.8013 99.6769 17.6898V18.8207H91.357C91.5186 19.5477 91.8417 20.0323 92.3263 20.4362C92.811 20.8401 93.3764 21.0824 94.1034 21.0824C94.6688 21.0824 95.1535 20.9208 95.5573 20.6785C95.9612 20.4362 96.2843 20.0323 96.6074 19.6284L99.1922 21.4863Z" fill="#425277"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M108.562 11.147L104.766 17.0436H108.562V11.147ZM108.562 20.1131H101.212V17.0436L108.078 6.46205H111.955V17.0436H114.136V20.1131H111.955V23.5057H108.481V20.1131H108.562Z" fill="#FFC63C"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M116.478 6.46205H122.052L126.01 17.6091L129.968 6.46205H135.541V23.5057H131.826V10.42H131.745L127.302 23.5057H124.475L120.194 10.42V23.5057H116.478V6.46205Z" fill="#425277"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M146.446 16.3166C146.446 15.6704 146.284 15.1858 145.88 14.7819C145.477 14.378 144.911 14.1357 144.265 14.1357C143.861 14.1357 143.538 14.2165 143.215 14.2973C142.892 14.4588 142.649 14.6204 142.407 14.7819C142.165 15.0242 142.003 15.1858 141.922 15.5089C141.842 15.7512 141.761 16.0743 141.68 16.3166H146.446ZM149.515 21.4863C148.95 22.2133 148.223 22.7787 147.334 23.1826C146.446 23.5864 145.557 23.748 144.588 23.748C143.7 23.748 142.892 23.5864 142.084 23.3441C141.276 23.021 140.63 22.6171 140.065 22.1325C139.499 21.567 139.015 20.9208 138.691 20.1939C138.368 19.4669 138.207 18.5784 138.207 17.6898C138.207 16.7205 138.368 15.9128 138.691 15.1858C139.015 14.4588 139.499 13.8126 140.065 13.2472C140.63 12.6817 141.357 12.2779 142.084 12.0355C142.892 11.7124 143.7 11.6317 144.588 11.6317C145.396 11.6317 146.204 11.7932 146.85 12.0355C147.496 12.3586 148.061 12.7625 148.546 13.2472C149.031 13.8126 149.354 14.4588 149.596 15.1858C149.838 15.9128 150 16.8013 150 17.6898V18.8207H141.68C141.842 19.5477 142.165 20.0323 142.649 20.4362C143.134 20.8401 143.7 21.0824 144.426 21.0824C144.992 21.0824 145.477 20.9208 145.88 20.6785C146.284 20.4362 146.607 20.0323 146.931 19.6284L149.515 21.4863Z" fill="#425277"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M28.1906 1.53473C28.1906 0.646204 28.9176 0 29.7253 0C30.6139 0 31.2601 0.726979 31.2601 1.53473C31.2601 2.42326 30.5331 3.06947 29.7253 3.06947C28.9176 3.15024 28.1906 2.42326 28.1906 1.53473Z" fill="#FF6400"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.53473C0 0.726979 0.726979 0 1.53473 0C2.42326 0 3.15024 0.726979 3.15024 1.53473C3.15024 2.42326 2.42326 3.15024 1.53473 3.15024C0.726979 3.15024 0 2.42326 0 1.53473Z" fill="#FF6400"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.2941 33.6834C22.2941 32.7948 23.021 32.1486 23.8288 32.1486C24.7173 32.1486 25.3635 32.8756 25.3635 33.6834C25.3635 34.5719 24.6366 35.2181 23.8288 35.2181C23.021 35.2181 22.2941 34.5719 22.2941 33.6834Z" fill="#FF6400"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.0323 6.62363C20.2746 6.86595 20.2746 7.18906 20.0323 7.35061L17.3667 10.0162C17.1244 10.2585 17.2051 10.4201 17.5283 10.5816C19.063 11.1471 20.2746 12.3587 20.7593 13.8126C20.84 14.055 21.0824 14.1357 21.3247 13.9742L23.9903 11.3086C24.2326 11.0663 24.5557 11.0663 24.7173 11.3086L27.0598 13.6511C27.3021 13.8934 27.4636 13.8126 27.4636 13.4895V4.20036C27.4636 4.03881 27.3829 3.95804 27.2213 3.95804H17.8514C17.5282 3.95804 17.5282 4.11959 17.6898 4.36191L20.0323 6.62363ZM13.7318 10.5008C13.9741 10.4201 14.0549 10.1777 13.8934 9.93542L11.2278 7.26983C10.9854 7.0275 10.9854 6.7044 11.2278 6.54285L13.5703 4.20036C13.8126 3.95804 13.7318 3.79649 13.4087 3.79649H4.2003C4.03875 3.95804 3.8772 4.03881 3.8772 4.20036V13.4895C3.8772 13.8126 4.03875 13.8126 4.28107 13.6511L6.62356 11.3086C6.86589 11.0663 7.18899 11.0663 7.35054 11.3086L10.0161 13.9742C10.2585 14.2165 10.42 14.1357 10.5816 13.8126C11.0662 12.2779 12.2778 11.0663 13.7318 10.5008ZM15.9127 21.1632C15.5896 21.1632 15.5089 21.4055 15.5896 21.6479L17.1244 25.0404C17.2051 25.2828 17.1244 25.6059 16.882 25.7674L13.8934 27.1406C13.651 27.3021 13.651 27.4637 13.8934 27.5445L22.6171 30.6947C22.7787 30.7755 22.9402 30.6947 22.9402 30.5332L26.1712 21.8094C26.252 21.5671 26.1712 21.4055 25.8481 21.5671L22.8594 22.9403C22.6171 23.1018 22.294 22.9403 22.1324 22.6979L20.4362 19.063C20.3554 18.8207 20.1131 18.8207 19.9515 18.9823C19.4669 19.6285 18.8207 20.1939 18.0129 20.5978C17.5282 20.8401 16.882 21.0017 16.3166 21.0824C16.3166 21.0824 16.0743 21.1632 15.9127 21.1632Z" fill="#FFC63C"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.7124 15.6705C11.7124 13.4895 13.4895 11.7932 15.5896 11.7932C17.7706 11.7932 19.4668 13.5703 19.4668 15.6705C19.4668 17.8514 17.6898 19.6285 15.5896 19.6285C13.4895 19.5477 11.7124 17.8514 11.7124 15.6705Z" fill="#FF6400"/>
</svg>

After

Width:  |  Height:  |  Size: 9.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 402 58"><g fill="#231F20"><path d="M24.6 23c.4 0 .7-.1 1-.2l10-5.4c1-.5 1.3-1.8.8-2.8-.5-1-1.8-1.3-2.8-.8l-9.9 5.4c-1 .3-1.5 1.3-1.3 2.3.3 1 1.3 1.7 2.3 1.5h-.1zM39.8 30.9c.3 0 .7-.1 1-.3L56.7 22c.6-.3 1-1 1-1.7 0-.8-.3-1.5-.9-1.8-.7-.4-1.4-.4-2.1-.1L38.8 27c-.9.4-1.5 1.4-1.2 2.4.2 1 1.2 1.6 2.2 1.5z"/><path d="M81 19.6c-.4-1.2-1.3-2.2-2.4-2.7L61.4 7.7c-2.8-1.4-6.1-1.4-9 0l-1.4.7L39.1 2C36.3.6 33 .6 30.1 2L2.5 16.9c-1.4.6-2.3 1.9-2.5 3.4v15.2c0 .8.4 1.5 1.1 1.8l35 19c2.8 1.4 6.2 1.4 9 0L80 37.1c.7-.3 1.1-1 1.1-1.8v-15c0-.2-.1-.5-.1-.7zm-76.5.9L32 5.6c1.6-.7 3.5-.7 5.2 0L51 13l3.3-1.8c1.7-.7 3.6-.7 5.2 0l17.1 9.2.2.1-.2.1-33.4 18c-1.7.8-3.6.8-5.2 0l-33.5-18-.2-.1h.2zm38.6 32.2c-1.6.7-3.5.7-5.1 0L4.1 34.3v-9.2L36 42.3c2.8 1.4 6.2 1.4 9 0l32-17.2v9L43.1 52.7zM115.7 10.2h18.2c8.7 0 13.1 3.1 13.1 9.1 0 1.9-.5 3.7-1.6 5.2s-2.6 2.6-4.3 3.2c2.2.4 4.2 1.5 5.7 3.1s2.2 3.6 2.2 5.7c0 3.8-1.4 6.7-4.1 8.7-2.7 2-6.6 3-11.8 3h-17.5v-5.4l1.8-.2c.4 0 .8-.2 1.1-.5.2-.4.3-.9.3-1.3V16.1l-3.1-.3v-5.6zm13.1 6.4v9h2.7c3.5 0 5.3-1.6 5.3-4.8 0-2.8-1.7-4.2-5.1-4.2h-2.9zm0 15.1v9.9h3.7c3.8 0 5.8-1.8 5.8-5.2 0-3.1-1.9-4.7-5.7-4.7h-3.8zM180.7 19v22c0 .5 0 .9.3 1.3.2.3.6.4 1 .5l1.5.1v5.2h-11.7v-3.6h-.2c-1.7 3-4.5 4.4-8.5 4.4-3.1 0-5.3-.8-6.8-2.3-1.4-1.6-2.1-4-2.1-7.3V26.2c0-.4-.1-.8-.4-1.1-.2-.3-.6-.5-1-.5l-1.6-.2V19H164v18.4c-.1 1.1.1 2.2.6 3.1.6.8 1.6 1.1 2.5 1 1.1.1 2.2-.4 2.9-1.2.7-1 1.1-2.2 1-3.4V26.3c0-.5-.1-.9-.3-1.3-.3-.3-.7-.4-1.1-.4l-1.3-.2V19h12.4zM198.9 12.3V19h8.1c2.5-1.1 4.3-3.4 5.5-6.7h5.3V19h6.9l-.5 6.3h-6.4v12.3c-.1 1.1.2 2.2.7 3.2.4.5 1.3.8 2.7.8 1.2 0 2.5-.3 3.6-.8l1.4 6.3c-2.5 1.3-5.2 1.9-7.9 1.8-1.3 0-2.5-.1-3.8-.3-.9-.2-1.8-.4-2.7-.8-.7-.3-1.3-.8-1.8-1.4-.4-.5-.8-1-1.1-1.6-.3-.6-.5-1.3-.6-2-.1-.6-.2-1.3-.3-2V25.3h-9v12.3c-.1 1 .1 2.1.6 3.1.5.7 1.4 1.1 2.3 1 1.1 0 2.2-.3 3.2-.8l1.7 6.2c-2.3 1.2-4.9 1.9-7.5 1.8-3.7 0-6.4-.9-7.9-2.6-1.5-1.7-2.3-4.2-2.3-7.6V25.3h-3.9l.8-5.5c3.6-.8 6.2-3.3 7.6-7.4l5.3-.1zM242.7 18.2c2.7-.1 5.3.6 7.5 2.2 2 1.6 3 4.1 2.8 6.6 0 6.9-5.3 10.2-16 10 .1 1.3.7 2.6 1.7 3.5 1.2 1 2.7 1.4 4.2 1.4 2.6-.1 5.2-.9 7.4-2.3l2.6 6.3c-.5.4-1 .7-1.6.9-1.3.6-2.6 1-4 1.4-1.9.5-3.8.7-5.7.7-4.9 0-8.5-1.3-10.8-4-2.3-2.6-3.5-6.2-3.5-10.7-.1-4.1 1.3-8.2 4-11.4 2.7-3 6.5-4.6 11.4-4.6zm2 9.3c0-.7-.2-1.4-.7-1.9-.5-.5-1.2-.7-1.9-.6-1.4 0-2.8.6-3.6 1.8-1 1.3-1.6 2.9-1.6 4.6 5.2.2 7.7-1.2 7.7-3.9h.1zM272.5 25.5c-1.1 0-2.1.5-2.7 1.3-.7.9-1.1 2.1-1 3.3v12.5l5.1.3v5.3h-18.1V43l1.9-.2c.4.1.8-.1 1.1-.4.2-.4.3-.9.3-1.4V26.2c0-.4-.1-.8-.3-1.2-.3-.3-.6-.4-1-.4l-2-.2V19H268v4.4h.1c.7-1.4 1.7-2.7 3-3.6 1.6-1.1 3.5-1.7 5.4-1.6 1.9-.1 3.7.2 5.4.9v11.3l-7.6.4v-3.9c0-.7-.2-1.1-.5-1.2-.4-.1-.9-.2-1.3-.2zM308.7 17.5c-1.2-.3-2.3-.4-3.4-.4-6.1 0-9.2 3.9-9.2 11.8 0 3.8.8 6.8 2.3 9 1.5 2.2 3.9 3.3 7.1 3.4 1.1 0 2.1-.1 3.2-.4.6-.2 1-.8 1-1.5v-3.7l7.3.4v10.5c-3.8 1.7-7.9 2.5-12.1 2.3-6.1 0-10.8-1.6-14.1-4.9-3.3-3.3-5-8.1-5-14.5 0-3.2.5-6.4 1.6-9.4.9-2.5 2.4-4.6 4.4-6.3 1.8-1.4 3.8-2.5 6-3.3 2.2-.7 4.6-1 6.9-1 4.2-.1 8.3.7 12.2 2.4v10l-7.4.4V19c0-.9-.3-1.4-.8-1.5zM323.6 10.2h14.6l7.5 24.8h.2l7.7-24.7h14.6v5.4l-1.8.2c-.5 0-.9.2-1.2.5-.3.4-.4.9-.3 1.3l1.9 24.8 2.9.1v5.6h-15.3v-5.5l1.8-.2c.4.1.8-.1 1-.4.2-.4.3-.9.2-1.3l-.9-16.1h-.1l-7.2 23.5h-7.1l-7-23.1h-.2l-1 17.3 2.8.2v5.6h-15.3v-5.5l1.8-.2c.5 0 .9-.2 1.2-.5.2-.4.4-.9.4-1.4l2-24.6-3.2-.2v-5.6zM385.5 41.6c3.5 0 5.3-1.4 5.3-4.2 0-1.1-.5-2.2-1.4-2.8-1.4-.8-2.9-1.4-4.5-1.8-1.3-.3-2.7-.8-4-1.3-1.2-.5-2.3-1.2-3.4-1.9-1.2-.9-2.2-2-2.8-3.3-.6-1.5-1-3.2-1-4.8-.1-3.4 1.4-6.7 4-8.8 2.7-2.1 6.2-3.1 10.6-3.1 4-.2 8 .6 11.7 2.2v9.3l-7.4.5v-2.9c0-.8-.3-1.3-.8-1.4-1.1-.3-2.2-.4-3.3-.4-1.1 0-2.2.3-3.1.8-.8.6-1.3 1.6-1.2 2.6-.1 1.1.5 2.2 1.4 2.8 1.5.9 3.1 1.6 4.8 2 1.4.4 2.5.8 3.3 1.1.9.4 1.9.8 2.8 1.3 1 .5 1.9 1.2 2.6 2 .7.9 1.2 1.8 1.6 2.9.5 1.3.7 2.6.7 4 .2 3.6-1.3 7-4.1 9.3-2.7 2.2-6.4 3.3-11.2 3.3-4.3.1-8.6-.7-12.6-2.3v-9.8l7.5-.5v3.2c0 .9.3 1.4.9 1.6 1.1.2 2.3.4 3.6.4z"/></g></svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 402 58"><g fill="#fff"><path d="M24.6 23c.4 0 .7-.1 1-.2l10-5.4c1-.5 1.3-1.8.8-2.8-.5-1-1.8-1.3-2.8-.8l-9.9 5.4c-1 .3-1.5 1.3-1.3 2.3.3 1 1.3 1.7 2.3 1.5h-.1zM39.8 30.9c.3 0 .7-.1 1-.3L56.7 22c.6-.3 1-1 1-1.7 0-.8-.3-1.5-.9-1.8-.7-.4-1.4-.4-2.1-.1L38.8 27c-.9.4-1.5 1.4-1.2 2.4.2 1 1.2 1.6 2.2 1.5z"/><path d="M81 19.6c-.4-1.2-1.3-2.2-2.4-2.7L61.4 7.7c-2.8-1.4-6.1-1.4-9 0l-1.4.7L39.1 2C36.3.6 33 .6 30.1 2L2.5 16.9c-1.4.6-2.3 1.9-2.5 3.4v15.2c0 .8.4 1.5 1.1 1.8l35 19c2.8 1.4 6.2 1.4 9 0L80 37.1c.7-.3 1.1-1 1.1-1.8v-15c0-.2-.1-.5-.1-.7zm-76.5.9L32 5.6c1.6-.7 3.5-.7 5.2 0L51 13l3.3-1.8c1.7-.7 3.6-.7 5.2 0l17.1 9.2.2.1-.2.1-33.4 18c-1.7.8-3.6.8-5.2 0l-33.5-18-.2-.1h.2zm38.6 32.2c-1.6.7-3.5.7-5.1 0L4.1 34.3v-9.2L36 42.3c2.8 1.4 6.2 1.4 9 0l32-17.2v9L43.1 52.7zM115.7 10.2h18.2c8.7 0 13.1 3.1 13.1 9.1 0 1.9-.5 3.7-1.6 5.2s-2.6 2.6-4.3 3.2c2.2.4 4.2 1.5 5.7 3.1s2.2 3.6 2.2 5.7c0 3.8-1.4 6.7-4.1 8.7-2.7 2-6.6 3-11.8 3h-17.5v-5.4l1.8-.2c.4 0 .8-.2 1.1-.5.2-.4.3-.9.3-1.3V16.1l-3.1-.3v-5.6zm13.1 6.4v9h2.7c3.5 0 5.3-1.6 5.3-4.8 0-2.8-1.7-4.2-5.1-4.2h-2.9zm0 15.1v9.9h3.7c3.8 0 5.8-1.8 5.8-5.2 0-3.1-1.9-4.7-5.7-4.7h-3.8zM180.7 19v22c0 .5 0 .9.3 1.3.2.3.6.4 1 .5l1.5.1v5.2h-11.7v-3.6h-.2c-1.7 3-4.5 4.4-8.5 4.4-3.1 0-5.3-.8-6.8-2.3-1.4-1.6-2.1-4-2.1-7.3V26.2c0-.4-.1-.8-.4-1.1-.2-.3-.6-.5-1-.5l-1.6-.2V19H164v18.4c-.1 1.1.1 2.2.6 3.1.6.8 1.6 1.1 2.5 1 1.1.1 2.2-.4 2.9-1.2.7-1 1.1-2.2 1-3.4V26.3c0-.5-.1-.9-.3-1.3-.3-.3-.7-.4-1.1-.4l-1.3-.2V19h12.4zM198.9 12.3V19h8.1c2.5-1.1 4.3-3.4 5.5-6.7h5.3V19h6.9l-.5 6.3h-6.4v12.3c-.1 1.1.2 2.2.7 3.2.4.5 1.3.8 2.7.8 1.2 0 2.5-.3 3.6-.8l1.4 6.3c-2.5 1.3-5.2 1.9-7.9 1.8-1.3 0-2.5-.1-3.8-.3-.9-.2-1.8-.4-2.7-.8-.7-.3-1.3-.8-1.8-1.4-.4-.5-.8-1-1.1-1.6-.3-.6-.5-1.3-.6-2-.1-.6-.2-1.3-.3-2V25.3h-9v12.3c-.1 1 .1 2.1.6 3.1.5.7 1.4 1.1 2.3 1 1.1 0 2.2-.3 3.2-.8l1.7 6.2c-2.3 1.2-4.9 1.9-7.5 1.8-3.7 0-6.4-.9-7.9-2.6-1.5-1.7-2.3-4.2-2.3-7.6V25.3h-3.9l.8-5.5c3.6-.8 6.2-3.3 7.6-7.4l5.3-.1zM242.7 18.2c2.7-.1 5.3.6 7.5 2.2 2 1.6 3 4.1 2.8 6.6 0 6.9-5.3 10.2-16 10 .1 1.3.7 2.6 1.7 3.5 1.2 1 2.7 1.4 4.2 1.4 2.6-.1 5.2-.9 7.4-2.3l2.6 6.3c-.5.4-1 .7-1.6.9-1.3.6-2.6 1-4 1.4-1.9.5-3.8.7-5.7.7-4.9 0-8.5-1.3-10.8-4-2.3-2.6-3.5-6.2-3.5-10.7-.1-4.1 1.3-8.2 4-11.4 2.7-3 6.5-4.6 11.4-4.6zm2 9.3c0-.7-.2-1.4-.7-1.9-.5-.5-1.2-.7-1.9-.6-1.4 0-2.8.6-3.6 1.8-1 1.3-1.6 2.9-1.6 4.6 5.2.2 7.7-1.2 7.7-3.9h.1zM272.5 25.5c-1.1 0-2.1.5-2.7 1.3-.7.9-1.1 2.1-1 3.3v12.5l5.1.3v5.3h-18.1V43l1.9-.2c.4.1.8-.1 1.1-.4.2-.4.3-.9.3-1.4V26.2c0-.4-.1-.8-.3-1.2-.3-.3-.6-.4-1-.4l-2-.2V19H268v4.4h.1c.7-1.4 1.7-2.7 3-3.6 1.6-1.1 3.5-1.7 5.4-1.6 1.9-.1 3.7.2 5.4.9v11.3l-7.6.4v-3.9c0-.7-.2-1.1-.5-1.2-.4-.1-.9-.2-1.3-.2zM308.7 17.5c-1.2-.3-2.3-.4-3.4-.4-6.1 0-9.2 3.9-9.2 11.8 0 3.8.8 6.8 2.3 9 1.5 2.2 3.9 3.3 7.1 3.4 1.1 0 2.1-.1 3.2-.4.6-.2 1-.8 1-1.5v-3.7l7.3.4v10.5c-3.8 1.7-7.9 2.5-12.1 2.3-6.1 0-10.8-1.6-14.1-4.9-3.3-3.3-5-8.1-5-14.5 0-3.2.5-6.4 1.6-9.4.9-2.5 2.4-4.6 4.4-6.3 1.8-1.4 3.8-2.5 6-3.3 2.2-.7 4.6-1 6.9-1 4.2-.1 8.3.7 12.2 2.4v10l-7.4.4V19c0-.9-.3-1.4-.8-1.5zM323.6 10.2h14.6l7.5 24.8h.2l7.7-24.7h14.6v5.4l-1.8.2c-.5 0-.9.2-1.2.5-.3.4-.4.9-.3 1.3l1.9 24.8 2.9.1v5.6h-15.3v-5.5l1.8-.2c.4.1.8-.1 1-.4.2-.4.3-.9.2-1.3l-.9-16.1h-.1l-7.2 23.5h-7.1l-7-23.1h-.2l-1 17.3 2.8.2v5.6h-15.3v-5.5l1.8-.2c.5 0 .9-.2 1.2-.5.2-.4.4-.9.4-1.4l2-24.6-3.2-.2v-5.6zM385.5 41.6c3.5 0 5.3-1.4 5.3-4.2 0-1.1-.5-2.2-1.4-2.8-1.4-.8-2.9-1.4-4.5-1.8-1.3-.3-2.7-.8-4-1.3-1.2-.5-2.3-1.2-3.4-1.9-1.2-.9-2.2-2-2.8-3.3-.6-1.5-1-3.2-1-4.8-.1-3.4 1.4-6.7 4-8.8 2.7-2.1 6.2-3.1 10.6-3.1 4-.2 8 .6 11.7 2.2v9.3l-7.4.5v-2.9c0-.8-.3-1.3-.8-1.4-1.1-.3-2.2-.4-3.3-.4-1.1 0-2.2.3-3.1.8-.8.6-1.3 1.6-1.2 2.6-.1 1.1.5 2.2 1.4 2.8 1.5.9 3.1 1.6 4.8 2 1.4.4 2.5.8 3.3 1.1.9.4 1.9.8 2.8 1.3 1 .5 1.9 1.2 2.6 2 .7.9 1.2 1.8 1.6 2.9.5 1.3.7 2.6.7 4 .2 3.6-1.3 7-4.1 9.3-2.7 2.2-6.4 3.3-11.2 3.3-4.3.1-8.6-.7-12.6-2.3v-9.8l7.5-.5v3.2c0 .9.3 1.4.9 1.6 1.1.2 2.3.4 3.6.4z"/></g></svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="325 451.6 374.2 120.8" enable-background="new 325 451.6 374.2 120.8" xml:space="preserve">
<path fill="#FFFFFF" d="M491.4,451.6c-33.6,0-59.6,22.4-63.6,53.4c5.4,1.7,9.7,3.9,12.9,6.6c2.1-25.9,23-44.5,50.7-44.5
c11.5,0,21.7,3.2,30.1,8.8c0.3-0.6,0.8-1.4,2.2-1.8c5.4-1.6,10.6-1.4,15.3,0.4c0.3-0.9,0.5-1.8,0.9-2.7
C528.2,459.4,511.2,451.6,491.4,451.6z"/>
<path fill="#FBAA19" d="M491.4,455.5c-31.9,0-56.4,21.5-59.9,50.8c2.1,0.8,3.9,1.7,5.6,2.7c3.4-26.5,25.5-45.8,54.3-45.8
c10.7,0,20.7,2.7,29,7.5c0.3-0.1,0.6-0.3,0.9-0.4c3.5-1,6.9-1.3,10.2-1C521.1,460.7,507.2,455.5,491.4,455.5z"/>
<g>
<path fill="#14499E" d="M564.5,538.1v-62.1h-7.8c-0.1,4-1.6,7.8-4,10.3c-1.3,1.3-2.7,2.3-4.1,2.8c1,2.6,2.1,5.3,2.7,8.1
c1.2,4.8,1.6,6.5,1.9,10.9c0.3,2.2,0.3,4.4,0.3,6.5c0,12.7-3.5,25.2-9.8,35.7v5h45.4v-17.6h-24.6V538.1z"/>
<path fill="#14499E" d="M613.5,555.7h-20.7v-79.5h20.7V555.7z"/>
<path fill="#14499E" d="M666.2,526.1h-17.2l8.7-25.3L666.2,526.1z M671.9,541.9l5.2,13.8h22.1l-29.9-79.5h-22.5l-30.5,79.5h21.9
l5.4-13.8H671.9z"/>
<path fill="#14499E" d="M426.1,507.2c-7-2.2-7.9-2.3-8.9-2.8c-3.6-1.7-5.4-3.7-5.4-6.2c0-3.9,3.9-6.9,8.8-6.9
c3.4,0,6.5,0.9,9.7,2.7c1.8-5.6,4.4-10.9,7.6-15.5c-6.7-2.8-13.8-4.4-20.7-4.4c-16,0-27,10.9-27,26.8c0,6.9,2.1,12,5.9,15.5
c3,2.5,6.5,4,15.5,6.7c9.7,2.8,12.4,4.9,12.4,9.2c0,4.7-4.3,7.9-10.3,8.3c-5.7,0.4-10.9,0.3-17.2-5.2l-9.6,13.3
c8.4,5.8,18,8.9,27.7,8.9c19.5,0,31-10.5,31-28.3C445.7,517.8,440,511.2,426.1,507.2z"/>
</g>
<g>
<path fill="#14499E" d="M596.7,479.9c0,6.7,0,65.2,0,71.8c3.9,0,8.9,0,12.9,0c0-6.7,0-65.2,0-71.8
C605.7,479.9,600.7,479.9,596.7,479.9z"/>
<path fill="#14499E" d="M649.3,479.9c-1.7,4.4-24.2,62.8-27.5,71.8c5.2,0,10.6,0,13.6,0c1.3-3.4,5.4-13.8,5.4-13.8h33.9
c0,0,3.9,10.5,5.2,13.8c3,0,8.5,0,13.7,0c-3.4-8.8-25.3-67.4-27-71.8C662.9,479.9,652.8,479.9,649.3,479.9z M645.4,524.8l12.4-36.2
l13.8,41.4h-27.9L645.4,524.8z"/>
<path fill="#14499E" d="M560.6,542c0,0,0-55.2,0-62.1c-0.5,0-1.2,0-1.7,0c-0.8,3.5-2.3,6.6-4.5,9.1c-0.6,0.8-1.4,1.4-2.2,1.9
c0.6,1.9,1.3,3.7,1.8,5.6c1.2,4.9,1.6,6.9,1.9,11.4c0.3,2.3,0.4,4.7,0.4,6.9c0,12.2-3.1,24-8.5,34.4c0,1.2,0,2.1,0,2.6
c5.9,0,31.8,0,37.6,0c0-3.4,0-6.5,0-9.8C579.9,542,560.6,542,560.6,542z"/>
<path fill="#14499E" d="M394.2,501c0,5.7,1.6,9.8,4.7,12.5c2.2,1.8,4.9,3.2,14,5.8c8.7,2.6,15.3,5.2,15.3,12.9
c0,6.7-5.6,11.6-14,12.2c-5.2,0.4-10.6,0.3-16.7-3.6c-1.8,2.5-3,4.1-4.8,6.6c6.9,4,14.4,6.2,22.1,6.2c17.5,0,27.2-8.7,27.2-24.4
c0-8-2.8-14.2-16.8-18.4l-1.8-0.5c-5.7-1.7-6.3-1.9-7.6-2.5c-5.2-2.3-7.6-5.7-7.6-9.7c0-5.9,5.6-10.7,12.7-10.7
c2.6,0,5,0.5,7.5,1.3c1.2-2.8,2.5-5.6,4-8.3c-4.9-1.6-10.1-2.5-14.9-2.5C403.5,478,394.2,487.2,394.2,501z"/>
</g>
<path fill="#FBAA19" d="M346.5,517.3c1.2-6.1,5.2-9.6,12-9.6c5.8,0,10.5,3.5,11.9,9.3L346.5,517.3z M389.8,529.1v-2.7
c-0.1-20.2-12.7-32.1-33-31.8c-19.5,0.1-31.9,12.8-31.8,31.9c0.1,18.9,13.7,31,34.4,30.8c15.5-0.1,25.7-7.2,29.5-21.9l-20,0.1
c-2.6,5.4-5.2,7-10,7c-8.5,0.1-12.8-4.1-12.9-13.1L389.8,529.1z"/>
<path fill="#FBAA19" d="M506.1,485.1c0,0,1.9-3.9,6.5-6.6c-6.2-3.1-13.4-4.9-21.2-4.9c-25.2,0-44,18.2-44,42.3
c0,24.2,18.9,42.4,44,42.4c25.2,0,44-18.2,44-42.4c0-10.5-3.5-19.8-9.6-27C517,484.2,506.1,485.1,506.1,485.1z M491.3,538.5
c-12.4,0-22.4-10-22.4-22.4c0-12.3,10-22.2,22.4-22.2s22.4,10,22.4,22.2C513.8,528.4,503.7,538.5,491.3,538.5z"/>
<path fill="#FBAA19" d="M356.8,498.3L356.8,498.3c-17.3,0.1-28.1,10.9-27.9,28.1c0.1,16.8,11.9,27.2,30.5,27
c12.2-0.1,20-4.8,24-14.1c-4.9,0-9.7,0.1-12.2,0.1c-2.8,4.9-6.5,7-12.3,7c-10.6,0.1-16.7-5.9-16.9-16.9c0,0,0,0,0-0.1
c0-1,0.4-1.9,1-2.7c0.8-0.8,1.7-1.2,2.7-1.2c0,0,33.2-0.3,39.7-0.4c-0.3-8.1-2.8-14.9-7.5-19.5C373.3,500.8,365.9,498.2,356.8,498.3
z M343.5,519.9c-0.8-0.9-1-2.1-0.9-3.2c1.4-8,7.2-12.7,15.8-12.8l0,0c7.6-0.1,13.8,4.8,15.6,12.3c0.3,1.2,0,2.3-0.6,3.4
c-0.8,0.9-1.8,1.6-3,1.6l-23.9,0.3C345.3,521.3,344.3,520.8,343.5,519.9z"/>
<path fill="#FBAA19" d="M506.1,485.1c0,0,0.9-1.8,3-3.9c-5.3-2.3-11.2-3.6-17.7-3.6c-22.9,0-40.1,16.5-40.1,38.4
c0,22,17.2,38.5,40.1,38.5s40.1-16.5,40.1-38.5c0-12.5-5.6-23.3-14.7-30.1C511,484.7,506.1,485.1,506.1,485.1z M517.7,516
c0,14.5-11.8,26.2-26.2,26.2s-26.2-11.8-26.2-26.2c0-14.5,11.8-26.1,26.2-26.1C505.8,489.9,517.7,501.7,517.7,516z"/>
<path fill="#14499E" d="M518.5,562.4c-7.9,4.1-16.9,6.3-26.9,6.3c-20.2,0-37.1-9.4-46.5-24.2c-0.6,1.4-1.4,2.7-2.3,3.9
c10.7,14.4,28.3,23.3,48.9,23.3c9.6,0,18.4-1.9,26.2-5.3c0.1-0.6,0.1-1.3,0.4-1.9C518.3,563.6,518.5,562.9,518.5,562.4z"/>
<path fill="#14499E" d="M552.9,472.6c-0.6-5-0.1-8,0.8-9.7c0-0.1-11.9-0.1-14.2,15.3c-5.7-3.2-11.5-3-16.3-1.6
c-0.8,0.3-0.6,0.5,0.1,0.5c3.1-0.1,6.1,0.5,8.8,1.9c-5.4-1.3-15.1-1.4-20.4,3.2c-0.3,0.1-0.5,0.3-0.5,0.4c0.5,0.1,4.9-0.8,15,3.6
c4.1,1.8,11.4,3.7,14.1-0.5c2.5,5.6,4.1,10.7,5,15.5c-1.8-3.1-4.1-4.5-4.8-4.8c-2.7-1.6-6.5-1.6-6.5-1.6s0.5,2.3,1.8,3.5
c3,3,7.4,2.1,7.2,1.8c0-0.8-0.3-1.4-0.5-1.9c2.2,2.3,3.7,8.1,4,10.9c0.9,10-1,18.4-3.1,24.8c-3.9,10-8.5,16.9-17.3,25
c-2.6-3.7-7.2-4.3-7.8-2.8v0.1c2.5-0.3,8.4,2.3,7.9,8.4c-0.6,7.4-6.5,5-5.3,0.1c0.8-3.4-0.6-5-1.9-6.1c0.6,1.3,1.6,3.1,0.5,6.5
c-2.3,7.9,7,11,8.3,0.9c0-0.5,0-1,0-1.4c15.9-12.9,24.2-34.9,22.1-56c-0.4-4.1-0.6-5.8-1.8-10.5c-0.9-3.6-2.2-7.2-3.7-10.6
C548.2,487.8,554.1,482.3,552.9,472.6z"/>
<g>
<path fill="#14499E" d="M541.7,478.5l-0.5,3.5l0,0c0.5,1.2,1.2,2.6,1.2,2.6c0.1,0.1,0.1,0.4,0.1,0.5c0.8,0,1.7,0.1,1.7,0.1
c0.9,0,2.5-0.4,3.7-1.9c1.8-1.9,2.7-4.7,2.7-7.9c0-0.8,0-1.6-0.1-2.3c-0.3-1.6-0.4-3.1-0.4-4.4c0-0.9,0.1-1.7,0.3-2.6
C547.3,467.1,543,470.1,541.7,478.5z"/>
<path fill="#14499E" d="M529.8,481.1c-3.4-0.8-6.1-0.8-10.3,0.1c2.3,0.6,4.8,1.4,7.4,2.6c4.1,1.8,9.4,3,11,0.4c0,0,1.2-1.9,1.8-3
c-0.9-0.5-1.7-1-1.7-1c-1.8-1-3.6-1.6-5.6-1.9C534,482,529.8,481.1,529.8,481.1z"/>
</g>
<path fill="#FBAA19" d="M491.3,489.9c13.6,0,24.8,10.3,26.1,23.5c0.1-0.9,0.1-1.7,0.1-2.6c0-14.5-11.8-26.1-26.2-26.1
c-14.5,0-26.2,11.8-26.2,26.1c0,0.9,0,1.8,0.1,2.6C466.5,500.2,477.7,489.9,491.3,489.9z"/>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.1 KiB

View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 1280 492" overflow="visible" xmlns="http://www.w3.org/2000/svg"><path d="m106.3 334.1c1.9 5.2 3.8 10.7 5.3 16.1-10.5 27.1-42.9 29.2-57.7 14.2-2.5-4.6-4.6-9.4-6.5-14.4 13.8 2.5 46.3-5 58.9-15.9zm80.4-207.2c1.8-6.5 1.8-13.4.2-20-2-7.6-6.1-14.4-12-19.7 0 0-12.8-23.7-36.2-23.7-14 .2-27.4 5.2-38 14.3-9 17.1-12.1 35.8-7.5 53.9 4.4 17.1 15 31.3 29.7 41.9 0 0 30.1 2.1 47.1-10.5 16.4-12.2 16.7-36.2 16.7-36.2zm33.2 125.1-50.1 42c-2.9-3.4-25.7-29.4-36-60l57.1-33.2c12.1 27.1 21.7 40.1 29 51.2zm-50.8 40.6c.5.6.5.6 0 0zm170.7 35.1c-8.5 9.9-34.8 26.2-48.7 26.2 1.7 4.8 3 9.8 3.8 14.8 9.6 15.9 50.3.4 46.2-25.7-.1-5.1-.5-10.2-1.3-15.3zm-141 88.1c-.1 4.6-.4 9.4-.6 14.4 6.4 20.7 47.2 23 58.7-.5 2.7-3.6 6.7-10.3 9.4-20.8-19.6 14.2-54.3 13.7-67.5 6.9zm101.3-282.8c1.2-4.2 2.3-8.5 3.2-12.8-17.3-2.7-34.7-4.4-52.1-4.9-1.3 4.2-3 8.2-5.1 12 8.1 20.1 40.9 21.9 54 5.7zm979.9 15v128c0 4.4-3.6 8-8 8h-296c-4.4 0-8-3.6-8-8v-128c0-4.4 3.6-8 8-8h296c4.4 0 8 3.6 8 8zm-162.4 107.2-53.8-46.6 52.2-39.6v-5h-22.7l-60.6 46v-46h-20.4v96h20.4v-41h14.1l47.2 41h23.7zm32.6-67h-19.9v71.8h19.9zm.4-27.5h-20.7l.9 17.3h18.9zm90.1 98.5-2.3-14.6c-5.7 1.1-11.4 1.6-17.2 1.6-16.1 0-22.4-6.4-22.4-18v-25.6h41.4v-14.5h-41.5v-19.1h-10.4l-9.6 19.2h-17.3v14.5h17.6v25.8c0 20.3 10.7 33.1 40.3 33.1 7.1 0 14.3-.8 21.4-2.4z" fill="#d99b21"/><path d="m339.8 327.7c-7.1-43.3-43.6-72.7-80.8-72.7-6.2 0-12.4.7-18.5 2-7.2-8-13.7-16.8-19.2-26 33.1-13.7 65.8-53.9 78.8-98-2.6 2.1-8.2 5-19.1 5-22.9 0-32.2-7.6-35-10.7-9.7 17.3-28.1 31.7-47 31.7-4.7 0-9.4-.5-14.1-1.4 7.7-14.4 9-26.8 4.3-32.2-.7-.8-2-.9-2.8-.2-.3.3-.5.6-.6 1-7.2 28.9-40.8 46.7-71 46.7-30.4.1-55.8-17.2-55.8-43.7 0-29.5 34.1-56.2 72.2-56.2 17.2 0 32.6 5.5 42.9 15.1.8.7 2 .7 2.8-.1.3-.3.5-.7.5-1.1 2.5-17-29.9-39.7-69.1-39.7-4.5 0-9.1.3-13.6.9l-2.4-9c-.7-2.5-.3-3.8 1.4-5.7 7.4-8.2 6.8-20.8-1.4-28.3-8.2-7.4-20.8-6.8-28.3 1.4-7.4 8.2-6.8 20.8 1.4 28.3 2.1 1.9 4.7 3.4 7.4 4.2 2.4.8 3.3 1.8 4 4.2l2.2 8.2c-37.5 11.6-65 44.3-65 80.2 0 46.9 40.2 68.2 64.3 73.3-8.9 5-16.6 11.8-22.7 20l-4.1-7.1c-.7-1-.8-2.4-.2-3.5 1.9-4.6-.3-9.9-5-11.7-4.6-1.9-9.9.3-11.7 5-1.9 4.6.3 9.9 5 11.7.7.3 1.4.5 2.2.6 1.3.1 2.4.8 2.9 1.9l6.1 10.5c-3 5-5.5 10.3-7.4 15.8l-20.5-35.1c-.8-1.1-.9-2.6-.1-3.7 2.9-6 .4-13.1-5.6-16-1.8-.9-3.7-1.3-5.7-1.2-6.6.2-11.8 5.8-11.6 12.4.2 6.1 5.1 11.1 11.2 11.5 1.3 0 2.6.8 3.1 2l25.2 43.6c-1.7 8-2.5 16.2-2.5 24.4 0 28.1 4.8 49.1 10.4 64 1.9 1.8 6.4 4 16.6 4 22.4 0 41.1-9.5 42.2-20 19.6 29.9 40.3 38.2 74.7 47 10.9 2.8 17.8 10.9 17.8 31 0 1.2 0 2.5-.1 3.8 2.9 3.3 10.4 8.2 29.2 8.2 23.9 0 34.4-10.1 38.2-15.1 1.9-7.8 2.8-15.8 2.8-23.9 0-24.7-18.1-47.9-42.8-61.2 5.5-1.2 11.2-1.8 16.8-1.8 21.4 0 39.5 8.6 48 31.9 1.6 1 4.4 2.1 9 2.1 15.2 0 35-15.6 40.1-28.3zm-126.6-74.9c-25.6 25.1-54.5 41.9-62.2 46.1-1.2.6-2.6.4-3.6-.5-16.9-17.3-26.7-40.7-29.6-48.1-.5-1.3.1-2.8 1.3-3.4 23.5-12 46.2-25.5 67.8-40.5.9-.6 2.1-.4 2.8.5.1.1.1.2.2.3 6.7 14.5 14.6 28.5 23.6 41.8.9 1.2.8 2.8-.3 3.8zm164.8 111.2c0 22.1-24 41-50 41-17.4 0-29.6-12-33-35-.1-.4-.1-.9-.2-1.3 1.3 1.2 3.5 2.3 7.2 2.3 16.2 0 39-17.3 39-28 0 0 2.2-1 8-1 15 0 29 7.7 29 22zm-121.1 65.7c9.1 12.4 14.1 25.4 14.1 33.3 0 15-9.3 29-26 29-24.4 0-47-24.5-47-54 0-2.6.1-5.2.2-7.8 2.2 3.6 8.7 8.8 27.8 8.8 16.3 0 25.8-5.1 30.9-9.3zm-145.3-79.5c2.6 9.2 4.4 18.3 4.4 25.9 0 12.7-3.4 20.4-11.2 23-2.3 14-8.1 22-19.8 22-16.5 0-32-17.2-32-48 0-2.9.3-5.8.9-8.7 3.1 2 8 3.7 16.1 3.7 25.6-.1 37.7-12.8 41.6-17.9zm122.4-259.2c0-5.1 4.3-8 10-8 2.7 0 5.4.5 7.9 1.5-.6-3.5-.9-7-.9-10.5 0-17.9 6.3-32 22-32 17.7 0 33 21.9 33 52 0 8.8-.9 17.6-2.7 26.2-2.6 1.5-8.6 3.8-20.3 3.8-25.3 0-31.9-8.7-31.9-8.7-7.5-6.3-17.1-15.9-17.1-24.3zm168.1 116.6h51.6v48.8c-14.8 3.5-30 5.3-45.2 5.3-42.2 0-64.6-19.6-64.6-49.8 0-30.7 24.2-49.5 66.8-49.5 13.7 0 27.3 1.4 40.7 4.2l-3.4 15.4c-12.1-2.3-24.3-3.4-36.6-3.4-32.4 0-46.9 13.1-46.9 33.7 0 20.7 13.9 33.3 44.6 33.3 8.6.1 17.3-.5 25.8-1.8v-21.1l-32.9-5.4zm449 37 2.3 14.6c-7.1 1.6-14.3 2.4-21.5 2.4-29.6 0-40.3-12.8-40.3-33.1v-25.8h-17.6v-14.5h17.3l9.7-19.2h10.4v19.2h41.5v14.5h-41.4v25.6c0 11.6 6.4 18 22.4 18 5.8-.1 11.6-.6 17.2-1.7zm-108.4-83.9h20.7l-.8 17.3h-18.9zm208.8 27.5v4.9l-49.5 90.9h-25.1v-4.8l28.8-22.6v-.8h-11.5l-34.3-62.7v-4.9h19.3l27 54.2 26.4-54.2zm-430.5 0h10v18.9l-38.1 9.5v43.4h-19.9v-71.8h13.4l5.3 16.1zm222.1 0h19.9v71.8h-19.9zm-32 0h19.2v4.9l-38.3 66.9h-16.6l-38.5-66.9v-4.9h19.5l27.4 50.2zm-132-1.5c-11 .1-22.1 1.3-32.9 3.6l2.3 13.8c9.4-2 19-3 28.7-3.1 19.2 0 26 6.1 26.9 16.4l-34.9.9c-19.3.5-28.5 8.7-28.5 21.4 0 12.6 10.3 21.9 30 21.9 13.2 0 25.1-4.6 34.6-10.3l4.7 8.7h14.1v-38.3c0-21.3-10.2-35-45-35zm25.2 55.3c-8.4 3.9-17.6 6.6-27.3 6.6-12.2 0-17.3-4.2-17.4-10.3 0-5.9 4.3-9.2 12.3-9.5l32.4-1.1z" fill="#001a4d"/></svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="100%" width="100%" enable-background="new 0 0 575.8 178.3" viewBox="0 0 575.8 178.3"><path d="m148.6 78.9-24.7-13.6-20.8 12.7-.3 13-10.1-6.7-13.8 8.4c-.2-3.9-.4-8.6-.6-14.2l-14.2-9.5c3.9-2 8.4-4.3 13.5-7-.1 0 .1 1.4-2-46.5l-32-15.4-43.6 13.6 9.7 46.9 14.6 11.4-11.1 5.3 7.3 35.3 10.2 9.6-7.3 4.5 5.7 27.3 22.9 24.3c.1-.1 2.4-1.9 29.5-23.5l-.8-18.6 11.7 9.9c.2-.2 2.4-1.9 23.7-18.8l.8-13.7 8.8 6.1c.1-.2 2.1-1.7 19.3-15.3z"></path><path d="m128.1 93.5 20.5-14.6-24.7-13.6-20.8 12.7z" fill="#141414"></path><path d="m125.8 119.5 2.3-26-25-15.5-.5 25.4z" fill="#004b16"></path><path d="m92.6 146-.3-27-25.1-19.1 1.9 26.4z" fill="#004b16"></path><path d="m92.3 119 25.5-18.2-25.1-16.5-25.5 15.6z" fill="#141414"></path><path d="m52.1 178.2-4.1-27.6-24.6-24.1 5.7 27.4z" fill="#004b16"></path><path d="m48 150.6 32.4-23.1-25.1-20.4-31.9 19.4z" fill="#141414"></path><path d="m45.9 136.3-5.3-36.4-27.4-22.8 7.3 35.4z" fill="#004b16"></path><path d="m40.6 99.9 37.7-21.4-28.2-18.9-36.9 17.5z" fill="#141414"></path><path d="m38 82.5-7.3-49.9-30.7-19 9.7 46.9z" fill="#004b16"></path><path d="m30.7 32.6 44.9-17.2-32-15.4-43.6 13.6z" fill="#141414"></path><g fill="#1cb35c"><path d="m145.2 104.2c-19 15.1-19.4 15.4-19.3 15.4 2.4-27.2 2.2-26 2.3-26 21.8-15.5 20.4-14.6 20.5-14.6z"></path><path d="m116.2 127.2c-23.5 18.7-23.8 18.8-23.7 18.8-.2-28.2-.3-27-.2-27 27.1-19.4 25.4-18.2 25.5-18.2z"></path><path d="m81.6 154.7c-29.4 23.3-29.6 23.5-29.5 23.5-4.2-28.4-4.1-27.5-4-27.5 34.5-24.6 32.3-23.1 32.4-23.1z"></path><path d="m75.6 15.4c2.1 47.9 1.9 46.5 2 46.5-38.8 20.2-39.7 20.6-39.6 20.6-7.5-51-7.4-49.9-7.3-49.9z"></path><path d="m78.3 78.5c1.6 36.3 1.4 35.1 1.5 35.1-33.6 22.6-34 22.8-33.9 22.8-5.5-37.4-5.4-36.4-5.3-36.4z"></path></g><path d="m191.4 33.6 16.8-4c0 81.8-3.1 93.5 8 97.1-2.6 4.9-7.1 7.4-13.3 7.4-15.3 0-11.5-11.3-11.5-100.5z"></path><path d="m233.7 132.7v-58.4h-9.2v-13.8h26.3v72.2zm8.7-100.1c12.9 0 12.9 19.5 0 19.5s-12.9-19.5 0-19.5z"></path><path d="m316.8 132.7c0-43.6 1.1-49.6-3.5-55.2-5.8-6.9-20-5-26.1 3v52.2h-16.8v-72.2h12.1l3.1 6.7c9.1-10.8 30.4-10.9 40.6-.4 9.7 10 7.4 20.5 7.4 65.8z"></path><path d="m347.2 96.4c0-49.2 69.4-51.1 69.4 0-.1 50.7-69.4 50.8-69.4 0zm17.5 0c0 28.8 22.2 27.7 29.7 17.7 7-9.4 8.8-41.2-12.5-41.2-12.3 0-17.2 11.3-17.2 23.5z"></path><path d="m476.4 132.7c0-7.4 1.8-3.4-7.1-.4-10.2 3.5-25.1 2-34.1-7.9-11.1-12.3-12.6-39.5 1.3-54.6 11.4-12.3 28.5-13.1 39.9-7.4v-28.9l16.9-4v103.1zm0-54.9c-8.9-7.1-20.9-4.8-26.8 1.9-8.1 9.1-11.2 40.2 16.2 40.2 2.9 0 9-2.2 10.6-4.4z"></path><path d="m574.6 101.8h-51.6c1.2 22.3 29 21.4 38.1 12.2l6.5 12.9c-14 11.3-62.3 15-62.3-29.5.1-54.1 81.3-49 69.3 4.4zm-51-12.7h35.5c-1.2-10.6-7-15.8-17.5-15.8-9.7 0-15.6 5.2-18 15.8z"></path></svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.0 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -0,0 +1,123 @@
var debug = 0 ? console.log.bind(console, '[explorer]') : function () {};
// This is cureently not used, but kept in case I change my mind.
export const explorer = (Alpine) => ({
uiState: {
containerScrollTop: -1,
lastActiveRef: '',
},
treeState: {
// The href of the current page.
currentNode: '',
// The state of each node in the tree.
nodes: {},
// We currenty only list the sections, not regular pages, in the side bar.
// This strikes me as the right balance. The pages gets listed on the section pages.
// This array is sorted by length, so we can find the longest prefix of the current page
// without having to iterate over all the keys.
nodeRefsByLength: [],
},
async init() {
let keys = Reflect.ownKeys(this.$refs);
for (let key of keys) {
let n = {
open: false,
active: false,
};
this.treeState.nodes[key] = n;
this.treeState.nodeRefsByLength.push(key);
}
this.treeState.nodeRefsByLength.sort((a, b) => b.length - a.length);
this.setCurrentActive();
},
longestPrefix(ref) {
let longestPrefix = '';
for (let key of this.treeState.nodeRefsByLength) {
if (ref.startsWith(key)) {
longestPrefix = key;
break;
}
}
return longestPrefix;
},
setCurrentActive() {
let ref = this.longestPrefix(window.location.pathname);
let activeChanged = this.uiState.lastActiveRef !== ref;
debug('setCurrentActive', this.uiState.lastActiveRef, window.location.pathname, '=>', ref, activeChanged);
this.uiState.lastActiveRef = ref;
if (this.uiState.containerScrollTop === -1 && activeChanged) {
// Navigation outside of the explorer menu.
let el = document.querySelector(`[x-ref="${ref}"]`);
if (el) {
this.$nextTick(() => {
debug('scrolling to', ref);
el.scrollIntoView({ behavior: 'smooth', block: 'center' });
});
}
}
this.treeState.currentNode = ref;
for (let key in this.treeState.nodes) {
let n = this.treeState.nodes[key];
n.active = false;
n.open = ref == key || ref.startsWith(key);
if (n.open) {
debug('open', key);
}
}
let n = this.treeState.nodes[this.longestPrefix(ref)];
if (n) {
n.active = true;
}
},
getScrollingContainer() {
return document.getElementById('leftsidebar');
},
onLoad() {
debug('onLoad', this.uiState.containerScrollTop);
if (this.uiState.containerScrollTop >= 0) {
debug('onLoad: scrolling to', this.uiState.containerScrollTop);
this.getScrollingContainer().scrollTo(0, this.uiState.containerScrollTop);
}
this.uiState.containerScrollTop = -1;
},
onBeforeRender() {
debug('onBeforeRender', this.uiState.containerScrollTop);
this.setCurrentActive();
},
toggleNode(ref) {
this.uiState.containerScrollTop = this.getScrollingContainer().scrollTop;
this.uiState.lastActiveRef = '';
debug('toggleNode', ref, this.uiState.containerScrollTop);
let node = this.treeState.nodes[ref];
if (!node) {
debug('node not found', ref);
return;
}
let wasOpen = node.open;
},
isCurrent(ref) {
let n = this.treeState.nodes[ref];
return n && n.active;
},
isOpen(ref) {
let node = this.treeState.nodes[ref];
if (!node) return false;
if (node.open) {
debug('isOpen', ref);
}
return node.open;
},
});

View File

@ -0,0 +1,3 @@
export * from './navbar';
export * from './search';
export * from './toc';

View File

@ -0,0 +1,12 @@
export const navbar = (Alpine) => ({
atTop: true,
init: function () {
Alpine.bind(this.$root, this.root);
},
root: {
['@scroll.window.debounce.10ms'](event) {
this.atTop = window.scrollY < 40 ? true : false;
},
},
});

View File

@ -0,0 +1,85 @@
const designMode = false;
const groupByLvl0 = (array) => {
if (!array) return [];
return array.reduce((result, currentValue) => {
(result[currentValue.hierarchy.lvl0] = result[currentValue.hierarchy.lvl0] || []).push(currentValue);
return result;
}, {});
};
export const search = (Alpine, cfg) => ({
query: designMode ? 'shortcodes' : '',
open: designMode,
result: {},
init() {
Alpine.bind(this.$root, this.root);
this.checkOpen();
return this.$nextTick(() => {
this.$watch('query', () => {
this.search();
});
});
},
toggleOpen: function () {
this.open = !this.open;
this.checkOpen();
},
checkOpen: function () {
if (!this.open) {
return;
}
this.search();
this.$nextTick(() => {
this.$refs.input.focus();
});
},
search: function () {
if (!this.query) {
this.result = {};
return;
}
var queries = {
requests: [
{
indexName: cfg.index,
params: `query=${encodeURIComponent(this.query)}`,
attributesToHighlight: ['hierarchy', 'content'],
attributesToRetrieve: ['hierarchy', 'url', 'content'],
},
],
};
const host = `https://${cfg.app_id}-dsn.algolia.net`;
const url = `${host}/1/indexes/*/queries`;
fetch(url, {
method: 'POST',
headers: {
'X-Algolia-Application-Id': cfg.app_id,
'X-Algolia-API-Key': cfg.api_key,
},
body: JSON.stringify(queries),
})
.then((response) => response.json())
.then((data) => {
this.result = groupByLvl0(data.results[0].hits);
});
},
root: {
['@click']() {
if (!this.open) {
this.toggleOpen();
}
},
['@search-toggle.window']() {
this.toggleOpen();
},
['@keydown.meta.k.window']() {
this.toggleOpen();
},
},
});

View File

@ -0,0 +1,65 @@
var debug = 0 ? console.log.bind(console, '[toc]') : function () {};
export const toc = (Alpine) => ({
contentScrollSpy: null,
activeHeading: '',
justClicked: false,
setActive(id) {
debug('setActive', id);
this.activeHeading = id;
// Prevent the intersection observer from changing the active heading right away.
this.justClicked = true;
setTimeout(() => {
this.justClicked = false;
}, 200);
},
init() {
return this.$nextTick(() => {
let contentEl = document.getElementById('content');
if (contentEl) {
const handleIntersect = (entries) => {
if (this.justClicked) {
return;
}
for (let entry of entries) {
if (entry.isIntersecting) {
let id = entry.target.id;
this.activeHeading = id;
let liEl = this.$refs[id];
if (liEl) {
// If liEl is not in the viewport, scroll it into view.
let bounding = liEl.getBoundingClientRect();
if (bounding.top < 0 || bounding.bottom > window.innerHeight) {
this.$root.scrollTop = liEl.offsetTop - 100;
}
}
debug('intersecting', id);
break;
}
}
};
let opts = {
rootMargin: '0px 0px -75%',
threshold: 0.75,
};
this.contentScrollSpy = new IntersectionObserver(handleIntersect, opts);
// Observe all headings.
let headings = contentEl.querySelectorAll('h2, h3, h4, h5, h6');
for (let heading of headings) {
this.contentScrollSpy.observe(heading);
}
}
});
},
destroy() {
if (this.contentScrollSpy) {
debug('disconnecting');
this.contentScrollSpy.disconnect();
}
},
});

View File

@ -0,0 +1,29 @@
'use strict';
export function registerMagics(Alpine) {
Alpine.magic('copy', (currentEl) => {
return function (el) {
if (!el) {
el = currentEl;
}
let lntds = el.querySelectorAll('.lntable .lntd');
if (lntds && lntds.length === 2) {
el = lntds[1];
}
// Trim whitespace.
let text = el.textContent.trim();
navigator.clipboard.writeText(text);
};
});
Alpine.magic('isScrollX', (currentEl) => {
return function (el) {
if (!el) {
el = currentEl;
}
return el.clientWidth < el.scrollWidth;
};
});
}

View File

@ -0,0 +1 @@
export * from './helpers';

View File

@ -0,0 +1 @@
export * from './nav.js';

View File

@ -0,0 +1,90 @@
var debug = 1 ? console.log.bind(console, '[navStore]') : function () {};
var ColorScheme = {
System: 1,
Light: 2,
Dark: 3,
};
const localStorageUserSettingsKey = 'hugoDocsUserSettings';
export const navStore = (Alpine) => ({
init() {
// There is no $watch available in Alpine stores,
// but this has the same effect.
this.userSettings.onColorSchemeChanged = Alpine.effect(() => {
if (this.userSettings.settings.colorScheme) {
this.userSettings.isDark = isDark(this.userSettings.settings.colorScheme);
toggleDarkMode(this.userSettings.isDark);
}
});
// Also react to changes in system settings.
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
this.userSettings.setColorScheme(ColorScheme.System);
});
},
destroy() {},
userSettings: {
// settings gets persisted between page navigations.
settings: Alpine.$persist({
// light, dark or system mode.
// If not set, we use the OS setting.
colorScheme: ColorScheme.System,
// Used to show the most relevant tab in config listings etc.
configFileType: 'toml',
}).as(localStorageUserSettingsKey),
isDark: false,
setColorScheme(colorScheme) {
this.settings.colorScheme = colorScheme;
this.isDark = isDark(colorScheme);
},
toggleColorScheme() {
let next = this.settings.colorScheme + 1;
if (next > ColorScheme.Dark) {
next = ColorScheme.System;
}
this.setColorScheme(next);
},
colorScheme() {
return this.settings.colorScheme ? this.settings.colorScheme : ColorScheme.System;
},
},
});
function isMediaDark() {
return window.matchMedia('(prefers-color-scheme: dark)').matches;
}
function isDark(colorScheme) {
if (!colorScheme || colorScheme == ColorScheme.System) {
return isMediaDark();
}
return colorScheme == ColorScheme.Dark;
}
export function initColorScheme() {
// The AlpineJS store has not have been initialized yet, so access the
// localStorage directly.
let settingsJSON = localStorage[localStorageUserSettingsKey];
if (settingsJSON) {
let settings = JSON.parse(settingsJSON);
toggleDarkMode(isDark(settings.colorScheme));
return;
}
toggleDarkMode(isDark(null));
}
const toggleDarkMode = function (dark) {
if (dark) {
document.body.classList.add('dark');
} else {
document.body.classList.remove('dark');
}
};

6
assets/js/body-start.js Normal file
View File

@ -0,0 +1,6 @@
import { initColorScheme } from './alpinejs/stores/index';
(function () {
// This allows us to initialize the color scheme before AlpineJS etc. is loaded.
initColorScheme();
})();

11
assets/js/head-early.js Normal file
View File

@ -0,0 +1,11 @@
import { scrollToActive } from 'js/helpers/index';
(function () {
// Now we know that the browser has JS enabled.
document.documentElement.classList.remove('no-js');
// Wait for the DOM to be ready.
document.addEventListener('DOMContentLoaded', function () {
scrollToActive('DOMContentLoaded');
});
})();

View File

@ -0,0 +1,67 @@
export function bridgeTurboAndAlpine(Alpine) {
document.addEventListener('turbo:before-render', (event) => {
event.detail.newBody.querySelectorAll('[data-alpine-generated]').forEach((el) => {
if (el.hasAttribute('data-alpine-generated')) {
el.removeAttribute('data-alpine-generated');
el.remove();
}
});
});
document.addEventListener('turbo:render', () => {
if (document.documentElement.hasAttribute('data-turbo-preview')) {
return;
}
document.querySelectorAll('[data-alpine-ignored]').forEach((el) => {
el.removeAttribute('x-ignore');
el.removeAttribute('data-alpine-ignored');
});
document.body.querySelectorAll('[x-data]').forEach((el) => {
if (el.hasAttribute('data-turbo-permanent')) {
return;
}
Alpine.initTree(el);
});
Alpine.startObservingMutations();
});
// Cleanup Alpine state on navigation.
document.addEventListener('turbo:before-cache', () => {
// This will be restarted in turbo:render.
Alpine.stopObservingMutations();
document.body.querySelectorAll('[data-turbo-permanent]').forEach((el) => {
if (!el.hasAttribute('x-ignore')) {
el.setAttribute('x-ignore', true);
el.setAttribute('data-alpine-ignored', true);
}
});
document.body.querySelectorAll('[x-for],[x-if],[x-teleport]').forEach((el) => {
if (el.hasAttribute('x-for') && el._x_lookup) {
Object.values(el._x_lookup).forEach((el) => el.setAttribute('data-alpine-generated', true));
}
if (el.hasAttribute('x-if') && el._x_currentIfEl) {
el._x_currentIfEl.setAttribute('data-alpine-generated', true);
}
if (el.hasAttribute('x-teleport') && el._x_teleport) {
el._x_teleport.setAttribute('data-alpine-generated', true);
}
});
document.body.querySelectorAll('[x-data]').forEach((el) => {
if (!el.hasAttribute('data-turbo-permanent')) {
Alpine.destroyTree(el);
// Turbo leaks DOM elements via their data-turbo-permanent handling.
// That needs to be fixed upstream, but until then.
let clone = el.cloneNode(true);
el.replaceWith(clone);
}
});
});
}

View File

@ -0,0 +1,17 @@
export const scrollToActive = (when) => {
let els = document.querySelectorAll('.scroll-active');
if (!els.length) {
return;
}
els.forEach((el) => {
// Find scrolling container.
let container = el.closest('[data-turbo-preserve-scroll-container]');
if (container) {
// Avoid scrolling if el is already in view.
if (el.offsetTop >= container.scrollTop && el.offsetTop <= container.scrollTop + container.clientHeight) {
return;
}
container.scrollTop = el.offsetTop - container.offsetTop;
}
});
};

View File

@ -0,0 +1,2 @@
export * from './bridgeTurboAndAlpine';
export * from './helpers';

89
assets/js/main.js Normal file
View File

@ -0,0 +1,89 @@
import Alpine from 'alpinejs';
import { registerMagics } from './alpinejs/magics/index';
import { navbar, search, toc } from './alpinejs/data/index';
import { navStore, initColorScheme } from './alpinejs/stores/index';
import { bridgeTurboAndAlpine } from './helpers/index';
import persist from '@alpinejs/persist';
import focus from '@alpinejs/focus';
var debug = 0 ? console.log.bind(console, '[index]') : function () {};
// Turbolinks init.
(function () {
document.addEventListener('turbo:render', function (e) {
// This is also called right after the body start. This is added to prevent flicker on navigation.
initColorScheme();
});
})();
// Set up and start Alpine.
(function () {
// Register AlpineJS plugins.
{
Alpine.plugin(focus);
Alpine.plugin(persist);
}
// Register AlpineJS magics and directives.
{
// Handles copy to clipboard etc.
registerMagics(Alpine);
}
// Register AlpineJS controllers.
{
// Register AlpineJS data controllers.
let searchConfig = {
index: 'hugodocs',
app_id: 'D1BPLZHGYQ',
api_key: '6df94e1e5d55d258c56f60d974d10314',
};
Alpine.data('navbar', () => navbar(Alpine));
Alpine.data('search', () => search(Alpine, searchConfig));
Alpine.data('toc', () => toc(Alpine));
}
// Register AlpineJS stores.
{
Alpine.store('nav', navStore(Alpine));
}
// Start AlpineJS.
Alpine.start();
// Start the Turbo-Alpine bridge.
bridgeTurboAndAlpine(Alpine);
{
let containerScrollTops = {};
// To preserve scroll position in scrolling elements on navigation add data-turbo-preserve-scroll-container="somename" to the scrolling container.
addEventListener('turbo:click', () => {
document.querySelectorAll('[data-turbo-preserve-scroll-container]').forEach((el2) => {
containerScrollTops[el2.dataset.turboPreserveScrollContainer] = el2.scrollTop;
});
});
addEventListener('turbo:render', () => {
document.querySelectorAll('[data-turbo-preserve-scroll-container]').forEach((ele) => {
const containerScrollTop = containerScrollTops[ele.dataset.turboPreserveScrollContainer];
if (containerScrollTop) {
ele.scrollTop = containerScrollTop;
} else {
let els = ele.querySelectorAll('.scroll-active');
if (els.length) {
els.forEach((el) => {
// Avoid scrolling if el is already in view.
if (el.offsetTop >= ele.scrollTop && el.offsetTop <= ele.scrollTop + ele.clientHeight) {
return;
}
ele.scrollTop = el.offsetTop - ele.offsetTop;
});
}
}
});
containerScrollTops = {};
});
}
})();

1
assets/js/turbo.js Normal file
View File

@ -0,0 +1 @@
import * as Turbo from '@hotwired/turbo';

10
assets/jsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"*": [
"*"
]
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

201
content/LICENSE.md Normal file
View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

2
go.mod
View File

@ -1,5 +1,3 @@
module github.com/gohugoio/hugoDocs
go 1.22.0
require github.com/gohugoio/gohugoioTheme v0.0.0-20250116152525-2d382cae7743 // indirect

225
hugo.toml
View File

@ -1,9 +1,7 @@
# This his the main configuration file. There are also environment specific configuration stored in the /config directory.
baseURL = "https://gohugo.io/"
defaultContentLanguage = "en"
enableEmoji = true
ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
ignoreLogs = ["error-missing-instagram-accesstoken"]
languageCode = "en-us"
pluralizeListTitles = false
timeZone = "Europe/Oslo"
@ -13,90 +11,161 @@ title = "Hugo"
disableAliases = true
[pagination]
pagerSize = 100
pagerSize = 100
[services.googleAnalytics]
ID = 'G-MBZGKNMDWC'
[minify]
[minify.tdewolff]
[minify.tdewolff.html]
keepWhitespace = true
[module]
[module.hugoVersion]
min = "0.56.0"
[[module.imports]]
path = "github.com/gohugoio/gohugoioTheme"
ID = 'G-MBZGKNMDWC'
[outputs]
home = ["HTML", "RSS", "REDIR", "HEADERS"]
section = ["HTML"]
home = ["html", "rss", "redir", "headers"]
section = ["html"]
page = ["html"]
taxonomy = ["html"]
term = ["html"]
[mediaTypes]
[mediaTypes."text/netlify"]
delimiter = ""
[params]
description = "The worlds fastest framework for building websites"
ghrepo = "https://github.com/gohugoio/hugoDocs/"
[languages]
[languages.en]
languageName = "English"
weight = 1
[security]
enableInlineShortcodes = false
[security.funcs]
getenv = ['^HUGO_', '^REPOSITORY_URL$', '^BRANCH$']
[security.http]
methods = ['(?i)GET|POST']
urls = ['.*']
[outputFormats]
[outputFormats.REDIR]
mediatype = "text/netlify"
baseName = "_redirects"
isPlainText = true
notAlternative = true
[outputFormats.HEADERS]
mediatype = "text/netlify"
baseName = "_headers"
isPlainText = true
notAlternative = true
[outputFormats.redir]
mediatype = "text/netlify"
baseName = "_redirects"
isPlainText = true
[outputFormats.headers]
mediatype = "text/netlify"
baseName = "_headers"
isPlainText = true
notAlternative = true
[caches]
[caches.getjson]
dir = ":cacheDir/:project"
maxAge = -1
[caches.getcsv]
dir = ":cacheDir/:project"
maxAge = -1
[caches.images]
dir = ":cacheDir/images"
maxAge = "1440h"
[caches.assets]
dir = ":resourceDir/_gen"
maxAge = -1
[caches.getresource]
dir = ":cacheDir/:project"
maxage = '1h'
[markup]
[markup.highlight]
style = 'solarized-dark'
lineNumbersInTable = true
noClasses = false
wrapperClass = 'highlight not-prose'
[related]
threshold = 80
includeNewer = true
toLower = false
[[related.indices]]
name = "keywords"
weight = 60
[[related.indices]]
# Can be used as a front matter slice to link to other page fragments (headings) using their ID.
# This isn't particular useful in the current docs, but we're planning on getting a auto generated
# reference section with a better ID setup.
# For now, we just use it to give pages with same headings some similarity score.
name = "fragmentrefs"
type = "fragments"
applyFilter = false
weight = 60
cardinalityThreshold = 50
[markup.goldmark.renderer]
hardWraps = false
unsafe = false
xhtml = false
[imaging]
# See https://github.com/disintegration/imaging
# CatmullRom is a sharp bicubic filter which should fit the docs site well with its many screenshots.
# Note that you can also set this per image processing.
resampleFilter = "CatmullRom"
# Default JPEG quality setting. Default is 75.
quality = 75
anchor = "smart"
[markup.goldmark.extensions]
definitionList = true
footnote = true
linkify = true
strikethrough = true
table = true
taskList = true
typographer = true
[taxonomies]
category = "categories"
[markup.goldmark.extensions.passthrough]
enable = true
[[cascade]]
categories = ['commands']
[cascade._target]
path = '/commands/**'
[markup.goldmark.extensions.passthrough.delimiters]
block = [['\[', '\]'], ['$$', '$$']]
inline = [['\(', '\)']]
[markup.goldmark.parser]
autoHeadingID = true
autoHeadingIDType = "github"
[markup.goldmark.parser.attribute]
block = true
title = true
[mediaTypes]
[mediaTypes."text/netlify"]
delimiter = ""
[module]
[module.hugoVersion]
min = "0.141.0"
[[module.mounts]]
source = "assets"
target = "assets"
[[module.mounts]]
lang = 'en'
source = 'content/en'
target = 'content'
[[module.mounts]]
source = "hugo_stats.json"
target = "assets/notwatching/hugo_stats.json"
disableWatch = true
[build]
[build.buildStats]
disableIDs = true
enable = true
[[build.cachebusters]]
source = "assets/notwatching/hugo_stats\\.json"
target = "css"
[[build.cachebusters]]
source = "(postcss|tailwind)\\.config\\.js"
target = "css"
[server]
[[server.headers]]
for = "/*"
[server.headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "no-referrer"
[[server.headers]]
for = "/**.{css,js}"
[minify]
[minify.tdewolff]
[minify.tdewolff.html]
keepSpecialComments = true
keepWhitespace = false
######## GLOBAL ITEMS TO BE SHARED WITH THE HUGO SITES ########
[menus]
[[menus.global]]
name = 'News'
weight = 1
identifier = 'news'
pageRef = '/news/'
[[menus.global]]
name = 'Docs'
weight = 5
identifier = 'docs'
url = '/documentation/'
[[menus.global]]
name = 'Themes'
weight = 10
identifier = 'themes'
url = 'https://themes.gohugo.io/'
[[menus.global]]
name = 'Community'
weight = 150
identifier = 'community'
post = 'external'
url = 'https://discourse.gohugo.io/'
[[menus.global]]
name = 'GitHub'
weight = 200
identifier = 'github'
post = 'external'
url = 'https://github.com/gohugoio/hugo'

View File

@ -1,4 +1,4 @@
go 1.22.0
use .
use ../gohugoioTheme

22
layouts/404.html Normal file
View File

@ -0,0 +1,22 @@
{{ define "main" }}
<main class="grid min-h-full place-items-center px-6 py-24 sm:py-32 lg:px-8">
<div class="text-center">
<h1
class="mt-4 text-5xl font-semibold tracking-tight text-balance text-gray-900 sm:text-7xl dark:text-gray-300">
Page not found
<img
src="{{ `images/gopher-side_color.svg` | relURL }}"
alt="gopher"
class="w-32 ml-12 float-right" />
</h1>
<div class="mt-10 flex items-center justify-center gap-x-6">
<a
href="{{ site.Home.RelPermalink }}"
class="rounded-md bg-blue-500 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs hover:bg-blue-400 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
>Go back home</a
>
</div>
</div>
</main>
{{ end }}

View File

@ -0,0 +1,10 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}
{{- if in (slice 2 3 4 6) .Level }}{{" " -}}
<a class="anchor" name="{{ .Anchor }}"></a>
<a class="inline-flex items-center" href="#{{ .Anchor | safeURL }}" aria-label="Anchor">
<svg class="fill-primary hover:fill-primary/70 w-4 h-4">
<use href="#icon--anchor"></use>
</svg>
</a>
{{- end -}}
</h{{ .Level }}>

View File

@ -0,0 +1,317 @@
{{- /* Last modified: 2025-01-19T14:44:56-08:00 */}}
{{- /*
Copyright 2025 Veriphor LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/}}
{{- /*
This render hook resolves internal destinations by looking for a matching:
1. Content page
2. Page resource (a file in the current page bundle)
3. Section resource (a file in the current section)
4. Global resource (a file in the assets directory)
It skips the section resource lookup if the current page is a leaf bundle.
External destinations are not modified.
You must place global resources in the assets directory. If you have placed
your resources in the static directory, and you are unable or unwilling to move
them, you must mount the static directory to the assets directory by including
both of these entries in your site configuration:
[[module.mounts]]
source = 'assets'
target = 'assets'
[[module.mounts]]
source = 'static'
target = 'assets'
By default, if this render hook is unable to resolve a destination, including a
fragment if present, it passes the destination through without modification. To
emit a warning or error, set the error level in your site configuration:
[params.render_hooks.link]
errorLevel = 'warning' # ignore (default), warning, or error (fails the build)
When you set the error level to warning, and you are in a development
environment, you can visually highlight broken internal links:
[params.render_hooks.link]
errorLevel = 'warning' # ignore (default), warning, or error (fails the build)
highlightBroken = true # true or false (default)
This will add a "broken" class to anchor elements with invalid src attributes.
Add a rule to your CSS targeting the broken links:
a.broken {
background: #ff0;
border: 2px solid #f00;
padding: 0.1em 0.2em;
}
This render hook may be unable to resolve destinations created with the ref and
relref shortcodes. Unless you set the error level to ignore you should not use
either of these shortcodes in conjunction with this render hook.
@context {string} Destination The link destination.
@context {page} Page A reference to the page containing the link.
@context {string} PlainText The link description as plain text.
@context {string} Text The link description.
@context {string} Title The link title.
@returns {template.html}
*/}}
{{- /* Initialize. */}}
{{- $renderHookName := "link" }}
{{- /* Verify minimum required version. */}}
{{- $minHugoVersion := "0.141.0" }}
{{- if lt hugo.Version $minHugoVersion }}
{{- errorf "The %q render hook requires Hugo v%s or later." $renderHookName $minHugoVersion }}
{{- end }}
{{- /* Error level when unable to resolve destination: ignore, warning, or error. */}}
{{- $errorLevel := or site.Params.render_hooks.link.errorLevel "ignore" | lower }}
{{- /* If true, adds "broken" class to broken links. Applicable in development environment when errorLevel is warning. */}}
{{- $highlightBrokenLinks := or site.Params.render_hooks.link.highlightBroken false }}
{{- /* Validate error level. */}}
{{- if not (in (slice "ignore" "warning" "error") $errorLevel) }}
{{- errorf "The %q render hook is misconfigured. The errorLevel %q is invalid. Please check your site configuration." $renderHookName $errorLevel }}
{{- end }}
{{- /* Determine content path for warning and error messages. */}}
{{- $contentPath := .Page.String }}
{{- /* Parse destination. */}}
{{- $u := urls.Parse .Destination }}
{{- /* Set common message. */}}
{{- $msg := printf "The %q render hook was unable to resolve the destination %q in %s" $renderHookName $u.String $contentPath }}
{{- /* Set attributes for anchor element. */}}
{{- $attrs := dict "href" $u.String }}
{{- if eq $u.String "g" }}
{{- /* Destination is a glossary term. */}}
{{- $ctx := dict
"contentPath" $contentPath
"errorLevel" $errorLevel
"renderHookName" $renderHookName
"text" .Text
}}
{{- $attrs = partial "inline/h-rh-l/get-glossary-link-attributes.html" $ctx }}
{{- else if $u.IsAbs }}
{{- /* Destination is a remote resource. */}}
{{- $attrs = merge $attrs (dict "rel" "external") }}
{{- else }}
{{- with $u.Path }}
{{- with $p := or ($.PageInner.GetPage .) ($.PageInner.GetPage (strings.TrimRight "/" .)) }}
{{- /* Destination is a page. */}}
{{- $href := .RelPermalink }}
{{- with $u.RawQuery }}
{{- $href = printf "%s?%s" $href . }}
{{- end }}
{{- with $u.Fragment }}
{{- $ctx := dict
"contentPath" $contentPath
"errorLevel" $errorLevel
"page" $p
"parsedURL" $u
"renderHookName" $renderHookName
}}
{{- partial "inline/h-rh-l/validate-fragment.html" $ctx }}
{{- $href = printf "%s#%s" $href . }}
{{- end }}
{{- $attrs = dict "href" $href }}
{{- else with $.PageInner.Resources.Get $u.Path }}
{{- /* Destination is a page resource; drop query and fragment. */}}
{{- $attrs = dict "href" .RelPermalink }}
{{- else with (and (ne $.Page.BundleType "leaf") ($.Page.CurrentSection.Resources.Get $u.Path)) }}
{{- /* Destination is a section resource, and current page is not a leaf bundle. */}}
{{- $attrs = dict "href" .RelPermalink }}
{{- else with resources.Get $u.Path }}
{{- /* Destination is a global resource; drop query and fragment. */}}
{{- $attrs = dict "href" .RelPermalink }}
{{- else }}
{{- if eq $errorLevel "warning" }}
{{- warnf $msg }}
{{- if and $highlightBrokenLinks hugo.IsDevelopment }}
{{- $attrs = merge $attrs (dict "class" "broken") }}
{{- end }}
{{- else if eq $errorLevel "error" }}
{{- errorf $msg }}
{{- end }}
{{- end }}
{{- else }}
{{- with $u.Fragment }}
{{- /* Destination is on the same page; prepend relative permalink. */}}
{{- $ctx := dict
"contentPath" $contentPath
"errorLevel" $errorLevel
"page" $.Page
"parsedURL" $u
"renderHookName" $renderHookName
}}
{{- partial "inline/h-rh-l/validate-fragment.html" $ctx }}
{{- $attrs = dict "href" (printf "%s#%s" $.Page.RelPermalink .) }}
{{- else }}
{{- if eq $errorLevel "warning" }}
{{- warnf $msg }}
{{- if and $highlightBrokenLinks hugo.IsDevelopment }}
{{- $attrs = merge $attrs (dict "class" "broken") }}
{{- end }}
{{- else if eq $errorLevel "error" }}
{{- errorf $msg }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- /* Render anchor element. */ -}}
<a aria-label="{{ .PlainText }}"
{{- with .Title }} title="{{ . }}" {{- end }}
{{- range $k, $v := $attrs }}
{{- if $v }}
{{- printf " %s=%q" $k ($v | transform.HTMLEscape) | safeHTMLAttr }}
{{- end }}
{{- end -}}
>{{ .Text }}</a>
{{- define "partials/inline/h-rh-l/validate-fragment.html" }}
{{- /*
Validates the fragment portion of a link destination.
@context {string} contentPath The page containing the link.
@context {string} errorLevel The error level when unable to resolve destination; ignore (default), warning, or error.
@context {page} page The page corresponding to the link destination
@context {struct} parsedURL The link destination parsed by urls.Parse.
@context {string} renderHookName The name of the render hook.
*/}}
{{- /* Initialize. */}}
{{- $contentPath := .contentPath }}
{{- $errorLevel := .errorLevel }}
{{- $p := .page }}
{{- $u := .parsedURL }}
{{- $renderHookName := .renderHookName }}
{{- /* Validate. */}}
{{- with $u.Fragment }}
{{- if $p.Fragments.Identifiers.Contains . }}
{{- if gt ($p.Fragments.Identifiers.Count .) 1 }}
{{- $msg := printf "The %q render hook detected duplicate heading IDs %q in %s" $renderHookName . $contentPath }}
{{- if eq $errorLevel "warning" }}
{{- warnf $msg }}
{{- else if eq $errorLevel "error" }}
{{- errorf $msg }}
{{- end }}
{{- end }}
{{- else }}
{{- /* Determine target path for warning and error message. */}}
{{- $targetPath := "" }}
{{- with $p.File }}
{{- $targetPath = .Path }}
{{- else }}
{{- $targetPath = .Path }}
{{- end }}
{{- /* Set common message. */}}
{{- $msg := printf "The %q render hook was unable to find heading ID %q in %s. See %s" $renderHookName . $targetPath $contentPath }}
{{- if eq $targetPath $contentPath }}
{{- $msg = printf "The %q render hook was unable to find heading ID %q in %s" $renderHookName . $targetPath }}
{{- end }}
{{- /* Throw warning or error. */}}
{{- if eq $errorLevel "warning" }}
{{- warnf $msg }}
{{- else if eq $errorLevel "error" }}
{{- errorf $msg }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- define "partials/inline/h-rh-l/get-glossary-link-attributes.html" }}
{{- /*
Returns the anchor element attributes for a link to the given glossary term.
It first checks for the existence of a glossary page for the given term. If
no page is found, it then checks for a glossary page for the singular form of
the term. If neither page exists it throws a warning or error dependent on
the errorLevel setting
The returned href attribute does not point to the glossary term page.
Instead, via its fragment, it points to an entry on the glossary page.
@context {string} contentPath The page containing the link.
@context {string} errorLevel The error level when unable to resolve destination; ignore (default), warning, or error.
@context {string} renderHookName The name of the render hook.
@context {string} text The link text.
*/}}
{{- /* Get context.. */}}
{{- $contentPath := .contentPath }}
{{- $errorLevel := .errorLevel }}
{{- $renderHookName := .renderHookName }}
{{- $text := .text | transform.Plainify | strings.ToLower }}
{{- /* Initialize. */}}
{{- $glossaryPath := "/quick-reference/glossary" }}
{{- $termGiven := $text }}
{{- $termActual := "" }}
{{- $termSingular := inflect.Singularize $termGiven }}
{{- /* Verify that the glossary page exists. */}}
{{- $glossaryPage := site.GetPage $glossaryPath }}
{{- if not $glossaryPage }}
{{- errorf "The %q render hook was unable to find %s: see %s" $renderHookName $glossaryPath $contentPath }}
{{- end }}
{{- /* There's a better way to handle this, but it works for now. */}}
{{- $cheating := dict
"chaining" "chain"
"localize" "localization"
"localized" "localization"
"paginating" "paginate"
"walking" "walk"
}}
{{- /* Verify that a glossary term page exists for the given term. */}}
{{- if site.GetPage (urls.JoinPath $glossaryPath ($termGiven | urlize)) }}
{{- $termActual = $termGiven }}
{{- else if site.GetPage (urls.JoinPath $glossaryPath ($termSingular | urlize)) }}
{{- $termActual = $termSingular }}
{{- else }}
{{- $termToTest := index $cheating $termGiven }}
{{- if site.GetPage (urls.JoinPath $glossaryPath ($termToTest | urlize)) }}
{{- $termActual = $termToTest }}
{{- end }}
{{- end }}
{{- if not $termActual }}
{{- errorf "The %q render hook was unable to find a glossary page for either the singular or plural form of the term %q: see %s" $renderHookName $termGiven $contentPath }}
{{- end }}
{{- /* Create the href attribute. */}}
{{- $href := ""}}
{{- if $termActual }}
{{- $href = fmt.Printf "%s#%s" $glossaryPage.RelPermalink (anchorize $termActual) }}
{{- end }}
{{- return (dict "href" $href) }}
{{- end -}}

View File

@ -0,0 +1,67 @@
<!doctype html>
<html
class="h-full antialiased scheme-light dark:scheme-dark"
lang="{{ with site.Language.LanguageCode }}
{{ . }}
{{ else }}
en-us
{{ end }}
">
<head>
<meta charset="utf-8" />
<title>
{{ .Title }}
</title>
<style>
[x-cloak] {
display: none;
}
</style>
<meta
name="description"
content="{{ .Description | default site.Params.description }}" />
{{ partial "layouts/head/head-js.html" . }}
{{ with (templates.Defer (dict "key" "global")) }}
{{ $t := debug.Timer "tailwindcss" }}
{{ with resources.Get "css/styles.css" }}
{{ $opts := dict
"inlineImports" true
"minify" (not hugo.IsDevelopment)
}}
{{ with . | css.TailwindCSS $opts }}
{{ partial "helpers/linkcss.html" (dict "r" .) }}
{{ end }}
{{ end }}
{{ $t.Stop }}
{{ end }}
{{ partial "layouts/head/head.html" . }}
</head>
<body class="flex flex-col min-h-full bg-white dark:bg-blue-950">
{{ partial "layouts/hooks/body-start.html" . }}
{{/* Layout. */}}
{{ block "header" . }}
{{ partial "layouts/header/header.html" . }}
{{ end }}
{{ block "hero" . }}
{{ end }}
<div class="flex w-full xl:w-6xl h-full flex-auto mx-auto">
<main
class="flex-1 mx-auto lg:mx-0 w-full max-w-3x lg:max-w-3x py-8 lg:py-14 px-main">
{{ block "main" . }}{{ end }}
</main>
{{ block "rightsidebar" . }}
<aside
class="py-15 ml-4 xl:ml-12 w-60 hidden lg:relative lg:block lg:flex-none">
{{ block "rightsidebar_content" . }}{{ end }}
</aside>
{{ end }}
</div>
{{/* Common icons. */}}
{{ partial "layouts/icons.html" . }}
{{/* Footer. */}}
{{ block "footer" . }}
{{ partial "layouts/footer.html" . }}
{{ end }}
{{ partial "layouts/hooks/body-end.html" . }}
</body>
</html>

View File

@ -0,0 +1,62 @@
{{ define "main" }}
{{ $pages := "" }}
{{ $showDate := false }}
{{ if .IsPage }}
{{/* We currently have a slightly odd content structure with no top level /docs sectin. */}}
{{ $pages = .CurrentSection.Pages }}
{{ else }}
{{ if eq .Section "news" }}
{{ $pages = partial "news/get-news-items.html" . }}
{{ $showDate = true }}
{{ else }}
{{ $pages = .Pages }}
{{ end }}
{{ end }}
<article class="">
{{ partial "layouts/docsheader.html" . }}
<div class="mt-6 sm:mt-8 grid grid-cols-2 xl:grid-cols-3 gap-4 min-h-40">
{{ range $pages }}
{{ if eq . $ }}
{{ continue }}
{{ end }}
<a
class="flex col-span-1 a--block cursor-pointer flex-col group border p-3 sm:p-4 hover:shadow-md dark:shadow-slate-800 border-gray-300 dark:border-gray-800 m-0"
href="{{ .RelPermalink }}">
{{ if $showDate }}
<p
class="text-gray-500 dark:text-gray-400 text-sm/5 md:text-base/2 mb-2 sm:mb-4">
{{ .Date.Format "January 2, 2006" }}
</p>
{{ end }}
<h3
class="text-lg/6 md:text-2xl tracking-tight p-0 -mt-1 sm:mt-0 mb-1 sm:mb-2 text-primary group-hover:text-primary/70 overflow-hidden">
{{ .LinkTitle }}
</h3>
{{ with .Params.action.signatures }}
{{/* Set in functions and methods pages. */}}
{{ with $signature := index . 0 }}
{{ if $.Params.action.returnType }}
{{ $signature = printf "%s ⟼ %s" $signature $.context.Params.action.returnType }}
{{ end }}
<div
class="font-mono font-light text-sm whitespace-nowrap mb-2 sm:mb-4 p-2 bg-slate-50 dark:bg-slate-700 border-0 mr-8 overflow-x-auto">
{{- $signature -}}
</div>
{{ end }}
{{ end }}
<p
class="text-black dark:text-gray-100 leading-6 text-sm md:text-base three-lines-ellipsis">
{{ (or .Params.description .Summary) | plainify | safeHTML }}
</p>
</a>
{{ end }}
</div>
</article>
{{ end }}
{{ define "rightsidebar" }}
{{ printf "%c" '\u00A0' }}
{{ end }}

View File

@ -0,0 +1,64 @@
{{ define "main" }}
{{ $ttop := debug.Timer "single" }}
<article class="max-w-5xl lg:max-w-3xl">
{{ partial "layouts/docsheader.html" . }}
<div class="content" id="content">
{{ with .Params.description }}
<div class="lead">
{{ . | markdownify }}
</div>
{{ end }}
{{ $t := debug.Timer "single.categories" }}
{{ $tags := .GetTerms "categories" }}
{{ range $tags }}
{{ $text := .LinkTitle }}
{{ $class := "" }}
{{ range (slice true false ) }}
{{ $color := partial "helpers/funcs/color-from-string.html" (dict "text" $text "dark" . ) }}
{{ $prefix := "" }}
{{ if . }}
{{ $prefix = "dark:" }}
{{ end }}
{{ $class = printf "%sbg-%s-%d %stext-%s-%d border %sborder-%s-%d"
$prefix $color.color $color.shade1
$prefix $color.color $color.shade2
$prefix $color.color $color.shade2
}}
{{ end }}
<a
href="{{ .RelPermalink }}"
class="{{ $class }} not-prose text-xs font-semibold no-underline inline-block py-1 px-2 rounded-sm uppercase last:mr-0 mr-1 hover:opacity-75 hover:shadow-none">
{{ .LinkTitle | upper }}
</a>
{{ end }}
{{ $t.Stop }}
{{ if .Params.action.signatures }}
<div class="mb-6 sm:mb-8 not-prose">
{{- partial "docs/functions-signatures.html" . -}}
{{- partial "docs/functions-return-type.html" . -}}
{{- partial "docs/functions-aliases.html" . -}}
</div>
{{ end }}
{{ $t := debug.Timer "single.content" }}
{{ .Content }}
{{ $t.Stop }}
{{ $t := debug.Timer "single.page-edit" }}
{{ partial "layouts/page-edit.html" . }}
{{ $t.Stop }}
</div>
</article>
{{ $ttop.Stop }}
{{ end }}
{{ define "rightsidebar_content" }}
{{ if not .Params.hide_in_this_section }}
{{ partial "layouts/in-this-section.html" . }}
{{ end }}
{{ partial "layouts/related.html" . }}
{{ partial "layouts/toc.html" . }}
{{ end }}

5
layouts/index.headers Normal file
View File

@ -0,0 +1,5 @@
/*
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Referrer-Policy: origin-when-cross-origin

52
layouts/index.html Normal file
View File

@ -0,0 +1,52 @@
{{ define "main" }}
<div class="flex flex-col w-full p-0 m-0">
{{ partial "layouts/home/opensource.html" . }}
<hr class="border-t border-gray-200 dark:border-gray-800 my-10 lg:my-14" />
{{ partial "layouts/home/sponsors.html" (dict "ctx" . "gtag" "home" ) }}
<hr class="border-t border-gray-200 dark:border-gray-800 my-10 lg:my-14" />
{{ partial "layouts/home/features.html" . }}
</div>
{{ end }}
{{ define "hero" }}
<div class="relative isolate px-6 lg:px-8">
<div class="mx-auto max-w-2xl pt-16">
<div class="text-center">
<img
src="{{ `images/hugo-logo-wide.svg`| relURL }}"
alt="Hugo Logo"
class="w-64 aspect-3/1 mx-auto mb-8" />
<h1
class="text-4xl font-bold tracking-tight text-balance text-gray-900 dark:text-gray-300 sm:text-6xl">
The worlds fastest framework for building websites
</h1>
<div
class="mt-8 text-lg font-medium text-pretty text-gray-800 dark:text-gray-400 sm:text-xl/8">
Hugo is one of the most popular open-source static site generators.
With its amazing speed and flexibility, Hugo makes building websites
fun again.
</div>
<div class="mt-10 flex items-center justify-center gap-x-6">
{{ with site.GetPage "/getting-started" }}
<a
href="{{ .RelPermalink }}"
class="rounded-md uppercase tracking-wide bg-blue-600 hover:bg-blue-500 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
>{{ .LinkTitle }}</a
>
{{ end }}
<div class="-my-5 mr-6 sm:mr-8 md:mr-0">
{{ partial "layouts/search/input-standalone.html" . }}
</div>
</div>
</div>
</div>
</div>
{{ end }}
{{ define "rightsidebar" }}
{{ printf "%c" '\u00A0' }}
{{ end }}
{{ define "leftsidebar" }}
{{ printf "%c" '\u00A0' }}
{{ end }}

6
layouts/index.redir Normal file
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 -}}

68
layouts/index.rss.xml Normal file
View File

@ -0,0 +1,68 @@
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Hugo News</title>
<description>Recent news about Hugo, a static site generator written in Go, optimized for speed and designed for flexibility.</description>
<link>{{ .Permalink }}</link>
<generator>Hugo {{ hugo.Version }}</generator>
<language>{{ or site.Language.LanguageCode site.Language.Lang }}</language>
{{- with site.Copyright }}
<copyright>{{ . }}</copyright>
{{- end }}
{{- with .OutputFormats.Get "rss" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}
{{- $news_items := slice }}
{{- /* Get releases from GitHub. */}}
{{- $u := "https://api.github.com/repos/gohugoio/hugo/releases" }}
{{- $releases := partial "helpers/funcs/get-remote-data.html" $u }}
{{- $releases = where $releases "draft" false }}
{{- $releases = where $releases "prerelease" false }}
{{- range $releases | first 20 }}
{{- $summary := printf
"Hugo %s was released on %s. See [release notes](%s) for details."
.tag_name
(.published_at | time.AsTime | time.Format "2 Jan 2006")
.html_url
}}
{{- $ctx := dict
"PublishDate" (.published_at | time.AsTime)
"Title" (printf "Release %s" .name)
"Permalink" .html_url
"Section" "news"
"Summary" ($summary | $.Page.RenderString)
}}
{{- $news_items = $news_items | append $ctx }}
{{- end }}
{{- /* Get content pages from news section. */}}
{{- range where site.RegularPages "Section" "news" }}
{{- $ctx := dict
"PublishDate" .PublishDate
"Title" .Title
"RelPermalink" .RelPermalink
"Section" "news"
"Summary" .Summary
"Params" (dict "description" .Description)
}}
{{- $news_items = $news_items | append $ctx }}
{{- end }}
{{- /* Sort, limit, and render lastBuildDate. */}}
{{- $limit := cond (gt site.Config.Services.RSS.Limit 1) site.Config.Services.RSS.Limit 999 }}
{{- $news_items = sort $news_items "PublishDate" "desc" | first $limit }}
<lastBuildDate>{{ (index $news_items 0).PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
{{- /* Render items. */}}
{{- range $news_items }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
<guid>{{ .Permalink }}</guid>
<description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
</item>
{{- end }}
</channel>
</rss>

View File

@ -0,0 +1,12 @@
{{- with .Params.action.aliases }}
{{- $label := "Alias" }}
{{- if gt (len .) 1 }}
{{- $label = "Aliases" }}
{{- end }}
<p class="font-bold text-dark dark:text-light mt-2">{{ $label }}</p>
{{- range . }}
<div class="font-sm font-mono px-3 p-2 ml-4 sm:ml-8 mt-0 sm:mt-2">
{{- . -}}
</div>
{{- end }}
{{- end -}}

View File

@ -0,0 +1,6 @@
{{- with .Params.action.returnType }}
<p class="font-bold text-dark dark:text-light mt-2">Returns</p>
<div class="font-sm font-mono px-3 p-2 ml-4 sm:ml-8 mt-0 sm:mt-2">
{{- . -}}
</div>
{{- end -}}

View File

@ -0,0 +1,12 @@
{{- with .Params.action.signatures }}
<p class="font-bold text-dark dark:text-light">Syntax</p>
{{- range . }}
{{- $signature := . }}
{{- if $.Params.function.returnType }}
{{- $signature = printf "%s ⟼ %s" . $.Params.function.returnType }}
{{- end }}
<div class="font-sm font-mono px-3 p-2 ml-4 sm:ml-8 mt-0 sm:mt-2">
{{- $signature -}}
</div>
{{- end }}
{{- end -}}

View File

@ -0,0 +1,18 @@
{{ $colors := slice "blue" "orange" "green" "pink" }}
{{ $shades := slice 200 300 500 }}
{{ if .dark }}
{{ $shades = slice 700 800 900 }}
{{ end }}
{{ $hash := (hash.FNV32a .text) }}
{{ $i := mod $hash (len $colors) }}
{{ $j := mod $hash (len $shades) }}
{{ $color := index $colors $i }}
{{ $shade1 := index $shades $j }}
{{ $shade2 := 0 }}
{{ if gt $shade1 400 }}
{{ $shade2 = math.Min (sub $shade1 400) 100 | int }}
{{ else }}
{{ $shade2 = math.Max (add $shade1 400) 800 | int }}
{{ end }}
{{ $res := dict "color" $color "shade1" $shade1 "shade2" $shade2 }}
{{ return $res }}

View File

@ -0,0 +1,28 @@
{{ $url := "https://api.github.com/repos/gohugoio/hugo" }}
{{ $cacheKey := print $url (now.Format "2006-01-02") }}
{{ $headers := dict }}
{{ with os.Getenv "HUGO_GH_TOKEN" }}
{{ $headers = dict "Authorization" (printf "Bearer %s" .) }}
{{ end }}
{{ $opts := dict "headers" $headers "key" $cacheKey }}
{{ $githubRepoInfo := dict }}
{{ with try (resources.GetRemote $url $opts) }}
{{ with .Err }}
{{ warnf "Failed to get GitHub repo info: %s" . }}
{{ else with (.Value | transform.Unmarshal) }}
{{ $githubRepoInfo = dict
"html_url" .html_url
"stargazers_url" .stargazers_url
"watchers_count" .watchers_count
"stargazers_count" .stargazers_count
"forks_count" .forks_count
"contributors_url" .contributors_url
"releases_url" .releases_url
"forks_count" .forks_count
}}
{{ else }}
{{ errorf "Unable to get remote resource %q" $url }}
{{ end }}
{{ end }}
{{ return $githubRepoInfo }}

View File

@ -0,0 +1,23 @@
{{/*
Parses the serialized data from the given URL and returns a map or an array.
Supports CSV, JSON, TOML, YAML, and XML.
@param {string} . The URL from which to retrieve the serialized data.
@returns {any}
@example {{ partial "get-remote-data.html" "https://example.org/foo.json" }}
*/}}
{{ $url := . }}
{{ $data := dict }}
{{ with try (resources.GetRemote $url) }}
{{ with .Err }}
{{ errorf "%s" . }}
{{ else with .Value }}
{{ $data = .Content | transform.Unmarshal }}
{{ else }}
{{ errorf "Unable to get remote resource %q" $url }}
{{ end }}
{{ end }}
{{ return $data }}

View File

@ -0,0 +1,27 @@
{{ with site.Config.Services.GoogleAnalytics.ID }}
<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', '{{ . }}', {'anonymize_ip': true, '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'
});
}
</script>
{{ end }}

View File

@ -0,0 +1,28 @@
{{ $r := .r }}
{{ $attr := .attributes | default dict }}
{{ if hugo.IsDevelopment }}
<link
rel="stylesheet"
href="{{ $r.RelPermalink }}"
{{ template `render-attributes` $attr }} />
{{ else }}
{{ with $r | minify | fingerprint }}
<link
rel="stylesheet"
href="{{ .RelPermalink }}"
integrity="{{ .Data.Integrity }}"
crossorigin="anonymous"
{{ template `render-attributes` $attr }} />
{{ end }}
{{ end }}
{{ define "render-attributes" }}
{{- range $k, $v := . -}}
{{- if $v -}}
{{- printf ` %s=%q` $k $v | safeHTMLAttr -}}
{{- else -}}
{{- printf ` %s` $k | safeHTMLAttr -}}
{{- end -}}
{{- end -}}
{{ end }}

View File

@ -0,0 +1,15 @@
{{ $r := .r }}
{{ $attr := .attributes | default dict }}
{{ if hugo.IsDevelopment }}
<script
src="{{ $r.RelPermalink }}"
{{ template `render-attributes` $attr }}></script>
{{ else }}
{{ with $r | fingerprint }}
<script
src="{{ .RelPermalink }}"
integrity="{{ .Data.Integrity }}"
crossorigin="anonymous"
{{ template `render-attributes` $attr }}></script>
{{ end }}
{{ end }}

View File

@ -0,0 +1,25 @@
{{ $image := .image }}
{{ $width := .width | default 1000 }}
{{ $width1x := div $width 2 }}
{{ $imageWebp := $image.Resize (printf "%dx webp" $width) }}
{{ $image1x := $image.Resize (printf "%dx" $width1x) }}
{{ $image1xWebp := $image.Resize (printf "%dx webp" $width1x) }}
{{ $class := .class | default "h-64 tablet:h-96 lg:h-full w-full object-cover lg:absolute" }}
<picture>
<source
srcset="{{ $imageWebp.RelPermalink }}"
type="image/webp"
media="(min-width: 1200px)" />
<source
srcset="{{ $image.RelPermalink }}"
type="image/jpeg"
media="(min-width: 1200px)" />
<source srcset="{{ $image1xWebp.RelPermalink }}" type="image/webp" />
<source srcset="{{ $image1x.RelPermalink }}" type="image/jpeg" />
<img
class="{{ $class }}"
src="{{ $image1x.RelPermalink }}"
alt=""
width="{{ $image1x.Width }}"
height="{{ $image1x.Height }}" />
</picture>

View File

@ -0,0 +1,27 @@
{{ $title := .title | default "" }}
{{ $color := .color | default "yellow" }}
{{ $icon := .icon | default "exclamation" }}
{{ $text := .text | default "" }}
{{ $class := .class | default "mt-6 mb-8" }}
<div
class="border-l-4 overflow-x-auto border-{{ $color }}-400 bg-{{ $color }}-50 dark:bg-{{ $color }}-950 border-1 border-{{ $color }}-100 dark:border-{{ $color }}-900 p-4 {{ $class }}">
<div class="flex">
<div class="shrink-0">
<svg class="fill-{{ $color }}-500 dark:fill-{{ $color }}-400 h-7 w-7">
<use href="#icon--{{ $icon }}"></use>
</svg>
</div>
<div class="ml-3">
{{ with $title }}
<h3 class="text-base font-medium text-{{ $color }}-800">
{{ . }}
</h3>
{{ end }}
<div class="mt-2 text-base">
<p>
{{ $text }}
</p>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,29 @@
<div x-data="{open: false}">
<div @click="open = true">
{{ .modal_button }}
</div>
<div
x-cloak
x-show="open"
x-transition.opacity.duration.200ms
x-trap.inert.noscroll="open"
@keydown.esc.window="open = false"
@click.self="open = false"
class="fixed inset-0 z-30 flex items-end justify-center bg-black/50 pb-8 backdrop-blur-md sm:items-center"
role="dialog"
aria-modal="true"
aria-label="Modal">
<div
x-show="open"
x-transition:enter.opacity.scale.60.origin.top.right.duration.300ms.delay.200ms
class="flex content-center items-center justify-center max-w-lg flex-col overflow-hidden bg-white dark:bg-blue-950 border-2 border-gray-300 dark:border-gray-800 shadow-lg sm:shadow-xl">
<div
class="border-b border-outline border-gray-300 dark:border-gray-800 p-2 lg:p-4">
<h3 class="text-sm font-semibold">
{{ .modal_title }}
</h3>
</div>
{{ .modal_content }}
</div>
</div>
</div>

View File

@ -0,0 +1,30 @@
{{ $documentation := site.GetPage "/documentation" }}
<nav aria-label="breadcrumb" class="flex">
<ol class="inline-flex items-center flex-wrap tracking-tight">
{{ range $i, $p := .Ancestors.Reverse }}
{{/* We currently have a slightly odd structure. */}}
{{ if eq $p site.Home }}
{{ $p = $documentation }}
{{ end }}
<li class="flex items-center">
<a
href="{{ $p.RelPermalink }}"
class="truncate text-blue-600 hover:text-blue-500"
>{{ $p.LinkTitle }}</a
>
{{ template "breadcrumbs-arrow" . }}
</li>
{{ end }}
<li class="truncate text-gray-700 dark:text-gray-300">
{{ $.LinkTitle | title }}
</li>
</ol>
</nav>
{{ define "breadcrumbs-arrow" }}
<svg class="fill-gray-500 dark:fill-gray-100 w-3 h-3 mx-2">
<use href="#icon--chevron-right"></use>
</svg>
{{ end }}

View File

@ -0,0 +1,9 @@
<header>
{{ partial "layouts/breadcrumbs.html" . }}
{{ if and .IsPage (not (eq .Layout "list")) }}
<h1
class="font-display mt-6 sm:mt-8 text-3xl tracking-tight text-slate-900 dark:text-white">
{{ .Title }}
</h1>
{{ end }}
</header>

View File

@ -0,0 +1,47 @@
{{/* This is currently not in use, but kept in case I change my mind. */}}
<nav
role="navigation"
id="explorer"
class="overflow-x-hidden w-54"
x-data="explorer"
data-turbo-permanent
@turbo:load.window="onLoad()"
@turbo:before-render.window="onBeforeRender()"
x-cloak>
<ul class="w-full">
{{ $root := site.GetPage "/" }}
{{ template "docs-explorer-section" (dict "p" $root "level" 0 ) }}
</ul>
</nav>
{{ define "docs-explorer-section" }}
{{ $p := .p }}
{{ $level := .level }}
{{ $pleft := $level }}
{{ if gt $level 0 }}
{{ $pleft = add $level 1 }}
{{ end }}
{{ $pl := printf "pl-%d" $pleft }}
{{ $pages := $p.Sections }}
{{ range $pages }}
{{ $hasChildren := gt (len .Pages) 0 }}
{{ $class := cond (eq $level 0) "text-primary hover:text-primary/70" "text-gray-900 dark:text-gray-400 hover:dark:text-gray-300" }}
<li class="w-full">
<a
@click="toggleNode('{{ .RelPermalink }}')"
href="{{ .RelPermalink }}"
x-ref="{{ .RelPermalink }}"
:class="isCurrent('{{ .RelPermalink }}') ? 'font-bold underline': 'font-normal'"
class="block cursor-pointer {{ $pl }} {{ $class }} focus:font-bold hover:underline focus:underline tracking-tight leading-7">
{{ .LinkTitle }}
</a>
{{ if $hasChildren }}
<ul class="w-full" x-show="isOpen('{{ .RelPermalink }}')">
{{ template "docs-explorer-section" (dict "p" . "level" (add $level 1)) }}
</ul>
{{ end }}
</li>
{{ end }}
{{ end }}

View File

@ -0,0 +1,72 @@
<footer class="bg-blue-950 mt-8 sm:mt-24 border-t-1 border-gray-800">
<div class="mx-auto max-w-7xl pt-16 pb-8 sm:pt-18 lg:pt-20">
<div class="xl:grid xl:grid-cols-3 xl:gap-8">
{{/* Column 1 */}}
<div class="flex flex-col items-center justify-between space-y-8">
<div class="text-gray-200">
By the
<a
href="https://github.com/gohugoio/hugo/graphs/contributors"
class="text-blue-300 hover:underline"
>Hugo Authors</a
><br />
</div>
<img
src="/images/hugo-logo-wide.svg"
alt="Hugo Logo"
class="aspect-3/1 w-40" />
<ul class="space-y-2 text-gray-200">
<li class="hover:text-white">
<a href="https://fosstodon.org/@gohugoio" class="">@GoHugoIO</a>
</li>
<li class="hover:text-white">
<a href="https://twitter.com/spf13" class="">@spf13</a>
</li>
<li class="hover:text-white">
<a href="https://twitter.com/bepsays" class="">@bepsays</a>
</li>
<li class="mt-6">
<a
href="https://github.com/gohugoio/hugo/issues/new"
class="text-sm/6 text-gray-200 hover:text-white"
>File an issue</a
>
</li>
<li>
<a
href="https://discourse.gohugo.io/"
class="text-sm/6 text-gray-200 hover:text-white"
>Get help</a
>
</li>
<li>
<a
href="https://themes.gohugo.io/"
class="text-sm/6 text-gray-200 hover:text-white"
>Find a theme</a
>
</li>
</ul>
</div>
{{/* Sponsors */}}
<div
class="mt-16 xl:mt-0 col-span-2 text-gray-200 max-w-3xl flex items-center content-center justify-center mx-auto">
{{ partial "layouts/home/sponsors.html" (dict
"ctx" .
"gtag" "footer"
)
}}
</div>
</div>
<div class="mt-16 border-t border-white/10 pt-8 sm:mt-20 lg:mt-24">
<p class="text-sm/6 text-gray-200">
The Hugo logos are copyright © Steve Francia 2013{{ now.Year }}. The
Hugo Gopher is based on an original work by Renée French.
</p>
</div>
</div>
</footer>

View File

@ -0,0 +1,11 @@
{{ $githubInfo := partialCached "helpers/funcs/get-github-info.html" . "-" }}
{{ $opts := dict "minify" true }}
{{ with resources.Get "js/head-early.js" | js.Build $opts }}
{{ partial "helpers/linkjs.html" (dict "r" . "attributes" (dict "async" "")) }}
{{ end }}
{{ with resources.Get "js/main.js" | js.Build $opts }}
{{ partial "helpers/linkjs.html" (dict "r" . "attributes" (dict "defer" "")) }}
{{ end }}
{{ with resources.Get "js/turbo.js" | js.Build $opts }}
{{ partial "helpers/linkjs.html" (dict "r" . "attributes" (dict "defer" "")) }}
{{ end }}

View File

@ -0,0 +1,52 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
{{ hugo.Generator }}
{{ if hugo.IsProduction }}
<meta name="robots" content="index, follow" />
{{ else }}
<meta name="robots" content="noindex, nofollow" />
{{ end }}
<title>
{{ with .Title }}{{ . }} |{{ end }}
{{ .Site.Title }}
</title>
<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="turbo-prefetch" content="true">
<meta name="view-transition" content="same-origin">
{{ range .AlternativeOutputFormats -}}
<link
rel="{{ .Rel }}"
type="{{ .MediaType.Type }}"
href="{{ .RelPermalink | safeURL }}" />
{{ end -}}
<meta
name="description"
content="{{ with .Description }}
{{ . }}
{{ else }}
{{ with .Site.Params.description }}{{ . }}{{ end }}
{{ end }}
" />
{{ partial "opengraph/opengraph.html" . }}
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{ if hugo.IsProduction }}
{{ partial "helpers/gtag.html" . }}
{{ end }}

View File

@ -0,0 +1,16 @@
{{ with partialCached "helpers/funcs/get-github-info.html" . "-" }}
<a
href="{{ .html_url | safeURL }}"
target="_blank"
class="font-normal tracking-tight flex items-center bg-gray-200 hover:bg-gray-300 dark:bg-gray-600 dark:hover:bg-gray-700 text-sm text-black dark:text-white h-10 border-none cursor-pointer relative py-1 px-2 rounded-md"
aria-label="Star on GitHub">
<svg class="mr-1 fill-gray-800 dark:fill-gray-100 w-5 h-5">
<use href="#icon--github"></use>
</svg>
<span class="hidden md:inline mr-1">Star</span>
<span class="hidden md:inline">{{ .stargazers_count }}</span>
<span class="inline md:hidden">
{{ printf "%0.1fk" (div .stargazers_count 1000) }}
</span>
</a>
{{ end }}

View File

@ -0,0 +1,43 @@
<header
x-data="navbar"
class="sticky top-0 z-50 bg-blue-950 flex flex-none flex-wrap items-center justify-between px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 sm:px-6 lg:px-8 dark:shadow-none"
:class="atTop ? '': 'bg-blue-950/80'">
<div class="relative flex basis-0 items-cente mr-2 lg:mr-8">
{{ with site.Home }}
<a
class="text-white text-xl font-bold upper"
href="{{ .RelPermalink }}"
aria-label="{{ .LinkTitle }}"
>HUGO</a
>
{{ end }}
</div>
<div
class=" relative flex flex-grow basis-0 items-center min-w-24 max-w-3xl overflow-x-auto">
{{ range .Site.Menus.global }}
<a
href="{{ .URL }}"
class="font-semibold text-gray-300 hover:text-gray-400 ml-4"
>{{ .Name }}</a
>
{{ end }}
</div>
<div class="-my-5 pl-2 sm:mr-8">
{{/* Search. */}}
{{ partial "layouts/search/input.html" . }}
</div>
<div class="relative flex basis-0 justify-end gap-6 sm:gap-1 md:flex-grow">
{{/* QR code. */}}
{{ partial "layouts/header/qr.html" . }}
{{/* Theme selector. */}}
{{ partial "layouts/header/theme.html" . }}
{{/* Social. */}}
<div
class="hidden sm:block ml-8 h-6 fill-slate-400 group-hover:fill-slate-500 dark:group-hover:fill-slate-300">
{{ partial "layouts/header/githubstars.html" . }}
</div>
</div>
</header>

View File

@ -0,0 +1,24 @@
{{ $t := debug.Timer "qr" }}
{{ $qr := partial "partials/_inline/qr" (dict
"page" $
"img_class" "w-10 bg-white view-transition-qr" )
}}
{{ $qrBig := partial "partials/_inline/qr" (dict "page" $ "img_class" "w-64 p-4") }}
{{ $t.Stop }}
<div class="hidden lg:block cursor-pointer">
{{ partial "layouts/blocks/modal.html" (dict "modal_button" $qr "modal_content" $qrBig "modal_title" (printf "QR code linking to %s" $.Permalink )) }}
</div>
{{ define "partials/_inline/qr" }}
{{ $img_class := .img_class | default "w-10" }}
{{ with images.QR $.page.Permalink (dict "targetDir" "images/qr") }}
<img
src="{{ .RelPermalink }}"
width="{{ .Width }}"
height="{{ .Height }}"
@load="$event.target.classList.remove('_opacity-0')"
alt="QR code linking to {{ $.page.Permalink }}"
class="{{ $img_class }}" />
{{ end }}
{{ end }}

View File

@ -0,0 +1,35 @@
<div class="ml-4 sm:ml-10 flex items-center" x-data>
<button
@click="$store.nav.userSettings.toggleColorScheme()"
aria-label="Toggle color scheme"
id="theme-toggle"
type="button"
class="inline-flex items-center p-2 bg-accent hover:bg-accent/70 dark:bg-gray-600 dark:hover:bg-gray-700 border border-transparent rounded-full shadow-sm text-white hover:text-gray-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500">
<svg
aria-hidden="true"
class="w-3 h-3 sm:w-5 sm:h-5"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path
x-show="$store.nav.userSettings.colorScheme() == 1"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>
<path
x-show="$store.nav.userSettings.colorScheme() == 2"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"></path>
<path
x-show="$store.nav.userSettings.colorScheme() == 3"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"></path>
</svg>
</button>
</div>

View File

@ -0,0 +1,56 @@
{{/* icons source: https://heroicons.com/ */}}
{{ $dataTOML := `
[[features]]
heading = "Optimized for speed"
copy = "Written in Go, optimized for speed and designed for flexibility. With its advanced templating system and fast asset pipelines, Hugo renders a large site in seconds, often less."
icon = """<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" />
</svg>
"""
[[features]]
heading = "Flexible framework"
copy = "With its multilingual support, and powerful taxonomy system, Hugo is widely used to create documentation sites, landing pages, corporate, government, nonprofit, education, news, event, and project sites."
icon = """<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" />
</svg>
"""
[[features]]
heading = "Fast assets pipeline"
copy = "Image processing (convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract EXIF data), JavaScript bundling (tree shake, code splitting), Sass processing, great TailwindCSS support."
icon = """<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
</svg>
"""
[[features]]
heading = "Embedded web server"
copy = "Use Hugo's embedded web server during development to instantly see changes to content, structure, behavior, and presentation. "
icon = """<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418" />
</svg>
"""
`
}}
{{ $data := $dataTOML | transform.Unmarshal }}
<div class="mx-auto max-w-7xl px-6 lg:px-8">
<div class="mx-auto max-w-2xl lg:max-w-4xl">
<dl
class="grid max-w-xl grid-cols-1 gap-x-8 gap-y-10 lg:max-w-none lg:grid-cols-2 lg:gap-y-16">
{{ range $data.features }}
<div class="relative pl-16">
<dt
class="text-base/7 font-semibold text-gray-900 dark:text-gray-300">
<div
class="absolute top-0 left-0 flex size-10 items-center justify-center rounded-full bg-blue-600 p-2 fill-white text-white">
{{ .icon | safeHTML }}
</div>
{{ .heading }}
</dt>
<dd class="mt-2 text-base/7 text-gray-600 dark:text-gray-400">
{{ .copy }}
</dd>
</div>
{{ end }}
</dl>
</div>
</div>

View File

@ -0,0 +1,110 @@
{{ $githubInfo := partialCached "helpers/funcs/get-github-info.html" . "-" }}
<div class="mx-auto max-w-7xl px-6 lg:px-8">
<div
class="mx-auto grid max-w-2xl grid-cols-1 gap-x-8 gap-y-10 lg:mx-0 lg:max-w-none lg:grid-cols-2">
<div class="lg:pr-8">
<div class="lg:max-w-lg">
<p
class="text-4xl font-bold tracking-tight text-pretty text-gray-900 dark:text-gray-300 sm:text-5xl">
Open source
</p>
<p class="mt-6 text-lg/8 text-gray-600 dark:text-gray-400">
Hugo is open source and free to use. It is distributed under the
Apache 2.0 License.
</p>
<dl
class="mt-10 max-w-xl space-y-8 text-base/7 text-gray-600 dark:text-gray-300 lg:max-w-none">
<div class="relative pl-9">
<dt class="inline font-bold text-gray-900 dark:text-gray-300">
<svg
class="absolute top-1 left-1 size-5 text-blue-600"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="size-6">
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M6 20.25h12m-7.5-3v3m3-3v3m-10.125-3h17.25c.621 0 1.125-.504 1.125-1.125V4.875c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125Z" />
</svg>
Popular.
</dt>
<dd class="inline ml-1">
As of writing this, Hugo has
{{ $githubInfo.stargazers_count }}
stars on GitHub. Join the crowd and hit the
<a
class="text-blue-600 hover:text-blue-700 font-semibold"
href="https://github.com/gohugoio/hugo"
>Star button</a
>.
</dd>
</div>
<div class="relative pl-9">
<dt class="inline font-bold text-gray-900 dark:text-gray-300">
<svg
class="absolute top-1 left-1 size-5 text-blue-600"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="size-6">
<path
stroke-linecap="round"
stroke-linejoin="round"
d="m20.893 13.393-1.135-1.135a2.252 2.252 0 0 1-.421-.585l-1.08-2.16a.414.414 0 0 0-.663-.107.827.827 0 0 1-.812.21l-1.273-.363a.89.89 0 0 0-.738 1.595l.587.39c.59.395.674 1.23.172 1.732l-.2.2c-.212.212-.33.498-.33.796v.41c0 .409-.11.809-.32 1.158l-1.315 2.191a2.11 2.11 0 0 1-1.81 1.025 1.055 1.055 0 0 1-1.055-1.055v-1.172c0-.92-.56-1.747-1.414-2.089l-.655-.261a2.25 2.25 0 0 1-1.383-2.46l.007-.042a2.25 2.25 0 0 1 .29-.787l.09-.15a2.25 2.25 0 0 1 2.37-1.048l1.178.236a1.125 1.125 0 0 0 1.302-.795l.208-.73a1.125 1.125 0 0 0-.578-1.315l-.665-.332-.091.091a2.25 2.25 0 0 1-1.591.659h-.18c-.249 0-.487.1-.662.274a.931.931 0 0 1-1.458-1.137l1.411-2.353a2.25 2.25 0 0 0 .286-.76m11.928 9.869A9 9 0 0 0 8.965 3.525m11.928 9.868A9 9 0 1 1 8.965 3.525" />
</svg>
Active.
</dt>
<dd class="inline ml-1">
Hugo has a large and active community. If you have questions or
need help, you can ask in the
<a
class="text-blue-600 hover:text-blue-700 font-semibold"
href="https://discourse.gohugo.io"
>Hugo forums</a
>.
</dd>
</div>
<div class="relative pl-9">
<dt class="inline font-bold text-gray-900 dark:text-gray-300">
<svg
class="absolute top-1 left-1 size-5 text-blue-600"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="size-6">
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h1.5C5.496 19.5 6 18.996 6 18.375m-3.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-1.5A1.125 1.125 0 0 1 18 18.375M20.625 4.5H3.375m17.25 0c.621 0 1.125.504 1.125 1.125M20.625 4.5h-1.5C18.504 4.5 18 5.004 18 5.625m3.75 0v1.5c0 .621-.504 1.125-1.125 1.125M3.375 4.5c-.621 0-1.125.504-1.125 1.125M3.375 4.5h1.5C5.496 4.5 6 5.004 6 5.625m-3.75 0v1.5c0 .621.504 1.125 1.125 1.125m0 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m1.5-3.75C5.496 8.25 6 7.746 6 7.125v-1.5M4.875 8.25C5.496 8.25 6 8.754 6 9.375v1.5m0-5.25v5.25m0-5.25C6 5.004 6.504 4.5 7.125 4.5h9.75c.621 0 1.125.504 1.125 1.125m1.125 2.625h1.5m-1.5 0A1.125 1.125 0 0 1 18 7.125v-1.5m1.125 2.625c-.621 0-1.125.504-1.125 1.125v1.5m2.625-2.625c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125M18 5.625v5.25M7.125 12h9.75m-9.75 0A1.125 1.125 0 0 1 6 10.875M7.125 12C6.504 12 6 12.504 6 13.125m0-2.25C6 11.496 5.496 12 4.875 12M18 10.875c0 .621-.504 1.125-1.125 1.125M18 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m-12 5.25v-5.25m0 5.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125m-12 0v-1.5c0-.621-.504-1.125-1.125-1.125M18 18.375v-5.25m0 5.25v-1.5c0-.621.504-1.125 1.125-1.125M18 13.125v1.5c0 .621.504 1.125 1.125 1.125M18 13.125c0-.621.504-1.125 1.125-1.125M6 13.125v1.5c0 .621-.504 1.125-1.125 1.125M6 13.125C6 12.504 5.496 12 4.875 12m-1.5 0h1.5m-1.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M19.125 12h1.5m0 0c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h1.5m14.25 0h1.5" />
</svg>
Frequent releases.
</dt>
<dd class="inline ml-1">
Hugo has a fast
<a
class="text-blue-600 hover:text-blue-700 font-semibold"
href="https://github.com/gohugoio/hugo/releases"
>release</a
>
cycle. The project is actively maintained and new features are
added regularly.
</dd>
</div>
</dl>
</div>
</div>
{{ partial "helpers/picture.html" (dict
"image" (resources.Get "images/hugo-github-screenshot.png")
"alt" "Hugo GitHub Repository"
"width" 640
"class" "w-full max-w-[38rem] ring-1 shadow-xl dark:shadow-gray-500 ring-gray-400/10")
}}
</div>
</div>

View File

@ -0,0 +1,43 @@
{{ $gtag := .gtag | default "unknown" }}
{{ $gtag := .gtag | default "unknown" }}
{{ $isFooter := (eq $gtag "footer") }}
{{ $utmSource := cond $isFooter "hugofooter" "hugohome" }}
{{ $containerClass := .containerClass | default "mx-auto max-w-7xl px-6 lg:px-8" }}
{{/* TODO1 prod: onclick="trackOutboundLink({{ printf "'%s', '%s'" $gtagID $url | safeJS }});"
*/}}
{{ with .ctx.Site.Data.sponsors }}
<div class="{{ $containerClass }}">
<h2 class="font-bold text-2xl mb-6 tracking-tighter">Hugo Sponsors</h2>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-6">
{{ range .banners }}
<div class="max-w-64" style="background-color: {{ .bgcolor }};">
{{ $query_params := .query_params | default "" }}
{{ $url := .link }}
{{ if not .no_query_params }}
{{ $url = printf "%s?%s%s" .link $query_params (querify "utm_source" (.utm_source | default $utmSource ) "utm_medium" (.utm_medium | default "banner") "utm_campaign" (.utm_campaign | default "hugosponsor") "utm_content" (.utm_content | default "gohugoio")) | safeURL }}
{{ end }}
{{ $logo := resources.Get .logo }}
{{ $gtagID := printf "Sponsor %s %s" .name $gtag | title }}
<a
href="{{ $url }}"
title="{{ .title | default .name }}"
class="group inline-block w-full h-full shadow-md dark:shadow-gray-600"
{{ with .link_attr }}{{ . | safeHTMLAttr }}{{ end }}>
<div
class="flex w-full h-full p-8 items-center justify-center content-center transition duration-500 hover:scale-105 {{ if .show_on_hover }}
invisible group-hover:visible
{{ end }}">
{{ with $logo }}
{{ .Content | safeHTML }}
{{ else }}
<span class="text-4xl font-bold text-white">
{{ .name }}
</span>
{{ end }}
</div>
</a>
</div>
{{ end }}
</div>
</div>
{{ end }}

View File

@ -0,0 +1 @@
{{/* Empty for now */}}

View File

@ -0,0 +1,3 @@
{{ with resources.Get "js/body-start.js" | js.Build (dict "minify" true) }}
{{ partial "helpers/linkjs.html" (dict "r" . "attributes" (dict "" "")) }}
{{ end }}

View File

@ -0,0 +1,53 @@
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="icon--chevron-right" viewBox="0 0 20 20">
<path
fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"></path>
</symbol>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="icon--search" viewBox="0 0 20 20">
<path
d="M16.293 17.707a1 1 0 0 0 1.414-1.414l-1.414 1.414ZM9 14a5 5 0 0 1-5-5H2a7 7 0 0 0 7 7v-2ZM4 9a5 5 0 0 1 5-5V2a7 7 0 0 0-7 7h2Zm5-5a5 5 0 0 1 5 5h2a7 7 0 0 0-7-7v2Zm8.707 12.293-3.757-3.757-1.414 1.414 3.757 3.757 1.414-1.414ZM14 9a4.98 4.98 0 0 1-1.464 3.536l1.414 1.414A6.98 6.98 0 0 0 16 9h-2Zm-1.464 3.536A4.98 4.98 0 0 1 9 14v2a6.98 6.98 0 0 0 4.95-2.05l-1.414-1.414Z" />
</symbol>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="icon--anchor" viewBox="0 0 24 24">
<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" />
</symbol>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="icon--exclamation" viewBox="0 0 24 24">
<path
fill-rule="evenodd"
d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"
clip-rule="evenodd" />
</symbol>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="icon--copy" viewBox="0 0 24 24">
<path
fill="none"
stroke="currentColor"
stroke-width="1.5"
aria-hidden="true"
stroke-linecap="round"
stroke-linejoin="round"
d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z"></path>
</symbol>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="icon--github" viewBox="0 0 24 24" aria-hidden="true">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.477 2 2 6.463 2 11.97c0 4.404 2.865 8.14 6.839 9.458.5.092.682-.216.682-.48 0-.236-.008-.864-.013-1.695-2.782.602-3.369-1.337-3.369-1.337-.454-1.151-1.11-1.458-1.11-1.458-.908-.618.069-.606.069-.606 1.003.07 1.531 1.027 1.531 1.027.892 1.524 2.341 1.084 2.91.828.092-.643.35-1.083.636-1.332-2.22-.251-4.555-1.107-4.555-4.927 0-1.088.39-1.979 1.029-2.675-.103-.252-.446-1.266.098-2.638 0 0 .84-.268 2.75 1.022A9.607 9.607 0 0 1 12 6.82c.85.004 1.705.114 2.504.336 1.909-1.29 2.747-1.022 2.747-1.022.546 1.372.202 2.386.1 2.638.64.696 1.028 1.587 1.028 2.675 0 3.83-2.339 4.673-4.566 4.92.359.307.678.915.678 1.846 0 1.332-.012 2.407-.012 2.734 0 .267.18.577.688.48 3.97-1.32 6.833-5.054 6.833-9.458C22 6.463 17.522 2 12 2Z"></path>
</symbol>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -0,0 +1,29 @@
{{- with .CurrentSection.RegularPages }}
<h2
class="text-base font-semibold tracking-tight text-gray-600 dark:text-gray-400">
{{ "In this section" | title }}
</h2>
<div
class="relative my-2
after:absolute after:bottom-0 after:left-0 after:w-full after:h-8 after:bg-gradient-to-t after:from-white dark:after:from-blue-950">
<ul
id="in-sthis-section"
class="max-h-96 pb-8 overflow-y-auto"
data-turbo-preserve-scroll-container="in-this-section">
{{- range . }}
<li>
<a
class="text-sm {{ if eq . $ }}
font-bold text-blue-600 focus:font-bold dark:text-blue-200
hover:text-blue-600 scroll-active
{{ else }}
text-blue-600 hover:text-blue-500
{{ end }}"
href="{{ .RelPermalink }}"
>{{ .LinkTitle }}</a
>
</li>
{{- end }}
</ul>
</div>
{{- end }}

View File

@ -0,0 +1,22 @@
<hr class="border-t border-gray-200 dark:border-gray-800 my-10 lg:my-16" />
<div class="text-gray-800 font-semibold">
Last updated:
{{ .Lastmod.Format "January 2, 2006" }}{{ with .GitInfo }}
:
<a
class="text-blue-600 hover:text-blue-500"
href="{{ $.Site.Params.ghrepo }}commit/{{ .Hash }}"
>{{ .Subject }} ({{ .AbbreviatedHash }})</a
>
{{ end }}
</div>
{{ with .File }}
{{ $href := printf "%sedit/master/content/%s/%s" site.Params.ghrepo $.Lang .Path }}
<a
href="{{ $href }}"
class="mt-4 inline-block not-prose bg-blue-600 hover:bg-blue-800 text-white hover:text-white font-bold py-2 px-4 rounded">
Improve this page
</a>
{{ end }}

View File

@ -0,0 +1,32 @@
{{- $heading := "See also" | title }}
{{- $related := site.RegularPages.Related . | first 5 }}
{{- if .Params.action.related }}
{{- $related = slice }}
{{- range .Params.action.related }}
{{- $path := . | lower }}
{{- with or (site.GetPage $path) ($.GetPage $path) }}
{{- $related = $related | append . }}
{{- else }}
{{/* TODO1 make error */}}
{{- warnf "The 'related' partial was unable to get page %s" . }}
{{- end }}
{{- end }}
{{- end }}
{{- with $related }}
<h2
class="text-base font-semibold tracking-tight text-gray-600 dark:text-gray-400">
{{ $heading }}
</h2>
<ul class="mb-10 mt-2">
{{- range . }}
<li>
<a
class="text-sm text-blue-600 hover:text-blue-500"
href="{{ .RelPermalink }}"
>{{ .LinkTitle }}</a
>
</li>
{{- end }}
</ul>
{{- end }}

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