Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
parent
6d7a554140
commit
fac5874be3
7 changed files with 63 additions and 68 deletions
20
deno.json
20
deno.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"imports": {
|
||||
"lume/": "https://deno.land/x/lume@v2.3.2/",
|
||||
"lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/cms@0.5.10/"
|
||||
"lume/": "https://deno.land/x/lume@v2.4.3/",
|
||||
"lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/cms@0.7.3/"
|
||||
},
|
||||
"tasks": {
|
||||
"lume": "echo \"import 'lume/cli.ts'\" | deno run -A -",
|
||||
|
@ -15,13 +15,13 @@
|
|||
},
|
||||
"exclude": [
|
||||
"./_site"
|
||||
],
|
||||
"deploy": {
|
||||
"project": "bffcfd12-e23c-4402-b99a-335185e60640",
|
||||
"exclude": [
|
||||
"**/node_modules"
|
||||
],
|
||||
"include": [],
|
||||
"entrypoint": "serve.ts"
|
||||
}
|
||||
"deploy": {
|
||||
"project": "bffcfd12-e23c-4402-b99a-335185e60640",
|
||||
"exclude": [
|
||||
"**/node_modules"
|
||||
],
|
||||
"include": [],
|
||||
"entrypoint": "serve.ts"
|
||||
}
|
||||
}
|
||||
|
|
30
plugins.ts
30
plugins.ts
|
@ -1,37 +1,23 @@
|
|||
import "lume/types.ts";
|
||||
import favicon from "lume/plugins/favicon.ts"
|
||||
import Color from "npm:colorjs.io@0.5.2";
|
||||
import simpleIcons from "https://deno.land/x/lume_icon_plugins@v0.1.1/simpleicons.ts";
|
||||
import basePath from "lume/plugins/base_path.ts";
|
||||
import favicon from "lume/plugins/favicon.ts";
|
||||
import metas from "lume/plugins/metas.ts";
|
||||
import postcss from "lume/plugins/postcss.ts";
|
||||
import transformImages from "lume/plugins/transform_images.ts";
|
||||
import metas from "lume/plugins/metas.ts";
|
||||
import minifyHTML from "lume/plugins/minify_html.ts";
|
||||
import svgo from "lume/plugins/svgo.ts";
|
||||
import basePath from "lume/plugins/base_path.ts";
|
||||
import * as si from "npm:simple-icons@11.9.0";
|
||||
import type { SimpleIcon } from "npm:simple-icons@11.9.0";
|
||||
import Color from "https://colorjs.io/dist/color.js";
|
||||
|
||||
const icons = Object.values(si) as SimpleIcon[];
|
||||
|
||||
/** Configure the site */
|
||||
export default function () {
|
||||
return (site: Lume.Site) => {
|
||||
site.use(postcss())
|
||||
.use(favicon())
|
||||
.use(metas())
|
||||
.use(svgo())
|
||||
.use(favicon())
|
||||
.use(basePath())
|
||||
.mergeKey("extra_head", "stringArray")
|
||||
.use(transformImages())
|
||||
.copy("static", ".")
|
||||
.copy("static/.domains")
|
||||
.use(minifyHTML({
|
||||
extensions: [".css", ".html", ".js"]
|
||||
}));
|
||||
|
||||
site.data("icon", (slug?: string) => {
|
||||
if (!slug) return;
|
||||
return icons.find((icon) => icon.slug === slug);
|
||||
});
|
||||
.use(simpleIcons())
|
||||
.copy("static", ".");
|
||||
|
||||
site.data("textColor", (hex: string) => {
|
||||
const color = new Color(`#${hex}`);
|
||||
|
|
|
@ -33,4 +33,4 @@
|
|||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
box-shadow: 0 2px 10px -8px #0009;
|
||||
}
|
||||
}
|
||||
|
||||
.button:not(.is-primary) {
|
||||
background: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
|
@ -59,9 +58,8 @@
|
|||
box-shadow: 0 2px 10px -8px #0009;
|
||||
}
|
||||
}
|
||||
|
||||
.button:not(.is-primary) {
|
||||
background: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="{{ it.lang }}">
|
||||
<head>
|
||||
|
@ -9,7 +9,7 @@
|
|||
<meta name="supported-color-schemes" content="light dark">
|
||||
<meta name="theme-color" content="hsl(220, 20%, 100%)" media="(prefers-color-scheme: light)">
|
||||
<meta name="theme-color" content="hsl(220, 20%, 10%)" media="(prefers-color-scheme: dark)">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/styles.css">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon.png">
|
||||
<link rel="canonical" href="{{ url |> url(true) }}">
|
||||
|
@ -42,34 +42,45 @@
|
|||
{{> const icons = links.filter((link) => link.only_icon) }}
|
||||
|
||||
{{ if icons.length }}
|
||||
<ul class="icon-list">
|
||||
{{ for link of icons }}
|
||||
{{> let i = icon(link.type) }}
|
||||
<li>
|
||||
<a href="{{ link.href }}" rel="me" class="button" style="--bg-color:{{ link.hex || `#${i?.hex || "fff" }` }}; --text-color:{{ link.textColor || textColor(i?.hex || "fff") }}" title="{{ link.text }}">
|
||||
{{ i?.svg }}
|
||||
</a>
|
||||
</li>
|
||||
{{ /for }}
|
||||
</ul>
|
||||
<ul class="icon-list">
|
||||
{{ for link of icons }}
|
||||
{{ set hex = link.type |> simpleicons("hex") }}
|
||||
<li>
|
||||
<a
|
||||
href="{{ link.href }}"
|
||||
class="button"
|
||||
rel="me"
|
||||
style='--bg-color:{{ link.hex || `#${hex || "fff" }` }}; --text-color:{{ link.textColor || textColor(hex || "fff") }}'
|
||||
title="{{ link.text }}"
|
||||
>
|
||||
{{ link.type |> simpleicons }}
|
||||
</a>
|
||||
</li>
|
||||
{{ /for }}
|
||||
</ul>
|
||||
{{ /if }}
|
||||
|
||||
<ul class="link-list">
|
||||
{{ for link of links.filter((link) => !link.only_icon) }}
|
||||
{{> let i = icon(link.type) }}
|
||||
<li>
|
||||
<a href="{{ link.href }}" rel="me" class="button" style="--bg-color:{{ link.hex || `#${i?.hex || "fff" }` }}; --text-color:{{ link.textColor || textColor(i?.hex || "fff") }}">
|
||||
{{ i?.svg }}
|
||||
{{ link.text }}
|
||||
</a>
|
||||
</li>
|
||||
{{ set hex = link.type |> simpleicons("hex") }}
|
||||
<li>
|
||||
<a
|
||||
href="{{ link.href }}"
|
||||
class="button"
|
||||
rel="me"
|
||||
style='--bg-color:{{ link.hex || `#${hex || "fff" }` }}; --text-color:{{ link.textColor || textColor(hex || "fff") }}'
|
||||
>
|
||||
{{ link.type |> simpleicons }}
|
||||
{{ link.text }}
|
||||
</a>
|
||||
</li>
|
||||
{{ /for }}
|
||||
</ul>
|
||||
</main>
|
||||
{{ if footer }}
|
||||
<footer>
|
||||
{{ footer |> md }}
|
||||
</footer>
|
||||
<footer>
|
||||
{{ footer |> md }}
|
||||
</footer>
|
||||
{{ /if }}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -9,9 +9,9 @@ metas:
|
|||
image: =header.avatar
|
||||
generator: true
|
||||
links:
|
||||
- text: Git
|
||||
- type: forgejo
|
||||
text: Git
|
||||
href: 'https://git.froth.zone/sam'
|
||||
type: forgejo
|
||||
only_icon: false
|
||||
- type: writedotas
|
||||
text: Blog
|
||||
|
@ -29,8 +29,7 @@ links:
|
|||
text: Bluesky
|
||||
href: 'https://bsky.app/profile/samtherapy.net'
|
||||
only_icon: false
|
||||
- type: nostr
|
||||
text: Nostr (I don't like using it but I have one)
|
||||
- text: Nostr (I don't like using it but I have one)
|
||||
href: >-
|
||||
https://njump.me/nprofile1qyfhwumn8ghj7mmxve3ksctfdch8qatz9uq3vamnwvaz7tmjv4kxz7fwd4hhxarj9ec82c30qythwumn8ghj7un9d3shjtnxwfhhg6pw0fhkuef0qqs9gymnvuqhq66973gsat9rnh44v9la7qmss2xk747z5tv263zydzq2nr59m
|
||||
only_icon: false
|
||||
|
@ -39,21 +38,22 @@ links:
|
|||
href: 'https://froth.zone/users/sam'
|
||||
only_icon: false
|
||||
- type: github
|
||||
text: GitHub
|
||||
href: 'https://github.com/SamTherapy'
|
||||
only_icon: true
|
||||
text: GitHub
|
||||
- only_icon: true
|
||||
type: gitlab
|
||||
- type: gitlab
|
||||
text: GitLab
|
||||
href: 'https://gitlab.com/SamTherapy'
|
||||
only_icon: true
|
||||
- type: codeberg
|
||||
text: Codeberg
|
||||
href: 'https://codeberg.org/sammefishe'
|
||||
only_icon: true
|
||||
- only_icon: true
|
||||
type: sourcehut
|
||||
- type: sourcehut
|
||||
text: SourceHut
|
||||
href: 'https://sr.ht/~sammefishe/'
|
||||
only_icon: true
|
||||
footer: >-
|
||||
Powered by [Lume](https://lume.land) &
|
||||
[SimpleMe](https://github.com/lumeland/theme-simple-me) theme
|
||||
extra_head: "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Blog\" href=\"https://blog.froth.zone/sam/feed/\">\n<link rel=\"me\" href=\"mailto:sam@samtherapy.net\" rel=\"me\"/>\n"
|
||||
|
|
|
@ -36,4 +36,4 @@ footer {
|
|||
a {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue