add titles to pages

This commit is contained in:
Akis 2022-06-22 09:57:47 +03:00
parent 36e25f4f42
commit d1c2c1842c
15 changed files with 399 additions and 352 deletions

View File

@ -18,9 +18,7 @@
"i18n": { "i18n": {
"scope": "svelte", "scope": "svelte",
"prefix": "i18n", "prefix": "i18n",
"body": [ "body": ["{\\$t('common.$1')}"],
"{\\$t('common.$1')}"
],
"description": "i18n Snippet for Project Segfault's website" "description": "i18n Snippet for Project Segfault's website"
} }
} }

View File

@ -1,30 +0,0 @@
<script lang="ts">
import SvelteSeo from "svelte-seo";
import Banner from "$lib/images/ProjectSegfault_Desktop_16-9.png";
import * as global from "../i18n/_global.json";
import { t } from '$lib/translations';
</script>
<SvelteSeo
openGraph={{
title: global.NAME,
description: $t('common.INDEX_DESCRIPTION'),
type: "website",
images: [
{
url: Banner,
width: 850,
height: 650,
alt: "Image"
}
]
}}
/>
<svelte:head>
<title>{global.NAME}</title>
</svelte:head>
<div class="mdsvex_content">
<slot />
</div>

View File

@ -4,13 +4,13 @@
import IconGitHub from "~icons/simple-icons/github"; import IconGitHub from "~icons/simple-icons/github";
import IconSignal from "~icons/fa6-solid/signal"; import IconSignal from "~icons/fa6-solid/signal";
import * as global from "../i18n/_global.json"; import * as global from "../i18n/_global.json";
import { t } from '$lib/translations'; import { t } from "$lib/translations";
</script> </script>
<footer> <footer>
<hr /> <hr />
<div class="content"> <div class="content">
<span>{$t('common.FOOTER_COPYRIGHT')}</span> <span>{$t("common.FOOTER_COPYRIGHT")}</span>
<div class="links"> <div class="links">
<a href={global.MATRIX_INVITE}> <a href={global.MATRIX_INVITE}>

View File

@ -1,6 +1,6 @@
<script> <script>
import * as global from "../i18n/_global.json"; import * as global from "../i18n/_global.json";
import { t } from '$lib/translations'; import { t } from "$lib/translations";
</script> </script>
<nav> <nav>
@ -16,12 +16,12 @@
</a> </a>
<div class="links"> <div class="links">
<a href={global.INSTANCES}>{$t('common.NAVBAR_INSTANCES')}</a> <a href={global.INSTANCES}>{$t("common.NAVBAR_INSTANCES")}</a>
<a href="/minecraft">{global.MINECRAFT}</a> <a href="/minecraft">{global.MINECRAFT}</a>
<a href="/donate">{$t('common.NAVBAR_DONATE')}</a> <a href="/donate">{$t("common.NAVBAR_DONATE")}</a>
<a href={global.FAQ_URL}>{$t('common.NAVBAR_FAQ')}</a> <a href={global.FAQ_URL}>{$t("common.NAVBAR_FAQ")}</a>
<a href="/contact">{$t('common.NAVBAR_CONTACT')}</a> <a href="/contact">{$t("common.NAVBAR_CONTACT")}</a>
<a href={global.BLOG_URL}>{$t('common.NAVBAR_BLOG')}</a> <a href={global.BLOG_URL}>{$t("common.NAVBAR_BLOG")}</a>
</div> </div>
</nav> </nav>

View File

@ -1,23 +1,21 @@
import i18n from 'sveltekit-i18n'; import i18n from "sveltekit-i18n";
/** @type {import('sveltekit-i18n').Config} */ /** @type {import('sveltekit-i18n').Config} */
const config = ({ const config = {
loaders: [ loaders: [
{ {
locale: 'en', locale: "en",
key: 'common', key: "common",
loader: async () => ( loader: async () => (await import("../i18n/common.json")).default
await import('../i18n/common.json')
).default,
}, },
{ {
locale: 'nb', locale: "nb",
key: 'common', key: "common",
loader: async () => ( loader: async () => (await import("../i18n/nb.json")).default
await import('../i18n/nb.json')
).default,
} }
], ]
}); };
export const { t, locale, locales, loading, loadTranslations } = new i18n(config); export const { t, locale, locales, loading, loadTranslations } = new i18n(
config
);

