From 94eafc81d31660238587e520165258f35914cc58 Mon Sep 17 00:00:00 2001 From: VnPower Date: Tue, 12 Jul 2022 11:33:13 +0700 Subject: [PATCH] i got it working finally --- .gitignore | 1 + about.html | 35 ++++++++++++ config | 4 +- site.tmpl | 121 +++++++++++++++++---------------------- src/index.html | 2 +- src/static/css/main.css | 106 ++++++++++++++++++++++++++++++++++ src/static/style.css | 123 ---------------------------------------- 7 files changed, 196 insertions(+), 196 deletions(-) create mode 100644 about.html create mode 100644 src/static/css/main.css delete mode 100644 src/static/style.css diff --git a/.gitignore b/.gitignore index a02fcf5..bdfa4a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ www/ +gostatic sync.sh diff --git a/about.html b/about.html new file mode 100644 index 0000000..cb8cfd1 --- /dev/null +++ b/about.html @@ -0,0 +1,35 @@ + + + + Home - VnPower + + + + + +
+
+ +

$(vnpower@about) ~:

+ +
+
+

About me

+

I am a Vietnamese who likes to dig deep.

+
+
+ +
+ + diff --git a/config b/config index 23b2c11..aee0cee 100644 --- a/config +++ b/config @@ -1,9 +1,9 @@ TEMPLATES = site.tmpl SOURCE = src OUTPUT = www -TITLE = テクニカル諏訪子 +TITLE = VnPower URL = http://6qiatzlijtqo6giwvuhex5zgg3czzwrq5g6yick3stnn4xekw26zf7qd.onion -AUTHOR = テクニカル諏訪子 +AUTHOR = VnPower blog/**/*.md: config diff --git a/site.tmpl b/site.tmpl index aab791e..98c139a 100644 --- a/site.tmpl +++ b/site.tmpl @@ -1,88 +1,69 @@ -{{ define "header" }} - - - - - - - - {{ .Site.Other.Title }}{{ if .Title }}: {{ .Title }}{{ end }} - - - -
JavaScriptが有効です。安全・安心の為、JavaScriptを無効にしてください。
- -
- ヘッダー +{{ define "header" }} + + + + Home - VnPower + + + + + +
+
+ +

$(vnpower@about) ~:

