mirror of
https://github.com/foo-dogsquared/hugo-theme-more-contentful.git
synced 2025-04-25 12:19:16 +00:00
Make a few tweaks to the theme
This commit is contained in:
parent
e81b882549
commit
9487442d64
@ -17,6 +17,17 @@ and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Version
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
== [Unreleased]
|
||||||
|
|
||||||
|
=== Fixed
|
||||||
|
|
||||||
|
* Make a few tweaks with CSS.
|
||||||
|
* Formatting of files.
|
||||||
|
* Relative files in the contact links are now linked with `absLangURL` which is useful for linking web feeds.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== [0.1.2] - 2020-11-04
|
== [0.1.2] - 2020-11-04
|
||||||
|
|
||||||
=== Fixed
|
=== Fixed
|
||||||
|
@ -143,7 +143,7 @@ paginate = 20
|
|||||||
|
|
||||||
[module]
|
[module]
|
||||||
[[module.imports]]
|
[[module.imports]]
|
||||||
path = "github.com/foo-dogsquared/hugo-theme-contentful"
|
path = "github.com/foo-dogsquared/hugo-theme-more-contentful"
|
||||||
[[module.imports]]
|
[[module.imports]]
|
||||||
path = "github.com/foo-dogsquared/hugo-web-feeds"
|
path = "github.com/foo-dogsquared/hugo-web-feeds"
|
||||||
|
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
/**
|
/**
|
||||||
* Dracula Theme originally by Zeno Rocha [@zenorocha]
|
* This is a CSS stylesheet template for Prism in case you use that.
|
||||||
* https://draculatheme.com/
|
* This is based from a Prism CSS port by Albert Vallverdu [@byverdu].
|
||||||
*
|
|
||||||
* Ported for PrismJS by Albert Vallverdu [@byverdu]
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
code[class*="language-"],
|
code[class*="language-"],
|
||||||
pre[class*="language-"] {
|
pre[class*="language-"] {
|
||||||
color: var(--base07);
|
color: var(--base05);
|
||||||
background: none;
|
background: none;
|
||||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
@ -59,7 +59,7 @@ a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dd, li, p, td {
|
dd, li, p, td {
|
||||||
line-height: 1.5;
|
line-height: 1.45;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
@ -1,10 +1,3 @@
|
|||||||
@for $i from 0 through 15 {
|
|
||||||
$hex: decToHex($i);
|
|
||||||
.base#{$hex} {
|
|
||||||
color: var(--base#{$hex});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-flow: row wrap;
|
flex-flow: row wrap;
|
||||||
|
@ -30,12 +30,6 @@
|
|||||||
@return str-slice($hex, $first, $first) + str-slice($hex, $second, $second)
|
@return str-slice($hex, $first, $first) + str-slice($hex, $second, $second)
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin content-separator {
|
|
||||||
content: " | ";
|
|
||||||
color: var(--base03);
|
|
||||||
margin: auto 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin header-link-hover-style {
|
@mixin header-link-hover-style {
|
||||||
> *:hover {
|
> *:hover {
|
||||||
color: var(--base0C);
|
color: var(--base0C);
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
[module]
|
[module]
|
||||||
|
[module.hugoVersion]
|
||||||
|
extended = true
|
||||||
|
min = "0.74.0"
|
||||||
|
|
||||||
[[module.imports]]
|
[[module.imports]]
|
||||||
path = "github.com/foo-dogsquared/hugo-theme-contentful"
|
path = "github.com/foo-dogsquared/hugo-theme-contentful"
|
||||||
[[module.imports]]
|
[[module.imports]]
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
Otherwise, we take the pages of a section. */ -}}
|
Otherwise, we take the pages of a section. */ -}}
|
||||||
{{- $pages := .Pages }}
|
{{- $pages := .Pages }}
|
||||||
{{- if .IsHome }}
|
{{- if .IsHome }}
|
||||||
{{- $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
|
{{- $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- range (where (.Paginate $pages).Pages "Params.hidden" "!=" true) }}
|
{{- range (where (.Paginate $pages).Pages "Params.hidden" "!=" true) }}
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
{{ $is_toc := cond (ne .Params.toc nil) .Params.toc $.Site.Params.toc }}
|
{{ $is_toc := cond (ne .Params.toc nil) .Params.toc $.Site.Params.toc }}
|
||||||
{{ if (and $is_toc (gt (countrunes .TableOfContents) 0)) }}
|
{{ if (and $is_toc (gt (countrunes .TableOfContents) 0)) }}
|
||||||
<style>
|
<style>
|
||||||
#TableOfContents:not(:empty)::before {
|
#TableOfContents:not(:empty)::before {
|
||||||
content: "{{ i18n "table_of_contents" }}";
|
content: "{{ i18n "table_of_contents" }}";
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{{ .TableOfContents }}
|
{{ .TableOfContents }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
@ -31,9 +31,9 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<!-- Only show the creation date if the `date` field is valid. -->
|
<!-- Only show the creation date if the `date` field is valid. -->
|
||||||
{{- if ne (.Date.Format "2006") "0001" -}}
|
{{- if ne (.PublishDate.Format "2006") "0001" -}}
|
||||||
<!-- Publication date. -->
|
<!-- Publication date. -->
|
||||||
<p data-content-publication-date="{{ .Date }}">{{ i18n "published_on" }}: <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time></p>
|
<p data-content-publication-date="{{ .Date }}">{{ i18n "published_on" }}: <time datetime="{{ .PublishDate.Format "2006-01-02" }}">{{ .PublishDate.Format "2006-01-02" }}</time></p>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<!-- Modification date (will only appear if the publication date is less than the modified date.) -->
|
<!-- Modification date (will only appear if the publication date is less than the modified date.) -->
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
<!-- Linking to other languages' homepage. -->
|
<!-- Linking to other languages' homepage. -->
|
||||||
{{ if $.Site.IsMultiLingual }}
|
{{ if $.Site.IsMultiLingual }}
|
||||||
<p>{{ i18n "multilingual" }}:
|
<p>{{ i18n "multilingual" }}:
|
||||||
<span class="list site__languages">
|
<span class="list site__languages">
|
||||||
{{ range $.Site.Languages }}
|
{{ range $.Site.Languages }}
|
||||||
<a href="{{ . | relURL }}" hreflang="{{ .Lang }}">{{ with .LanguageName }}{{ . }}{{ else }}{{ .Lang }}{{ end }}</a>
|
<a href="{{ . | relURL }}" hreflang="{{ .Lang }}">{{ with .LanguageName }}{{ . }}{{ else }}{{ .Lang }}{{ end }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
@ -24,7 +24,7 @@
|
|||||||
{{ $links = sort $links "weight" "asc" }}
|
{{ $links = sort $links "weight" "asc" }}
|
||||||
{{- range $links -}}
|
{{- range $links -}}
|
||||||
<li>
|
<li>
|
||||||
<a {{ if $useImage }}class="site__social-icon"{{ end }} rel="me" href="{{ .url }}" aria-label="{{ with .name }}{{ . }}{{ else }}{{ .id }}{{ end }}">
|
<a {{ if $useImage }}class="site__social-icon"{{ end }} rel="me" href="{{ .url | absLangURL }}" aria-label="{{ with .name }}{{ . }}{{ else }}{{ .id }}{{ end }}">
|
||||||
{{- if $useImage }}
|
{{- if $useImage }}
|
||||||
{{- partial "components/icon.html" (dict "id" .id "output" "icons/brand/%s.svg" "template" "templates/simple-icon.svg") }}
|
{{- partial "components/icon.html" (dict "id" .id "output" "icons/brand/%s.svg" "template" "templates/simple-icon.svg") }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
{{- /* Linking all of the output formats for discovery. */ -}}
|
{{- /* Linking all of the output formats for discovery. */ -}}
|
||||||
{{- range .OutputFormats }}
|
{{- range .OutputFormats }}
|
||||||
{{- printf "<link rel=%q type=%q href=%q />" .Rel .MediaType.Type .Permalink | safeHTML }}
|
{{- printf "<link rel=%q type=%q href=%q />" .Rel .MediaType.Type .Permalink | safeHTML }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,4 +7,4 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
Loading…
Reference in New Issue
Block a user