View File

@ -1,16 +1,10 @@
<script>
import "$lib/app.css";
import Nav from "$lib/Nav.svelte";
import Footer from "$lib/Footer.svelte";
</script>
<script context="module"> <script context="module">
import { locale, loadTranslations } from '$lib/translations'; import { locale, loadTranslations } from "$lib/translations";
export const load = async ({ url }) => { export const load = async ({ url }) => {
const { pathname } = url; const { pathname } = url;
const defaultLocale = 'en'; // get from cookie, user session, ... const defaultLocale = "en"; // get from cookie, user session, ...
const initLocale = locale.get() || defaultLocale; // set default if no locale already set const initLocale = locale.get() || defaultLocale; // set default if no locale already set
@ -23,13 +17,40 @@
// edge // edge
// https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx // https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
return {}; return {};
} };
</script> </script>
<script>
import "$lib/app.css";
import Nav from "$lib/Nav.svelte";
import Footer from "$lib/Footer.svelte";
import SvelteSeo from "svelte-seo";
import Banner from "$lib/images/ProjectSegfault_Desktop_16-9.png";
import * as global from "../i18n/_global.json";
import { t } from "$lib/translations";
</script>
<SvelteSeo
openGraph={{
title: global.NAME,
description: $t("common.INDEX_DESCRIPTION"),
type: "website",
images: [
{
url: Banner,
width: 850,
height: 650,
alt: "Image"
}
]
}}
/>
<Nav /> <Nav />
<main> <main>
<slot /> <slot />
</main> </main>
<Footer /> <Footer />

View File

