refactor head partials

This commit is contained in:
Robert Kaussow 2020-07-22 23:41:46 +02:00
parent e182cbbe74
commit edc1307b1a
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
10 changed files with 38 additions and 29 deletions

View File

@ -1,6 +1,4 @@
- ENHANCEMENT - ENHANCEMENT
- allow setting some common meta elements e.g. description and authors - split head partials into smaller parts to allow simple overwrites for e.g. custom favicons
- prevent duplicate title on the start page - scale down page title on mobile media-query
- add basic robots.txt - add missing title to branding image
- BUGFIX
- dont display duplicate title on home page

View File

@ -36,7 +36,7 @@ gulp.task('favicon-generate', function (done) {
design: { design: {
ios: { ios: {
pictureAspect: 'backgroundAndMargin', pictureAspect: 'backgroundAndMargin',
backgroundColor: '#ffffff', backgroundColor: '#2f333e',
margin: '14%', margin: '14%',
assets: { assets: {
ios6AndPriorIcons: false, ios6AndPriorIcons: false,
@ -48,7 +48,7 @@ gulp.task('favicon-generate', function (done) {
desktopBrowser: {}, desktopBrowser: {},
windows: { windows: {
pictureAspect: 'whiteSilhouette', pictureAspect: 'whiteSilhouette',
backgroundColor: '#2b5797', backgroundColor: '#2f333e',
onConflict: 'override', onConflict: 'override',
assets: { assets: {
windows80Ie10Tile: false, windows80Ie10Tile: false,
@ -61,8 +61,10 @@ gulp.task('favicon-generate', function (done) {
} }
}, },
androidChrome: { androidChrome: {
pictureAspect: 'shadow', pictureAspect: 'backgroundAndMargin',
themeColor: '#ffffff', margine: '14px',
backgroundColor: '#2f333e',
themeColor: '#2f333e',
manifest: { manifest: {
display: 'standalone', display: 'standalone',
orientation: 'notSet', orientation: 'notSet',
@ -75,9 +77,8 @@ gulp.task('favicon-generate', function (done) {
} }
}, },
safariPinnedTab: { safariPinnedTab: {
pictureAspect: 'blackAndWhite', pictureAspect: 'silhouette',
threshold: 74.21875, themeColor: '#2f333e'
themeColor: '#5bbad5'
} }
}, },
settings: { settings: {

View File

@ -2,7 +2,11 @@
<html lang="{{ .Site.Language.Lang }}"> <html lang="{{ .Site.Language.Lang }}">
<head> <head>
{{ partial "head" . }} {{ partial "head/meta" . }}
<title>{{ if not (eq .Kind "home") }}{{ partial "title" . }} | {{ end }}{{ .Site.Title }}</title>
{{ partial "head/favicons" . }}
{{ partial "head/others" . }}
</head> </head>
<body> <body>

View File

@ -2,7 +2,11 @@
<html lang="{{ .Site.Language.Lang }}"> <html lang="{{ .Site.Language.Lang }}">
<head> <head>
{{ partial "head" . }} {{ partial "head/meta" . }}
<title>{{ if not (eq .Kind "home") }}{{ partial "title" . }} | {{ end }}{{ .Site.Title }}</title>
{{ partial "head/favicons" . }}
{{ partial "head/others" . }}
</head> </head>
<body> <body>

View File

@ -0,0 +1 @@
<link rel="icon" href="{{ "favicon/favicon-32x32.png" | relURL }}" type="image/x-icon">

View File

@ -20,16 +20,3 @@
<meta name="author" content="{{ delimit . "," }}"> <meta name="author" content="{{ delimit . "," }}">
{{ end }} {{ end }}
{{ end }} {{ end }}
<title>{{ if not (eq .Kind "home") }}{{ partial "title" . }} | {{ end }}{{ .Site.Title }}</title>
<link rel="icon" href="{{ "favicon/favicon-32x32.png" | relURL }}" type="image/x-icon">
<link rel="stylesheet" href="{{ "main.min.css" | relURL }}" media="screen">
<link rel="stylesheet" href="{{ "custom.css" | relURL }}" media="screen">
{{ with .OutputFormats.Get "atom" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end }}
{{ "<!--" | safeHTML }}
Made with Geekblog theme https://github.com/xoxys/hugo-geekblog
{{- "-->" | safeHTML }}

View File

@ -0,0 +1,10 @@
<link rel="stylesheet" href="{{ "main.min.css" | relURL }}" media="screen">
<link rel="stylesheet" href="{{ "custom.css" | relURL }}" media="screen">
{{ with .OutputFormats.Get "atom" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end }}
{{ "<!--" | safeHTML }}
Made with Geekblog theme https://github.com/xoxys/hugo-geekblog
{{- "-->" | safeHTML }}

View File

@ -2,7 +2,7 @@
<div class="container flex align-center justify-center"> <div class="container flex align-center justify-center">
<a class="gblog-header__link" href="{{ .Site.BaseURL }}"> <a class="gblog-header__link" href="{{ .Site.BaseURL }}">
<span class="gblog-brand flex align-center justify-center"> <span class="gblog-brand flex align-center justify-center">
<img class="gblog-brand__img" src="{{ (default "brand.svg" .Site.Params.GeekblogLogo) | relURL }}" alt="{{ .Site.Title }}" width=60 height=60> <img class="gblog-brand__img" title="Branding of {{ .Site.Title }}" src="{{ (default "brand.svg" .Site.Params.GeekblogLogo) | relURL }}" alt="{{ .Site.Title }}" width=60 height=60>
{{ .Site.Title }} {{ .Site.Title }}
</span> </span>
{{ with .Site.Params.GeekblogSubtitle }} {{ with .Site.Params.GeekblogSubtitle }}

View File

@ -1 +1 @@
{"result":{"status":"success"},"favicon":{"package_url":"https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/favicon_package_v0.16.zip","files_urls":["https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/android-chrome-192x192.png","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/android-chrome-512x512.png","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/apple-touch-icon.png","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/browserconfig.xml","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/favicon-16x16.png","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/favicon-32x32.png","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/favicon.ico","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/mstile-144x144.png","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/mstile-150x150.png","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/mstile-310x150.png","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/mstile-310x310.png","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/mstile-70x70.png","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/safari-pinned-tab.svg","https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/package_files/site.webmanifest"],"html_code":"<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/apple-touch-icon.png\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicon-32x32.png\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicon-16x16.png\">\n<link rel=\"manifest\" href=\"/site.webmanifest\">\n<link rel=\"mask-icon\" href=\"/safari-pinned-tab.svg\" color=\"#5bbad5\">\n<meta name=\"msapplication-TileColor\" content=\"#2b5797\">\n<meta name=\"msapplication-TileImage\" content=\"/mstile-144x144.png\">\n<meta name=\"theme-color\" content=\"#ffffff\">","compression":"false","overlapping_markups":["link[rel=\"apple-touch-icon\"]","link[rel=\"shortcut\"]","link[rel=\"shortcut icon\"]","link[rel=\"icon\",sizes=\"16x16\"]","link[rel=\"icon\",sizes=\"32x32\"]","meta[name=\"msapplication-TileColor\"]","meta[name=\"msapplication-TileImage\"]","link[rel=\"manifest\"]","meta[name=\"theme-color\"]","link[rel=\"mask-icon\"]"]},"files_location":{"type":"path","path":"/"},"preview_picture_url":"https://realfavicongenerator.net/files/932583a8226fc43ee3fda9a9340275d34ce6f5b5/favicon_preview.png","version":"0.16"} {"result":{"status":"success"},"favicon":{"package_url":"https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/favicon_package_v0.16.zip","files_urls":["https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/android-chrome-192x192.png","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/android-chrome-512x512.png","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/apple-touch-icon.png","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/browserconfig.xml","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/favicon-16x16.png","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/favicon-32x32.png","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/favicon.ico","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/mstile-144x144.png","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/mstile-150x150.png","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/mstile-310x150.png","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/mstile-310x310.png","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/mstile-70x70.png","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/safari-pinned-tab.svg","https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/package_files/site.webmanifest"],"html_code":"<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/apple-touch-icon.png\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicon-32x32.png\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicon-16x16.png\">\n<link rel=\"manifest\" href=\"/site.webmanifest\">\n<link rel=\"mask-icon\" href=\"/safari-pinned-tab.svg\" color=\"#2f333e\">\n<meta name=\"msapplication-TileColor\" content=\"#2f333e\">\n<meta name=\"msapplication-TileImage\" content=\"/mstile-144x144.png\">\n<meta name=\"theme-color\" content=\"#2f333e\">","compression":"false","overlapping_markups":["link[rel=\"apple-touch-icon\"]","link[rel=\"shortcut\"]","link[rel=\"shortcut icon\"]","link[rel=\"icon\",sizes=\"16x16\"]","link[rel=\"icon\",sizes=\"32x32\"]","meta[name=\"msapplication-TileColor\"]","meta[name=\"msapplication-TileImage\"]","link[rel=\"manifest\"]","meta[name=\"theme-color\"]","link[rel=\"mask-icon\"]"]},"files_location":{"type":"path","path":"/"},"preview_picture_url":"https://realfavicongenerator.net/files/a4f0eaa3aee2ec1ff38aa6a49585781a75bbd7f9/favicon_preview.png","version":"0.16"}

View File

@ -373,6 +373,10 @@ img {
} }
@media screen and (max-width: $sm-breakpoint) { @media screen and (max-width: $sm-breakpoint) {
.gblog-brand {
font-size: $font-size-32 * 1.1;
}
.gblog-nav { .gblog-nav {
.container { .container {
padding: 0; padding: 0;