+ +
+
{{ end }} -{{ define "footer" }}
- gostaticで創作しました。 - ページのGitリポジトリ - -
- +{{ define "footer" }} + +
+ +
+ {{ end }} -{{ define "page" }}{{ template "header" . }} - -
- 支援♡ : Monero -
-
-{{ replace "" "" ( replace "
" "
" .Content ) }}{{ template "footer" . }}{{ end }}
+{{ define "page" }}{{ template "header" . }}
+{{ .Content }}{{ template "footer" . }}{{ end }}
 
 {{ define "date" }}{{ .Format "2006年01月02日" }}{{ end }}
 
-{{ define "pagelist" }}{{ range . }}    
- {{ template "date" .Date }} - {{ .Title }} -
+{{ define "pagelist" }}{{ range . }} +
+
+ {{ template "date" .Date }} +
+
+

{{ .Title }}

+ Remember the old days when we used to make text-only webpages? I missed that time, + and probably you too. Nowadays the "web standard" has rapidly changed, which made + us, "web developers", change. +
+
{{ end }}{{ end }} -{{ define "post" }}
-

{{ .Title }}

+{{ define "post" }} +

{{ .Title }}

トップページに戻る
- {{ .Other.Author }}、 - {{ template "date" .Date }} — {{ range $i, $t := .Tags }}{{ if $i }},{{ end }} {{ $t }}{{ end }}
-
-
-
-{{ .Content }}
+ {{ .Content }} {{ end }} {{ define "tag" }}

{{ .Title }} のタグが付いているページ

diff --git a/src/index.html b/src/index.html index 3f58bf4..198eb37 100644 --- a/src/index.html +++ b/src/index.html @@ -1,4 +1,4 @@ -title: トップページ +title: Main Page ----

ようこそ、あたしのウェブページへ!諏訪子です。

{{ template "pagelist" (((.Site.Pages.Children "blog/").Where "Url" "/$").WhereNot "Draft" "true") }} diff --git a/src/static/css/main.css b/src/static/css/main.css new file mode 100644 index 0000000..590c868 --- /dev/null +++ b/src/static/css/main.css @@ -0,0 +1,106 @@ +@import url("/static/font/font.css"); /* load the fonts */ +/* variables */ +:root { + /* Nord colorscheme */ + --nord1: #2E3440; + --nord5: #D8DEE9; + --nord6: #E5E9F0; + --nord7: #ECEFF4; + --nord10: #81A1C1; + --nord11: #5E81AC; +} +/* default values */ +* { + box-sizing: border-box; + text-rendering: geometricPrecision; +} +a { + text-decoration: none; + color: var(--nord10); +} +a:hover { + background: var(--nord11); + color: var(--nord7); +} +hr { + background: var(--nord5); + margin: 1.8em 0; +} +/* this part is complicated */ +h4 { + overflow: hidden; + position: relative; + display: table-cell; + padding: 20px 0; +} +h4::after { + content: "===================================================================================================="; + position: absolute; + bottom: 5px; + left: 0; + color: var(--nord7); +} +/* main components */ +body { + margin: 0; + background: var(--nord1); + color: var(--nord7); + font-size: 16px; + font-family: "Roboto Mono", "JetBrains Mono", monospace; + word-wrap: break-word; + min-height: 100vh; + display: flex; + justify-content: center; +} +.container { + width: 65%; + min-width: 800px; +} +main { + line-height: 1.4em; +} +/* navbar components */ +header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px 0; +} +nav { + display: flex; + column-gap: 22px; +} +nav a { + text-decoration: none; + color: var(--nord5); +} +nav a:hover { + background: none; + color: var(--nord7); +} +header .flash { + animation: flash 1s; + animation-iteration-count: infinite; + width: 5px; + height: 12px; +} +/* content-related components */ +.post { + padding: 1.4em 0; + display: flex; +} +section .date { + width: 14%; + display: flex; + justify-content: center; +} +section .content { + width: 86%; +} +/* keyframes for animations */ +@keyframes flash { + 0% { background: none; } + 49% { background: var(--nord11); } + 50% { background: var(--nord11); } + 100% { background: none; } +} diff --git a/src/static/style.css b/src/static/style.css deleted file mode 100644 index cca820e..0000000 --- a/src/static/style.css +++ /dev/null @@ -1,123 +0,0 @@ -body { - background-color: #232629; - background-image: url('/static/stars.gif'); - color: #fcfcfc; - font-family: sans-serif, sans-serif; - margin: 0; -} - -table { - border: 1px solid #ea81e8; - border-spacing: 0; -} - -th { - background-color: #a93da9; -} - -td, th { - border: 1px solid #ea81e8; -} - -#jswarning { - background-color: rgb(170, 170, 0); - color: rgb(252, 252, 252); - display: none; - padding: 10px; - border: 4px #dde22d ridge; - margin: 0; - text-align: center; -} - -.container { - margin: 4px auto; - background-color: #170b15; - max-width: 840px; - border: 8px #a93da9 ridge; - padding: 1em; -} - -@media screen and (max-width: 840px) { - body { - background-image: none; - } - .container { - padding: 0; - border: 0; - margin: 0 auto; - } -} - -.header-img { - display: block; - max-width: 100%; - margin-bottom: 0.5em; -} - -a { - color: #ea81e8; - text-decoration: none; -} - -pre { - background-color: #4b364b; - padding: 8px; - border: 1px #ff61ff dashed; - overflow-x: auto; -} - -pre, code { - font: 1rem monospace, monospace; -} - -img { - max-width: min(600px, 100%); - max-height: 500px; -} - -hr { - border: 4px #971195 outset; - border-color: #971195; -} - -h1 { - font-size: 30px; - text-decoration: underline; -} - -.header > h1 { - font-size: 1.5em; - text-decoration: none; -} - -.warning, .danger { - padding: 4px; - border: 1px solid #eff0f1; - border-radius: 5px; -} - -.warning { - background-color: #fdbc4b; - color: #232629; -} - -.danger { - background-color: #da4453; -} - -.mb5 { - margin-block: 0.5em; -} - -.mb5 > span { - display: inline-block; -} - -.icon { - height: 1em; - vertical-align: sub; -} - -.emblems { - display: inline-block; -}