@ -1,45 +1,56 @@
<script lang="ts"> <script lang="ts">
import { t } from '$lib/translations'; import { t } from "$lib/translations";
import * as global from "../i18n/_global.json"; import * as global from "../i18n/_global.json";
</script> </script>
<h1>{$t('common.CONTACT_TITLE')}</h1> <svelte:head>
<title>{$t("common.CONTACT_TITLE")} | {global.NAME}</title>
</svelte:head>
<h2>{$t('common.CONTACT_DESCRIPTION')}</h2> <h1>{$t("common.CONTACT_TITLE")}</h1>
<h1>{$t('common.CONTACT_OUR_EMAIL')}</h1> <h2>{$t("common.CONTACT_DESCRIPTION")}</h2>
<h1>{$t("common.CONTACT_OUR_EMAIL")}</h1>
<p><a href="mailto:{global.EMAIL}">{global.EMAIL}</a></p> <p><a href="mailto:{global.EMAIL}">{global.EMAIL}</a></p>
<p><i>{$t('common.CONTACT_EMAIL_SPAM')}</i></p> <p><i>{$t("common.CONTACT_EMAIL_SPAM")}</i></p>
<h1>{$t('common.CONTACT_PEOPLE')}</h1> <h1>{$t("common.CONTACT_PEOPLE")}</h1>
<div id="Active" style="display:none"> <div id="Active" style="display:none">
<div class="parent"> <div class="parent">
<div class="div1">{global.MIDOU}:</div> <div class="div1">{global.MIDOU}:</div>
<a class="div2 matrixcolored" href={global.MIDOU_MATRIX_URL}>[Matrix]</a> <a class="div2 matrixcolored" href={global.MIDOU_MATRIX_URL}>[Matrix]</a
<div class="div3"></div> >
<div class="div3" />
<div class="div4">{global.MRLERIEN}:</div> <div class="div4">{global.MRLERIEN}:</div>
<a class="div5 discordcolored" href={global.MRLERIEN_DISCORD_URL}>Discord</a> <a class="div5 discordcolored" href={global.MRLERIEN_DISCORD_URL}
<div class="div6"></div> >Discord</a
>
<div class="div6" />
<div class="div7">{global.ODYSSEY}:</div> <div class="div7">{global.ODYSSEY}:</div>
<a class="div8 matrixcolored" href={global.ODYSSEY_MATRIX_URL}>[Matrix]</a> <a class="div8 matrixcolored" href={global.ODYSSEY_MATRIX_URL}
<a class="div9 discordcolored" href={global.ODYSSEY_DISCORD_URL}>Discord</a> >[Matrix]</a
>
<a class="div9 discordcolored" href={global.ODYSSEY_DISCORD_URL}
>Discord</a
>
<div class="div10">{global.DEVNOL}:</div> <div class="div10">{global.DEVNOL}:</div>
<a class="div11 matrixcolored" href={global.DEVNOL_MATRIX_URL}>[Matrix]</a> <a class="div11 matrixcolored" href={global.DEVNOL_MATRIX_URL}
<a class="div12 discordcolored" href={global.DEVNOL_DISCORD_URL}>Discord</a> >[Matrix]</a
>
<a class="div12 discordcolored" href={global.DEVNOL_DISCORD_URL}
>Discord</a
>
</div> </div>
</div> </div>
<button <button
id="hide" id="hide"
type="button" type="button"
onclick='document.getElementById("Active").style.display ="block"; document.getElementById("hide").style.display = "none" ;' onclick="document.getElementById("Active").style.display ="block"; document.getElementById("hide").style.display = "none" ;"
> >
{$t("common.CONTACT_CLICK")}
{$t('common.CONTACT_CLICK')}
</button> </button>
<style> <style>
@ -64,25 +75,47 @@ onclick='document.getElementById("Active").style.display ="block"; document.getE
/* this is a hack to make the grid work, need to improve this */ /* this is a hack to make the grid work, need to improve this */
.div1 { grid-area: 1 / 1 / 2 / 2; } .div1 {
.div2 { grid-area: 1 / 2 / 2 / 3; } grid-area: 1 / 1 / 2 / 2;
.div3 { grid-area: 1 / 3 / 2 / 4; } }
.div4 { grid-area: 2 / 1 / 3 / 2; } .div2 {
.div5 { grid-area: 2 / 2 / 3 / 3; } grid-area: 1 / 2 / 2 / 3;
.div6 { grid-area: 2 / 3 / 3 / 4; } }
.div7 { grid-area: 3 / 1 / 4 / 2; } .div3 {
.div8 { grid-area: 3 / 2 / 4 / 3; } grid-area: 1 / 3 / 2 / 4;
.div9 { grid-area: 3 / 3 / 4 / 4; } }
.div10 { grid-area: 4 / 1 / 5 / 2; } .div4 {
.div11 { grid-area: 4 / 2 / 5 / 3; } grid-area: 2 / 1 / 3 / 2;
.div12 { grid-area: 4 / 3 / 5 / 4; } }
.div5 {
grid-area: 2 / 2 / 3 / 3;
}
.div6 {
grid-area: 2 / 3 / 3 / 4;
}
.div7 {
grid-area: 3 / 1 / 4 / 2;
}
.div8 {
grid-area: 3 / 2 / 4 / 3;
}
.div9 {
grid-area: 3 / 3 / 4 / 4;
}
.div10 {
grid-area: 4 / 1 / 5 / 2;
}
.div11 {
grid-area: 4 / 2 / 5 / 3;
}
.div12 {
grid-area: 4 / 3 / 5 / 4;
}
#Active a { #Active a {
border: none; border: none;
border-radius: 10px; border-radius: 10px;
padding: .5rem; padding: 0.5rem;
cursor: pointer; cursor: pointer;
font-family: var(--font-primary); font-family: var(--font-primary);
color: var(--secondary); color: var(--secondary);
@ -94,8 +127,7 @@ onclick='document.getElementById("Active").style.display ="block"; document.getE
} }
.discordcolored { .discordcolored {
background-color: #5865F2; background-color: #5865f2;
color: #fff !important; color: #fff !important;
} }
</style> </style>

View File

