19 Commits

Author SHA1 Message Date
ngn
c287ffa086 fix showing the active link in the navbar
All checks were successful
Build the docker image for the API / build (push) Successful in 2m16s
Build the docker image for the frontend application / build (push) Successful in 40s
Signed-off-by: ngn <ngn@ngn.tf>
2025-07-11 22:00:56 +03:00
ngn
26d656896e Merge pull request 'Update dependency @sveltejs/kit to v2.22.5' (#85) from renovate/sveltejs-kit-2.x-lockfile into main
All checks were successful
Build the docker image for the frontend application / build (push) Successful in 53s
Reviewed-on: #85
2025-07-11 19:00:38 +03:00
ngn
734bbdb998 Merge pull request 'Update dependency prettier to v3.6.2' (#82) from renovate/prettier-3.x-lockfile into main
Some checks failed
Build the docker image for the frontend application / build (push) Has been cancelled
Reviewed-on: #82
2025-07-11 19:00:24 +03:00
ngn
7e8a927bb3 Merge pull request 'Update dependency svelte to v5.35.6' (#84) from renovate/svelte-5.x-lockfile into main
Some checks failed
Build the docker image for the frontend application / build (push) Has been cancelled
Reviewed-on: #84
2025-07-11 19:00:13 +03:00
ngn
f08b04e710 Merge pull request 'Update dependency marked to v16' (#86) from renovate/marked-16.x into main
Some checks failed
Build the docker image for the frontend application / build (push) Has been cancelled
Reviewed-on: #86
2025-07-11 19:00:03 +03:00
ngn
fa6c1d8b2c Merge pull request 'Update golang Docker tag to v1.24.5' (#88) from renovate/golang-1.x into main
All checks were successful
Build the docker image for the API / build (push) Successful in 3m18s
Reviewed-on: #88
2025-07-11 18:59:50 +03:00
ngn
0c1e07b779 Merge pull request 'Update dependency @sveltejs/adapter-node to v5.2.13' (#87) from renovate/sveltejs-adapter-node-5.x-lockfile into main
Some checks failed
Build the docker image for the frontend application / build (push) Has been cancelled
Reviewed-on: #87
2025-07-11 18:59:40 +03:00
c615409a42 Update dependency svelte to v5.35.6 2025-07-11 02:05:09 +00:00
da50365380 Update dependency @sveltejs/kit to v2.22.5 2025-07-10 12:04:52 +00:00
68f5480ff1 Update golang Docker tag to v1.24.5 2025-07-09 21:04:42 +00:00
12216ca0f7 Update dependency @sveltejs/adapter-node to v5.2.13 2025-07-09 17:04:35 +00:00
7e407b181d Update dependency marked to v16 2025-06-27 07:05:17 +00:00
4f0e911407 Update dependency prettier to v3.6.2 2025-06-27 07:05:11 +00:00
ngn
b447c8cf13 Merge pull request 'Update dependency svelte to v5.34.7' (#80) from renovate/svelte-5.x-lockfile into main
All checks were successful
Build the docker image for the frontend application / build (push) Successful in 41s
Reviewed-on: #80
2025-06-20 11:36:23 +03:00
ngn
e212d43bf2 Merge pull request 'Update dependency @sveltejs/kit to v2.22.0' (#81) from renovate/sveltejs-kit-2.x-lockfile into main
Some checks failed
Build the docker image for the frontend application / build (push) Has been cancelled
Reviewed-on: #81
2025-06-20 11:36:13 +03:00
2bf94c0f3c Update dependency @sveltejs/kit to v2.22.0 2025-06-20 07:05:19 +00:00
3f49d8294a Update dependency svelte to v5.34.7 2025-06-19 17:04:56 +00:00
ngn
323b76fe98 Merge pull request 'Update dependency svelte to v5.34.4' (#79) from renovate/svelte-5.x-lockfile into main
All checks were successful
Build the docker image for the frontend application / build (push) Successful in 42s
Reviewed-on: #79
2025-06-18 02:24:41 +03:00
f714bc6eaa Update dependency svelte to v5.34.4 2025-06-17 21:04:15 +00:00
18 changed files with 94 additions and 63 deletions

View File

@ -1,4 +1,4 @@
FROM golang:1.24.4
FROM golang:1.24.5
WORKDIR /api

View File

@ -11,4 +11,7 @@ run:
format:
gofmt -s -w .
.PHONY: test format
clean:
rm -f *.elf
.PHONY: test format clean

View File

@ -1,6 +1,6 @@
module github.com/ngn13/website/api
go 1.24.0
go 1.24.5
require (
github.com/gofiber/fiber/v2 v2.52.8

View File

@ -1,7 +1,5 @@
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
github.com/gofiber/fiber/v2 v2.52.6 h1:Rfp+ILPiYSvvVuIPvxrBns+HJp8qGLDnLJawAu27XVI=
github.com/gofiber/fiber/v2 v2.52.6/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
github.com/gofiber/fiber/v2 v2.52.8 h1:xl4jJQ0BV5EJTA2aWiKw/VddRpHrKeZLF0QPUxqn0x4=
github.com/gofiber/fiber/v2 v2.52.8/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
@ -15,12 +13,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-sqlite3 v1.14.27 h1:drZCnuvf37yPfs95E5jd9s3XhdVWLal+6BOK6qrv6IU=
github.com/mattn/go-sqlite3 v1.14.27/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mattn/go-sqlite3 v1.14.28 h1:ThEiQrnbtumT+QMknw63Befp/ce/nUPgBPMlRFEum7A=
github.com/mattn/go-sqlite3 v1.14.28/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/ngn13/ortam v0.0.0-20250412195317-e76e62a7a305 h1:1YxtSMwR14PklXNlZxIqcmfpiq2+G98YNmhSuz7GKCQ=
github.com/ngn13/ortam v0.0.0-20250412195317-e76e62a7a305/go.mod h1:MSJZ4ZstrLvVEvivbp9hhup+iL8rvtpgKcYaF3DSOKk=
github.com/ngn13/ortam v0.0.0-20250421004351-8dea81680817 h1:WkHM4w51N5jCsWcDVcPsXz3zhi/kCfNp/VGh2uPjwsk=
github.com/ngn13/ortam v0.0.0-20250421004351-8dea81680817/go.mod h1:MSJZ4ZstrLvVEvivbp9hhup+iL8rvtpgKcYaF3DSOKk=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=

View File

@ -1,2 +1 @@
engine-strict=true
resolution-mode=highest

View File

@ -3,7 +3,7 @@
"tabWidth": 2,
"singleQuote": false,
"trailingComma": "es5",
"printWidth": 100,
"printWidth": 80,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}

49
app/package-lock.json generated
View File

@ -9,7 +9,7 @@
"version": "6.3",
"dependencies": {
"dompurify": "^3.2.3",
"marked": "^15.0.6",
"marked": "^16.0.0",
"svelte-i18n": "^4.0.1"
},
"devDependencies": {
@ -851,9 +851,9 @@
}
},
"node_modules/@sveltejs/adapter-node": {
"version": "5.2.12",
"resolved": "https://registry.npmjs.org/@sveltejs/adapter-node/-/adapter-node-5.2.12.tgz",
"integrity": "sha512-0bp4Yb3jKIEcZWVcJC/L1xXp9zzJS4hDwfb4VITAkfT4OVdkspSHsx7YhqJDbb2hgLl6R9Vs7VQR+fqIVOxPUQ==",
"version": "5.2.13",
"resolved": "https://registry.npmjs.org/@sveltejs/adapter-node/-/adapter-node-5.2.13.tgz",
"integrity": "sha512-yS2TVFmIrxjGhYaV5/iIUrJ3mJl6zjaYn0lBD70vTLnYvJeqf3cjvLXeXCUCuYinhSBoyF4DpfGla49BnIy7sQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -867,9 +867,9 @@
}
},
"node_modules/@sveltejs/kit": {
"version": "2.21.5",
"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.21.5.tgz",
"integrity": "sha512-P5m7yZtvD1Kx/Z6JcjgJtdMqef/tCGMDrd9B9S2q8j+FMnkeKTMxW1nidnjVzk4HEDRGf4IlBI94/niy6t3hLA==",
"version": "2.22.5",
"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.22.5.tgz",
"integrity": "sha512-l5i+LcDaoymD2mg5ziptnHmzzF79+c9twJiDoLWAPKq7afMEe4mvGesJ+LVtm33A92mLzd2KUHgtGSqTrvfkvg==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -884,8 +884,7 @@
"mrmime": "^2.0.0",
"sade": "^1.8.1",
"set-cookie-parser": "^2.6.0",
"sirv": "^3.0.0",
"vitefu": "^1.0.6"
"sirv": "^3.0.0"
},
"bin": {
"svelte-kit": "svelte-kit.js"
@ -894,9 +893,9 @@
"node": ">=18.13"
},
"peerDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0 || ^6.0.0-next.0",
"svelte": "^4.0.0 || ^5.0.0-next.0",
"vite": "^5.0.3 || ^6.0.0"
"vite": "^5.0.3 || ^6.0.0 || ^7.0.0-beta.0"
}
},
"node_modules/@sveltejs/vite-plugin-svelte": {
@ -1204,9 +1203,9 @@
}
},
"node_modules/esrap": {
"version": "1.4.9",
"resolved": "https://registry.npmjs.org/esrap/-/esrap-1.4.9.tgz",
"integrity": "sha512-3OMlcd0a03UGuZpPeUC1HxR3nA23l+HEyCiZw3b3FumJIN9KphoGzDJKMXI1S72jVS1dsenDyQC0kJlO1U9E1g==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/esrap/-/esrap-2.1.0.tgz",
"integrity": "sha512-yzmPNpl7TBbMRC5Lj2JlJZNPml0tzqoqP5B1JXycNUwtqma9AKCO0M2wHrdgsHcy1WRW7S9rJknAMtByg3usgA==",
"license": "MIT",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.15"
@ -1385,15 +1384,15 @@
}
},
"node_modules/marked": {
"version": "15.0.12",
"resolved": "https://registry.npmjs.org/marked/-/marked-15.0.12.tgz",
"integrity": "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA==",
"version": "16.0.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-16.0.0.tgz",
"integrity": "sha512-MUKMXDjsD/eptB7GPzxo4xcnLS6oo7/RHimUMHEDRhUooPwmN9BEpMl7AEOJv3bmso169wHI2wUF9VQgL7zfmA==",
"license": "MIT",
"bin": {
"marked": "bin/marked.js"
},
"engines": {
"node": ">= 18"
"node": ">= 20"
}
},
"node_modules/memoizee": {
@ -1516,9 +1515,9 @@
}
},
"node_modules/prettier": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz",
"integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==",
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz",
"integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
"dev": true,
"license": "MIT",
"bin": {
@ -1650,9 +1649,9 @@
}
},
"node_modules/svelte": {
"version": "5.34.3",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-5.34.3.tgz",
"integrity": "sha512-Y0QKP2rfWD+ARKe91c4JgZgc/nXa2BfOnVBUjYUMB819m7VyPszihkjdzXPIV0qlGRZYEukpgNq7hgbzTbopJw==",
"version": "5.35.6",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-5.35.6.tgz",
"integrity": "sha512-p7PVLQYrvCxJuxzGfOv/l71hVuHC6EZk5UDjbt/bndMYaBcUV5sFjDsj+PSIYvz1vcfbG6inX83/xIUeik1xGA==",
"license": "MIT",
"dependencies": {
"@ampproject/remapping": "^2.3.0",
@ -1664,7 +1663,7 @@
"axobject-query": "^4.1.0",
"clsx": "^2.1.1",
"esm-env": "^1.2.1",
"esrap": "^1.4.8",
"esrap": "^2.1.0",
"is-reference": "^3.0.3",
"locate-character": "^3.0.0",
"magic-string": "^0.30.11",

View File

@ -22,7 +22,7 @@
"type": "module",
"dependencies": {
"dompurify": "^3.2.3",
"marked": "^15.0.6",
"marked": "^16.0.0",
"svelte-i18n": "^4.0.1"
}
}

View File

@ -13,11 +13,14 @@ function api_urljoin(path = null, query = {}) {
}
function api_check_err(json) {
if (!("error" in json)) throw new Error('API response is missing the "error" key');
if (!("error" in json))
throw new Error('API response is missing the "error" key');
if (json["error"] != "") throw new Error(`API returned an error: ${json["error"]}`);
if (json["error"] != "")
throw new Error(`API returned an error: ${json["error"]}`);
if (!("result" in json)) throw new Error('API response is missing the "result" key');
if (!("result" in json))
throw new Error('API response is missing the "result" key');
}
async function api_http_get(fetch, url) {
@ -39,4 +42,10 @@ async function api_get_projects(fetch) {
return await api_http_get(fetch, api_urljoin("/projects"));
}
export { api_version, api_urljoin, api_get_metrics, api_get_services, api_get_projects };
export {
api_version,
api_urljoin,
api_get_metrics,
api_get_services,
api_get_projects,
};

View File

@ -5,7 +5,8 @@ function doc_urljoin(path = null, query = {}) {
}
function doc_check_err(json) {
if ("error" in json) throw new Error(`Documentation server returned an error: ${json["error"]}`);
if ("error" in json)
throw new Error(`Documentation server returned an error: ${json["error"]}`);
}
async function doc_http_get(fetch, url) {

View File

@ -18,7 +18,9 @@
<footer style="border-top: solid 2px var(--{color()});">
<div class="links">
<span>
<Link link={import.meta.env.WEBSITE_SOURCE_URL} bold={true}>{$_("footer.source")}</Link>
<Link link={import.meta.env.WEBSITE_SOURCE_URL} bold={true}
>{$_("footer.source")}</Link
>
</span>
<span>/</span>
<span>

View File

@ -28,7 +28,8 @@ function locale_from_browser() {
function locale_select(l = null) {
if (l === null) {
if (browser && null !== (l = localStorage.getItem("locale"))) locale_select(l);
if (browser && null !== (l = localStorage.getItem("locale")))
locale_select(l);
else locale_select(locale_from_browser());
return;
}

View File

@ -3,14 +3,13 @@
import { page } from "$app/stores";
export let link;
function is_active() {
return $page.url.pathname == link;
}
</script>
<a
style="text-decoration-color: var(--{color()}); {is_active() ? `color: var(--${color()})` : ''}"
style="
text-decoration-color: var(--{color()});
{$page.url.pathname === link ? `color: var(--${color()});` : ''}
"
data-sveltekit-preload-data
on:click={click}
href={link}

View File

@ -15,9 +15,13 @@
<p>{service.desc[$locale]}</p>
</div>
<div class="links">
<Link highlight={false} link={service.clear}><Icon icon="nf-oct-link" /></Link>
<Link highlight={false} link={service.clear}
><Icon icon="nf-oct-link" /></Link
>
{#if service.onion != ""}
<Link highlight={false} link={service.onion}><Icon icon="nf-linux-tor" /></Link>
<Link highlight={false} link={service.onion}
><Icon icon="nf-linux-tor" /></Link
>
{/if}
{#if service.i2p != ""}
<Link highlight={false} link={service.i2p}

View File

@ -59,7 +59,9 @@
<Link icon="nf-md-email" link="mailto:ngn@ngn.tf">Email</Link>
</li>
<li>
<Link icon="nf-md-mastodon" link="https://defcon.social/@ngn">Mastodon</Link>
<Link icon="nf-md-mastodon" link="https://defcon.social/@ngn"
>Mastodon</Link
>
</li>
</ul>
<span>
@ -72,7 +74,8 @@
</span>
<ul>
<li>
<i style="color: var(--{color()});" class="nf nf-md-speedometer_slow"></i>
<i style="color: var(--{color()});" class="nf nf-md-speedometer_slow"
></i>
{$_("home.services.speed")}
</li>
<li>
@ -80,7 +83,8 @@
{$_("home.services.security")}
</li>
<li>
<i style="color: var(--{color()});" class="nf nf-fa-network_wired"></i>
<i style="color: var(--{color()});" class="nf nf-fa-network_wired"
></i>
{$_("home.services.privacy")}
</li>
<li>

View File

@ -30,7 +30,11 @@
function get_services() {
return services.filter((s) => {
return s.desc[$locale] !== "" && s.desc[$locale] !== null && s.desc[$locale] !== undefined;
return (
s.desc[$locale] !== "" &&
s.desc[$locale] !== null &&
s.desc[$locale] !== undefined
);
});
}
@ -48,10 +52,16 @@
<main>
<div class="title">
{#if show_input}
<input oninput={change} type="text" placeholder={$_("services.search")} />
<input
oninput={change}
type="text"
placeholder={$_("services.search")}
/>
{/if}
<div>
<Link icon="nf-fa-feed" link={api_urljoin("/news/" + $locale)}>{$_("services.feed")}</Link>
<Link icon="nf-fa-feed" link={api_urljoin("/news/" + $locale)}
>{$_("services.feed")}</Link
>
</div>
</div>
<div class="services">

View File

@ -34,12 +34,15 @@
--size-5: 24px;
--size-6: 30px;
--box-shadow-1: rgba(20, 20, 20, 0.19) 0px 10px 20px, rgba(30, 30, 30, 0.23) 0px 6px 6px;
--box-shadow-2: rgba(0, 0, 0, 0.35) 0px 30px 60px -12px inset,
--box-shadow-1:
rgba(20, 20, 20, 0.19) 0px 10px 20px, rgba(30, 30, 30, 0.23) 0px 6px 6px;
--box-shadow-2:
rgba(0, 0, 0, 0.35) 0px 30px 60px -12px inset,
rgba(20, 20, 20, 0.3) 0px 18px 36px -18px inset;
--text-shadow: 3px 2px 8px rgba(50, 50, 50, 0.8);
--background: linear-gradient(rgba(11, 11, 11, 0.808), rgba(1, 1, 1, 0.96)),
--background:
linear-gradient(rgba(11, 11, 11, 0.808), rgba(1, 1, 1, 0.96)),
url("/assets/banner.png");
--profile-size: 220px;
}

View File

@ -5,8 +5,9 @@
margin: 0;
color: #c9d1d9;
background-color: #000;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial,
sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
font-family:
-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica,
Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
font-size: 16px;
line-height: 1.5;
word-wrap: break-word;
@ -1026,7 +1027,9 @@
}
.markdown-body .contains-task-list:hover .task-list-item-convert-container,
.markdown-body .contains-task-list:focus-within .task-list-item-convert-container {
.markdown-body
.contains-task-list:focus-within
.task-list-item-convert-container {
display: block;
width: auto;
height: 24px;