apply prettier formatting

This commit is contained in:
Robert Kaussow 2020-09-12 18:20:46 +02:00
parent 6ed8201cc5
commit 1a5d341913
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
10 changed files with 212 additions and 183 deletions

View File

@ -57,5 +57,3 @@ branches:
restrictions: restrictions:
users: [] users: []
teams: [] teams: []
...

View File

@ -2,6 +2,7 @@
.drone.yml .drone.yml
search*.js search*.js
_normalize.css _normalize.css
list.json.json
.lighthouseci/ .lighthouseci/
themes/ themes/
static/js/ static/js/

View File

@ -3,4 +3,3 @@ title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }} date: {{ .Date }}
draft: true draft: true
--- ---

View File

@ -17,9 +17,11 @@ To enable emoji globally, set `enableEmoji` to `true` in your site's [configurat
<!-- markdownlint-disable --> <!-- markdownlint-disable -->
<!-- spellchecker-disable --> <!-- spellchecker-disable -->
<span class="no-wrap">{{< emojify ":see_no_evil:" >}} <code>:see_no_evil:</code></span> <span class="no-wrap">{{< emojify ":see_no_evil:" >}} <code>:see_no_evil:</code></span>
<span class="no-wrap">{{< emojify ":hear_no_evil:" >}} <code>:hear_no_evil:</code></span> <span class="no-wrap">{{< emojify ":hear_no_evil:" >}} <code>:hear_no_evil:</code></span>
<span class="no-wrap">{{< emojify ":speak_no_evil:" >}} <code>:speak_no_evil:</code></span> <span class="no-wrap">{{< emojify ":speak_no_evil:" >}} <code>:speak_no_evil:</code></span>
<!-- spellchecker-enable --> <!-- spellchecker-enable -->
<!-- markdownlint-restore --> <!-- markdownlint-restore -->
@ -33,9 +35,11 @@ The above steps enable Unicode Standard emoji characters and sequences in Hugo,
**Example:** **Example:**
<!-- spellchecker-disable --> <!-- spellchecker-disable -->
<!-- prettier-ignore -->
{{< highlight html "linenos=table" >}} {{< highlight html "linenos=table" >}}
.emoji { .emoji {
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
} }
{{< /highlight >}} {{< /highlight >}}
<!-- spellchecker-enable --> <!-- spellchecker-enable -->

View File

@ -66,9 +66,9 @@ To prepare your new site environment just a few steps are required:
cd demosite cd demosite
``` ```
3. Install the Geekblog theme from a [release bundle](#option-1-download-pre-build-release) (recommended) or form [Git branch](#option-2-clone-the-github-repository). 3. Install the Geekblog theme from a [release bundle](#option-1-download-pre-build-release-bundle) (recommended) or form [Git branch](#option-2-clone-the-github-repository).
4. Create the minimal required Hugo configuration `config.toml`. For all configuration options see [here](/usage/configuration/). 4. Create the minimal required Hugo configuration `config.toml`. For all configuration options see [here](#configuration).
```Toml ```Toml
baseURL = "http://localhost" baseURL = "http://localhost"

View File

@ -17,6 +17,7 @@ The following HTML `<h1>`—`<h6>` elements represent six levels of section head
<!-- spellchecker-disable --> <!-- spellchecker-disable -->
<!-- markdownlint-disable --> <!-- markdownlint-disable -->
# H1 # H1
## H2 ## H2
@ -28,6 +29,7 @@ The following HTML `<h1>`—`<h6>` elements represent six levels of section head
##### H5 ##### H5
###### H6 ###### H6
<!-- markdownlint-restore --> <!-- markdownlint-restore -->
## Paragraph ## Paragraph
@ -35,6 +37,7 @@ The following HTML `<h1>`—`<h6>` elements represent six levels of section head
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
<!-- spellchecker-enable --> <!-- spellchecker-enable -->
## Blockquotes ## Blockquotes
@ -44,16 +47,20 @@ The blockquote element represents content that is quoted from another source, op
### Blockquote without attribution ### Blockquote without attribution
<!-- spellchecker-disable --> <!-- spellchecker-disable -->
> Tiam, ad mint andaepu dandae nostion secatur sequo quae. > Tiam, ad mint andaepu dandae nostion secatur sequo quae.
> **Note** that you can use _Markdown syntax_ within a blockquote. > **Note** that you can use _Markdown syntax_ within a blockquote.
<!-- spellchecker-enable --> <!-- spellchecker-enable -->
### Blockquote with attribution ### Blockquote with attribution
<!-- markdownlint-disable --> <!-- markdownlint-disable -->
> Don't communicate by sharing memory, share memory by communicating.<br> > Don't communicate by sharing memory, share memory by communicating.<br>
> — <cite>Rob Pike[^1]</cite> > — <cite>Rob Pike[^1]</cite>
> <!-- markdownlint-restore -->
<!-- markdownlint-restore -->
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015. [^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.
@ -93,6 +100,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
<!-- markdownlint-disable --> <!-- markdownlint-disable -->
<!-- spellchecker-disable --> <!-- spellchecker-disable -->
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
@ -103,6 +111,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
<p>Test</p> <p>Test</p>
</body> </body>
</html> </html>
<!-- spellchecker-enable --> <!-- spellchecker-enable -->
<!-- markdownlint-restore --> <!-- markdownlint-restore -->
@ -111,6 +120,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
<!-- markdownlint-disable --> <!-- markdownlint-disable -->
<!-- spellchecker-disable --> <!-- spellchecker-disable -->
{{< highlight html "linenos=table" >}} {{< highlight html "linenos=table" >}}
<!doctype html> <!doctype html>
@ -156,6 +166,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou
<!-- spellchecker-disable --> <!-- spellchecker-disable -->
<!-- markdownlint-disable --> <!-- markdownlint-disable -->
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format. <abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
H<sub>2</sub>O H<sub>2</sub>O
@ -165,5 +176,6 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session. Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.
Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures. Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
<!-- markdownlint-restore --> <!-- markdownlint-restore -->
<!-- spellchecker-enable --> <!-- spellchecker-enable -->

View File

@ -9,7 +9,7 @@ tags:
- Development - Development
resources: resources:
- name: testimage - name: testimage
src: 'images/testimage.jpg' src: "images/testimage.jpg"
title: This is a test image title: This is a test image
params: params:
credits: "[David Pennington](https://unsplash.com/@dtpennington) on [Unsplash](https://unsplash.com/s/photos/test)" credits: "[David Pennington](https://unsplash.com/@dtpennington) on [Unsplash](https://unsplash.com/s/photos/test)"

View File

@ -1,183 +1,191 @@
const gulp = require('gulp'); const gulp = require("gulp");
const rename = require('gulp-rename'); const rename = require("gulp-rename");
const sass = require('gulp-sass'); const sass = require("gulp-sass");
const cleanCSS = require('gulp-clean-css'); const cleanCSS = require("gulp-clean-css");
const autoprefixer = require('gulp-autoprefixer'); const autoprefixer = require("gulp-autoprefixer");
const iconfont = require('gulp-iconfont'); const iconfont = require("gulp-iconfont");
const realFavicon = require('gulp-real-favicon'); const realFavicon = require("gulp-real-favicon");
const path = require('path'); const path = require("path");
const fs = require('fs'); const fs = require("fs");
const svgSprite = require('gulp-svg-sprite'); const svgSprite = require("gulp-svg-sprite");
var CSSDEST = 'static/' var CSSDEST = "static/";
var FAVICON_DATA_FILE = 'tmp/faviconData.json'; var FAVICON_DATA_FILE = "tmp/faviconData.json";
var TIMESTAMP = Math.round(Date.now() / 1000); var TIMESTAMP = Math.round(Date.now() / 1000);
gulp.task('sass', function () { gulp.task("sass", function () {
return gulp.src('src/sass/main.scss') return gulp
.pipe(sass({ errLogToConsole: true })) .src("src/sass/main.scss")
.pipe(cleanCSS({ format: 'beautify' })) .pipe(sass({ errLogToConsole: true }))
.pipe(autoprefixer({ .pipe(cleanCSS({ format: "beautify" }))
cascade: false .pipe(
})) autoprefixer({
.pipe(gulp.dest(CSSDEST)) cascade: false,
.pipe(cleanCSS()) })
.pipe(rename({ extname: '.min.css' })) )
.pipe(gulp.dest(CSSDEST)) .pipe(gulp.dest(CSSDEST))
.pipe(cleanCSS())
.pipe(rename({ extname: ".min.css" }))
.pipe(gulp.dest(CSSDEST));
}); });
gulp.task('favicon-generate', function (done) { gulp.task("favicon-generate", function (done) {
realFavicon.generateFavicon({ realFavicon.generateFavicon(
masterPicture: 'src/favicon/favicon-master.svg', {
dest: 'static/favicon', masterPicture: "src/favicon/favicon-master.svg",
iconsPath: '/favicon', dest: "static/favicon",
design: { iconsPath: "/favicon",
ios: { design: {
pictureAspect: 'backgroundAndMargin', ios: {
backgroundColor: '#2f333e', pictureAspect: "backgroundAndMargin",
margin: '14%', backgroundColor: "#2f333e",
assets: { margin: "14%",
ios6AndPriorIcons: false, assets: {
ios7AndLaterIcons: false, ios6AndPriorIcons: false,
precomposedIcons: false, ios7AndLaterIcons: false,
declareOnlyDefaultIcon: true precomposedIcons: false,
} declareOnlyDefaultIcon: true,
}, },
desktopBrowser: {},
windows: {
pictureAspect: 'whiteSilhouette',
backgroundColor: '#2f333e',
onConflict: 'override',
assets: {
windows80Ie10Tile: false,
windows10Ie11EdgeTiles: {
small: false,
medium: true,
big: false,
rectangle: false
}
}
},
androidChrome: {
pictureAspect: 'shadow',
themeColor: '#2f333e',
manifest: {
display: 'standalone',
orientation: 'notSet',
onConflict: 'override',
declared: true
},
assets: {
legacyIcon: false,
lowResolutionIcons: false
}
},
safariPinnedTab: {
pictureAspect: 'silhouette',
themeColor: '#2f333e'
}
}, },
settings: { desktopBrowser: {},
scalingAlgorithm: 'Mitchell', windows: {
errorOnImageTooSmall: false, pictureAspect: "whiteSilhouette",
readmeFile: false, backgroundColor: "#2f333e",
htmlCodeFile: false, onConflict: "override",
usePathAsIs: false assets: {
}, windows80Ie10Tile: false,
markupFile: FAVICON_DATA_FILE windows10Ie11EdgeTiles: {
}, function () { small: false,
done(); medium: true,
}); big: false,
}); rectangle: false,
gulp.task('favicon-check-update', function (done) {
var currentVersion = JSON.parse(fs.readFileSync(FAVICON_DATA_FILE)).version;
realFavicon.checkForUpdates(currentVersion, function (err) {
if (err) {
throw err;
}
});
done();
});
gulp.task('svg-sprite', function () {
config = {
shape: {
dimension: {
maxWidth: 24,
maxHeight: 24,
attributes: false,
}, },
spacing: { },
padding: 5,
box: 'content'
},
dest: 'tmp/intermediate-svg',
}, },
svg: { androidChrome: {
xmlDeclaration: false, pictureAspect: "shadow",
rootAttributes: { themeColor: "#2f333e",
style: "position: absolute; width: 0; height: 0; overflow: hidden;" manifest: {
} display: "standalone",
orientation: "notSet",
onConflict: "override",
declared: true,
},
assets: {
legacyIcon: false,
lowResolutionIcons: false,
},
}, },
mode: { safariPinnedTab: {
inline: true, pictureAspect: "silhouette",
symbol: { themeColor: "#2f333e",
dest: 'layouts/partials/', },
sprite: 'svg-icon-symbols.html', },
bust: false, settings: {
} scalingAlgorithm: "Mitchell",
} errorOnImageTooSmall: false,
}; readmeFile: false,
htmlCodeFile: false,
return gulp.src('src/icons/*.svg') usePathAsIs: false,
.pipe(svgSprite(config)) },
.pipe(gulp.dest('.')); markupFile: FAVICON_DATA_FILE,
},
function () {
done();
}
);
}); });
gulp.task('iconfont', function () { gulp.task("favicon-check-update", function (done) {
var lastUnicode = 0xEA01; var currentVersion = JSON.parse(fs.readFileSync(FAVICON_DATA_FILE)).version;
var files = fs.readdirSync('src/iconfont'); realFavicon.checkForUpdates(currentVersion, function (err) {
if (err) {
// Filter files with containing unicode value throw err;
// and set last unicode }
files.forEach(function (file) { });
var basename = path.basename(file); done();
var matches = basename.match(/^(?:((?:u[0-9a-f]{4,6},?)+)\-)?(.+)\.svg$/i);
var currentCode = -1;
if (matches && matches[1]) {
currentCode = parseInt(matches[1].split('u')[1], 16);
}
if (currentCode >= lastUnicode) {
lastUnicode = ++currentCode;
}
});
return gulp.src(['src/iconfont/*.svg'])
.pipe(iconfont({
startUnicode: lastUnicode,
fontName: 'GeekblogIcons', // required
prependUnicode: true, // recommended option
normalize: true,
fontHeight: 1001,
centerHorizontally: true,
formats: ['woff', 'woff2'], // default, 'woff2' and 'svg' are available
timestamp: TIMESTAMP, // recommended to get consistent builds when watching files
}))
.pipe(gulp.dest('static/fonts/'));
}); });
gulp.task('default', gulp.series( gulp.task("svg-sprite", function () {
'sass', config = {
'svg-sprite', shape: {
'iconfont', dimension: {
'favicon-generate' maxWidth: 24,
)); maxHeight: 24,
attributes: false,
},
spacing: {
padding: 5,
box: "content",
},
dest: "tmp/intermediate-svg",
},
svg: {
xmlDeclaration: false,
rootAttributes: {
style: "position: absolute; width: 0; height: 0; overflow: hidden;",
},
},
mode: {
inline: true,
symbol: {
dest: "layouts/partials/",
sprite: "svg-icon-symbols.html",
bust: false,
},
},
};
gulp.task('devel', function () { return gulp
gulp.watch('src/sass/**/*.*css', gulp.series('sass')); .src("src/icons/*.svg")
.pipe(svgSprite(config))
.pipe(gulp.dest("."));
});
gulp.task("iconfont", function () {
var lastUnicode = 0xea01;
var files = fs.readdirSync("src/iconfont");
// Filter files with containing unicode value
// and set last unicode
files.forEach(function (file) {
var basename = path.basename(file);
var matches = basename.match(/^(?:((?:u[0-9a-f]{4,6},?)+)\-)?(.+)\.svg$/i);
var currentCode = -1;
if (matches && matches[1]) {
currentCode = parseInt(matches[1].split("u")[1], 16);
}
if (currentCode >= lastUnicode) {
lastUnicode = ++currentCode;
}
});
return gulp
.src(["src/iconfont/*.svg"])
.pipe(
iconfont({
startUnicode: lastUnicode,
fontName: "GeekblogIcons", // required
prependUnicode: true, // recommended option
normalize: true,
fontHeight: 1001,
centerHorizontally: true,
formats: ["woff", "woff2"], // default, 'woff2' and 'svg' are available
timestamp: TIMESTAMP, // recommended to get consistent builds when watching files
})
)
.pipe(gulp.dest("static/fonts/"));
});
gulp.task(
"default",
gulp.series("sass", "svg-sprite", "iconfont", "favicon-generate")
);
gulp.task("devel", function () {
gulp.watch("src/sass/**/*.*css", gulp.series("sass"));
}); });

View File

@ -11,7 +11,7 @@ $font-size-14: 0.875rem !default;
$font-size-16: 1rem !default; $font-size-16: 1rem !default;
$font-size-32: 2rem !default; $font-size-32: 2rem !default;
$border-radius: 0.30rem !default; $border-radius: 0.3rem !default;
// Grayscale // Grayscale
$white: rgba(255, 255, 255, 1) !default; $white: rgba(255, 255, 255, 1) !default;
@ -28,7 +28,7 @@ $black: rgba(0, 0, 0, 1) !default;
$color-link: rgba(10, 83, 154, 1) !default; $color-link: rgba(10, 83, 154, 1) !default;
$color-link-visited: rgba(119, 73, 191, 1) !default; $color-link-visited: rgba(119, 73, 191, 1) !default;
$color-link-footer: rgba(255,163,30,1.0) !default; $color-link-footer: rgba(255, 163, 30, 1) !default;
$color-code: rgba($gray-200, 0.5) !default; $color-code: rgba($gray-200, 0.5) !default;
@ -51,5 +51,5 @@ $sm-breakpoint: 45rem !default;
$hint-colors: ( $hint-colors: (
info: rgba(102, 187, 255, 1), info: rgba(102, 187, 255, 1),
warning: rgba(255, 221, 102, 1), warning: rgba(255, 221, 102, 1),
danger: rgba(255, 102, 102, 1) danger: rgba(255, 102, 102, 1),
) !default; ) !default;

View File

@ -1,6 +1,7 @@
@font-face { @font-face {
font-family: "Liberation Sans"; font-family: "Liberation Sans";
src: url("fonts/LiberationSans-Bold.woff2") format("woff2"), url("fonts/LiberationSans-Bold.woff") format("woff"); src: url("fonts/LiberationSans-Bold.woff2") format("woff2"),
url("fonts/LiberationSans-Bold.woff") format("woff");
font-weight: bold; font-weight: bold;
font-style: normal; font-style: normal;
font-display: swap; font-display: swap;
@ -17,7 +18,8 @@
@font-face { @font-face {
font-family: "Liberation Sans"; font-family: "Liberation Sans";
src: url("fonts/LiberationSans-Italic.woff2") format("woff2"), url("fonts/LiberationSans-Italic.woff") format("woff"); src: url("fonts/LiberationSans-Italic.woff2") format("woff2"),
url("fonts/LiberationSans-Italic.woff") format("woff");
font-weight: normal; font-weight: normal;
font-style: italic; font-style: italic;
font-display: swap; font-display: swap;
@ -25,7 +27,8 @@
@font-face { @font-face {
font-family: "Liberation Sans"; font-family: "Liberation Sans";
src: url("fonts/LiberationSans.woff2") format("woff2"), url("fonts/LiberationSans.woff") format("woff"); src: url("fonts/LiberationSans.woff2") format("woff2"),
url("fonts/LiberationSans.woff") format("woff");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: swap; font-display: swap;
@ -33,7 +36,8 @@
@font-face { @font-face {
font-family: "Liberation Mono"; font-family: "Liberation Mono";
src: url("fonts/LiberationMono.woff2") format("woff2"), url("fonts/LiberationMono.woff") format("woff"); src: url("fonts/LiberationMono.woff2") format("woff2"),
url("fonts/LiberationMono.woff") format("woff");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: swap; font-display: swap;
@ -41,7 +45,8 @@
@font-face { @font-face {
font-family: "Droid Sans"; font-family: "Droid Sans";
src: url("fonts/DroidSans.woff2") format("woff2"), url("fonts/DroidSans.woff") format("woff"); src: url("fonts/DroidSans.woff2") format("woff2"),
url("fonts/DroidSans.woff") format("woff");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: swap; font-display: swap;
@ -49,7 +54,8 @@
@font-face { @font-face {
font-family: "Metropolis"; font-family: "Metropolis";
src: url("fonts/Metropolis.woff2") format("woff2"), url("fonts/Metropolis.woff") format("woff"); src: url("fonts/Metropolis.woff2") format("woff2"),
url("fonts/Metropolis.woff") format("woff");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: swap; font-display: swap;
@ -57,7 +63,8 @@
@font-face { @font-face {
font-family: "GeekblogIcons"; font-family: "GeekblogIcons";
src: url("fonts/GeekblogIcons.woff2") format("woff2"), url("fonts/GeekblogIcons.woff") format("woff"); src: url("fonts/GeekblogIcons.woff2") format("woff2"),
url("fonts/GeekblogIcons.woff") format("woff");
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: swap; font-display: swap;