Update theme

This commit is contained in:
Bjørn Erik Pedersen 2021-03-01 13:50:10 +01:00
parent bb15e9804a
commit 8af3b236c0
No known key found for this signature in database
GPG Key ID: 330E6E2BD4859D8F
12 changed files with 88 additions and 42 deletions

View File

@ -1,9 +1,3 @@
[[banners]]
name = "Forestry.io"
link = "https://forestry.io/"
logo = "/images/sponsors/forestry-logotype.svg"
copy = ""
[[banners]] [[banners]]
name = "Linode" name = "Linode"
link = "https://www.linode.com/" link = "https://www.linode.com/"
@ -14,4 +8,12 @@ copy = ""
name = "eSolia" name = "eSolia"
link = "https://esolia.com/post/why-did-esolia-choose-hugo/" link = "https://esolia.com/post/why-did-esolia-choose-hugo/"
logo = "/images/sponsors/esolia-logo.svg" logo = "/images/sponsors/esolia-logo.svg"
copy = ""
[[banners]]
name = "Brave"
link = "https://brave.com/"
logo = "/images/sponsors/brave-logo.svg"
bgcolor = "#5A2FA1"
copy = "" copy = ""

View File

@ -39,6 +39,8 @@
{{ $.Scratch.Set "stylesheet" . }} {{ $.Scratch.Set "stylesheet" . }}
{{end}} {{end}}
<meta name="description"
content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
{{ block "scripts" . }} {{ block "scripts" . }}
{{- partial "site-scripts.html" . -}} {{- partial "site-scripts.html" . -}}
@ -53,9 +55,6 @@
{{ partial "gtag" . }} {{ partial "gtag" . }}
{{ end }} {{ end }}
</head> </head>
<body class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}"> <body class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}">
@ -69,4 +68,4 @@
</body> </body>
</html> </html>

View File

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

View File

@ -6,7 +6,7 @@
gtag('js', new Date()); gtag('js', new Date());
{{ $site := $.Site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+).*" "$2" }} {{ $site := $.Site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+).*" "$2" }}
gtag('config', '{{ . }}', {'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'}); gtag('config', '{{ . }}', {'anonymize_ip': true, 'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'});
/** /**
* Function that tracks a click on an outbound link in Analytics. * Function that tracks a click on an outbound link in Analytics.

View File

@ -14,7 +14,7 @@
<div class="h4"> <div class="h4">
<img src="/images/gopher-hero.svg" alt="Hugo Gopher" class="h4"> <img src="/images/gopher-hero.svg" alt="Hugo Gopher" class="h4">
</div> </div>
<p class="f6 mid-gray m0 p0 pt3">Mac OS</p> <p class="f6 mid-gray m0 p0 pt3">macOS</p>
<div class="code f6 bg-black light-green lh-copy pv3 ph3 br2 w-100 w-50-ns center mb2 tl"> <div class="code f6 bg-black light-green lh-copy pv3 ph3 br2 w-100 w-50-ns center mb2 tl">
$ brew install hugo <br /> $ brew install hugo <br />
</div> </div>
@ -35,5 +35,4 @@
<!-- TODO: Animate the gopher https://github.com/rdwatters/hugo-docs-concept/issues/3#issuecomment-287194777 --> <!-- TODO: Animate the gopher https://github.com/rdwatters/hugo-docs-concept/issues/3#issuecomment-287194777 -->
</div> </div>

View File

@ -1,4 +1,4 @@
{{$classes_box := "ba b--light-gray bg-light-gray br3 flex flex-column flex-wrap items-center justify-center ph3 pv4 mb4 w-100 w-30-l "}} {{$classes_box := "ba b--dark-gray bg-light-gray br3 flex flex-column flex-wrap items-center justify-center ph3 pv4 mb4 w-100 w-30-l "}}
{{$gtag := .gtag | default "unknown" }} {{$gtag := .gtag | default "unknown" }}
{{ with .cx.Site.Data.sponsors }} {{ with .cx.Site.Data.sponsors }}
<section class="{{ $.classes_section | default "bg-primary-color-dark b--dark-gray bb bt ph5 pv4 w-100"}}"> <section class="{{ $.classes_section | default "bg-primary-color-dark b--dark-gray bb bt ph5 pv4 w-100"}}">
@ -8,7 +8,7 @@
{{ range .banners }} {{ range .banners }}
{{ $banner := . }} {{ $banner := . }}
{{if .logo}} {{if .logo}}
<div class="{{$classes_box}} o-100"> <div class="{{$classes_box}} o-100"{{ with .bgcolor }} style="background-color: {{ . }};"{{ end}}>
{{with .link -}} {{with .link -}}
{{ $url := printf "%s?%s" . (querify "utm_source" "homepage" "utm_medium" "banner" "utm_campaign" "hugosponsor") | safeURL }} {{ $url := printf "%s?%s" . (querify "utm_source" "homepage" "utm_medium" "banner" "utm_campaign" "hugosponsor") | safeURL }}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq $.cx.Site.Params.env "production") }} {{ if eq (getenv "HUGO_ENV") "production" | or (eq $.cx.Site.Params.env "production") }}

View File

@ -17,7 +17,7 @@
{{/* pagination.html: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */}} {{/* pagination.html: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */}}
{{ template "_internal/pagination.html" . }} {{ template "_internal/pagination.html" . }}
</div> </div>
<div class="dib f3 mt4">The Showcase articles are copyright the content authors. Any open source license will be attached.</div> <div class="dib f3 mt4">The Showcase articles are copyrighted by their respective content authors. Any open source license will be attached.</div>
</div> </div>
{{ end }} {{ end }}

