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": {
"scope": "svelte",
"prefix": "i18n",
"body": [
"{\\$t('common.$1')}"
],
"body": ["{\\$t('common.$1')}"],
"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 IconSignal from "~icons/fa6-solid/signal";
import * as global from "../i18n/_global.json";
import { t } from '$lib/translations';
import { t } from "$lib/translations";
</script>
<footer>
<hr />
<div class="content">
<span>{$t('common.FOOTER_COPYRIGHT')}</span>
<span>{$t("common.FOOTER_COPYRIGHT")}</span>
<div class="links">
<a href={global.MATRIX_INVITE}>

View File

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

View File

@ -1,23 +1,21 @@
import i18n from 'sveltekit-i18n';
import i18n from "sveltekit-i18n";
/** @type {import('sveltekit-i18n').Config} */
const config = ({
const config = {
loaders: [
{
locale: 'en',
key: 'common',
loader: async () => (
await import('../i18n/common.json')
).default,
locale: "en",
key: "common",
loader: async () => (await import("../i18n/common.json")).default
},
{
locale: 'nb',
key: 'common',
loader: async () => (
await import('../i18n/nb.json')
).default,
locale: "nb",
key: "common",
loader: async () => (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">
import { locale, loadTranslations } from '$lib/translations';
import { locale, loadTranslations } from "$lib/translations";
export const load = async ({ 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
@ -23,13 +17,40 @@
// edge
// https://msdn.microsoft.com/en-us/library/hh869301(v=vs.85).aspx
return {};
}
};
</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 />
<main>
<slot />
</main>
<Footer />

View File

@ -1,45 +1,56 @@
<script lang="ts">
import { t } from '$lib/translations';
import { t } from "$lib/translations";
import * as global from "../i18n/_global.json";
</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><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 class="parent">
<div class="div1">{global.MIDOU}:</div>
<a class="div2 matrixcolored" href={global.MIDOU_MATRIX_URL}>[Matrix]</a>
<div class="div3"></div>
<a class="div2 matrixcolored" href={global.MIDOU_MATRIX_URL}>[Matrix]</a
>
<div class="div3" />
<div class="div4">{global.MRLERIEN}:</div>
<a class="div5 discordcolored" href={global.MRLERIEN_DISCORD_URL}>Discord</a>
<div class="div6"></div>
<a class="div5 discordcolored" href={global.MRLERIEN_DISCORD_URL}
>Discord</a
>
<div class="div6" />
<div class="div7">{global.ODYSSEY}:</div>
<a class="div8 matrixcolored" href={global.ODYSSEY_MATRIX_URL}>[Matrix]</a>
<a class="div9 discordcolored" href={global.ODYSSEY_DISCORD_URL}>Discord</a>
<a class="div8 matrixcolored" href={global.ODYSSEY_MATRIX_URL}
>[Matrix]</a
>
<a class="div9 discordcolored" href={global.ODYSSEY_DISCORD_URL}
>Discord</a
>
<div class="div10">{global.DEVNOL}:</div>
<a class="div11 matrixcolored" href={global.DEVNOL_MATRIX_URL}>[Matrix]</a>
<a class="div12 discordcolored" href={global.DEVNOL_DISCORD_URL}>Discord</a>
<a class="div11 matrixcolored" href={global.DEVNOL_MATRIX_URL}
>[Matrix]</a
>
<a class="div12 discordcolored" href={global.DEVNOL_DISCORD_URL}
>Discord</a
>
</div>
</div>
<button
id="hide"
type="button"
onclick='document.getElementById("Active").style.display ="block"; document.getElementById("hide").style.display = "none" ;'
id="hide"
type="button"
onclick="document.getElementById("Active").style.display ="block"; document.getElementById("hide").style.display = "none" ;"
>
{$t('common.CONTACT_CLICK')}
{$t("common.CONTACT_CLICK")}
</button>
<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 */
.div1 { grid-area: 1 / 1 / 2 / 2; }
.div2 { grid-area: 1 / 2 / 2 / 3; }
.div3 { grid-area: 1 / 3 / 2 / 4; }
.div4 { grid-area: 2 / 1 / 3 / 2; }
.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; }
.div1 {
grid-area: 1 / 1 / 2 / 2;
}
.div2 {
grid-area: 1 / 2 / 2 / 3;
}
.div3 {
grid-area: 1 / 3 / 2 / 4;
}
.div4 {
grid-area: 2 / 1 / 3 / 2;
}
.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 {
border: none;
border-radius: 10px;
padding: .5rem;
padding: 0.5rem;
cursor: pointer;
font-family: var(--font-primary);
color: var(--secondary);
@ -94,8 +127,7 @@ onclick='document.getElementById("Active").style.display ="block"; document.getE
}
.discordcolored {
background-color: #5865F2;
background-color: #5865f2;
color: #fff !important;
}
</style>

View File

@ -1,23 +1,32 @@
<script lang="ts">
import MoneroQR from "$lib/images/Monero.png";
import { t } from '$lib/translations';
import { t } from "$lib/translations";
import * as global from "../i18n/_global.json";
</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">
<span>{global.MONERO}: <code>47L7Qsto7XcifY3CdG18ySe5Tt83kpFLDLve9jQwbc9taPBLNGv6ZrJNUKpMG9Nj9zHgCZ4FQMSyt75e8Jvx12JFLtJyFdA</code></span>
<img src={MoneroQR} alt="Monero Qr Code">
<span
>{global.MONERO}:
<code
>47L7Qsto7XcifY3CdG18ySe5Tt83kpFLDLve9jQwbc9taPBLNGv6ZrJNUKpMG9Nj9zHgCZ4FQMSyt75e8Jvx12JFLtJyFdA</code
></span
>
<img src={MoneroQR} alt="Monero Qr Code" />
</div>
<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>
import { t } from '$lib/translations';
import { t } from "$lib/translations";
import * as global from "../i18n/_global.json";
</script>
<svelte:head>
<title>{global.NAME}</title>
</svelte:head>
<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">
<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
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"
>
<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>

View File

@ -1,17 +1,35 @@
<script>
import { t } from '$lib/translations';
import { t } from "$lib/translations";
import * as global from "../../i18n/_global.json";
</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>
<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>{$t('common.CSM_OPTIMIZATION_MODS_NOTE')}</li>
<li><a href="https://modrinth.com/mod/simple-voice-chat/">Simple Voice Chat</a></li>
<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>{$t("common.CSM_OPTIMIZATION_MODS_NOTE")}</li>
<li>
<a href="https://modrinth.com/mod/simple-voice-chat/"
>Simple Voice Chat</a
>
</li>
</ul>

View File

@ -1,50 +1,62 @@
<script>
import { t } from '$lib/translations';
import { t } from "$lib/translations";
import * as global from "../../i18n/_global.json";
</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>
<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_RULES")}</h2>
<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>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://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>
<li>BlockLocker</li>
@ -53,10 +65,15 @@
<li>EssentialsX (EssentialsXDiscord, EssentialsXGeoIP)</li>
<li>Geyser & Floodgate</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>Vault</li>
<li>ViaVersion ({$t('common.MINECRAFT_VIAVERSION_NOTE')})</li>
<li>ViaVersion ({$t("common.MINECRAFT_VIAVERSION_NOTE")})</li>
<li>PlugMan</li>
<li>CombatLogX</li>
<li>Simple Voice Chat</li>

View File

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