@ -1,23 +1,32 @@
<script lang="ts"> <script lang="ts">
import MoneroQR from "$lib/images/Monero.png"; import MoneroQR from "$lib/images/Monero.png";
import { t } from '$lib/translations'; import { t } from "$lib/translations";
import * as global from "../i18n/_global.json"; import * as global from "../i18n/_global.json";
</script> </script>
<h1>{$t('common.DONATE_TITLE')}</h1> <svelte:head>
<title>{$t("common.DONATE_TITLE")} | {global.NAME}</title>
</svelte:head>
<h2>{$t('common.DONATE_DESCRIPTION')}</h2> <h1>{$t("common.DONATE_TITLE")}</h1>
<h1>{$t('common.DONATE_PLEASE_DO')}</h1> <h2>{$t("common.DONATE_DESCRIPTION")}</h2>
<p>{$t('common.DONATE_EXPLANATION')}</p> <h1>{$t("common.DONATE_PLEASE_DO")}</h1>
<h1>{$t('common.DONATE_OK_SURE')}</h1> <p>{$t("common.DONATE_EXPLANATION")}</p>
<h1>{$t("common.DONATE_OK_SURE")}</h1>
<div class="monero"> <div class="monero">
<span>{global.MONERO}: <code>47L7Qsto7XcifY3CdG18ySe5Tt83kpFLDLve9jQwbc9taPBLNGv6ZrJNUKpMG9Nj9zHgCZ4FQMSyt75e8Jvx12JFLtJyFdA</code></span> <span
<img src={MoneroQR} alt="Monero Qr Code"> >{global.MONERO}:
<code
>47L7Qsto7XcifY3CdG18ySe5Tt83kpFLDLve9jQwbc9taPBLNGv6ZrJNUKpMG9Nj9zHgCZ4FQMSyt75e8Jvx12JFLtJyFdA</code
></span
>
<img src={MoneroQR} alt="Monero Qr Code" />
</div> </div>
<style> <style>

View File