View File

@ -0,0 +1,43 @@
{
"name": "gohugo-default-styles",
"version": "1.1.0",
"description": "Default Theme for Hugo Sites",
"main": "index.js",
"homepage": "https://gohugo.io/",
"bugs": {
"url": "https://github.com/gohugoio/gohugoioTheme/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gohugoio/gohugoioTheme.git"
},
"author": "budparr",
"license": "MIT",
"scripts": {
"build": "NODE_ENV=production webpack",
"build-dev": "NODE_ENV=development webpack --progress --watch",
"start": "npm run build-dev"
},
"devDependencies": {
"clean-webpack-plugin": "^1.0.0",
"clipboard": "^2.0.4",
"css-loader": "^4.3.0",
"docsearch.js": "^2.6.1",
"file-loader": "^2.0.0",
"glob-all": "^3.1.0",
"highlight.js": "^9.13.1",
"lazysizes": "^5.2.1",
"mini-css-extract-plugin": "^0.4.4",
"postcss": "^7.0.32",
"postcss-cssnext": "^3.1.0",
"postcss-import": "^12.0.1",
"postcss-loader": "^3.0.0",
"purgecss-webpack-plugin": "^1.3.1",
"scrolldir": "^1.4.0",
"tachyons": "^4.7.0",
"typeface-muli": "0.0.54",
"webpack": "^4.44.1",
"webpack-command": "^0.4.2"
},
"dependencies": {}
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -1 +1 @@
# github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f # github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3

2
go.mod
View File

@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs
go 1.12 go 1.12
require github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f // indirect require github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3 // indirect

2
go.sum
View File

@ -23,3 +23,5 @@ github.com/gohugoio/gohugoioTheme v0.0.0-20200518165806-0095b7b902a7 h1:Sy0hlWyZ
github.com/gohugoio/gohugoioTheme v0.0.0-20200518165806-0095b7b902a7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs= github.com/gohugoio/gohugoioTheme v0.0.0-20200518165806-0095b7b902a7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f h1:BWJyycs4HD7tUbaU8RIGeMay84bIBWRVVLE3yajPas4= github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f h1:BWJyycs4HD7tUbaU8RIGeMay84bIBWRVVLE3yajPas4=
github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs= github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3 h1:ShqzOFeeg54FPSuS6q8HSeTVgj2xNZRe/YS0jNbi21g=
github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=