Initial commit
This commit is contained in:
commit
67f0a6e623
|
@ -0,0 +1,13 @@
|
|||
version: 1
|
||||
update_configs:
|
||||
- package_manager: javascript
|
||||
directory: /
|
||||
update_schedule: live
|
||||
allowed_updates:
|
||||
- match:
|
||||
update_type: security
|
||||
automerged_updates:
|
||||
- match:
|
||||
dependency_type: all
|
||||
update_type: in_range
|
||||
version_requirement_updates: widen_ranges
|
|
@ -0,0 +1,11 @@
|
|||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
|
@ -0,0 +1,2 @@
|
|||
assets/js/vendor
|
||||
node_modules
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"commonjs": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018
|
||||
},
|
||||
"rules": {
|
||||
"no-console": 0,
|
||||
"quotes": ["error", "single"],
|
||||
"comma-dangle": [
|
||||
"error",
|
||||
{
|
||||
"arrays": "always-multiline",
|
||||
"objects": "always-multiline",
|
||||
"imports": "always-multiline",
|
||||
"exports": "always-multiline",
|
||||
"functions": "ignore"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
functions
|
||||
node_modules
|
||||
public
|
||||
resources
|
||||
yarn-error.log
|
|
@ -0,0 +1,3 @@
|
|||
assets/scss/common/_syntax.scss
|
||||
assets/scss/vendor
|
||||
node_modules
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"extends": "stylelint-config-standard",
|
||||
"rules": {
|
||||
"no-empty-source": null,
|
||||
"string-quotes": "double",
|
||||
"at-rule-no-unknown": [
|
||||
true,
|
||||
{
|
||||
"ignoreAtRules": [
|
||||
"extend",
|
||||
"at-root",
|
||||
"debug",
|
||||
"warn",
|
||||
"error",
|
||||
"if",
|
||||
"else",
|
||||
"for",
|
||||
"each",
|
||||
"while",
|
||||
"mixin",
|
||||
"include",
|
||||
"content",
|
||||
"return",
|
||||
"function",
|
||||
"tailwind",
|
||||
"apply",
|
||||
"responsive",
|
||||
"variants",
|
||||
"screen"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
dist: xenial
|
||||
sudo: required
|
||||
|
||||
language: node_js
|
||||
node_js:
|
||||
- "lts/*"
|
||||
|
||||
install:
|
||||
- wget "https://github.com/gohugoio/hugo/releases/download/v${HUGO_RELEASE}/hugo_extended_${HUGO_RELEASE}_Linux-64bit.deb"
|
||||
- sudo dpkg -i hugo*.deb
|
||||
- yarn install
|
||||
|
||||
script:
|
||||
- hugo version
|
||||
- yarn test
|
||||
- yarn clean
|
||||
- yarn build
|
||||
|
||||
env:
|
||||
global:
|
||||
- PRODUCTION=true
|
||||
- HUGO_RELEASE=0.60.1
|
|
@ -0,0 +1,76 @@
|
|||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.2.1] - 2020-03-31
|
||||
### Added
|
||||
- version to package.json - [issue 23](https://github.com/h-enk/hyas/issues/23)
|
||||
- `copy:deps` to build command - [issue 22](https://github.com/h-enk/hyas/issues/22)
|
||||
- `clean:deps` command
|
||||
|
||||
## [1.2.0] - 2020-03-30
|
||||
### Added
|
||||
- ga-lite - [issue 15](https://github.com/h-enk/hyas/issues/15)
|
||||
- copy script for dep resources - [issue 14](https://github.com/h-enk/hyas/issues/14)
|
||||
- flag `--minify` to `build` command
|
||||
|
||||
### Changed
|
||||
- Bumped `[build.environment]` `netlify.toml`
|
||||
- Bumped dependencies `package.json`
|
||||
- Update security headers - [issue 17](https://github.com/h-enk/hyas/issues/17)
|
||||
- `README.md`
|
||||
- `robots` tag logic in `seo.html`
|
||||
|
||||
### Removed
|
||||
- favicon - [issue 12](https://github.com/h-enk/hyas/issues/12)
|
||||
|
||||
## [1.1.0] - 2020-02-06
|
||||
### Added
|
||||
- `<link rel="shortcut icon" href="/path/to/favicon.ico">` - [issue 12](https://github.com/h-enk/hyas/issues/12)
|
||||
- breadcrumbList structured data - [issue 11](https://github.com/h-enk/hyas/issues/11)
|
||||
- body classes - [issue 10](https://github.com/h-enk/hyas/issues/10)
|
||||
- `.stylelintignore` - [issue 9](https://github.com/h-enk/hyas/issues/9)
|
||||
- `.eslintignore` - [issue 8](https://github.com/h-enk/hyas/issues/8)
|
||||
|
||||
### Changed
|
||||
- default theme - [issue 7](https://github.com/h-enk/hyas/issues/7)
|
||||
- bumped dependency `lazysizes` to `^5.2`
|
||||
- bumped dependency `HUGO_VERSION` to `0.63.2`
|
||||
|
||||
## [1.0.1] - 2019-12-20
|
||||
### Added
|
||||
- custom `layouts/rss.xml` with page option `feed_exclude: true` - [issue 5](https://github.com/h-enk/hyas/issues/5)
|
||||
- content `'./content/**/*.md',` to `postcss.config.js` - [issue 2](https://github.com/h-enk/hyas/issues/2)
|
||||
|
||||
### Changed
|
||||
- set `canonifyURLs = false` in `/config/production/config.toml` and `/config/staging/config.toml` - [issue 3](https://github.com/h-enk/hyas/issues/3)
|
||||
|
||||
### Removed
|
||||
- `--minify` in `build` command `package.json` - [issue 4](https://github.com/h-enk/hyas/issues/4)
|
||||
|
||||
## [1.0.0] - 2019-12-11
|
||||
### Added
|
||||
- [Layouts](https://github.com/h-enk/hyas/tree/master/layouts)
|
||||
- [Image](https://github.com/h-enk/hyas/blob/master/layouts/shortcodes/img.html) shortcode
|
||||
- [Directories](https://github.com/h-enk/hyas#theme-structure)
|
||||
- [Scripts](https://github.com/h-enk/hyas/blob/master/package.json)
|
||||
- bootstrap 4.4.1
|
||||
- @fullhuman/postcss-purgecss 1.3.0
|
||||
- purgecss-whitelister 2.4.0
|
||||
- eslint 6.7.2
|
||||
- stylelint 12.0.0
|
||||
- stylelint-config-standard 19.0.0
|
||||
- rimraf 3.0.0
|
||||
- lazysizes 5.2.0-beta1
|
||||
- [Atlas](https://github.com/indigotree/atlas), Copyright (c) 2017 Indigo Tree, [MIT License](https://github.com/indigotree/atlas/blob/master/LICENSE)
|
||||
|
||||
[Unreleased]: https://github.com/h-enk/hyas/compare/v1.2.1...HEAD
|
||||
[1.2.1]: https://github.com/h-enk/hyas/releases/tag/v1.2.1
|
||||
[1.2.0]: https://github.com/h-enk/hyas/releases/tag/v1.2.0
|
||||
[1.1.0]: https://github.com/h-enk/hyas/releases/tag/v1.1.0
|
||||
[1.0.1]: https://github.com/h-enk/hyas/releases/tag/v1.0.1
|
||||
[1.0.0]: https://github.com/h-enk/hyas/releases/tag/v1.0.0
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 Henk Verlinde
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,139 @@
|
|||
# Hyas
|
||||
[![GitHub release](https://img.shields.io/github/release/h-enk/hyas.svg?style=flat-square)](https://github.com/h-enk/hyas/releases)
|
||||
[![Build Status](https://img.shields.io/travis/h-enk/hyas.svg?style=flat-square)](https://travis-ci.org/h-enk/hyas)
|
||||
[![Netlify](https://img.shields.io/netlify/895a161c-86be-48a2-8c57-a8c5d68cd1a4?style=flat-square)](https://hyas.netlify.com/)
|
||||
|
||||
Hugo boilerplate helping you build fast, robust, and adaptable websites.
|
||||
|
||||
## Features
|
||||
|
||||
- Bootstrap Sass (no JavaScript) and Autoprefixer
|
||||
- Check Sass and JavaScript for errors
|
||||
- Environment specific configuration
|
||||
- Image shortcode with [lazysizes](https://github.com/aFarkas/lazysizes) and [blur up](https://github.com/aFarkas/lazysizes/tree/master/plugins/blur-up) plugin
|
||||
- Fingerprinting and [SRI](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) (production)
|
||||
- Remove unused CSS (production)
|
||||
|
||||
## Requirements
|
||||
|
||||
Make sure all dependencies have been installed:
|
||||
|
||||
- Hugo >= 0.68.3/extended
|
||||
- Node.js >= 13.11.0
|
||||
- npm >= 6.13.7
|
||||
- Yarn >= 1.22.0 (recommended)
|
||||
|
||||
## Getting started
|
||||
|
||||
Create a new Hyas project:
|
||||
|
||||
```bash
|
||||
$ git clone git@github.com:h-enk/hyas.git my-hyas-site
|
||||
```
|
||||
|
||||
Install dependencies:
|
||||
|
||||
```bash
|
||||
# @ my-hyas-site/
|
||||
$ yarn install
|
||||
```
|
||||
|
||||
Build development theme with live reloading and injection:
|
||||
|
||||
```bash
|
||||
# @ my-hyas-site/
|
||||
$ yarn start
|
||||
```
|
||||
|
||||
### Other commands
|
||||
- `yarn lint:styles` - Check Sass for errors
|
||||
- `yarn lint:scripts` - Check JavaScript for errors
|
||||
- `yarn clean` - Delete temporary directories
|
||||
- `yarn build` - Build production theme
|
||||
|
||||
## Theme structure
|
||||
|
||||
```shell
|
||||
my-hyas-site/ # → Root of your Hyas based theme
|
||||
├── archetypes/ # → Content template files
|
||||
├── assets/ # → Asset files (fonts, images, js, lambda, and sass)
|
||||
├── config/ # → Configuration directives
|
||||
│ ├── _default/ # → Development and defaults
|
||||
│ ├── production/ # → Production specific
|
||||
│ ├── staging/ # → Staging specific
|
||||
│ ├── postcss.config.js # → PostCSS configuration file
|
||||
├── content/ # → Content using page bundles
|
||||
├── data/ # → Custom data files
|
||||
├── functions/ # → Netlify lambda functions directory (production)
|
||||
├── layouts/ # → Template files
|
||||
│ ├── _default/ # → Base templates for list & singular pages
|
||||
│ ├── partials/ # → Partials (footer, head, header, and sidebar)
|
||||
│ ├── shortcodes/ # → Shortcodes (img)
|
||||
│ │── 404.html # → 404 Template
|
||||
│ │── index.headers # → Custom Netlify HTTP headers
|
||||
│ │── index.html # → Homepage template
|
||||
│ │── index.redirects # → Custom Netlify redirect rules
|
||||
│ │── robots.txt # → Template for robots.txt
|
||||
│ │── sitemap.xml # → Custom sitemap template
|
||||
├── node_modules/ # → Node.js packages (never edit)
|
||||
├── public/ # → Publish directory (temporary)
|
||||
├── resources/ # → Resource cache directory (temporary)
|
||||
├── static/ # → Static content (favicons et cetera)
|
||||
├── .eslintrc.json # → ESLint configuration
|
||||
├── .stylelintrc.json # → stylelint configuration
|
||||
├── netlify.toml # → Netlify configuration
|
||||
├── package.json # → Node.js dependencies and scripts
|
||||
└── yarn.lock # → Yarn lock file (never edit)
|
||||
```
|
||||
|
||||
## Theme setup
|
||||
Edit files in `config/` directory.
|
||||
|
||||
|
||||
## Theme development
|
||||
### Sass
|
||||
|
||||
Don't like Bootstrap? Remove it:
|
||||
```bash
|
||||
# @ my-hyas-site/
|
||||
$ yarn remove bootstrap
|
||||
```
|
||||
Also make sure to update your sass files, like `app.scss`.
|
||||
|
||||
### Images
|
||||
|
||||
Use the image shortcode:
|
||||
```
|
||||
{{< img src="image-in-page-bundle.jpg" alt="Text description image" caption="Caption, optional" class="wide" >}}
|
||||
```
|
||||
|
||||
Configuration in `config/_default/params.toml`:
|
||||
|
||||
```toml
|
||||
quality = 85
|
||||
bgColor = "#fff"
|
||||
landscapePhotoWidths = [900, 700, 500]
|
||||
portraitPhotoWidths = [1500, 1000, 750]
|
||||
lqipWidth = "20x"
|
||||
```
|
||||
|
||||
### Sitemap
|
||||
Exclude a page by adding the following front matter variable:
|
||||
```yaml
|
||||
sitemap_exclude: true
|
||||
```
|
||||
|
||||
### Robots
|
||||
Add a custom [robots meta tag](https://developers.google.com/search/reference/robots_meta_tag) by adding the following front matter variable:
|
||||
```yaml
|
||||
robots: "noindex, noarchive"
|
||||
```
|
||||
This will output:
|
||||
|
||||
```html
|
||||
<meta name=robots content="noindex, noarchive">
|
||||
```
|
||||
|
||||
## Documentation
|
||||
- [Hugo](https://gohugo.io/documentation/)
|
||||
- [Goldmark](https://github.com/yuin/goldmark/)
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
description: ""
|
||||
lead: ""
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
images: [""]
|
||||
authors: [""]
|
||||
---
|
||||
|
||||
{{< img src="" alt="" caption="" class="wide" >}}
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
description: ""
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
images: [""]
|
||||
---
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
description: ""
|
||||
lead: ""
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
images: [""]
|
||||
menu:
|
||||
docs:
|
||||
parent: ""
|
||||
weight: 999
|
||||
toc: true
|
||||
---
|
||||
|
||||
{{< img src="" alt="" caption="" class="wide" >}}
|
|
@ -0,0 +1,8 @@
|
|||
document.getElementById('mode').addEventListener('click', () => {
|
||||
document.body.classList.toggle('dark');
|
||||
localStorage.setItem('theme', document.body.classList.contains('dark') ? 'dark' : 'light');
|
||||
});
|
||||
|
||||
if (localStorage.getItem('theme') === 'dark') {
|
||||
document.body.classList.add('dark');
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
exports.handler = (event, context, callback) => {
|
||||
callback (null, {
|
||||
statusCode: 200,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
message: 'Hi from Lambda.',
|
||||
}),
|
||||
});
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/** Import Bootstrap functions */
|
||||
@import "bootstrap/scss/functions";
|
||||
|
||||
/** Import theme variables */
|
||||
@import "common/variables";
|
||||
|
||||
/** Import Bootstrap */
|
||||
@import "bootstrap/scss/bootstrap";
|
||||
|
||||
/** Import theme styles */
|
||||
// @import "common/fonts";
|
||||
@import "common/global";
|
||||
@import "common/dark";
|
||||
// @import "common/syntax";
|
||||
@import "components/buttons";
|
||||
@import "components/code";
|
||||
@import "components/comments";
|
||||
@import "components/forms";
|
||||
@import "components/images";
|
||||
@import "layouts/footer";
|
||||
@import "layouts/header";
|
||||
@import "layouts/pages";
|
||||
@import "layouts/posts";
|
||||
@import "layouts/sidebar";
|
|
@ -0,0 +1,196 @@
|
|||
/** Theme variables */
|
||||
|
||||
$body-bg-dark: lighten($black, 10%);
|
||||
$body-color-dark: darken($white, 15%);
|
||||
$link-color-dark: lighten($primary, 20%);
|
||||
$body-overlay-dark: lighten($black, 15%);
|
||||
$border-dark: lighten($black, 20%);
|
||||
|
||||
/** Theme styles */
|
||||
|
||||
body.dark {
|
||||
background: $body-bg-dark;
|
||||
color: $body-color-dark;
|
||||
}
|
||||
|
||||
body.dark a {
|
||||
color: $link-color-dark;
|
||||
}
|
||||
|
||||
body.dark .btn-primary {
|
||||
color: $body-color-dark;
|
||||
}
|
||||
|
||||
body.dark .navbar {
|
||||
background: $body-bg-dark;
|
||||
opacity: 0.975;
|
||||
border-bottom: 1px solid $border-dark;
|
||||
}
|
||||
|
||||
body.dark.home .navbar {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
body.dark .navbar-light .navbar-brand {
|
||||
color: $navbar-dark-brand-color;
|
||||
}
|
||||
|
||||
body.dark .navbar-light .navbar-brand:hover,
|
||||
body.dark .navbar-light .navbar-brand:focus {
|
||||
color: $navbar-dark-brand-hover-color;
|
||||
}
|
||||
|
||||
body.dark .navbar-light .navbar-nav .nav-link {
|
||||
color: $navbar-dark-color;
|
||||
}
|
||||
|
||||
body.dark .navbar-light .navbar-nav .nav-link:hover,
|
||||
body.dark .navbar-light .navbar-nav .nav-link:focus {
|
||||
color: $navbar-dark-hover-color;
|
||||
}
|
||||
|
||||
body.dark .navbar-light .navbar-nav .nav-link.disabled {
|
||||
color: $navbar-dark-disabled-color;
|
||||
}
|
||||
|
||||
body.dark .navbar-light .navbar-nav .show > .nav-link,
|
||||
body.dark .navbar-light .navbar-nav .active > .nav-link,
|
||||
body.dark .navbar-light .navbar-nav .nav-link.show,
|
||||
body.dark .navbar-light .navbar-nav .nav-link.active {
|
||||
color: $navbar-dark-active-color;
|
||||
}
|
||||
|
||||
body.dark .navbar-light .navbar-text {
|
||||
color: $navbar-dark-color;
|
||||
}
|
||||
|
||||
body.dark .page-links a {
|
||||
color: $body-color-dark;
|
||||
}
|
||||
|
||||
body.dark .docs-link:hover,
|
||||
body.dark .docs-link.active,
|
||||
body.dark .page-links a:hover {
|
||||
text-decoration: none;
|
||||
color: $link-color-dark;
|
||||
}
|
||||
|
||||
body.dark .navbar-light .navbar-text a {
|
||||
color: $navbar-dark-active-color;
|
||||
}
|
||||
|
||||
body.dark .navbar-light .navbar-text a:hover,
|
||||
body.dark .navbar-light .navbar-text a:focus {
|
||||
color: $navbar-dark-active-color;
|
||||
}
|
||||
|
||||
body.dark .navbar .btn-link {
|
||||
color: $navbar-dark-color;
|
||||
}
|
||||
|
||||
body.dark .navbar .btn-link:hover {
|
||||
color: $navbar-dark-hover-color;
|
||||
}
|
||||
|
||||
body.dark .navbar .btn-link:active {
|
||||
color: $navbar-dark-active-color;
|
||||
}
|
||||
|
||||
body.dark .form-control.is-search {
|
||||
background: $body-overlay-dark;
|
||||
}
|
||||
|
||||
body.dark .border-top {
|
||||
border-top: 1px solid $border-dark !important;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
body.dark .docs-sidebar {
|
||||
order: 0;
|
||||
border-right: 1px solid $border-dark;
|
||||
}
|
||||
}
|
||||
|
||||
body.dark .docs-navigation {
|
||||
border-top: 1px solid $border-dark;
|
||||
}
|
||||
|
||||
body.dark ::selection {
|
||||
background: lighten($primary, 25%);
|
||||
}
|
||||
|
||||
body.dark pre {
|
||||
background: $body-overlay-dark;
|
||||
color: $body-color-dark;
|
||||
}
|
||||
|
||||
body.dark code {
|
||||
background: $body-overlay-dark;
|
||||
color: $body-color-dark;
|
||||
}
|
||||
|
||||
body.dark blockquote {
|
||||
border-left: 3px solid lighten($black, 30%);
|
||||
}
|
||||
|
||||
body.dark .footer {
|
||||
border-top: 1px solid $border-dark;
|
||||
}
|
||||
|
||||
body.dark .docs-links,
|
||||
body.dark .docs-toc {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: $body-bg-dark $body-bg-dark;
|
||||
}
|
||||
|
||||
body.dark .docs-links::-webkit-scrollbar,
|
||||
body.dark .docs-toc::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
body.dark .docs-links::-webkit-scrollbar-track,
|
||||
body.dark .docs-toc::-webkit-scrollbar-track {
|
||||
background: $body-bg-dark;
|
||||
}
|
||||
|
||||
body.dark .docs-links::-webkit-scrollbar-thumb,
|
||||
body.dark .docs-toc::-webkit-scrollbar-thumb {
|
||||
background: $body-bg-dark;
|
||||
}
|
||||
|
||||
body.dark .docs-links:hover,
|
||||
body.dark .docs-toc:hover {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: $border-dark $body-bg-dark;
|
||||
}
|
||||
|
||||
body.dark .docs-links:hover::-webkit-scrollbar-thumb,
|
||||
body.dark .docs-toc:hover::-webkit-scrollbar-thumb {
|
||||
background: $border-dark;
|
||||
}
|
||||
|
||||
body.dark .docs-links::-webkit-scrollbar-thumb:hover,
|
||||
body.dark .docs-toc::-webkit-scrollbar-thumb:hover {
|
||||
background: $border-dark;
|
||||
}
|
||||
|
||||
body.dark .docs-links h3:not(:first-child) {
|
||||
border-top: 1px solid $border-dark;
|
||||
}
|
||||
|
||||
body.dark a.docs-link {
|
||||
color: $body-color-dark;
|
||||
}
|
||||
|
||||
body.dark .page-links li:not(:first-child) {
|
||||
border-top: 1px dashed $border-dark;
|
||||
}
|
||||
|
||||
body.dark .card {
|
||||
background: $body-bg-dark;
|
||||
border: 1px solid $border-dark;
|
||||
}
|
||||
|
||||
body.dark .card.bg-light {
|
||||
background: $body-overlay-dark !important;
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
@font-face {
|
||||
font-family: Jost;
|
||||
src: local("Jost"), url(/fonts/vendor/jost/Jost-400-Book.otf);
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Jost;
|
||||
src: local("Jost"), url(/fonts/vendor/jost/Jost-400-BookItalic.otf);
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Jost;
|
||||
src: local("Jost"), url(/fonts/vendor/jost/Jost-500-Medium.otf);
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Jost;
|
||||
src: local("Jost"), url(/fonts/vendor/jost/Jost-500-MediumItalic.otf);
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/*
|
||||
@font-face {
|
||||
font-family: Jost;
|
||||
src: local("Jost"), url(/fonts/vendor/jost/Jost-600-Semi.otf);
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Jost;
|
||||
src: local("Jost"), url(/fonts/vendor/jost/Jost-600-SemiItalic.otf);
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: Jost;
|
||||
src: local("Jost"), url(/fonts/vendor/jost/Jost-700-Bold.otf);
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
}
|
||||
*/
|
|
@ -0,0 +1,157 @@
|
|||
.authors .content,
|
||||
.blog .content,
|
||||
.page .content,
|
||||
.error404 .content {
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 3rem;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.h1,
|
||||
.h2,
|
||||
.h3,
|
||||
.h4,
|
||||
.h5,
|
||||
.h6 {
|
||||
margin: 2rem 0 1rem;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
body {
|
||||
font-size: $font-size-md;
|
||||
padding-top: 4rem !important;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.h1,
|
||||
.h2,
|
||||
.h3,
|
||||
.h4,
|
||||
.h5,
|
||||
.h6 {
|
||||
margin-bottom: 1.125rem;
|
||||
}
|
||||
}
|
||||
|
||||
.section {
|
||||
padding-top: 5rem;
|
||||
padding-bottom: 5rem;
|
||||
}
|
||||
|
||||
.section svg {
|
||||
display: inline-block;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
body {
|
||||
padding-top: 3.5625rem;
|
||||
}
|
||||
|
||||
.docs-sidebar {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
.docs-sidebar {
|
||||
order: 0;
|
||||
border-right: 1px solid $gray-200;
|
||||
}
|
||||
|
||||
@supports ((position:-webkit-sticky) or (position:sticky)) {
|
||||
.docs-sidebar {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 4rem;
|
||||
z-index: 1000;
|
||||
height: calc(100vh - 4rem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(xl) {
|
||||
.docs-sidebar {
|
||||
flex: 0 1 320px;
|
||||
}
|
||||
}
|
||||
|
||||
.docs-links {
|
||||
padding-bottom: 5rem;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
@supports ((position: -webkit-sticky) or (position: sticky)) {
|
||||
.docs-links {
|
||||
max-height: calc(100vh - 4rem);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
.docs-links {
|
||||
display: block !important;
|
||||
margin-right: -1.5rem;
|
||||
padding-bottom: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
.docs-toc {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
@supports ((position:-webkit-sticky) or (position:sticky)) {
|
||||
.docs-toc {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 4rem;
|
||||
height: calc(100vh - 4rem);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.docs-content {
|
||||
padding-bottom: 3rem;
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.docs-navigation {
|
||||
border-top: 1px solid $gray-200;
|
||||
margin-top: 3rem;
|
||||
margin-bottom: 0;
|
||||
padding-top: 2rem;
|
||||
}
|
||||
|
||||
.docs-navigation a {
|
||||
font-size: $font-size-base * 0.9;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
.docs-navigation {
|
||||
margin-bottom: 5rem;
|
||||
}
|
||||
|
||||
.docs-navigation a {
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
||||
|
||||
#TableOfContents ul {
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: lighten($primary, 45%);
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
/* Background */ .chroma { color: #f8f8f2; background-color: #282a36 }
|
||||
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
|
||||
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
|
||||
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
|
||||
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
|
||||
/* Keyword */ .chroma .k { color: #ff79c6 }
|
||||
/* KeywordConstant */ .chroma .kc { color: #ff79c6 }
|
||||
/* KeywordDeclaration */ .chroma .kd { color: #8be9fd; font-style: italic }
|
||||
/* KeywordNamespace */ .chroma .kn { color: #ff79c6 }
|
||||
/* KeywordPseudo */ .chroma .kp { color: #ff79c6 }
|
||||
/* KeywordReserved */ .chroma .kr { color: #ff79c6 }
|
||||
/* KeywordType */ .chroma .kt { color: #8be9fd }
|
||||
/* NameAttribute */ .chroma .na { color: #50fa7b }
|
||||
/* NameBuiltin */ .chroma .nb { color: #8be9fd; font-style: italic }
|
||||
/* NameClass */ .chroma .nc { color: #50fa7b }
|
||||
/* NameFunction */ .chroma .nf { color: #50fa7b }
|
||||
/* NameLabel */ .chroma .nl { color: #8be9fd; font-style: italic }
|
||||
/* NameTag */ .chroma .nt { color: #ff79c6 }
|
||||
/* NameVariable */ .chroma .nv { color: #8be9fd; font-style: italic }
|
||||
/* NameVariableClass */ .chroma .vc { color: #8be9fd; font-style: italic }
|
||||
/* NameVariableGlobal */ .chroma .vg { color: #8be9fd; font-style: italic }
|
||||
/* NameVariableInstance */ .chroma .vi { color: #8be9fd; font-style: italic }
|
||||
/* LiteralString */ .chroma .s { color: #f1fa8c }
|
||||
/* LiteralStringAffix */ .chroma .sa { color: #f1fa8c }
|
||||
/* LiteralStringBacktick */ .chroma .sb { color: #f1fa8c }
|
||||
/* LiteralStringChar */ .chroma .sc { color: #f1fa8c }
|
||||
/* LiteralStringDelimiter */ .chroma .dl { color: #f1fa8c }
|
||||
/* LiteralStringDoc */ .chroma .sd { color: #f1fa8c }
|
||||
/* LiteralStringDouble */ .chroma .s2 { color: #f1fa8c }
|
||||
/* LiteralStringEscape */ .chroma .se { color: #f1fa8c }
|
||||
/* LiteralStringHeredoc */ .chroma .sh { color: #f1fa8c }
|
||||
/* LiteralStringInterpol */ .chroma .si { color: #f1fa8c }
|
||||
/* LiteralStringOther */ .chroma .sx { color: #f1fa8c }
|
||||
/* LiteralStringRegex */ .chroma .sr { color: #f1fa8c }
|
||||
/* LiteralStringSingle */ .chroma .s1 { color: #f1fa8c }
|
||||
/* LiteralStringSymbol */ .chroma .ss { color: #f1fa8c }
|
||||
/* LiteralNumber */ .chroma .m { color: #bd93f9 }
|
||||
/* LiteralNumberBin */ .chroma .mb { color: #bd93f9 }
|
||||
/* LiteralNumberFloat */ .chroma .mf { color: #bd93f9 }
|
||||
/* LiteralNumberHex */ .chroma .mh { color: #bd93f9 }
|
||||
/* LiteralNumberInteger */ .chroma .mi { color: #bd93f9 }
|
||||
/* LiteralNumberIntegerLong */ .chroma .il { color: #bd93f9 }
|
||||
/* LiteralNumberOct */ .chroma .mo { color: #bd93f9 }
|
||||
/* Operator */ .chroma .o { color: #ff79c6 }
|
||||
/* OperatorWord */ .chroma .ow { color: #ff79c6 }
|
||||
/* Comment */ .chroma .c { color: #6272a4 }
|
||||
/* CommentHashbang */ .chroma .ch { color: #6272a4 }
|
||||
/* CommentMultiline */ .chroma .cm { color: #6272a4 }
|
||||
/* CommentSingle */ .chroma .c1 { color: #6272a4 }
|
||||
/* CommentSpecial */ .chroma .cs { color: #6272a4 }
|
||||
/* CommentPreproc */ .chroma .cp { color: #ff79c6 }
|
||||
/* CommentPreprocFile */ .chroma .cpf { color: #ff79c6 }
|
||||
/* GenericDeleted */ .chroma .gd { color: #8b080b }
|
||||
/* GenericEmph */ .chroma .ge { text-decoration: underline }
|
||||
/* GenericHeading */ .chroma .gh { font-weight: bold }
|
||||
/* GenericInserted */ .chroma .gi { font-weight: bold }
|
||||
/* GenericOutput */ .chroma .go { color: #44475a }
|
||||
/* GenericSubheading */ .chroma .gu { font-weight: bold }
|
||||
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
|
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
$theme-colors: (
|
||||
primary: #3c48d5
|
||||
);
|
||||
*/
|
||||
|
||||
$yellow: #ffe000;
|
||||
$black: #1d2d35;
|
||||
$white: #fff;
|
||||
$beige: #fbf7f0;
|
||||
$red: #e55235;
|
||||
$purple: #5d2f86;
|
||||
$brown: #aa9c84;
|
||||
|
||||
$white: #fff;
|
||||
$gray-100: #f8f9fa;
|
||||
$gray-200: #e9ecef;
|
||||
$gray-300: #dee2e6;
|
||||
$gray-400: #ced4da;
|
||||
$gray-500: #adb5bd;
|
||||
$gray-600: #6c757d;
|
||||
$gray-700: #495057;
|
||||
$gray-800: #343a40;
|
||||
$gray-900: #212529;
|
||||
$black: #000;
|
||||
|
||||
$primary: lighten($purple, 10%);
|
||||
$secondary: $gray-200;
|
||||
|
||||
/** Bootstrap navbar fix (https://git.io/fADqW) */
|
||||
$navbar-dark-toggler-icon-bg: none;
|
||||
$navbar-light-toggler-icon-bg: none;
|
||||
|
||||
// Options
|
||||
//
|
||||
// Quickly modify global styling by enabling or disabling optional features.
|
||||
|
||||
$enable-responsive-font-sizes: true;
|
||||
|
||||
// Body
|
||||
//
|
||||
// Settings for the `<body>` element.
|
||||
|
||||
$body-bg: $white;
|
||||
$body-color: lighten($black, 10%);
|
||||
|
||||
// Grid containers
|
||||
//
|
||||
// Define the maximum width of `.container` for different screen sizes.
|
||||
|
||||
$container-max-widths: (
|
||||
sm: 540px,
|
||||
md: 720px,
|
||||
lg: 960px,
|
||||
xl: 1240px
|
||||
);
|
||||
|
||||
@include _assert-ascending($container-max-widths, "$container-max-widths");
|
||||
|
||||
// Grid columns
|
||||
//
|
||||
// Set the number of columns and specify the width of the gutters.
|
||||
|
||||
$grid-columns: 16;
|
||||
$grid-gutter-width: 48px;
|
||||
$grid-row-columns: 6;
|
||||
|
||||
// Typography
|
||||
//
|
||||
// Font, line-height, and color for body text, headings, and more.
|
||||
|
||||
// stylelint-disable value-keyword-case
|
||||
$font-family-sans-serif: "Jost", -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
$font-family-monospace: sfmono-regular, menlo, monaco, consolas, "Liberation Mono", "Courier New", monospace;
|
||||
$font-family-base: $font-family-sans-serif;
|
||||
// stylelint-enable value-keyword-case
|
||||
|
||||
$font-size-base: 1rem; // Assumes the browser default, typically `16px`
|
||||
$font-size-xl: $font-size-base * 1.375;
|
||||
$font-size-lg: $font-size-base * 1.25;
|
||||
$font-size-md: $font-size-base * 1.125;
|
||||
$font-size-sm: $font-size-base * 0.875;
|
||||
|
||||
$line-height-base: 1.5;
|
||||
|
||||
$headings-font-family: null;
|
||||
$headings-font-weight: 500;
|
||||
|
||||
// Spacing
|
||||
//
|
||||
// Control the default styling of most Bootstrap elements by modifying these
|
||||
// variables. Mostly focused on spacing.
|
||||
// You can add more entries to the $spacers map, should you need more variation.
|
||||
|
||||
$spacer: 1rem;
|
||||
|
||||
// Navbar
|
||||
|
||||
$navbar-padding-y: $spacer / 2;
|
||||
$navbar-padding-x: 0;
|
||||
|
||||
$navbar-nav-link-padding-x: 0.5rem;
|
|
@ -0,0 +1,46 @@
|
|||
.navbar .btn-link {
|
||||
color: $navbar-light-color;
|
||||
padding: 0.4375rem 0;
|
||||
}
|
||||
|
||||
#mode {
|
||||
margin-right: 1.25rem;
|
||||
}
|
||||
|
||||
#navigation {
|
||||
margin-left: 1.25rem;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
#mode {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.navbar .btn-link {
|
||||
padding: 0.5625em 0.25rem 0.5rem 0.125rem;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar .btn-link:hover {
|
||||
color: $navbar-light-hover-color;
|
||||
}
|
||||
|
||||
.navbar .btn-link:active {
|
||||
color: $navbar-light-active-color;
|
||||
}
|
||||
|
||||
body .toggle-dark {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body .toggle-light {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body.dark .toggle-light {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body.dark .toggle-dark {
|
||||
display: none;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
.highlight {
|
||||
margin-left: -1.5rem;
|
||||
margin-right: -1.5rem;
|
||||
}
|
||||
*/
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: $font-family-monospace;
|
||||
font-size: $font-size-sm;
|
||||
border-radius: $border-radius;
|
||||
}
|
||||
|
||||
pre {
|
||||
background: lighten($black, 15%);
|
||||
color: $beige;
|
||||
line-height: $line-height-lg;
|
||||
margin: 2rem 0;
|
||||
overflow: auto;
|
||||
padding: 1.25rem 1.5rem;
|
||||
tab-size: 4;
|
||||
}
|
||||
|
||||
code {
|
||||
background: $beige;
|
||||
color: $black;
|
||||
padding: 0.25rem 0.5rem;
|
||||
}
|
||||
|
||||
pre code {
|
||||
background: none;
|
||||
font-size: inherit;
|
||||
padding: 0;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
.comment-list {
|
||||
@extend .list-unstyled;
|
||||
}
|
||||
|
||||
.comment-list ol {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.comment-form p {
|
||||
@extend .form-group;
|
||||
}
|
||||
|
||||
.comment-form input[type="text"],
|
||||
.comment-form input[type="email"],
|
||||
.comment-form input[type="url"],
|
||||
.comment-form textarea {
|
||||
@extend .form-control;
|
||||
}
|
||||
|
||||
.comment-form input[type="submit"] {
|
||||
@extend .btn;
|
||||
@extend .btn-secondary;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.25rem;
|
||||
border-left: 3px solid $gray-300;
|
||||
padding-left: 1rem;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/** Search form */
|
||||
.search-form {
|
||||
@extend .form-inline;
|
||||
}
|
||||
|
||||
.search-form label {
|
||||
@extend .form-group;
|
||||
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.search-form .search-field {
|
||||
@extend .form-control;
|
||||
}
|
||||
|
||||
.search-form .search-submit {
|
||||
@extend .btn;
|
||||
@extend .btn-secondary;
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
.img svg,
|
||||
.img img {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.img {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.img img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 2rem 0;
|
||||
}
|
||||
|
||||
.figure-caption {
|
||||
margin: 0.25rem 0 0.75rem;
|
||||
}
|
||||
|
||||
figure.wide {
|
||||
margin: 2rem -1.5rem;
|
||||
}
|
||||
|
||||
figure.wide .figure-caption {
|
||||
margin: 0.25rem 1.5rem 0.75rem;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
figure.wide {
|
||||
margin: 2rem -3rem;
|
||||
}
|
||||
|
||||
figure.wide .figure-caption {
|
||||
margin: 0.25rem 3rem 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
figure.wide {
|
||||
margin: 2rem -5rem;
|
||||
}
|
||||
|
||||
figure.wide .figure-caption {
|
||||
margin: 0.25rem 5rem 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
.blur-up {
|
||||
-webkit-filter: blur(5px);
|
||||
filter: blur(5px);
|
||||
transition: filter 300ms, -webkit-filter 300ms;
|
||||
}
|
||||
|
||||
.blur-up.lazyloaded {
|
||||
-webkit-filter: blur(0);
|
||||
filter: blur(0);
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
.footer {
|
||||
border-top: 1px solid $gray-200;
|
||||
padding-top: 1.125rem;
|
||||
padding-bottom: 1.125rem;
|
||||
}
|
||||
|
||||
.footer ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.footer p,
|
||||
.footer li a {
|
||||
font-size: $font-size-sm;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
.footer p,
|
||||
.footer li a {
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
.banner .nav li {
|
||||
@extend .nav-item;
|
||||
}
|
||||
|
||||
.banner .nav a {
|
||||
@extend .nav-link;
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
.navbar-brand {
|
||||
font-size: $font-size-xl;
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
margin-left: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-nav {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.nav-item {
|
||||
margin-left: 1.25rem;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
.nav-item {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
.nav-item:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(md) {
|
||||
.navbar .container {
|
||||
padding-left: 1.5rem;
|
||||
padding-right: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.break {
|
||||
flex-basis: 100%;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background-color: rgba(255, 255, 255, 0.95);
|
||||
border-bottom: 1px solid $gray-200;
|
||||
|
||||
/* margin-top: 3px; */
|
||||
}
|
||||
|
||||
.header-bar {
|
||||
border-top: 3px solid;
|
||||
border-image-source: linear-gradient(90deg, $primary, #8ed6fb 50%, #d32e9d);
|
||||
border-image-slice: 1;
|
||||
}
|
||||
|
||||
.home .navbar {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
margin-top: -0.15625rem;
|
||||
}
|
||||
|
||||
.navbar-form {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
.navbar-brand {
|
||||
margin-right: 1rem !important;
|
||||
}
|
||||
|
||||
.main-nav .nav-item:first-child .nav-link,
|
||||
.social-nav .nav-item:first-child .nav-link {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.main-nav .nav-item:last-child .nav-link,
|
||||
.social-nav .nav-item:last-child .nav-link {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.navbar-form {
|
||||
margin-top: 0;
|
||||
margin-left: 1.5rem;
|
||||
margin-right: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.form-control.is-search {
|
||||
padding-right: calc(1.5em + 0.75rem);
|
||||
background: $gray-100;
|
||||
border: 0;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-search'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right calc(0.375em + 0.1875rem) center;
|
||||
background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
.docs-content > h2[id]::before,
|
||||
.docs-content > h3[id]::before,
|
||||
.docs-content > h4[id]::before {
|
||||
display: block;
|
||||
height: 6rem;
|
||||
margin-top: -6rem;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.anchor {
|
||||
visibility: hidden;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
h1:hover a,
|
||||
h2:hover a,
|
||||
h3:hover a,
|
||||
h4:hover a {
|
||||
visibility: visible;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.card-list {
|
||||
margin-top: 2.25rem;
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
.authors.list .card,
|
||||
.blog.list .card {
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.authors.list .card:hover,
|
||||
.blog.list .card:hover {
|
||||
transform: scale(1.025);
|
||||
}
|
||||
|
||||
.authors.list .card-body,
|
||||
.blog.list .card-body {
|
||||
padding: 0 2rem 1rem;
|
||||
}
|
||||
|
||||
.blog-header {
|
||||
text-align: center;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.blog-footer {
|
||||
text-align: center;
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
.docs-links,
|
||||
.docs-toc {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: $white $white;
|
||||
}
|
||||
|
||||
.docs-links::-webkit-scrollbar,
|
||||
.docs-toc::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.docs-links::-webkit-scrollbar-track,
|
||||
.docs-toc::-webkit-scrollbar-track {
|
||||
background: $white;
|
||||
}
|
||||
|
||||
.docs-links::-webkit-scrollbar-thumb,
|
||||
.docs-toc::-webkit-scrollbar-thumb {
|
||||
background: $white;
|
||||
}
|
||||
|
||||
.docs-links:hover,
|
||||
.docs-toc:hover {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: $gray-200 $white;
|
||||
}
|
||||
|
||||
.docs-links:hover::-webkit-scrollbar-thumb,
|
||||
.docs-toc:hover::-webkit-scrollbar-thumb {
|
||||
background: $gray-200;
|
||||
}
|
||||
|
||||
.docs-links::-webkit-scrollbar-thumb:hover,
|
||||
.docs-toc::-webkit-scrollbar-thumb:hover {
|
||||
background: $gray-200;
|
||||
}
|
||||
|
||||
.docs-links h3,
|
||||
.page-links h3 {
|
||||
text-transform: uppercase;
|
||||
font-size: $font-size-base;
|
||||
margin: 1.25rem 0 0.5rem 0;
|
||||
padding: 1.5rem 0 0 0;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
.docs-links h3,
|
||||
.page-links h3 {
|
||||
margin: 1.125rem 1.5rem 0.75rem 0;
|
||||
padding: 1.375rem 0 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.docs-links h3:not(:first-child) {
|
||||
border-top: 1px solid $gray-200;
|
||||
}
|
||||
|
||||
a.docs-link {
|
||||
color: $body-color;
|
||||
display: block;
|
||||
padding: 0.125rem 0;
|
||||
font-size: $font-size-base;
|
||||
}
|
||||
|
||||
.page-links li {
|
||||
margin-top: 0.375rem;
|
||||
padding-top: 0.375rem;
|
||||
}
|
||||
|
||||
.page-links li ul li {
|
||||
border-top: none;
|
||||
padding-left: 1rem;
|
||||
margin-top: 0.125rem;
|
||||
padding-top: 0.125rem;
|
||||
}
|
||||
|
||||
.page-links li:not(:first-child) {
|
||||
border-top: 1px dashed $gray-200;
|
||||
}
|
||||
|
||||
.page-links a {
|
||||
color: $body-color;
|
||||
display: block;
|
||||
padding: 0.125rem 0;
|
||||
font-size: $font-size-base * 0.9375;
|
||||
}
|
||||
|
||||
.docs-link:hover,
|
||||
.docs-link.active,
|
||||
.page-links a:hover {
|
||||
text-decoration: none;
|
||||
color: $link-color;
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
baseurl = "/"
|
||||
disableAliases = true
|
||||
disableHugoGeneratorInject = true
|
||||
# disableKinds = ["taxonomy", "taxonomyTerm"]
|
||||
enableEmoji = true
|
||||
enableRobotsTXT = true
|
||||
languageCode = "en-US"
|
||||
paginate = 7
|
||||
rssLimit = 10
|
||||
|
||||
[taxonomies]
|
||||
author = "authors"
|
||||
|
||||
# add redirects/headers
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "REDIRECTS", "HEADERS"]
|
||||
|
||||
# remove .{ext} from text/netlify
|
||||
[mediaTypes."text/netlify"]
|
||||
suffixes = [""]
|
||||
delimiter = ""
|
||||
|
||||
# add output format for netlify _redirects
|
||||
[outputFormats.REDIRECTS]
|
||||
mediatype = "text/netlify"
|
||||
baseName = "_redirects"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
|
||||
# add output format for netlify _headers
|
||||
[outputFormats.HEADERS]
|
||||
mediatype = "text/netlify"
|
||||
baseName = "_headers"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
|
||||
[markup]
|
||||
[markup.goldmark]
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
[markup.highlight]
|
||||
codeFences = true
|
||||
hl_Lines = ""
|
||||
lineNoStart = 1
|
||||
lineNos = false
|
||||
lineNumbersInTable = true
|
||||
noClasses = false
|
||||
style = "dracula"
|
||||
tabWidth = 4
|
||||
|
||||
[sitemap]
|
||||
changefreq = "monthly"
|
||||
filename = "sitemap.xml"
|
||||
priority = 0.5
|
||||
|
||||
[module]
|
||||
[[module.mounts]]
|
||||
source = "assets"
|
||||
target = "assets"
|
||||
[[module.mounts]]
|
||||
source = "static"
|
||||
target = "static"
|
||||
[[module.mounts]]
|
||||
source = "node_modules/alpinejs/dist"
|
||||
target = "assets/js/vendor/alpinejs"
|
||||
[[module.mounts]]
|
||||
source = "node_modules/lazysizes"
|
||||
target = "assets/js/vendor/lazysizes"
|
||||
[[module.mounts]]
|
||||
source = "node_modules/ga-lite/dist"
|
||||
target = "static/js/vendor/ga-lite"
|
|
@ -0,0 +1,39 @@
|
|||
[[docs]]
|
||||
name = "Prologue"
|
||||
weight = 10
|
||||
identifier = "prologue"
|
||||
url = "/docs/prologue/"
|
||||
|
||||
[[docs]]
|
||||
name = "Basic Hyas"
|
||||
weight = 20
|
||||
identifier = "basic-hyas"
|
||||
url = "/docs/basic-hyas/"
|
||||
|
||||
[[docs]]
|
||||
name = "Styles and assets"
|
||||
weight = 30
|
||||
identifier = "styles-and-assets"
|
||||
url = "/docs/styles-and-assets/"
|
||||
|
||||
[[main]]
|
||||
name = "Docs"
|
||||
url = "/docs/prologue/introduction/"
|
||||
weight = 10
|
||||
|
||||
[[main]]
|
||||
name = "Blog"
|
||||
url = "/blog/"
|
||||
weight = 20
|
||||
|
||||
[[social]]
|
||||
name = "Twitter"
|
||||
pre = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-twitter\"><path d=\"M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z\"></path></svg>"
|
||||
url = "https://twitter.com/henkverlinde"
|
||||
weight = 10
|
||||
|
||||
[[social]]
|
||||
name = "GitHub"
|
||||
pre = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-github\"><path d=\"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22\"></path></svg>"
|
||||
url = "https://github.com/h-enk"
|
||||
weight = 20
|
|
@ -0,0 +1,27 @@
|
|||
title = "Doks"
|
||||
titleSeparator = "-"
|
||||
titleAddition = "Hugo Documentation Theme"
|
||||
description = "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
images = ["image-hyas.jpg"]
|
||||
twitterSite = "@henkverlinde"
|
||||
twitterCreator = "@henkverlinde"
|
||||
ogLocale = "en_US"
|
||||
schemaType = "Organization"
|
||||
schemaLogo = "logo-hyas.png"
|
||||
schemaTwitter = "https://twitter.com/henkverlinde"
|
||||
schemaLinkedIn = "https://www.linkedin.com/in/henkverlinde/"
|
||||
schemaSection = "news"
|
||||
siteLinksSearchBox = false
|
||||
|
||||
themeColor = "#fff"
|
||||
|
||||
# googleAnalytics = "UA-99999999-1"
|
||||
|
||||
quality = 85
|
||||
bgColor = "#fff"
|
||||
landscapePhotoWidths = [900, 700, 500]
|
||||
portraitPhotoWidths = [1500, 1000, 750]
|
||||
lqipWidth = "20x"
|
||||
|
||||
footer = "© 2020 Henk Verlinde - MIT License"
|
||||
version = "v0.1.0"
|
|
@ -0,0 +1,23 @@
|
|||
const autoprefixer = require('autoprefixer')
|
||||
const purgecss = require('@fullhuman/postcss-purgecss')
|
||||
const whitelister = require('purgecss-whitelister');
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
autoprefixer(),
|
||||
purgecss({
|
||||
content: [
|
||||
'./layouts/**/*.html',
|
||||
'./content/**/*.md',
|
||||
],
|
||||
whitelist: [
|
||||
'lazyloaded',
|
||||
...whitelister([
|
||||
'./assets/sass/common/_dark.scss',
|
||||
'./assets/sass/common/_syntax.scss',
|
||||
'./assets/sass/components/_code.scss',
|
||||
]),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
baseurl = "https://hyas.netlify.com/"
|
||||
canonifyURLs = false
|
|
@ -0,0 +1,2 @@
|
|||
baseurl = "https://hyas-staging.netlify.com/"
|
||||
canonifyURLs = false
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
title : "Doks"
|
||||
description: "Hugo boilerplate helping you build fast, flexible, and search ready websites."
|
||||
date: 2019-12-02T13:47:16+01:00
|
||||
draft: false
|
||||
images: ["image-hyas.jpg"]
|
||||
lead: "Hugo documentation theme build on Hyas."
|
||||
---
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-5">
|
||||
<h2 class="h4 mt-1">100/A+ scores</h5>
|
||||
<p>Get perfect Google Lighthouse and <a href="https://observatory.mozilla.org/" target="_blank" rel="noreferrer noopener">Mozilla Observatory</a> scores by default.</p>
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<h2 class="h4 mt-1">Algolia DocSearch</h5>
|
||||
<p>The best search experience for docs, by <a href="https://docsearch.algolia.com/" target="_blank" rel="noreferrer noopener">Algolia</a>, for free.</p>
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<h2 class="h4 mt-1">Dark/Light toggle</h5>
|
||||
<p>Enable dark mode at night or in dark environments.</p>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
title: "Authors"
|
||||
description: ""
|
||||
date: 2020-03-23T11:01:55+01:00
|
||||
draft: false
|
||||
images: [""]
|
||||
---
|
||||
|
||||
The Doks Blog authors
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: "Henk Verlinde"
|
||||
description: ""
|
||||
date: 2020-03-23T11:01:55+01:00
|
||||
draft: false
|
||||
images: [""]
|
||||
---
|
||||
|
||||
Creator of Doks.
|
||||
|
||||
[@HenkVerlinde](https://twitter.com/henkverlinde)
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Blog"
|
||||
description: ""
|
||||
date: 2019-12-02T13:47:16+01:00
|
||||
draft: false
|
||||
images: [""]
|
||||
---
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
title: "Say hello to Doks 👋"
|
||||
description: ""
|
||||
lead: "Doks is a Hugo documentation theme build on Hyas."
|
||||
date: 2020-03-14T10:12:13+02:00
|
||||
draft: false
|
||||
images: [""]
|
||||
authors: ["Henk Verlinde"]
|
||||
---
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title : "Docs"
|
||||
description: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
lead: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
date: 2019-12-02T13:47:16+01:00
|
||||
draft: false
|
||||
images: ["image-hyas.jpg"]
|
||||
---
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title : "Basic Hyas"
|
||||
description: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
lead: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
date: 2019-12-02T13:47:16+01:00
|
||||
draft: false
|
||||
images: ["image-hyas.jpg"]
|
||||
---
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
title: "Directory Structure"
|
||||
description: "The Hyas directory structure explained."
|
||||
lead: "The Hyas directory structure follows and extends the Hugo directory structure. So you can easily locate stuff."
|
||||
date: 2020-01-07T16:02:42+01:00
|
||||
draft: false
|
||||
images: ["image-hyas.jpg"]
|
||||
menu:
|
||||
docs:
|
||||
parent: "basic-hyas"
|
||||
weight: 110
|
||||
toc: true
|
||||
---
|
||||
|
||||
A basic Hyas project would be structured like this:
|
||||
|
||||
```shell
|
||||
my-hyas-site/
|
||||
├── archetypes/
|
||||
├── assets/
|
||||
├── config/
|
||||
│ ├── _default/
|
||||
│ ├── production/
|
||||
│ ├── staging/
|
||||
│ ├── postcss.config.js
|
||||
├── content/
|
||||
├── data/
|
||||
├── functions/
|
||||
├── layouts/
|
||||
│ ├── _default/
|
||||
│ ├── partials/
|
||||
│ ├── shortcodes/
|
||||
│ │── 404.html
|
||||
│ │── index.headers
|
||||
│ │── index.html
|
||||
│ │── index.redirects
|
||||
│ │── robots.txt
|
||||
│ │── sitemap.xml
|
||||
├── node_modules/
|
||||
├── public/
|
||||
├── resources/
|
||||
├── static/
|
||||
├── .eslintrc.json
|
||||
├── .stylelintrc.json
|
||||
├── netlify.toml
|
||||
├── package.json
|
||||
└── yarn.lock
|
||||
```
|
||||
|
||||
## The root directory
|
||||
Lorem ipsum dolor sit amet, consectetur __adipiscing__ elit. Donec rhoncus commodo nisl, et volutpat sem maximus quis. Phasellus in consequat eros. Etiam in dui eu urna pharetra placerat in efficitur mi. Proin at dui non quam mollis consequat non vel mauris.
|
||||
|
||||
Phasellus sagittis nibh et nibh dictum lobortis. Proin nec ultrices tortor. Aliquam erat volutpat. Donec elementum erat non urna commodo hendrerit. Vestibulum est felis, pellentesque sit amet nulla tristique, porttitor commodo libero.
|
||||
|
||||
Vestibulum iaculis velit ut turpis sodales, nec ullamcorper ex imperdiet. Nullam in facilisis sapien. Donec pretium sagittis tortor, id pretium sapien dignissim vitae. Donec finibus, tellus vel vestibulum malesuada, felis augue ultrices elit, et ornare velit lacus ut tortor.
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Layouts"
|
||||
description: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
lead: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
date: 2020-01-08T11:30:27+01:00
|
||||
draft: false
|
||||
images: ["image-hyas.jpg"]
|
||||
menu:
|
||||
docs:
|
||||
parent: "basic-hyas"
|
||||
weight: 130
|
||||
toc: false
|
||||
---
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
title: "Project Configuration"
|
||||
description: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
lead: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
date: 2020-01-07T16:20:26+01:00
|
||||
draft: false
|
||||
images: ["image-hyas.jpg"]
|
||||
menu:
|
||||
docs:
|
||||
parent: "basic-hyas"
|
||||
weight: 120
|
||||
toc: true
|
||||
---
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title : "Prologue"
|
||||
description: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
lead: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
date: 2019-12-02T13:47:16+01:00
|
||||
draft: false
|
||||
images: ["image-hyas.jpg"]
|
||||
---
|
|
@ -0,0 +1,67 @@
|
|||
---
|
||||
title: "Introduction"
|
||||
description: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
lead: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
date: 2020-01-07T16:23:23+01:00
|
||||
draft: false
|
||||
images: ["image-hyas.jpg"]
|
||||
menu:
|
||||
docs:
|
||||
parent: "prologue"
|
||||
weight: 010
|
||||
toc: true
|
||||
---
|
||||
|
||||
<div class="card bg-light border-0">
|
||||
<div class="card-body">
|
||||
👉 This is some text within a card body.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
## Why Hyas?
|
||||
- Bootstrap Sass (no JavaScript) and Autoprefixer
|
||||
- Check Sass and JavaScript for errors
|
||||
- Environment specific configuration
|
||||
- Image shortcode with [lazysizes](https://github.com/aFarkas/lazysizes) and [blur up](https://github.com/aFarkas/lazysizes/tree/master/plugins/blur-up) plugin
|
||||
- Fingerprinting and [SRI](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) (production)
|
||||
- Remove unused CSS (production)
|
||||
|
||||
## Prerequisites
|
||||
Make sure all dependencies have been installed:
|
||||
|
||||
- Hugo >= 0.62.2/extended
|
||||
- Node.js >= 10.16.0
|
||||
- npm >= 6.9.0
|
||||
- Yarn >= 1.21.1 (recommended)
|
||||
|
||||
## Internal links
|
||||
|
||||
[Check out the directory structure]({{< ref "docs/basic-hyas/directory-structure.md" >}}).
|
||||
|
||||
## How to install
|
||||
Create a new Hyas project:
|
||||
|
||||
```bash
|
||||
git clone git@github.com:h-enk/hyas.git my-hyas-site
|
||||
```
|
||||
|
||||
Install dependencies:
|
||||
|
||||
```bash
|
||||
yarn install
|
||||
```
|
||||
|
||||
Build development theme with live reloading and injection:
|
||||
|
||||
```bash
|
||||
yarn start
|
||||
```
|
||||
|
||||
### Other commands
|
||||
- `yarn lint:styles` - Check Sass for errors
|
||||
- `yarn lint:scripts` - Check JavaScript for errors
|
||||
- `yarn clean` - Delete temporary directories
|
||||
- `yarn build` - Build production theme
|
||||
|
||||
## Alternatives
|
||||
- [Atlas](https://github.com/indigotree/atlas).
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title: "Styles and Assets"
|
||||
description: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
lead: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
date: 2020-04-02T17:00:04+02:00
|
||||
draft: false
|
||||
images: ["image-hyas.jpg"]
|
||||
---
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Use CSS in Hyas"
|
||||
description: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
lead: "Hugo boilerplate helping you build fast, robust, and flexible websites."
|
||||
date: 2020-04-02T17:02:38+02:00
|
||||
draft: false
|
||||
images: ["image-hyas.jpg"]
|
||||
menu:
|
||||
docs:
|
||||
parent: "styles-and-assets"
|
||||
weight: 210
|
||||
toc: false
|
||||
---
|
||||
Global stylesheets and assets are usually located in the `src/assets` folder and imported into `src/main.js`.
|
|
@ -0,0 +1,10 @@
|
|||
{{ define "main" }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-8">
|
||||
<article>
|
||||
<h1 class="text-center">Page not found</h1>
|
||||
<p class="text-center">The page you requested could not be found.</p>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1 @@
|
|||
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noreferrer noopener"{{ end }}>{{ .Text | safeHTML }}</a>
|
|
@ -0,0 +1,27 @@
|
|||
<!doctype html>
|
||||
<html lang="{{ .Site.LanguageCode | default "en" }}">
|
||||
{{ block "head" . }}{{ partial "head/head.html" . }}{{ end }}
|
||||
{{ if eq .Kind "home" -}}
|
||||
{{ .Scratch.Set "class" "home" -}}
|
||||
{{ else if eq .Kind "404" -}}
|
||||
{{ .Scratch.Set "class" "error404" -}}
|
||||
{{ else if eq .Kind "page" -}}
|
||||
{{ .Scratch.Set "class" .Type -}}
|
||||
{{ .Scratch.Add "class" " single" -}}
|
||||
{{ else -}}
|
||||
{{ .Scratch.Set "class" .Type -}}
|
||||
{{ .Scratch.Add "class" " list" -}}
|
||||
{{ end -}}
|
||||
<body class="{{ .Scratch.Get "class" }}">
|
||||
{{ block "header" . }}{{ partial "header/header.html" . }}{{ end }}
|
||||
<div class="wrap container" role="document">
|
||||
<div class="content">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ if ne .Section "docs" }}
|
||||
{{ block "footer" . }}{{ partial "footer/footer.html" . }}{{ end }}
|
||||
{{ end }}
|
||||
{{ block "script-footer" . }}{{ partial "footer/script-footer.html" . }}{{ end }}
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
{{ define "main" }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-8">
|
||||
{{ range .Paginator.Pages }}
|
||||
<article>
|
||||
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
{{ .Description }}
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,10 @@
|
|||
{{ define "main" }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-8">
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,23 @@
|
|||
{{ define "main" }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-8">
|
||||
<article>
|
||||
<h1 class="text-center">{{ .Title }}</h1>
|
||||
<div class="text-center">{{ .Content }}</div>
|
||||
<div class="card-list">
|
||||
{{ range .Data.Pages -}}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h2 class="h3"><a class="stretched-link" href="{{ .Permalink }}">{{ .Params.title }}</a></h2>
|
||||
{{ if eq .Section "blog" -}}
|
||||
<p>{{ .Params.lead }}</p>
|
||||
{{ partial "main/blog-meta.html" . -}}
|
||||
{{ end -}}
|
||||
</div>
|
||||
</div>
|
||||
{{ end -}}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,21 @@
|
|||
{{ define "main" }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-8">
|
||||
<article>
|
||||
<h1 class="text-center">{{ .Title }}</h1>
|
||||
<div class="text-center">{{ .Content }}</div>
|
||||
<div class="card-list">
|
||||
{{ range .Data.Pages -}}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h2 class="h3"><a class="stretched-link" href="{{ .Permalink }}">{{ .Params.title }}</a></h2>
|
||||
<p>{{ .Params.lead }}</p>
|
||||
{{ partial "main/blog-meta.html" . -}}
|
||||
</div>
|
||||
</div>
|
||||
{{ end -}}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,14 @@
|
|||
{{ define "main" }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-8">
|
||||
<article>
|
||||
<div class="blog-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ partial "main/blog-meta.html" . }}
|
||||
</div>
|
||||
<p class="lead">{{ .Params.lead }}</p>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,22 @@
|
|||
{{ define "main" }}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12 col-lg-10 col-xl-8">
|
||||
<article>
|
||||
<h1 class="text-center">{{ .Title }}</h1>
|
||||
<div class="text-center">{{ .Content }}</div>
|
||||
<div class="card-list">
|
||||
{{ $currentSection := .CurrentSection }}
|
||||
{{ range where .Site.RegularPages.ByTitle "Section" .Section }}
|
||||
{{ if in (.Permalink | string) $currentSection.RelPermalink }}
|
||||
<div class="card my-3">
|
||||
<div class="card-body">
|
||||
<a class="stretched-link" href="{{ .Permalink }}">{{ .Params.title | title }} →</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,18 @@
|
|||
{{ define "main" }}
|
||||
<div class="row flex-xl-nowrap">
|
||||
<div class="col-lg-5 col-xl-4 docs-sidebar">
|
||||
<nav class="docs-links" aria-label="Main navigation">
|
||||
{{ partial "sidebar/docs-menu.html" . }}
|
||||
</nav>
|
||||
</div>
|
||||
<nav class="docs-toc d-none d-xl-block col-xl-3" aria-label="Secondary navigation">
|
||||
{{ partial "sidebar/docs-toc.html" . }}
|
||||
</nav>
|
||||
<main class="docs-content col-lg-11 col-xl-9" role="main">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<p class="lead">{{ .Params.lead | safeHTML }}</p>
|
||||
{{ partial "main/headline-hash.html" .Content }}
|
||||
{{ partial "main/docs-navigation.html" . }}
|
||||
</main>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
|
||||
X-Content-Type-Options: nosniff
|
||||
X-XSS-Protection: 1; mode=block
|
||||
Content-Security-Policy: default-src 'self'; img-src 'self' data:; object-src 'none'
|
||||
X-Frame-Options: SAMEORIGIN
|
||||
Referrer-Policy: strict-origin
|
||||
Feature-Policy: geolocation 'self'
|
||||
Cache-Control: public, max-age=31536000
|
|
@ -0,0 +1,15 @@
|
|||
{{ define "main" }}
|
||||
<section class="section container-fluid">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-11 text-center">
|
||||
<h1 class="mt-0">{{ .Title }}</h1>
|
||||
<p class="lead">{{ .Params.Lead | safeHTML }}</p>
|
||||
<a class="btn btn-primary btn-lg px-4 mb-2" href="{{ .Site.BaseURL }}docs/prologue/introduction/" role="button">Get started</a>
|
||||
<p><a class="text-muted" href="https://github.com/h-enk" target="_blank" rel="noreferrer noopener"><small>{{ .Site.Params.version }}</small></a></p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section container-fluid border-top">
|
||||
{{- .Content -}}
|
||||
</section>
|
||||
{{ end }}
|
|
@ -0,0 +1,6 @@
|
|||
# redirects for Netlify - https://www.netlify.com/docs/redirects/
|
||||
{{- range $p := .Site.Pages -}}
|
||||
{{- range .Aliases }}
|
||||
{{ . }} {{ $p.RelPermalink -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
|
@ -0,0 +1,9 @@
|
|||
<footer class="footer text-muted">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-16 text-center">
|
||||
<p>{{ .Site.Params.footer | safeHTML }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
|
@ -0,0 +1,13 @@
|
|||
{{ $lazysizes := resources.Get "js/vendor/lazysizes/lazysizes.min.js" -}}
|
||||
{{ if eq (hugo.Environment) "development" -}}
|
||||
{{ $alpinejs := resources.Get "js/vendor/alpinejs/alpine.js" -}}
|
||||
{{ $app := resources.Get "js/app.js" -}}
|
||||
{{ $js := slice $alpinejs $lazysizes $app | resources.Concat "main.js" -}}
|
||||
<script src="{{ $js.Permalink }}" defer></script>
|
||||
{{ else -}}
|
||||
{{ $alpinejs := resources.Get "js/vendor/alpinejs/alpine.js" | minify -}}
|
||||
{{ $app := resources.Get "js/app.js" | minify -}}
|
||||
{{ $js := slice $alpinejs $lazysizes $app | resources.Concat "main.js" -}}
|
||||
{{ $secureJS := $js | resources.Fingerprint "sha512" -}}
|
||||
<script src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}" crossorigin="anonymous" defer></script>
|
||||
{{ end -}}
|
|
@ -0,0 +1,5 @@
|
|||
<meta name="theme-color" content="{{ $.Site.Params.themeColor }}">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | absLangURL }}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | absLangURL }}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | absLangURL }}">
|
||||
<link rel="manifest" href="{{ "site.webmanifest" | absLangURL }}">
|
|
@ -0,0 +1,10 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
{{ block "head/resource-hints" . }}{{ partial "head/resource-hints.html" . }}{{ end }}
|
||||
{{ block "head/stylesheet" . }}{{ partial "head/stylesheet.html" . }}{{ end }}
|
||||
{{ block "head/seo" . }}{{ partial "head/seo.html" . }}{{ end }}
|
||||
{{ block "head/favicons" . }}{{ partial "head/favicons.html" . }}{{ end }}
|
||||
{{ block "head/script-header" . }}{{ partial "head/script-header.html" . }}{{ end }}
|
||||
</head>
|
|
@ -0,0 +1,6 @@
|
|||
<!--
|
||||
<link rel="preload" as="font" href="{{ .Site.BaseURL }}fonts/vendor/jost/Jost-400-Book.otf" type="font/otf" crossorigin>
|
||||
<link rel="preload" as="font" href="{{ .Site.BaseURL }}fonts/vendor/jost/Jost-400-BookItalic.otf" type="font/otf" crossorigin>
|
||||
<link rel="preload" as="font" href="{{ .Site.BaseURL }}fonts/vendor/jost/Jost-500-Medium.otf" type="font/otf" crossorigin>
|
||||
<link rel="preload" as="font" href="{{ .Site.BaseURL }}fonts/vendor/jost/Jost-500-MediumItalic.otf" type="font/otf" crossorigin>
|
||||
-->
|
|
@ -0,0 +1,11 @@
|
|||
{{ if isset .Site.Params "googleanalytics" -}}
|
||||
<script>
|
||||
(function(e,t,n,i,s,a,c){e[n]=e[n]||function(){(e[n].q=e[n].q||[]).push(arguments)}
|
||||
;a=t.createElement(i);c=t.getElementsByTagName(i)[0];a.async=true;a.src=s
|
||||
;c.parentNode.insertBefore(a,c)
|
||||
})(window,document,"galite","script","{{ .Site.BaseURL }}js/vendor/ga-lite/ga-lite.min.js");
|
||||
|
||||
galite('create', '{{ $.Site.Params.googleAnalytics }}', 'auto');
|
||||
galite('send', 'pageview');
|
||||
</script>
|
||||
{{ end -}}
|
|
@ -0,0 +1,40 @@
|
|||
{{ if and (eq .Kind "section" "taxonomy" "taxonomyTerm") (ne .Section "blog" ) -}}
|
||||
<meta name="robots" content="noindex, noarchive">
|
||||
{{ else -}}
|
||||
{{ with .Params.robots -}}
|
||||
<meta name="robots" content="{{ . }}">
|
||||
{{ else -}}
|
||||
<meta name="robots" content="index, follow">
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if .IsHome -}}
|
||||
<title>{{ .Site.Params.title }} {{ .Site.Params.titleSeparator }} {{ .Site.Params.titleAddition }}</title>
|
||||
{{ else -}}
|
||||
<title>{{ .Title }} {{ .Site.Params.titleSeparator }} {{ .Site.Params.title }}</title>
|
||||
{{ end -}}
|
||||
|
||||
{{ with .Description -}}
|
||||
<meta name="description" content="{{ . }}">
|
||||
{{ else -}}
|
||||
<meta name="description" content="{{ .Site.Params.description }}">
|
||||
{{ end -}}
|
||||
|
||||
{{ with .Params.canonical -}}
|
||||
<link rel="canonical" href="{{ . }}">
|
||||
{{ else -}}
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
{{ end -}}
|
||||
|
||||
{{ template "_internal/twitter_cards.html" . -}}
|
||||
<meta name="twitter:site" content="{{ .Site.Params.twitterSite }}">
|
||||
<meta name="twitter:creator" content="{{ .Site.Params.twitterCreator }}">
|
||||
|
||||
{{ template "_internal/opengraph.html" . -}}
|
||||
<meta property="og:locale" content="{{ .Site.Params.ogLocale }}">
|
||||
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
||||
{{ end -}}
|
||||
|
||||
{{ block "head/structured-data" . }}{{ partial "head/structured-data.html" . }}{{ end }}
|
|
@ -0,0 +1,105 @@
|
|||
{{ if .IsHome -}}
|
||||
{{ if eq .Site.Params.schemaType "Organization" -}}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Organization",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
"name": "{{ .Site.Params.title }}",
|
||||
"logo": "{{ .Site.BaseURL }}{{ .Site.Params.schemaLogo }}",
|
||||
"sameAs": [
|
||||
"{{ .Site.Params.schemaTwitter | safeURL }}",
|
||||
"{{ .Site.Params.schemaLinkedIn | safeURL }}"
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{{ end -}}
|
||||
{{ if eq .Site.Params.schemaType "Person" -}}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Person",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
"name": "{{ .Site.Params.title }}",
|
||||
"sameAs": [
|
||||
"{{ .Site.Params.schemaTwitter | safeURL }}",
|
||||
"{{ .Site.Params.schemaLinkedIn | safeURL }}"
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{{ end -}}
|
||||
{{ if .Site.Params.siteLinksSearchBox -}}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebSite",
|
||||
"url": "{{ .Site.BaseURL }}",
|
||||
"potentialAction": {
|
||||
"@type": "SearchAction",
|
||||
"target": "{{ .Site.BaseURL }}?q={search_term_string}",
|
||||
"query-input": "required name=search_term_string"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
{{ if .IsPage -}}
|
||||
{{ if eq .Section .Site.Params.schemaSection -}}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Article",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "{{ .Permalink }}"
|
||||
},
|
||||
"headline": "{{ .Title }}",
|
||||
"image": {{ apply .Params.images "absURL" "." }},
|
||||
"datePublished": "{{ .PublishDate.Format "2006-01-02T15:04:05CET" }}",
|
||||
"dateModified": "{{ .Lastmod.Format "2006-01-02T15:04:05CET" }}",
|
||||
"author": {
|
||||
"@type": "{{ .Site.Params.schemaType }}",
|
||||
"name": "{{ .Site.Params.title }}"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "{{ .Site.Params.schemaType }}",
|
||||
"name": "{{ .Site.Params.title }}",
|
||||
{{ if eq .Site.Params.schemaType "Organization" -}}
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ .Site.BaseURL }}{{ .Site.Params.schemaLogo }}"
|
||||
}
|
||||
{{ end -}}
|
||||
},
|
||||
"description": "{{ .Description }}"
|
||||
}
|
||||
</script>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" -}}
|
||||
{{ $.Scratch.Add "path" .Site.BaseURL -}}
|
||||
|
||||
{{ $.Scratch.Add "breadcrumb" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) -}}
|
||||
{{ range $index, $element := split $url "/" -}}
|
||||
{{ $.Scratch.Add "path" $element -}}
|
||||
{{ $.Scratch.Add "path" "/" -}}
|
||||
{{ if ne $element "" -}}
|
||||
{{ $.Scratch.Add "breadcrumb" (slice (dict "url" ($.Scratch.Get "path") "name" . "position" (add $index 2))) -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [{{ range $.Scratch.Get "breadcrumb" }}{{ if ne .position 1 }},{{ end }}{
|
||||
"@type": "ListItem",
|
||||
"position": {{ .position }},
|
||||
"item": {
|
||||
"@id": "{{ .url }}",
|
||||
"name": "{{ .name }}"
|
||||
}
|
||||
}{{ end }}]
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,11 @@
|
|||
{{ if eq (hugo.Environment) "development" -}}
|
||||
{{ $options := (dict "targetPath" "main.css" "enableSourceMap" true "includePaths" (slice "node_modules")) -}}
|
||||
{{ $css := resources.Get "scss/app.scss" | toCSS $options -}}
|
||||
<link rel="stylesheet" href="{{ $css.Permalink }}">
|
||||
{{ else -}}
|
||||
{{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "includePaths" (slice "node_modules")) -}}
|
||||
{{ $css := resources.Get "scss/app.scss" | toCSS $options | postCSS (dict "config" "config/postcss.config.js") -}}
|
||||
{{ $secureCSS := $css | resources.Fingerprint "sha512" -}}
|
||||
<link rel="stylesheet" href="{{ $secureCSS.Permalink }}" integrity="{{ $secureCSS.Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end -}}
|
||||
<noscript><style>img.lazyload { display: none; }</style></noscript>
|
|
@ -0,0 +1,40 @@
|
|||
<!-- <div class="header-bar fixed-top"></div> -->
|
||||
<header x-data="{ open: false }" class="navbar fixed-top navbar-expand-md navbar-light">
|
||||
<div class="container">
|
||||
<a class="navbar-brand order-0 mr-auto" href="{{ .Site.BaseURL }}">{{ .Site.Params.Title }}</a>
|
||||
<button id="mode" class="btn btn-link order-1 order-md-4" type="button" aria-label="Toggle mode">
|
||||
<span class="toggle-dark"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg></span>
|
||||
<span class="toggle-light"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg></span>
|
||||
</button>
|
||||
<ul class="navbar-nav social-nav order-2 order-md-5">
|
||||
{{ range .Site.Menus.social -}}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ .URL | absLangURL }}" target="_blank" rel="noreferrer noopener">{{ .Pre | safeHTML }}<span class="ml-2 sr-only">{{ .Name | safeHTML }}</span></a>
|
||||
</li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
<button @click="open = true" id="navigation" class="btn btn-link order-3 d-md-none" type="button" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<svg x-bind:class="{ 'd-none': open }" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>
|
||||
<svg class="d-none" x-bind:class="{ 'd-block': open }" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
||||
</button>
|
||||
<div x-show="open" @click.away="open = false" x-bind:class="{ 'd-block': open }" class="navbar-collapse order-4 order-md-1">
|
||||
<ul class="navbar-nav main-nav mr-auto order-5 order-md-2">
|
||||
{{- $current := . -}}
|
||||
{{ range .Site.Menus.main -}}
|
||||
{{- $active := or ($current.IsMenuCurrent "main" .) ($current.HasMenuCurrent "main" .) -}}
|
||||
{{- $active = or $active (eq .Name $current.Title) -}}
|
||||
{{- $active = or $active (and (eq .Name "Docs") (eq $current.Section "docs")) -}}
|
||||
{{- $active = or $active (and (eq .Name "Guides") (eq $current.Section "guides")) -}}
|
||||
{{- $active = or $active (and (eq .Name "Blog") (eq $current.Section "blog" "authors")) -}}
|
||||
<li class="nav-item{{ if $active }} active{{ end }}">
|
||||
<a class="nav-link" href="{{ .URL | absLangURL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
<div class="break order-6 d-md-none"></div>
|
||||
<form class="navbar-form flex-grow-1 order-7 order-md-3">
|
||||
<input class="form-control is-search" type="search" placeholder="Search {{ .Site.Params.Title }} docs..." aria-label="Search {{ .Site.Params.Title }} docs...">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
|
@ -0,0 +1 @@
|
|||
<p><small>Posted {{ .Lastmod.Format "January 2, 2006" }} by {{ if .Params.authors -}}{{ range $index, $author := .Params.authors }}{{ if gt $index 0 }} and {{ end }}<a class="stretched-link position-relative" href="{{ "/authors/" | absURL }}{{ . | urlize }}/">{{ . }}</a>{{ end -}}{{ end -}} ‐ <strong>{{ .ReadingTime -}} min read</strong></small><p>
|
|
@ -0,0 +1,24 @@
|
|||
{{ if or .Prev .Next -}}
|
||||
<div class="docs-navigation d-flex justify-content-between">
|
||||
<!-- https://www.feliciano.tech/blog/custom-sort-hugo-single-pages/ -->
|
||||
{{ $pages := where site.RegularPages "Section" .Section -}}
|
||||
{{ with $pages.Next . -}}
|
||||
<a href="{{ .Permalink }}">
|
||||
<div class="card my-3">
|
||||
<div class="card-body py-2">
|
||||
← {{ .Title }}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{ end -}}
|
||||
{{ with $pages.Prev . -}}
|
||||
<a class="ml-auto" href="{{ .Permalink }}">
|
||||
<div class="card my-3">
|
||||
<div class="card-body py-2">
|
||||
{{ .Title }} →
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ end -}}
|
|
@ -0,0 +1 @@
|
|||
{{ . | replaceRE "(<h[2-9] id=\"([^\"]+)\".+)(</h[2-9]+>)" `${1}<a href="#${2}" class="anchor">#</a> ${3}` | safeHTML }}
|
|
@ -0,0 +1,13 @@
|
|||
{{ $currentPage := . -}}
|
||||
{{ range .Site.Menus.docs -}}
|
||||
<h3>{{ .Name }}</h3>
|
||||
{{ if .HasChildren -}}
|
||||
<ul class="list-unstyled">
|
||||
{{ range .Children -}}
|
||||
{{- $active := or ($currentPage.IsMenuCurrent "docs" .) ($currentPage.HasMenuCurrent "docs" .) -}}
|
||||
{{- $active = or $active (eq .Name $currentPage.Title) -}}
|
||||
<li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end -}}
|
||||
</ul>
|
||||
{{ end -}}
|
||||
{{ end -}}
|
|
@ -0,0 +1,6 @@
|
|||
{{ if ne .Params.toc false -}}
|
||||
<div class="page-links">
|
||||
<h3>On this page</h3>
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end -}}
|
|
@ -0,0 +1,7 @@
|
|||
User-agent: *
|
||||
{{ if eq (hugo.Environment) "production" -}}
|
||||
Allow: /
|
||||
{{ else -}}
|
||||
Disallow: /
|
||||
{{ end }}
|
||||
Sitemap: {{ "sitemap.xml" | absLangURL -}}
|
|
@ -0,0 +1,27 @@
|
|||
{{ 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>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{ end }}
|
||||
{{ range .Pages }}{{ if ne .Params.feed_exclude true }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Summary | html }}</description>
|
||||
</item>
|
||||
{{ end }}{{ end }}
|
||||
</channel>
|
||||
</rss>
|
|
@ -0,0 +1,23 @@
|
|||
{{ $image := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) -}}
|
||||
{{ $lqip := $image.Resize $.Site.Params.lqipWidth -}}
|
||||
|
||||
{{ $imgSrc := "" -}}
|
||||
{{ $imgSrcSet := slice -}}
|
||||
|
||||
{{ $widths := $.Site.Params.landscapePhotoWidths -}}
|
||||
{{ if gt $image.Height $image.Width -}}
|
||||
{{ $widths = $.Site.Params.portraitPhotoWidths -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ range $widths -}}
|
||||
{{ $srcUrl := (printf "%dx" . | $image.Resize).Permalink -}}
|
||||
{{ if eq $imgSrc "" -}}{{ $imgSrc = $srcUrl -}}{{ end -}}
|
||||
{{ $imgSrcSet = $imgSrcSet | append (printf "%s %dw" $srcUrl .) -}}
|
||||
{{ end -}}
|
||||
{{ $imgSrcSet = (delimit $imgSrcSet ",") -}}
|
||||
|
||||
<figure{{ with .Get "class" }} class="{{.}}"{{ end }}>
|
||||
<img class="figure-img img-fluid lazyload blur-up" data-sizes="auto" src="{{ $lqip.Permalink }}" data-srcset="{{ $imgSrcSet }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}>
|
||||
<noscript><img class="figure-img img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" {{ with .Get "alt" }}alt="{{.}}"{{ end }}></noscript>
|
||||
{{ with .Get "caption" }}<figcaption class="figure-caption">{{ . | safeHTML }}</figcaption>{{ end }}
|
||||
</figure>
|
|
@ -0,0 +1,22 @@
|
|||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{ range .Data.Pages }}{{ if ne .Params.sitemap_exclude true }}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
</url>
|
||||
{{ end }}{{ end }}
|
||||
</urlset>
|
|
@ -0,0 +1,16 @@
|
|||
[build]
|
||||
publish = "public/"
|
||||
command = "yarn build"
|
||||
functions = "functions/"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.69.0"
|
||||
NODE_VERSION = "13.11.0"
|
||||
NPM_VERSION = "6.13.7"
|
||||
YARN_VERSION = "1.22.4"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "yarn build:preview"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "yarn build"
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"name": "hyas",
|
||||
"version": "1.2.1",
|
||||
"private": true,
|
||||
"browserslist": [
|
||||
"defaults"
|
||||
],
|
||||
"scripts": {
|
||||
"start": "hugo server",
|
||||
"build": "hugo --minify && npm run build:functions",
|
||||
"build:functions": "netlify-lambda build assets/lambda",
|
||||
"build:preview": "npm run build -D -F",
|
||||
"server": "hugo server",
|
||||
"clean": "rimraf public resources functions",
|
||||
"lint": "npm run -s lint:scripts && npm run -s lint:styles",
|
||||
"lint:scripts": "eslint assets/js assets/lambda config",
|
||||
"lint:styles": "stylelint \"assets/scss/**/*.{css,sass,scss,sss,less}\"",
|
||||
"test": "npm run -s lint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fullhuman/postcss-purgecss": "^1.3",
|
||||
"autoprefixer": "^9.7",
|
||||
"eslint": "^6.8",
|
||||
"ga-lite": "^2.0.5",
|
||||
"netlify-lambda": "^1.6",
|
||||
"postcss-cli": "^7.1",
|
||||
"purgecss-whitelister": "^2.4",
|
||||
"rimraf": "^3.0",
|
||||
"stylelint": "^13.2",
|
||||
"stylelint-config-standard": "^20.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"alpinejs": "^2.2.5",
|
||||
"bootstrap": "^4.4",
|
||||
"lazysizes": "^5.2"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 416 B |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue