diff options
author | Karl <kc0bfv@gmail.com> | 2019-11-24 19:29:46 +0300 |
---|---|---|
committer | Karl <kc0bfv@gmail.com> | 2019-11-24 19:29:46 +0300 |
commit | d97e9826fbac2e06ebab2b086e788a2937699771 (patch) | |
tree | 8b8b575aad2687b48a1254cea521f37503505348 |
First commit - already working well
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | LICENSE | 20 | ||||
-rw-r--r-- | archetypes/default.md | 10 | ||||
-rw-r--r-- | layouts/404.html | 11 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 27 | ||||
-rw-r--r-- | layouts/_default/list.html | 10 | ||||
-rw-r--r-- | layouts/_default/single.html | 10 | ||||
-rw-r--r-- | layouts/partials/body_footer.html | 1 | ||||
-rw-r--r-- | layouts/partials/body_header.html | 1 | ||||
-rw-r--r-- | layouts/partials/foot.html | 37 | ||||
-rw-r--r-- | layouts/partials/head.html | 48 | ||||
-rw-r--r-- | layouts/partials/navbar.html | 15 | ||||
-rw-r--r-- | static/css/myboth.css | 24 | ||||
-rw-r--r-- | static/css/myprint.css | 9 | ||||
-rw-r--r-- | static/css/myscreen.css | 11 | ||||
-rw-r--r-- | static/img/header_template.png | bin | 0 -> 871 bytes | |||
-rw-r--r-- | static/img/side_image_template.png | bin | 0 -> 1624 bytes | |||
-rw-r--r-- | theme.toml | 15 |
18 files changed, 250 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1377554 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2019 YOUR_NAME_HERE + +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. diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..4b8562a --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,10 @@ +--- +title: "title" +date: {{ .Date }} +draft: false +buttonimage: "" +sideimages: [] +sideimagealt: "" +weight: 1 +--- + diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..b4eba3e --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,11 @@ +{{ define "main" }} + <div class="col-12 col-sm-5"> + {{ with .Params.sideimages }} + <img id="sideimage" class="morerounded" src="/img/side_image_template.png"> + {{ end }} + </div> + <div class="col-12 col-sm-7"> + <h1>404</h1> + <p>Content Not Found + </div> +{{ end }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..ead1c49 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,27 @@ +<!DOCTYPE html> +<html lang="{{ .Site.LanguageCode }}"> + <head>{{- partial "head.html" . -}}</head> + <body> + <div id="header" class="top-section"> + {{- partial "body_header.html" . -}} + </div> + <div id="content" class="top-section"> + <div class="container-fluid"> + <div class="row"> + <div class="col col-12 col-sm-8 col-lg-9"> + <div class="row"> + {{- block "main" . }}{{- end }} + </div> + </div> + <div class="col col-8 offset-2 col-sm-4 offset-sm-0 col-lg-3"> + {{- partial "navbar" . -}} + </div> + </div> + </div> + </div> + <div id="footer" class="top-section"> + {{- partial "body_footer.html" . -}} + </div> + {{- partial "foot.html" . -}} + </body> +</html> diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..a49703f --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,10 @@ +{{ define "main" }} + {{ range .Site.RegularPages.ByWeight }} + <div class="col col-12 col-lg-6 imgbtntxt"> + <a class="imgbtntxt" href="{{ with .Params.actualurl }}{{ . }}{{ else }}{{ .Permalink }}{{ end }}"> + <img class="morerounded" height="300" width="300" src="{{ .Params.buttonimage }}" alt="{{ .Title }}"> + <br>{{ .Title }} + </a> + </div> + {{ end }} +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..12b8808 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,10 @@ +{{ define "main" }} + <div class="col-12 col-sm-5"> + {{ with .Params.sideimages }} + <img id="sideimage" class="morerounded" src="/img/side_image_template.png" alt="{{ $.Params.sideimagealt }}"> + {{ end }} + </div> + <div class="col-12 col-sm-7"> + {{ .Content | safeHTML }} + </div> +{{ end }} diff --git a/layouts/partials/body_footer.html b/layouts/partials/body_footer.html new file mode 100644 index 0000000..4071265 --- /dev/null +++ b/layouts/partials/body_footer.html @@ -0,0 +1 @@ +{{ with .Site.Params.webmasterEmail }}Webmaster: <a href="mailto:{{ . }}">{{ . }}</a>{{ end }} diff --git a/layouts/partials/body_header.html b/layouts/partials/body_header.html new file mode 100644 index 0000000..65334d4 --- /dev/null +++ b/layouts/partials/body_header.html @@ -0,0 +1 @@ +<img id="headerimg" class="veryrounded" src="/img/header_template.png" alt="notmet.net header image"> diff --git a/layouts/partials/foot.html b/layouts/partials/foot.html new file mode 100644 index 0000000..cda9879 --- /dev/null +++ b/layouts/partials/foot.html @@ -0,0 +1,37 @@ +<script> + function toggleDisplay( elementID ) { + elem = document.getElementById(elementID); + if( elem.style.display == "none" ) { + elem.style.display = "block"; + } else if( elem.style.display == "block" ) { + elem.style.display = "none"; + } + } + {{ with .Site.Params.headerimages }} + function randomHeaderImg() { + images = [ + {{- $last_elem := sub (len .) 1 -}} + {{ range $index, $component := . -}} + {{ . }}{{ if lt $index $last_elem }},{{ end }} + {{- end -}} + ]; + i = Math.ceil(Math.random() * images.length) - 1; + document.getElementById("headerimg").src = images[i]; + } + window.onload = randomHeaderImg; + {{ end }} + {{ with .Params.sideimages }} + function randomSideAndHeaderImg() { + randomHeaderImg(); + images = [ + {{- $last_elem := sub (len .) 1 -}} + {{ range $index, $component := . -}} + {{ . }}{{ if lt $index $last_elem }},{{ end }} + {{- end -}} + ]; + i = Math.ceil(Math.random() * images.length) - 1; + document.getElementById("sideimage").src = images[i]; + } + window.onload = randomSideAndHeaderImg; + {{ end }} +</script> diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..9e66127 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,48 @@ +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + +<meta name="description" content="{{ .Params.description }}"> +<meta name="author" content="{{ .Params.author }}"> +<link rel="icon" href="/{{ .Site.Params.favicon }}"> + +<title>{{ .Site.Title }}{{ with .Params.title }} - {{ . }}{{ end }}</title> + +{{ with .Params.actualurl }} +<meta http-equiv="refresh" content="0;URL='{{ . }}'" /> +{{ end }} + +<!-- SEO Prefs --> +<meta name="robots" content="index,follow"> +<meta name="referrer" content="origin-when-cross-origin"> +{{ with .Site.Params.googlesiteverification }}<meta name="google-site-verification" content="{{ . }}">{{ end }} +{{ with .Site.Params.msvalidate }}<meta name="msvalidate.01" content="{{ . }}">{{ end }} + +<!-- Site Generator --> +<meta name="generator" content="Hugo {{ hugo.Version }}"> + +<!-- Bootstrap CSS --> +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> + +<!--My CSS--> +<link rel="stylesheet" href="/css/myscreen.css" type="text/css" media="screen"> +<link rel="stylesheet" href="/css/myprint.css" type="text/css" media="print"> +<meta name="theme-color" content="black"> + +{{ template "_internal/google_analytics_async.html" . }} + +<noscript> + <style> + {{ with .Site.Params.headerimages }} + #headerimg { + background-image: url({{ index . 0 | safeURL }}); + background-size: cover; + } + {{ end }} + {{ with .Params.sideimages }} + #sideimage { + background-image: url({{ index . 0 | safeURL }}); + background-size: cover; + } + {{ end }} + </style> +</noscript> diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html new file mode 100644 index 0000000..1af7cc7 --- /dev/null +++ b/layouts/partials/navbar.html @@ -0,0 +1,15 @@ +<div class="box morerounded"> + <ul class="navbar"> + {{- $pages := slice .Site.Home -}} + {{- $pages = $pages | append .Site.RegularPages.ByWeight -}} + {{ range $pages }} + <li> + {{- if eq . $ -}} + {{ .Title }} + {{- else -}} + <a href="{{ with .Params.actualurl }}{{ . }}{{ else }}{{ .Permalink }}{{ end }}">{{ .Title }}</a> + {{- end -}} + </li> + {{- end }} + </ul> +</div> diff --git a/static/css/myboth.css b/static/css/myboth.css new file mode 100644 index 0000000..d71a9f9 --- /dev/null +++ b/static/css/myboth.css @@ -0,0 +1,24 @@ +.box { padding-bottom:.25em; } +#headerimg { width: 100%; } +#footer { font-size: .8em; } +#sideimage { width: 100%; } + +/* Make my own styles up */ +.top-section { margin: 20px; } +.morerounded { border-radius:15px; } +.veryrounded { border-radius:30px; } +.navbar { + list-style-type: none; + flex-direction: column; + align-items: flex-start; +} +.imgbtntxt { text-align:center; font-size:1.5em; font-weight:normal; color:#999; text-decoration:none; } +.abitbigger { font-size:1.3em; } +.verylarge { font-size:2em; } + +/* Styles mimicing old blueprint */ +a:hover { text-decoration: none; } + +body { + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; +} diff --git a/static/css/myprint.css b/static/css/myprint.css new file mode 100644 index 0000000..e5b7cff --- /dev/null +++ b/static/css/myprint.css @@ -0,0 +1,9 @@ +@import url("/css/myboth.css"); + +body { background:white; color: #000; } +h1, h2, h3, h4, h5, h6 { color: #000; } +a:focus, a:hover { color: #33f; } +a { color:#33f; } +.loud { color: #000; } +.box { color: #000; } +.navbar { display: none; } diff --git a/static/css/myscreen.css b/static/css/myscreen.css new file mode 100644 index 0000000..2eb2a63 --- /dev/null +++ b/static/css/myscreen.css @@ -0,0 +1,11 @@ +@import url("/css/myboth.css"); + +body { background:black; color: #ddd; } +h1, h2, h3, h4, h5, h6 { color: #eee; } +a:focus, a:hover { color: #06c; } +a { color: #09f; } +.loud { color: #fff; } +.box { + color: #222; + background: #e5eCf9; +} diff --git a/static/img/header_template.png b/static/img/header_template.png Binary files differnew file mode 100644 index 0000000..bb00fcf --- /dev/null +++ b/static/img/header_template.png diff --git a/static/img/side_image_template.png b/static/img/side_image_template.png Binary files differnew file mode 100644 index 0000000..200ab97 --- /dev/null +++ b/static/img/side_image_template.png diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..a87c00f --- /dev/null +++ b/theme.toml @@ -0,0 +1,15 @@ +# theme.toml template for a Hugo theme +# See https://github.com/gohugoio/hugoThemes#themetoml for an example + +name = "Ticky_tacky_dark" +license = "MIT" +licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE" +description = "" +homepage = "http://example.com/" +tags = [] +features = [] +min_version = "0.41" + +[author] + name = "kc0bfv" + homepage = "https://notmet.net/" |