From 177b419463f0fd09ecf674a753083f0a0fd84bff Mon Sep 17 00:00:00 2001 From: ange Date: Sat, 19 Apr 2025 08:50:37 +0000 Subject: [PATCH 1/3] fix: copy button --- html/contact.html | 2 +- src/route.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/html/contact.html b/html/contact.html index 337f759..a85ff27 100644 --- a/html/contact.html +++ b/html/contact.html @@ -10,7 +10,7 @@ } function copyFile(id) { - fetch(document.getElementById(id).childNodes[1].href).then(f => { + fetch(document.getElementById(id).childNodes[0].href).then(f => { f.text().then(t => { navigator.clipboard.writeText(t); }) diff --git a/src/route.go b/src/route.go index 19ce2c3..664e7af 100644 --- a/src/route.go +++ b/src/route.go @@ -18,7 +18,7 @@ var routes = []struct { {[]string{"GET"}, url(""), index}, {[]string{"GET"}, url("/(pgp.asc|ssh)"), static}, {[]string{"GET"}, url("/static/.+"), static}, - {[]string{"GET"}, url("/(.+\\.css)"), css}, + {[]string{"GET"}, url("/(.+\\.(css))"), file}, {[]string{"GET"}, url("/([^/]+)"), html}, } -- 2.45.2 From 1af1e594bae4e8506a39ee16d861feb9c9f63659 Mon Sep 17 00:00:00 2001 From: ange Date: Tue, 22 Apr 2025 02:15:02 +0000 Subject: [PATCH 2/3] fix: copy button broken --- html/contact.html | 2 +- src/route.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/html/contact.html b/html/contact.html index a85ff27..337f759 100644 --- a/html/contact.html +++ b/html/contact.html @@ -10,7 +10,7 @@ } function copyFile(id) { - fetch(document.getElementById(id).childNodes[0].href).then(f => { + fetch(document.getElementById(id).childNodes[1].href).then(f => { f.text().then(t => { navigator.clipboard.writeText(t); }) diff --git a/src/route.go b/src/route.go index 664e7af..19ce2c3 100644 --- a/src/route.go +++ b/src/route.go @@ -18,7 +18,7 @@ var routes = []struct { {[]string{"GET"}, url(""), index}, {[]string{"GET"}, url("/(pgp.asc|ssh)"), static}, {[]string{"GET"}, url("/static/.+"), static}, - {[]string{"GET"}, url("/(.+\\.(css))"), file}, + {[]string{"GET"}, url("/(.+\\.css)"), css}, {[]string{"GET"}, url("/([^/]+)"), html}, } -- 2.45.2 From 09dcfdac7ac16aae3f5743cd5187015962eae4b2 Mon Sep 17 00:00:00 2001 From: ange Date: Sun, 17 Aug 2025 03:38:47 +0000 Subject: [PATCH 3/3] feat: wg.sh alias --- .gitea/workflows/deploy.yaml | 2 +- aliases.txt | 3 ++- tmpl/vars.tmpl | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 380f6be..1f60f1a 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -8,7 +8,7 @@ jobs: - name: setup env run: | . ./.env || true - if [ "${{ gitea.ref_name }}" == prod ] && [ -n "$PROD_URL" ]; then + if [ "${{ gitea.ref_name }}" = prod ] && [ -n "$PROD_URL" ]; then BASE_URL="$PROD_URL" else BASE_URL="${{ gitea.ref_name }}.$(tr / '\n' <<< "${{ gitea.repository }}" | tac | tr '\n' .)k8s.gmoker.com" diff --git a/aliases.txt b/aliases.txt index 4afd155..974b84c 100644 --- a/aliases.txt +++ b/aliases.txt @@ -1,3 +1,4 @@ termux.sh https://git.gmoker.com/ange/termux/raw/branch/main/install.sh dotfiles https://git.gmoker.com/ange/dotfiles -arch https://git.gmoker.com/ange/arch +arch https://git.gmoker.com/ange/archinstall +wg.sh https://git.gmoker.com/ange/wg/src/branch/main/install.sh diff --git a/tmpl/vars.tmpl b/tmpl/vars.tmpl index 97ca02e..d0067d2 100644 --- a/tmpl/vars.tmpl +++ b/tmpl/vars.tmpl @@ -3,11 +3,11 @@ {{end}} {{define "phone"}} -+33 5 82 95 16 23 ++33 5 82 95 16 23 {{end}} {{define "email"}} -ange@yw5n.com +ange@yw5n.com {{end}} {{define "wa"}} @@ -19,9 +19,9 @@ {{end}} {{define "pgp"}} -pgp.asc +pgp.asc {{end}} {{define "ssh"}} -ssh +ssh {{end}} -- 2.45.2