init - lots of changes from lugo
This commit is contained in:
parent
62ac46a295
commit
7b3c3f0dfb
@ -1,6 +1,7 @@
|
||||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
description: "Example"
|
||||
tags: ['']
|
||||
draft: true
|
||||
---
|
||||
|
||||
|
@ -1,36 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language }}">
|
||||
<head>
|
||||
<title>{{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }}</title>
|
||||
<link rel="canonical" href="{{ .Site.BaseURL }}">
|
||||
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/index.xml'>
|
||||
<link rel='stylesheet' type='text/css' href='/style.css'>
|
||||
{{ with .Site.Params.favicon }}<link rel="icon" href="{{ . }}">
|
||||
{{ end -}}
|
||||
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}">
|
||||
{{ if isset .Params "tags" }}<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . ", " }}{{ end }}">
|
||||
{{ end -}}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="index, follow">
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
<body>
|
||||
{{ if .Site.Menus.main }}{{ partial "nav.html" . }}{{ end -}}
|
||||
{{ block "header" . }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ end }}
|
||||
<main>
|
||||
<header><h1 id="tag_{{ .Title }}">{{ block "title" . }}{{ end }}</h1></header>
|
||||
<div class="article-header">
|
||||
<h3 class="spaced">
|
||||
{{ .Page.Title }}
|
||||
</h3>
|
||||
</div>
|
||||
<article>
|
||||
{{ block "main" . }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ if .Param "nextprev" }}{{ partial "nextprev.html" . -}}{{ end -}}
|
||||
{{ if .Param "taglist" }}{{ partial "taglist.html" . }}{{ end -}}
|
||||
</article>
|
||||
</main>
|
||||
{{ block "footer" . }}
|
||||
<footer>
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.BaseURL }}</a>
|
||||
{{- if .Param "showrss" }}<br><br><a href="/index.xml"><img src="/rss.svg" style="max-height:1.5em" alt="RSS Feed" title="Subscribe via RSS for updates."></a>{{ end }}
|
||||
</footer>
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
8
layouts/partials/footer.html
Normal file
8
layouts/partials/footer.html
Normal file
@ -0,0 +1,8 @@
|
||||
<hr>
|
||||
<footer>
|
||||
<p>
|
||||
Poem + Hugo = Pogo
|
||||
<br><br>
|
||||
© Pogo 2024
|
||||
</p>
|
||||
</footer>
|
19
layouts/partials/head.html
Normal file
19
layouts/partials/head.html
Normal file
@ -0,0 +1,19 @@
|
||||
<head>
|
||||
<title>{{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }}</title>
|
||||
<link rel="canonical" href="{{ .Site.BaseURL }}">
|
||||
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/index.xml'>
|
||||
<link rel='stylesheet' type='text/css' media='screen' href='/style.css'>
|
||||
{{ with .Site.Params.favicon }}
|
||||
<link rel="icon" href="{{ . }}">
|
||||
{{ end -}}
|
||||
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}">
|
||||
{{ if isset .Params "tags" }}
|
||||
<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . " , " }}{{ end }}">
|
||||
{{ end -}}
|
||||
{{ if isset .Params "redirect" }}
|
||||
<meta http-equiv="refresh" content="2; URL={{ with .Params.redirect }}{{ . }}{{ end }}">
|
||||
{{ end -}}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="index, follow">
|
||||
<meta charset="utf-8">
|
||||
</head>
|
5
layouts/partials/header.html
Normal file
5
layouts/partials/header.html
Normal file
@ -0,0 +1,5 @@
|
||||
<header>
|
||||
<h3>
|
||||
<a href="/">{{ .Site.Title }}</a>
|
||||
</h3>
|
||||
</header>
|
@ -1,8 +0,0 @@
|
||||
<nav>
|
||||
<ul>
|
||||
{{- $sec := .Page.Section }}{{ $file := .File.TranslationBaseName -}}
|
||||
{{ range.Site.Menus.main.ByWeight }}{{ $base := path.Base .URL }}
|
||||
<li><a {{ if or ( eq $sec $base ) ( eq $file $base ) ( and (eq $sec "") ( eq $file "_index") (eq $base "/") ) }}class="menuactive" {{ end }}href="{{ .URL }}"><span class=pre>{{ .Pre }}</span><span class=menuname>{{ .Name }}</span></a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
@ -1,13 +0,0 @@
|
||||
{{- if isset .Params "tags" -}}
|
||||
{{- $tagsLen := len .Params.tags -}}
|
||||
{{- if gt $tagsLen 0 -}}
|
||||
<div style="clear:both" class=taglist>
|
||||
{{- with .Site.Params.relatedtext }}{{ . }}<br>{{ end -}}
|
||||
{{- range $k, $v := .Params.tags -}}
|
||||
{{- $url := printf "tags/%s" (. | urlize | lower) -}}
|
||||
<a id="tag_{{ . | lower }}" href="{{ $url | absURL }}">{{ . | title }}</a>
|
||||
{{- if lt $k (sub $tagsLen 1) }} · {{ end -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- end }}
|
@ -7,7 +7,7 @@
|
||||
-->
|
||||
<figure {{ with .Get "class" }}class="{{.}}"{{ end -}}>
|
||||
{{- with .Get "link"}}<a href="{{.}}">{{ end -}}
|
||||
<img src="{{ .Get "src" }}"
|
||||
<img src='{{ .Get "src" }}'
|
||||
{{- with .Get "mouse" }} title="{{.}}"{{ end -}}
|
||||
{{- with .Get "alt" }} alt="{{.}}"{{ end -}}
|
||||
>
|
||||
|
14
layouts/shortcodes/login.html
Normal file
14
layouts/shortcodes/login.html
Normal file
@ -0,0 +1,14 @@
|
||||
<div>
|
||||
{% if user %}
|
||||
Welcome {{/* user */}}!
|
||||
{% else %}
|
||||
<link rel='stylesheet' type='text/css' media='screen' href='/form.css'>
|
||||
<form class="spaced" method="post" action="login" enctype="application/x-www-form-urlencoded">
|
||||
<label>Login</label>
|
||||
<br>
|
||||
<input type="text" id="username" name="username" aria-autocomplete="both" placeholder="Username" autofocus autocomplete="username" required><br>
|
||||
<input type="password" id="password" name="password" placeholder="Password" autocomplete="new-password" required><br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
14
layouts/shortcodes/post.html
Normal file
14
layouts/shortcodes/post.html
Normal file
@ -0,0 +1,14 @@
|
||||
<link rel='stylesheet' type='text/css' media='screen' href='/form.css'>
|
||||
<form method="post" action="post-article" enctype="application/x-www-form-urlencoded">
|
||||
<label style="display: none">Create new post:</label>
|
||||
<p>Markdown is supported!</p>
|
||||
<textarea
|
||||
accesskey="/"
|
||||
id="article"
|
||||
name="article"
|
||||
required
|
||||
maxlength="1000"
|
||||
rows="11"
|
||||
placeholder="Your super sick idea..."></textarea>
|
||||
<input type="submit" value="Post">
|
||||
</form>
|
@ -1,3 +0,0 @@
|
||||
{{ if isset .Site.Taxonomies "tags" }}{{ if not (eq (len .Site.Taxonomies.tags) 0) }} <ul id="tagcloud">
|
||||
{{ range $name, $items := .Site.Taxonomies.tags }}{{ $url := printf "%s/%s" "tags" ($name | urlize | lower)}}<li><a href="{{ $url | absURL }}" id="tag_{{ $name }}">{{ $name | title }}</a></li>
|
||||
{{ end }}</ul>{{ end }}{{ end }}
|
61
static/form.css
Normal file
61
static/form.css
Normal file
@ -0,0 +1,61 @@
|
||||
input {
|
||||
color: #ffffff;
|
||||
margin: 0.2rem;
|
||||
}
|
||||
|
||||
textarea:focus, input:focus {
|
||||
outline-width: 0.2rem;
|
||||
outline-style: solid;
|
||||
}
|
||||
|
||||
textarea:focus {
|
||||
outline-color: #222222;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline-color: white;
|
||||
}
|
||||
|
||||
input[type="submit"]:focus {
|
||||
outline-color: #344a70;
|
||||
}
|
||||
|
||||
input[type="submit"] {
|
||||
background-color: #344a70;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
input[type="password"], [type="text"] {
|
||||
background-color: #ffffff;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
/* input[value="Post"] {
|
||||
} */
|
||||
|
||||
textarea, input {
|
||||
border-radius: 0.5rem;
|
||||
border-style: hidden;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
textarea {
|
||||
background-color: #222222;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
resize: none;
|
||||
color: white;
|
||||
scrollbar-width: 0;
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
textarea > ::placeholder {
|
||||
color: #717171;
|
||||
opacity: 1;
|
||||
}
|
112
static/style.css
112
static/style.css
@ -1,45 +1,99 @@
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: sans-serif ;
|
||||
background: #110000 ;
|
||||
color: #ccc ;
|
||||
background-color: #222222;
|
||||
color: #ffffff;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin: 0;
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
main {
|
||||
max-width: 800px ;
|
||||
margin: auto ;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100% ;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
header {
|
||||
background-color: #344a70;
|
||||
margin-top: 0;
|
||||
margin-left: 0;
|
||||
text-align: center;
|
||||
padding: 0.75rem;
|
||||
font-size: xx-large;
|
||||
}
|
||||
|
||||
.article-header {
|
||||
background-color: #454545;
|
||||
margin: 2rem;
|
||||
margin-bottom: 0;
|
||||
border-top-right-radius: 0.5rem;
|
||||
border-top-left-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.spaced {
|
||||
margin: 0;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
article {
|
||||
background-color: #303030;
|
||||
padding: 1.5rem;
|
||||
margin-left: 2rem;
|
||||
margin-right: 2rem;
|
||||
text-align: left;
|
||||
border-bottom-left-radius: 0.5rem;
|
||||
border-bottom-right-radius: 0.5em;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 2rem;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
border-top: 1px solid #454545;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
footer {
|
||||
color: #606060;
|
||||
text-align: center;
|
||||
clear: both ;
|
||||
}
|
||||
|
||||
/* For TAGLIST.HTML */
|
||||
.taglist {
|
||||
text-align: center ;
|
||||
clear: both ;
|
||||
p {
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* For NEXTPREV.HTML */
|
||||
#nextprev {
|
||||
/* The container for both the previous and next articles. */
|
||||
h1,h2,h3,h4,h5,h6 {
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
#prevart {
|
||||
float: left ;
|
||||
text-align: left ;
|
||||
|
||||
a {
|
||||
color: #3e765d;
|
||||
}
|
||||
#nextart {
|
||||
float: right ;
|
||||
text-align: right ;
|
||||
|
||||
a:hover {
|
||||
color: #344a70;
|
||||
text-decoration-line: none;
|
||||
}
|
||||
|
||||
header a {
|
||||
color: inherit;
|
||||
text-decoration-line: none;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
header a:hover {
|
||||
font-weight: bold;
|
||||
color: inherit
|
||||
}
|
||||
|
||||
main {
|
||||
max-width: 80%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 900px) {
|
||||
main {
|
||||
max-width: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
#nextart,#prevart {
|
||||
max-width: 33% ;
|
||||
}
|
Loading…
Reference in New Issue
Block a user