From cfa5ea2f4a8fd79136cfe95ad1fdfe88d52eece8 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Mon, 3 Mar 2025 16:58:21 +0800 Subject: feat(www): update page and use hugo image. --- www/archetypes/default.md | 1 + www/assets/home.css | 79 ++++++++++++++++++++++++++++++++++ www/assets/real-home.css | 61 --------------------------- www/content/_index.md | 1 - www/content/hurd.md | 5 +++ www/content/todos.md | 5 +++ www/layouts/index.html | 92 ++++++++++++++++++++++++++++++++++++++++ www/layouts/real-home/home.html | 93 ----------------------------------------- 8 files changed, 182 insertions(+), 155 deletions(-) create mode 100644 www/assets/home.css delete mode 100644 www/assets/real-home.css create mode 100644 www/content/hurd.md create mode 100644 www/content/todos.md create mode 100644 www/layouts/index.html delete mode 100644 www/layouts/real-home/home.html (limited to 'www') diff --git a/www/archetypes/default.md b/www/archetypes/default.md index 00e77bd..54cae55 100644 --- a/www/archetypes/default.md +++ b/www/archetypes/default.md @@ -1,6 +1,7 @@ --- title: "{{ replace .Name "-" " " | title }}" date: {{ .Date }} +lastmod: {{ .Date }} draft: true --- diff --git a/www/assets/home.css b/www/assets/home.css new file mode 100644 index 0000000..1db357e --- /dev/null +++ b/www/assets/home.css @@ -0,0 +1,79 @@ +#slogan { + position: sticky; + z-index: 1; + top: 0; +} + +#title-name { + font-family: monospace; + color: var(--bg-color); + background-color: var(--fg-color); +} + +#avatar { + float: right; +} + +#links { + font-family: monospace; + + margin-block-end: 1rem; + + > ul { + display: inline; + padding-inline-start: 0.5em; + >li { + display: inline; + + &::after { + content: " | "; + } + } + } +} + +#recent-posts { + margin-block-end: 1.5em; +} + +#friends-container { + display: flex; + gap: 1em; +} + +.friend { + flex-grow: 0; + text-align: center; +} + +.friend a { + font-family: unset; +} + +.friend-avatar { + object-fit: cover; +} + +.friend-github { + width: 1em; + vertical-align: middle; + margin-right: -0.5em; +} + +.friend-tag { + font-size: 0.8em; +} + +.citation { + margin: auto; +} + +.citation figcaption { + text-align: right; +} + +html[data-theme="dark"] { + & .friend-github { + filter: invert(1); + } +} \ No newline at end of file diff --git a/www/assets/real-home.css b/www/assets/real-home.css deleted file mode 100644 index 83c865b..0000000 --- a/www/assets/real-home.css +++ /dev/null @@ -1,61 +0,0 @@ -#slogan { - position: sticky; - z-index: 1; - top: 0; -} - -#title-name { - font-family: monospace; - color: var(--bg-color); - background-color: var(--fg-color); -} - -#avatar { - float: right; -} - -#recent-posts { - margin-block-end: 1.5em; -} - -#friends-container { - display: flex; - gap: 1em; -} - -.friend { - flex-grow: 0; - text-align: center; -} - -.friend a { - font-family: unset; -} - -.friend-avatar { - object-fit: cover; -} - -.friend-github { - width: 1em; - vertical-align: middle; - margin-right: -0.5em; -} - -.friend-tag { - font-size: 0.8em; -} - -.citation { - margin: auto; -} - -.citation figcaption { - text-align: right; -} - -html[data-theme="dark"] { - & .friend-github { - filter: invert(1); - } -} diff --git a/www/content/_index.md b/www/content/_index.md index b4533a5..e144d39 100644 --- a/www/content/_index.md +++ b/www/content/_index.md @@ -1,4 +1,3 @@ --- title: Home -type: real-home --- diff --git a/www/content/hurd.md b/www/content/hurd.md new file mode 100644 index 0000000..67cf6f8 --- /dev/null +++ b/www/content/hurd.md @@ -0,0 +1,5 @@ +--- +title: "Hurd" +date: 2025-03-03T15:34:41+08:00 +lastmod: 2025-03-03T15:34:41+08:00 +--- diff --git a/www/content/todos.md b/www/content/todos.md new file mode 100644 index 0000000..da7cc0f --- /dev/null +++ b/www/content/todos.md @@ -0,0 +1,5 @@ +--- +title: "Todos" +date: 2025-03-03T15:34:53+08:00 +lastmod: 2025-03-03T15:34:53+08:00 +--- diff --git a/www/layouts/index.html b/www/layouts/index.html new file mode 100644 index 0000000..55e49ff --- /dev/null +++ b/www/layouts/index.html @@ -0,0 +1,92 @@ +{{ define "head"}} + {{ partial "css.html" "home.css" }} + {{ partial "css.html" "partials/preview/article.css" }} +{{ end }} + +{{ define "friend" }} + {{ $gh_url := printf "https://github.com/%s" .github}} +
+ + Friend {{.name}}'s avatar
{{.name}}
+ + {{- with resources.Get "github-mark.png" -}} + + {{- end -}} +
+ {{ if .tag }} + {{ .tag }} + {{ end }} +
+{{ end }} + +{{ define "content"}} + My avatar +

Hello! This is crupest !

+
+
+

Welcome to my home page! Nice to meet you here! 🥰

+

If you have something interesting to share with me, feel free to email me at + crupest@crupest.life. + You can also create an issue in any of my repos on GitHub to talk anything to me. +

+ +
+
+ {{ with .GetPage "/posts" }} +
+

Recent Posts (all)

+ {{ partial "preview/posts.html" (dict + "h" "h3" + "pages" (.RegularPages.ByDate.Reverse.Limit 3)) + }} +
+ {{ end }} +
+
+

My Friends (more links are being collected ...)

+
+ {{ block "friend" dict + "name" "wsm" + "avatar" "https://avatars.githubusercontent.com/u/74699943?v=4" + "github" "wushuming666" + }} + {{ end }} + {{ block "friend" dict + "name" "hsz" + "url" "https://www.hszsoft.com" + "avatar" "https://avatars.githubusercontent.com/u/63097618?v=4" + "github" "hszSoft" + "tag" "随性の程序员" + }} + {{ end }} +
+
+
+
+

Always Remember

+
+
+

Die Philosophen haben die Welt nur verschieden interpretiert, es kömmt aber darauf an, sie zu verändern.

+

Translated from German: + The philosophers have only interpreted the world in various ways, the point is to change it.

+
+
+ Karl Marx, Theses on Feuerbach (1845) +
+
+
+{{ end }} \ No newline at end of file diff --git a/www/layouts/real-home/home.html b/www/layouts/real-home/home.html deleted file mode 100644 index daf3248..0000000 --- a/www/layouts/real-home/home.html +++ /dev/null @@ -1,93 +0,0 @@ -{{ define "head"}} - {{ partial "css.html" "real-home.css" }} - {{ partial "css.html" "partials/preview/article.css" }} -{{ end }} - -{{ define "friend" }} - {{ $gh_url := printf "https://github.com/%s" .github}} -
- - Friend {{.name}}'s avatar
{{.name}}
- - {{- with resources.Get "github-mark.png" -}} - - {{- end -}} -
- {{ if .tag }} - {{ .tag }} - {{ end }} -
-{{ end }} - -{{ define "content"}} - My avatar -

Hello! This is crupest !

-
-
-

Welcome to my home page! Nice to meet you here! 🥰

-

If you have something interesting to share with me, feel free to email me at - crupest@crupest.life. -

-

You can also create an issue in any of my repos on GitHub to talk anything to me, - https://github.com/crupest. -

-
-
- {{ with .Site.GetPage "posts" }} -
-

Recent Posts (all)

- {{ partial "preview/posts.html" (dict - "h" "h3" - "pages" (.RegularPages.ByDate.Reverse.Limit 3)) - }} -
- {{ end }} -
-
-

My Friends (more links are being collected ...)

-
- {{ block "friend" dict - "name" "wsm" - "avatar" "https://avatars.githubusercontent.com/u/74699943?v=4" - "github" "wushuming666" - }} - {{ end }} - {{ block "friend" dict - "name" "hsz" - "url" "https://www.hszsoft.com" - "avatar" "https://avatars.githubusercontent.com/u/63097618?v=4" - "github" "hszSoft" - "tag" "随性の程序员" - }} - {{ end }} -
-
- -
-
-

Always Remember

-
-
-

Die Philosophen haben die Welt nur verschieden interpretiert, es kömmt aber darauf an, sie zu verändern.

-

Translated from German: - The philosophers have only interpreted the world in various ways, the point is to change it.

-
-
- Karl Marx, Theses on Feuerbach (1845) -
-
-
-{{ end }} \ No newline at end of file -- cgit v1.2.3