@ -1,27 +0,0 @@
---
title: FAQ
description: Frequently or not frequently asked questions about Project Segfault!
---
# {title}
## Who is the project owner?
Orignally: Midou (Sysadmin) and Mrlerien (Hoster), but now Odyssey346 (Game Server Sysadmin, webdev and social media manager) and Devnol (Hoster) are with us.
# Hold on, what if Devnol decides to backstab you?
I highly doubt he will, but in any case this happens, critical services will stay up. So only extra (non important services) running on the server will be gone, but you should be aware of that anyways.
# One of your services contains toxic people!
You can contact us by mail or Matrix and we can figure this out with you. But we recommend that you put most of these requests in our support channel at [#support:projectsegfau.lt](https://matrix.to/#/#support:projectsegfau.lt) on Matrix.
If it's something personal, just say that you have a report against someone on one of our services and you'd like to be contacted by an admin and we'll constact you ASAP. We have no lives so we're quite active.
# How can I trust your services?
Well, you really can't. We don't make our logs or anything public, however, if you would like the data we have on you, please contact us. If you're paranoid, **you are allowed to use Tor on our services**, but we don't host any .onion links.
# Which ways do you prefer to communicate?
Look at <a href="/contact">Contact</a>.

View File

@ -1,21 +1,33 @@
<script> <script>
import { t } from '$lib/translations'; import { t } from "$lib/translations";
import * as global from "../i18n/_global.json"; import * as global from "../i18n/_global.json";
</script> </script>
<svelte:head>
<title>{global.NAME}</title>
</svelte:head>
<h1>{global.NAME}</h1> <h1>{global.NAME}</h1>
<h2> {$t('common.INDEX_DESCRIPTION')} </h2> <h2>{$t("common.INDEX_DESCRIPTION")}</h2>
<h1> {$t('common.INDEX_WHAT')} </h1> <!-- Cause I feel the need to scream --> <h1>{$t("common.INDEX_WHAT")}</h1>
<!-- Cause I feel the need to scream -->
<p> {$t('common.INDEX_WHO_ARE_WE')} </p> <p>{$t("common.INDEX_WHO_ARE_WE")}</p>
<h1> {$t('common.INDEX_TELL_ME_MORE')} </h1> <h1>{$t("common.INDEX_TELL_ME_MORE")}</h1>
<p>{$t('common.INDEX_MORE_INFO')}</p> <p>{$t("common.INDEX_MORE_INFO")}</p>
<a href="https://www.abuseipdb.com/user/82331" title="AbuseIPDB is an IP address blacklist for webmasters and sysadmins to report IP addresses engaging in abusive behavior on their networks"> <a
<img src="https://www.abuseipdb.com/contributor/82331.svg" alt="AbuseIPDB Contributor Badge" style="width: 270px;background: var(--accent-primary); padding: 0.5rem; href="https://www.abuseipdb.com/user/82331"
border-radius: 16px;"> title="AbuseIPDB is an IP address blacklist for webmasters and sysadmins to report IP addresses engaging in abusive behavior on their networks"
>
<img
src="https://www.abuseipdb.com/contributor/82331.svg"
alt="AbuseIPDB Contributor Badge"
style="width: 270px;background: var(--accent-primary); padding: 0.5rem;
border-radius: 16px;"
/>
</a> </a>

View File

@ -1,17 +1,35 @@
<script> <script>
import { t } from '$lib/translations'; import { t } from "$lib/translations";
import * as global from "../../i18n/_global.json";
</script> </script>
<h1>{$t('common.MINECRAFT_TITLE')}</h1>
<h1><a href="/minecraft">{$t('common.CSM_GOBACK')}</a></h1> <svelte:head>
<title>{$t("common.MINECRAFT_TITLE")} | {global.NAME}</title>
</svelte:head>
<h2>{$t('common.CSM_TITLE')}</h2> <h1>{$t("common.MINECRAFT_TITLE")}</h1>
<p>{$t('common.CSM_HOW_THEY_ARE_PICKED')}</p> <h1><a href="/minecraft">{$t("common.CSM_GOBACK")}</a></h1>
<p>{$t('common.CSM_NOTE_BEDROCK')}</p> <h2>{$t("common.CSM_TITLE")}</h2>
<p>{$t("common.CSM_HOW_THEY_ARE_PICKED")}</p>
<p>{$t("common.CSM_NOTE_BEDROCK")}</p>
<ul> <ul>
<li><a href="https://www.curseforge.com/minecraft/mc-mods/xaeros-world-map">Xaero's World Map</a> & <a href="https://www.curseforge.com/minecraft/mc-mods/xaeros-minimap">Xaero's Minimap</a></li> <li>
<li>{$t('common.CSM_OPTIMIZATION_MODS_NOTE')}</li> <a href="https://www.curseforge.com/minecraft/mc-mods/xaeros-world-map"
<li><a href="https://modrinth.com/mod/simple-voice-chat/">Simple Voice Chat</a></li> >Xaero's World Map</a
>
&
<a href="https://www.curseforge.com/minecraft/mc-mods/xaeros-minimap"
>Xaero's Minimap</a
>
</li>
<li>{$t("common.CSM_OPTIMIZATION_MODS_NOTE")}</li>
<li>
<a href="https://modrinth.com/mod/simple-voice-chat/"
>Simple Voice Chat</a
>
</li>
</ul> </ul>

View File

@ -1,50 +1,62 @@
<script> <script>
import { t } from '$lib/translations'; import { t } from "$lib/translations";
import * as global from "../../i18n/_global.json"; import * as global from "../../i18n/_global.json";
</script> </script>
<h1>{$t('common.MINECRAFT_TITLE')}</h1> <svelte:head>
<title>{$t("common.MINECRAFT_TITLE")} | {global.NAME}</title>
</svelte:head>
<h1>{$t('common.MINECRAFT_DESCRIPTION')}</h1> <h1>{$t("common.MINECRAFT_TITLE")}</h1>
<p>{$t('common.MINECRAFT_SMP')}</p> <h1>{$t("common.MINECRAFT_DESCRIPTION")}</h1>
<p>{$t('common.MINECRAFT_JOIN')}</p> <a href={global.DISCORD_INVITE}>{$t('common.MINECRAFT_DISCORD')}</a> <p>{$t("common.MINECRAFT_SMP")}</p>
<h2>{$t('common.MINECRAFT_RULES')}</h2> <p>{$t("common.MINECRAFT_JOIN")}</p>
<a href={global.DISCORD_INVITE}>{$t("common.MINECRAFT_DISCORD")}</a>
<p>{$t('common.MINECRAFT_RULE_1')}</p> <h2>{$t("common.MINECRAFT_RULES")}</h2>
<p>{$t('common.MINECRAFT_RULE_2')}</p>
<p>{$t('common.MINECRAFT_RULE_3')}</p>
<p>{$t('common.MINECRAFT_RULE_4')}</p>
<h2>{$t('common.MINECRAFT_IP')}</h2> <p>{$t("common.MINECRAFT_RULE_1")}</p>
<p>{$t("common.MINECRAFT_RULE_2")}</p>
<p>{$t("common.MINECRAFT_RULE_3")}</p>
<p>{$t("common.MINECRAFT_RULE_4")}</p>
<h2>{$t("common.MINECRAFT_IP")}</h2>
<p><b>Java</b>: {global.MINECRAFT_JAVA_IP}</p> <p><b>Java</b>: {global.MINECRAFT_JAVA_IP}</p>
<p><b>Bedrock</b>: {global.MINECRAFT_BEDROCK_IP}</p> <p><b>Bedrock</b>: {global.MINECRAFT_BEDROCK_IP}</p>
<i>{$t('common.MINECRAFT_NOTE_1')}</i> <i>{$t("common.MINECRAFT_NOTE_1")}</i>
<br> <br />
<i>{$t('common.MINECRAFT_NOTE_2')}</i> <i>{$t("common.MINECRAFT_NOTE_2")}</i>
<h2>{$t('common.MINECRAFT_LINKS')}</h2> <h2>{$t("common.MINECRAFT_LINKS")}</h2>
<a href="https://map.mc.projectsegfau.lt">Dynmap</a> <a href="https://map.mc.projectsegfau.lt">Dynmap</a>
<a href="https://apps.apple.com/us/app/mc-server-connector/id1548251304">{$t('common.MINECRAFT_MC_IOS')}</a> <a href="https://apps.apple.com/us/app/mc-server-connector/id1548251304"
>{$t("common.MINECRAFT_MC_IOS")}</a
>
<a href="https://play.google.com/store/apps/details?id=com.smokiem.mcserverconnector&hl=no&gl=US">{$t('common.MINECRAFT_MC_ANDROID')}</a> <a
href="https://play.google.com/store/apps/details?id=com.smokiem.mcserverconnector&hl=no&gl=US"
>{$t("common.MINECRAFT_MC_ANDROID")}</a
>
<h2>{$t('common.MINECRAFT_CLIENT_SIDE_MODS')}</h2> <h2>{$t("common.MINECRAFT_CLIENT_SIDE_MODS")}</h2>
<a href="/minecraft/client-side-mods">{$t('common.MINECRAFT_CLIENT_SIDE_MODS_URL')}</a> <a href="/minecraft/client-side-mods"
>{$t("common.MINECRAFT_CLIENT_SIDE_MODS_URL")}</a
>
<h2>{$t('common.MINECRAFT_PLUGIN_LIST_TITLE')}</h2> <h2>{$t("common.MINECRAFT_PLUGIN_LIST_TITLE")}</h2>
<p>{$t('common.MINECRAFT_PLUGIN_LIST_NOTE')}</p> <p>{$t("common.MINECRAFT_PLUGIN_LIST_NOTE")}</p>
<ul> <ul>
<li>BlockLocker</li> <li>BlockLocker</li>
@ -53,10 +65,15 @@
<li>EssentialsX (EssentialsXDiscord, EssentialsXGeoIP)</li> <li>EssentialsX (EssentialsXDiscord, EssentialsXGeoIP)</li>
<li>Geyser & Floodgate</li> <li>Geyser & Floodgate</li>
<li>LuckPerms</li> <li>LuckPerms</li>
<li>mcMMO <a href="https://dl.odyssey346.dev/Software/mcMMO_because_fuck_buying_open_source_software.jar">{$t('common.MINECRAFT_MCMMO')}</a></li> <li>
mcMMO <a
href="https://dl.odyssey346.dev/Software/mcMMO_because_fuck_buying_open_source_software.jar"
>{$t("common.MINECRAFT_MCMMO")}</a
>
</li>
<li>TabTPS</li> <li>TabTPS</li>
<li>Vault</li> <li>Vault</li>
<li>ViaVersion ({$t('common.MINECRAFT_VIAVERSION_NOTE')})</li> <li>ViaVersion ({$t("common.MINECRAFT_VIAVERSION_NOTE")})</li>
<li>PlugMan</li> <li>PlugMan</li>
<li>CombatLogX</li> <li>CombatLogX</li>
<li>Simple Voice Chat</li> <li>Simple Voice Chat</li>

View File

@ -12,8 +12,7 @@ const config = {
preprocess: [ preprocess: [
preprocess(), preprocess(),
mdsvex({ mdsvex({
extensions: [".md"], extensions: [".md"]
layout: "./src/lib/Content.svelte"
}) })
], ],