Varius HTML and CSS improvements

This commit is contained in:
Sivert V. Sæther 2022-08-18 13:41:11 +00:00
parent 753ac6ca40
commit 8d44db0550
8 changed files with 68 additions and 51 deletions

BIN
assets/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -1,6 +1,3 @@
h1,h2,h3,h4,h5,h6 {
@extend %headings !optional;
}
body {
background-color: rgb(18, 20, 21);
@ -32,32 +29,44 @@ figure {
max-width: 90%;
}
}
a:hover %headings {
a:hover .heading {
text-decoration: underline;
color: cyan;
}
a {
min-height: 48px;
min-width: 48px;
text-decoration: none;
color: cyan;
}
a li {
a article {
color: lime;
}
}
ul.contents {
.heading {
font-size: 2rem;
margin: 0;
}
list-style-image: url(data:0);
list-style-type: none;
padding: 0;
}
#navbar {
background-color: #222;
li a:hover {
background-color: #333;
}
.link-group li {
float: right;
}
li {
display: inline;
float: left;
}
ul {
li#right {
float: right;
}
li {
a:hover {
background-color: #333;
}
display: inline;
float: left;
}
list-style-type: none;
overflow: hidden;
padding: 0;

View File

@ -1,13 +1,27 @@
<!DOCTYPE html>
<html lang='en'>
<html lang='{{ .Language.Lang }}'>
<head>
<meta charset='UTF-8'>
<meta name='robots' content='index,follow'>
{{ with resources.Get "favicon.ico" | resources.Fingerprint }}
<link rel='icon' href='{{ .RelPermalink }}' integrity='{{ .Data.Integrity }}' />
{{ if isset .Params "title" }}
<title>{{ site.Title }} - {{ .Title }}</title>
{{ else }}
<title>{{ site.Title }}</title>
{{ end }}
{{ if .Description }}
<meta name='description' content='{{ .Description }}'>
{{ end }}
{{ with resources.Get "favicon.png" }}
{{ with . | fingerprint }}
<link rel='icon' href='{{ .RelPermalink }}' integrity='{{ .Data.Integrity }}' />
{{ end }}
{{ with .Resize "192x192 png" | fingerprint }}
<link rel="apple-touch-icon" href="{{ .RelPermalink }}" integrity='{{ .Data.Integrity }}' />
{{ end }}
{{ end }}
<meta name='viewport' content='width=device-width,initial-scale=1.0'>
<meta name="theme-color" content="#00FF00" />
{{ block "meta" . }}
<meta name='viewport' content='width=device-width,initial-scale=1.0'>
{{ end }}
<meta name='twitter:card' content='summary'>
<meta property='og:title' content='{{ site.Title }}' />
@ -19,14 +33,6 @@
{{ printf `<link rel='%s' type='%s' href='%s' title='%s' />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
<link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.5.1/css/bootstrap.min.css' crossorigin='anonymous'>
{{ if isset .Params "title" }}
<title>{{ site.Title }} - {{ .Title }}</title>
{{ else }}
<title>{{ site.Title }}</title>
{{ end }}
{{ if .Description }}
<meta name='description' content='{{ .Description }}'>
{{ end }}
{{ block "head" . }}{{ end }}
{{ if .Param "chroma" }}
{{ with resources.Get "chroma.scss" | toCSS | minify | fingerprint | resources.PostProcess }}

View File

@ -9,8 +9,9 @@
<h3>Posts</h3>
<ul class='contents'>
{{ range .Pages }}
<br />
<a href='{{ .RelPermalink }}'><li>{{ partial "summary.html" . }}</li></a>
<li><a href='{{ .RelPermalink }}'>
{{ partial "summary.html" . }}
</a></li>
{{ end }}
</ul>
{{ end }}

View File

@ -6,10 +6,9 @@
{{ .Content }}
<ul class='contents'>
{{ range .Pages }}
<br />
<a href='{{ .RelPermalink }}'>
<li>{{ partial "summary.html" . }}</li>
</a>
<li><a href='{{ .RelPermalink }}'>
{{ partial "summary.html" . }}
</a></li>
{{ end }}
</ul>
</article>

View File

@ -3,13 +3,15 @@
<li class='{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}'>
<a href='#'>{{ .Pre }}<span>{{ .Name }}</span></a>
</li>
<ul class='sub-menu'>
{{ range .Children }}
<li class='{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}'>
<a href='{{ .URL }}'>{{ .Name }}</a>
</li>
{{ end }}
</ul>
<li>
<ul class='sub-menu'>
{{ range .Children }}
<li class='{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}'>
<a href='{{ .URL }}'>{{ .Name }}</a>
</li>
{{ end }}
</ul>
</li>
{{ else }}
<li>
<a href='{{ .URL }}'>

View File

@ -8,7 +8,8 @@
{{ range .Site.Menus.left }}
{{ partial "menu" . }}
{{ end }}
<div class='link-group'>
<li id='right'>
<ul>
{{ range .Site.Menus.main }}
{{ partial "menu" . }}
{{ end }}
@ -16,6 +17,7 @@
<img class='icons' src='/search-icon.svg'>
</a>
</li> -->
</div>
</ul>
</li>
</ul>
</nav>

View File

@ -1,13 +1,11 @@
{{- $pubdate := .PublishDate.Format "02/01/2006" }}
{{- $lastmod := .Lastmod.Format "02/01/2006" }}
<article>
<div>
<h3>{{ .Title }}</h3>
{{ i18n "published" }} {{ $pubdate }}
{{ if ne $pubdate $lastmod }}
{{ i18n "modified" }} {{ $lastmod }}
{{ end }}<br />
{{ .Summary }}
{{ if .Truncated }}{{ i18n "readMore" }}...{{ end }}
</div>
<p class="heading">{{ .Title }}</p>
{{ i18n "published" }} {{ $pubdate }}
{{ if ne $pubdate $lastmod }}
{{ i18n "modified" }} {{ $lastmod }}
{{ end }}<br />
{{ .Summary }}
{{ if .Truncated }}{{ i18n "readMore" }}...{{ end }}
</article>