Make a few tweaks to the theme

This commit is contained in:
Gabriel Arazas 2020-11-05 13:54:38 +08:00
parent e81b882549
commit 9487442d64
13 changed files with 131 additions and 131 deletions

View File

@ -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
=== Fixed

View File

@ -143,7 +143,7 @@ paginate = 20
[module]
[[module.imports]]
path = "github.com/foo-dogsquared/hugo-theme-contentful"
path = "github.com/foo-dogsquared/hugo-theme-more-contentful"
[[module.imports]]
path = "github.com/foo-dogsquared/hugo-web-feeds"

View File

@ -1,13 +1,11 @@
/**
* Dracula Theme originally by Zeno Rocha [@zenorocha]
* https://draculatheme.com/
*
* Ported for PrismJS by Albert Vallverdu [@byverdu]
* This is a CSS stylesheet template for Prism in case you use that.
* This is based from a Prism CSS port by Albert Vallverdu [@byverdu].
*/
code[class*="language-"],
pre[class*="language-"] {
color: var(--base07);
color: var(--base05);
background: none;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;

View File

@ -59,7 +59,7 @@ a {
}
dd, li, p, td {
line-height: 1.5;
line-height: 1.45;
}
p {

View File

@ -1,10 +1,3 @@
@for $i from 0 through 15 {
$hex: decToHex($i);
.base#{$hex} {
color: var(--base#{$hex});
}
}
.list {
display: inline-flex;
flex-flow: row wrap;

View File

@ -30,12 +30,6 @@
@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 {
> *:hover {
color: var(--base0C);

View File

@ -1,4 +1,8 @@
[module]
[module.hugoVersion]
extended = true
min = "0.74.0"
[[module.imports]]
path = "github.com/foo-dogsquared/hugo-theme-contentful"
[[module.imports]]

View File

@ -6,7 +6,7 @@
Otherwise, we take the pages of a section. */ -}}
{{- $pages := .Pages }}
{{- if .IsHome }}
{{- $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
{{- $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
{{- end }}
{{- range (where (.Paginate $pages).Pages "Params.hidden" "!=" true) }}

View File

@ -9,13 +9,13 @@
{{ $is_toc := cond (ne .Params.toc nil) .Params.toc $.Site.Params.toc }}
{{ if (and $is_toc (gt (countrunes .TableOfContents) 0)) }}
<style>
#TableOfContents:not(:empty)::before {
#TableOfContents:not(:empty)::before {
content: "{{ i18n "table_of_contents" }}";
font-weight: bold;
}
}
</style>
{{ .TableOfContents }}
{{ end }}
{{ end }}
<main>
{{ .Content }}
@ -31,9 +31,9 @@
{{- end }}
<!-- 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. -->
<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 }}
<!-- Modification date (will only appear if the publication date is less than the modified date.) -->

View File

@ -5,12 +5,12 @@
<!-- Linking to other languages' homepage. -->
{{ if $.Site.IsMultiLingual }}
<p>{{ i18n "multilingual" }}:
<span class="list site__languages">
{{ range $.Site.Languages }}
<p>{{ i18n "multilingual" }}:
<span class="list site__languages">
{{ range $.Site.Languages }}
<a href="{{ . | relURL }}" hreflang="{{ .Lang }}">{{ with .LanguageName }}{{ . }}{{ else }}{{ .Lang }}{{ end }}</a>
{{ end }}
</span>
{{ end }}
</span>
</p>
{{ end }}
@ -24,7 +24,7 @@
{{ $links = sort $links "weight" "asc" }}
{{- range $links -}}
<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 }}
{{- partial "components/icon.html" (dict "id" .id "output" "icons/brand/%s.svg" "template" "templates/simple-icon.svg") }}
{{- else }}

View File

@ -39,7 +39,7 @@
{{- /* Linking all of the output formats for discovery. */ -}}
{{- 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 }}

View File

@ -7,4 +7,4 @@
{{ end }}
{{ end }}
</div>
</nav>
</nav>