Første commit
commit
991777214a
@ -0,0 +1,13 @@
|
||||
# Generated files by hugo
|
||||
/public/
|
||||
/resources/_gen/
|
||||
/assets/jsconfig.json
|
||||
hugo_stats.json
|
||||
|
||||
# Executable may be added to repository
|
||||
hugo.exe
|
||||
hugo.darwin
|
||||
hugo.linux
|
||||
|
||||
# Temporary lock file while building
|
||||
/.hugo_build.lock
|
@ -0,0 +1,20 @@
|
||||
Copyright (c) 2022 Trygve
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
---
|
||||
|
@ -0,0 +1,14 @@
|
||||
baseURL = 'https://trygve.net/'
|
||||
languageCode = 'no'
|
||||
title = 'Trygves hjemmeside'
|
||||
theme = "trygve.net"
|
||||
copyright = 'Everything is mine'
|
||||
defaultContentLanguage = 'no'
|
||||
|
||||
[languages]
|
||||
[languages.no]
|
||||
title = 'Trygves side'
|
||||
weight = 1
|
||||
[languages.en]
|
||||
title = 'Trygves homepage'
|
||||
weight = 2
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: Hjem
|
||||
menu: main
|
||||
weight: 1
|
||||
---
|
||||
|
||||
Kontakt meg på matrix: [@trygve:trygve.me](https://matrix.to/#/@trygve:trygve.me) eller epost: [trygve@trygve.me](mailto:trygve@trygve.me)
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Blog
|
||||
menu: main
|
||||
weight: 2
|
||||
---
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
title: "First Post"
|
||||
date: 2020-05-24T20:49:07+02:00
|
||||
categories: [Category 1]
|
||||
---
|
||||
|
||||
This is my first blog post.
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
title: "Second Post"
|
||||
date: 2020-05-24T20:49:10+02:00
|
||||
categories: [Category 1, Category 2]
|
||||
---
|
||||
|
||||
This is my second blog post.
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
title: About
|
||||
menu: main
|
||||
weight: 3
|
||||
---
|
||||
|
||||
English
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Info
|
||||
menu: main
|
||||
weight: 6
|
||||
---
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
title: "My First Post"
|
||||
date: 2022-11-03T19:45:30+01:00
|
||||
draft: true
|
||||
---
|
||||
# Testpost!
|
||||
Masse tekst og sånt
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: "Prosjekter"
|
||||
menu: main
|
||||
weight: 3
|
||||
---
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
title: "Tjenester"
|
||||
menu: main
|
||||
weight: 2
|
||||
---
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: {{ replace .Name "-" " " | title }}
|
||||
date: {{ now.Format "2006-01-02" }}
|
||||
categories: []
|
||||
---
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
title: {{ replace .Name "-" " " | title }}
|
||||
---
|
@ -0,0 +1,12 @@
|
||||
{{ define "main" }}
|
||||
<!--
|
||||
"404 Not found" page. May not work out of the box depending on the deployment setup (see the
|
||||
Hugo docs).
|
||||
-->
|
||||
<div class="page not-found-page">
|
||||
<h2 class="page-title not-found-title">Page not found</h2>
|
||||
<div class="page-content not-found-content">
|
||||
<p><a href="{{ .Site.BaseURL | relLangURL }}">Go to homepage</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language.Lang }}">
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
<body>
|
||||
{{ partial "header.html" . }}
|
||||
<main>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,21 @@
|
||||
{{ define "main" }}
|
||||
<!--
|
||||
Default template for a list page.
|
||||
-->
|
||||
<div class="page list-page">
|
||||
<!-- Title and content of list page -->
|
||||
<h2 class="page-title list-page-title">{{ .Title }}</h2>
|
||||
<div class="page-content list-page-content">{{ .Content }}</div>
|
||||
|
||||
<!-- List of subpages -->
|
||||
<ul class="page-preview-list">
|
||||
{{ range .Pages }}
|
||||
<li class="page-preview">
|
||||
<h3 class="page-preview-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
|
||||
{{ partial "post-metadata.html" . }}
|
||||
<p class="page-preview-summary">{{ .Summary }}</p>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
@ -0,0 +1,15 @@
|
||||
{{ define "main" }}
|
||||
<!--
|
||||
Default template for a single page. Additional classes are includedd for posts (pages with a
|
||||
publication date).
|
||||
-->
|
||||
<div class="page{{ if .Date }} post{{ end }}">
|
||||
<article>
|
||||
<h2 class="page-title{{ if .Date }} post-title{{ end }}">{{ .Title }}</h2>
|
||||
{{ partial "post-metadata.html" . }}
|
||||
<div class="page-content{{ if .Date }} post-content{{ end }}">{{ .Content }}</div>
|
||||
</article>
|
||||
|
||||
{{ partial "post-actions.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
@ -0,0 +1,9 @@
|
||||
{{ define "main" }}
|
||||
<!--
|
||||
Homepage.
|
||||
-->
|
||||
<div class="page homepage">
|
||||
<h2 class="page-title homepage-title">{{ .Title }}</h2>
|
||||
<div class="page-content homepage-content">{{ .Content }}</div>
|
||||
</div>
|
||||
{{ end }}
|
@ -0,0 +1,3 @@
|
||||
<!--
|
||||
Website footer, which may e.g. contain the copyright notice or social links.
|
||||
-->
|
@ -0,0 +1,3 @@
|
||||
<!--
|
||||
<link> tags for favicons.
|
||||
-->
|
@ -0,0 +1,3 @@
|
||||
<!--
|
||||
Scripts, e.g. analytics snippet.
|
||||
-->
|
@ -0,0 +1 @@
|
||||
<link rel="stylesheet" href="/css/main.css">
|
@ -0,0 +1,26 @@
|
||||
<!--
|
||||
Site head with metadata and asset imports.
|
||||
-->
|
||||
<head>
|
||||
<!-- Meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="{{ .Site.Params.Description }}">
|
||||
|
||||
<!-- Site title -->
|
||||
<title>{{ .Site.Title }}</title>
|
||||
|
||||
<!-- Favicons -->
|
||||
{{ partial "head-favicons.html" . }}
|
||||
|
||||
<!-- Styles -->
|
||||
{{ partial "head-styles.html" . }}
|
||||
|
||||
<!-- Scripts -->
|
||||
{{ partial "head-scripts.html" . }}
|
||||
|
||||
<!-- RSS -->
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
</head>
|
@ -0,0 +1,5 @@
|
||||
<!-- Site header with title and main menu. -->
|
||||
<header class="header">
|
||||
<!-- <h1 class="site-title"><a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a></h1> -->
|
||||
{{ partial "navigation.html" . }}
|
||||
</header>
|
@ -0,0 +1,20 @@
|
||||
<!--
|
||||
Navigation: Lists all items in the "main" menu. For each menu entry, its path is compared with the
|
||||
current page's first path component to determine wheter it is child of that page. If so, the menu
|
||||
item is marked as active.
|
||||
-->
|
||||
<nav class="navigation">
|
||||
<ul class="header-list">
|
||||
{{ $pagePath := .RelPermalink }}
|
||||
{{ $pagePathSplit := split $pagePath "/" }}
|
||||
{{ $pageFirstPathPart := cond (eq $pagePath "/") "/" (print "/" (index $pagePathSplit 1) "/") }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ $menuItemPath := .Page.RelPermalink }}
|
||||
<li class="navigation-item{{ if eq $pageFirstPathPart $menuItemPath }} navigation-item-active{{ end }}">
|
||||
<a href="{{ $menuItemPath }}">
|
||||
{{- .Title -}}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
@ -0,0 +1,15 @@
|
||||
<!--
|
||||
Links for actions related to the current post. Only displayed for posts (pages with a publication
|
||||
date).
|
||||
-->
|
||||
{{ if .Date }}
|
||||
<div class="post-actions">
|
||||
<ul>
|
||||
<!-- URL to the section list page -->
|
||||
<li><a href="..">All posts</a></li>
|
||||
|
||||
<!-- URL to the section's RSS feed -->
|
||||
<li><a href="../index.xml">Subscribe</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
@ -0,0 +1,25 @@
|
||||
<!--
|
||||
Post metadata: Publication date and optional category list. Only displayed for posts (pages with a
|
||||
publication date).
|
||||
-->
|
||||
{{ if .Date }}
|
||||
<div class="post-metadata">
|
||||
<!-- Post creation date -->
|
||||
{{ if .Date }}
|
||||
<p class="post-date-created">
|
||||
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2, 2006" }}</time>
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
<!-- List of post's categories (category names link to their respective pages) -->
|
||||
<ul class="post-category-list">
|
||||
{{ with .Param "categories" }}
|
||||
{{ range $index, $category := . }}
|
||||
{{- with $.Site.GetPage (printf "/categories/%s" ($category | urlize)) -}}
|
||||
<li class="post-category"><a href="{{ .Permalink }}">{{ $category }}</a></li>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
@ -0,0 +1,152 @@
|
||||
:root {
|
||||
--dark-accent-color: #5C6BC0;
|
||||
--dark-bg-color: black;
|
||||
--dark-alt-bg-color: #5c6bc0;
|
||||
--dark-cont-bg-color: transparent;
|
||||
--dark-header-bg-color: #121212;
|
||||
--dark-text-color: #eeeeee;
|
||||
--dark-btn-color: #303f9f;
|
||||
--dark-link-color: #5C6BC0;
|
||||
--dark-shadow-color: #1a1a1a;
|
||||
|
||||
--dark-green-bg-color: #26a269;
|
||||
--dark-green-border-color: #176943;
|
||||
}
|
||||
body {
|
||||
min-height: 100%;
|
||||
font-family: "Noto Sans", "Liberation Sans","Trebuchet MS", Arial, Helvetica, sans-serif;
|
||||
margin: 0;
|
||||
--accent-color: #1A237E;
|
||||
--cont-bg-color: white;
|
||||
--alt-bg-color: #283593;
|
||||
--bg-color: #f6f5f4;
|
||||
--header-bg-color: white;
|
||||
--text-color: black;
|
||||
--btn-color: #303f9f;
|
||||
--link-color: #3949AB;
|
||||
--shadow-color: rgba(0,0,0,.15);
|
||||
|
||||
--green-bg-color: #8ff0a4;
|
||||
--green-border-color: #33d17a;
|
||||
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
|
||||
}
|
||||
header{
|
||||
align-self: start;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--link-color);
|
||||
}
|
||||
|
||||
.navigation ul{
|
||||
width: fit-content;
|
||||
width: -moz-fit-content;
|
||||
padding: 0.5rem;
|
||||
background-color: var(--header-bg-color);
|
||||
border-radius: 1rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: auto;
|
||||
min-height: 2rem;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
list-style: none;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.navigation a{
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: .25rem;
|
||||
text-decoration: underline;
|
||||
font-weight: 600;
|
||||
transition: 0.15s;
|
||||
color: var(--text-accent-color);
|
||||
}
|
||||
.navigation a:active{
|
||||
color: #fff;
|
||||
background-color: var(--btn-color);
|
||||
|
||||
}
|
||||
.navigation a:focus {
|
||||
transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
|
||||
outline: none;
|
||||
box-shadow: 0 0 2px 2px var(--accent-color), 0 .5rem 1rem rgba(0,0,0,.15) !important;
|
||||
}
|
||||
.navigation a:hover {
|
||||
box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
|
||||
background-color: var(--btn-color);
|
||||
box-shadow: 0 0 2px 2px var(--accent-color), 0 .5rem 1rem rgba(0,0,0,.15) !important;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
/* Container for main content */
|
||||
main {
|
||||
margin: auto;
|
||||
min-width: 20%;
|
||||
background: var(--cont-bg-color);
|
||||
border-radius: 1rem;
|
||||
grid-area: main;
|
||||
}
|
||||
|
||||
@media screen and (max-width:600px){
|
||||
main {
|
||||
max-width: 100%;
|
||||
width: calc(100% - 0.5rem);
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width:800px){
|
||||
main {
|
||||
max-width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width:800px){
|
||||
main {
|
||||
max-width: 80%;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width:1000px){
|
||||
main {
|
||||
padding: 1rem;
|
||||
width: max-content;
|
||||
max-width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width:1300px){
|
||||
html {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width:2000px){
|
||||
html {
|
||||
font-size: 20px;
|
||||
}
|
||||
main {
|
||||
max-width: 40%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body.theme-auto {
|
||||
--bg-color: var(--dark-bg-color);
|
||||
--alt-bg-color: var(--dark-alt-bg-color);
|
||||
--cont-bg-color: var(--dark-cont-bg-color);
|
||||
--header-bg-color: var(--dark-header-bg-color);
|
||||
--text-color: var(--dark-text-color);
|
||||
--btn-color: var(--dark-btn-color);
|
||||
--accent-color: var(--dark-accent-color);
|
||||
--link-color: var(--dark-link-color);
|
||||
--shadow-color: var(--dark-shadow-color);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue