You've already forked AstralRinth
forked from didirus/AstralRinth
Merge branch 'master' into gui_search
This commit is contained in:
@@ -1,59 +1,58 @@
|
||||
<script context="module" lang="ts">
|
||||
import { init, waitLocale } from 'svelte-intl-precompile'
|
||||
import { registerAll } from '$locales'
|
||||
import { init, waitLocale, t, getLocaleFromAcceptLanguageHeader } from 'svelte-intl-precompile';
|
||||
import { registerAll, availableLocales } from '$locales';
|
||||
|
||||
registerAll()
|
||||
registerAll();
|
||||
|
||||
/** @type {import('@sveltejs/kit').Load} */
|
||||
export async function load({fetch, session, stuff}) {
|
||||
export const load: import('@sveltejs/kit').Load = async ({ session }) => {
|
||||
init({
|
||||
fallbackLocale: 'en',
|
||||
initialLocale: session.acceptedLanguage,
|
||||
})
|
||||
await waitLocale()
|
||||
initialLocale: getLocaleFromAcceptLanguageHeader(session.acceptLanguage, availableLocales)
|
||||
});
|
||||
await waitLocale();
|
||||
|
||||
return {}
|
||||
}
|
||||
return {};
|
||||
};
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import '@fontsource/inter'
|
||||
import 'omorphia/styles.postcss'
|
||||
import '$styles/global.postcss'
|
||||
import Sidebar from '$layout/Sidebar.svelte'
|
||||
import StatusBar from "$layout/StatusBar.svelte";
|
||||
import Page from "$layout/Page.svelte";
|
||||
import '@fontsource/inter';
|
||||
import 'omorphia/styles.postcss';
|
||||
import '$styles/global.postcss';
|
||||
import Sidebar from '$layout/Sidebar.svelte';
|
||||
import StatusBar from '$layout/StatusBar.svelte';
|
||||
import Page from '$layout/Page.svelte';
|
||||
</script>
|
||||
|
||||
<div class="app base theme-dark">
|
||||
<Sidebar />
|
||||
<StatusBar />
|
||||
<Page>
|
||||
<slot/>
|
||||
</Page>
|
||||
<Sidebar />
|
||||
<StatusBar />
|
||||
<Page>
|
||||
<slot />
|
||||
</Page>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.app {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
"sidebar status-bar"
|
||||
"sidebar page";
|
||||
grid-template-rows: 2.5rem 1fr;
|
||||
grid-template-columns: 14rem 1fr;
|
||||
}
|
||||
.app {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
'sidebar status-bar'
|
||||
'sidebar page';
|
||||
grid-template-rows: 2.5rem 1fr;
|
||||
grid-template-columns: 14rem 1fr;
|
||||
}
|
||||
|
||||
:global(.page) {
|
||||
grid-area: page;
|
||||
}
|
||||
:global(.page) {
|
||||
grid-area: page;
|
||||
}
|
||||
|
||||
:global(.sidebar) {
|
||||
grid-area: sidebar;
|
||||
}
|
||||
:global(.sidebar) {
|
||||
grid-area: sidebar;
|
||||
}
|
||||
|
||||
:global(.status-bar) {
|
||||
grid-area: status-bar;
|
||||
}
|
||||
:global(.status-bar) {
|
||||
grid-area: status-bar;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,26 +1,41 @@
|
||||
<script lang="ts">
|
||||
import Instance from "$components/Instance.svelte";
|
||||
import CardRow from "$components/CardRow.svelte";
|
||||
import Instance from '$components/Instance.svelte';
|
||||
import CardRow from '$components/CardRow.svelte';
|
||||
</script>
|
||||
|
||||
<CardRow title="Jump back in">
|
||||
{#each Array(5) as _, i}
|
||||
<Instance title="New Caves" id="234" version="1.18" image="https://i.ibb.co/8KDxBwq/patchnotes-cavesandcliffs.jpg" />
|
||||
{/each}
|
||||
{#each Array(5) as _, i}
|
||||
<Instance
|
||||
title="New Caves"
|
||||
id="234"
|
||||
version="1.18"
|
||||
image="https://i.ibb.co/8KDxBwq/patchnotes-cavesandcliffs.jpg"
|
||||
/>
|
||||
{/each}
|
||||
</CardRow>
|
||||
|
||||
<CardRow title="Popular packs">
|
||||
{#each Array(5) as _, i}
|
||||
<Instance title="All of Fabric 5" id="567" version="1.18.1" image="https://media.forgecdn.net/avatars/458/829/637733746768258525.png" modpack />
|
||||
{/each}
|
||||
{#each Array(5) as _, i}
|
||||
<Instance
|
||||
title="All of Fabric 5"
|
||||
id="567"
|
||||
version="1.18.1"
|
||||
image="https://media.forgecdn.net/avatars/458/829/637733746768258525.png"
|
||||
modpack
|
||||
/>
|
||||
{/each}
|
||||
</CardRow>
|
||||
|
||||
<CardRow title="New releases">
|
||||
{#each Array(5) as _, i}
|
||||
<Instance title="New Caves" id="234" version="1.18.2" image="https://i.ibb.co/8KDxBwq/patchnotes-cavesandcliffs.jpg" />
|
||||
{/each}
|
||||
{#each Array(5) as _, i}
|
||||
<Instance
|
||||
title="New Caves"
|
||||
id="234"
|
||||
version="1.18.2"
|
||||
image="https://i.ibb.co/8KDxBwq/patchnotes-cavesandcliffs.jpg"
|
||||
/>
|
||||
{/each}
|
||||
</CardRow>
|
||||
|
||||
<style lang="postcss">
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
<script context="module" lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="postcss">
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,49 +1,52 @@
|
||||
<script lang="ts">
|
||||
import VerticalNav from "$components/VerticalNav.svelte";
|
||||
import IconPackage from 'virtual:icons/lucide/package'
|
||||
import IconAdjustments from 'virtual:icons/heroicons-outline/adjustments'
|
||||
import IconFileText from 'virtual:icons/lucide/file-text'
|
||||
import VerticalNav from '$components/VerticalNav.svelte';
|
||||
import IconPackage from 'virtual:icons/lucide/package';
|
||||
import IconAdjustments from 'virtual:icons/heroicons-outline/adjustments';
|
||||
import IconFileText from 'virtual:icons/lucide/file-text';
|
||||
</script>
|
||||
|
||||
<div class="layout-instance">
|
||||
<div class="instance-sidebar">
|
||||
<VerticalNav level={3} items={[
|
||||
<div class="instance-sidebar">
|
||||
<VerticalNav
|
||||
level={3}
|
||||
items={[
|
||||
{
|
||||
label: 'Mods',
|
||||
href: 'mods',
|
||||
icon: IconPackage,
|
||||
label: 'Mods',
|
||||
href: 'mods',
|
||||
icon: IconPackage
|
||||
},
|
||||
{
|
||||
label: 'Settings',
|
||||
href: 'settings',
|
||||
icon: IconAdjustments,
|
||||
label: 'Settings',
|
||||
href: 'settings',
|
||||
icon: IconAdjustments
|
||||
},
|
||||
{
|
||||
label: 'Logs',
|
||||
href: 'logs',
|
||||
icon: IconFileText,
|
||||
label: 'Logs',
|
||||
href: 'logs',
|
||||
icon: IconFileText
|
||||
}
|
||||
]}/>
|
||||
</div>
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="layout-instance__page">
|
||||
<slot />
|
||||
</div>
|
||||
<div class="layout-instance__page">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.layout-instance {
|
||||
display: grid;
|
||||
grid-template-columns: 224px 1fr;
|
||||
height: 100%;
|
||||
.layout-instance {
|
||||
display: grid;
|
||||
grid-template-columns: 224px 1fr;
|
||||
height: 100%;
|
||||
|
||||
&__page {
|
||||
height: 100%;
|
||||
background-color: var(--sub-page-bg);
|
||||
}
|
||||
&__page {
|
||||
height: 100%;
|
||||
background-color: var(--sub-page-bg);
|
||||
}
|
||||
}
|
||||
|
||||
.instance-sidebar {
|
||||
padding: 16px;
|
||||
}
|
||||
.instance-sidebar {
|
||||
padding: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,43 +1,45 @@
|
||||
<script lang="ts">
|
||||
import { Checkbox, FormField, TextInput, Button } from "omorphia"
|
||||
import GlobalSettings from "$components/GlobalSettings.svelte"
|
||||
import TitledSection from "$components/TitledSection.svelte"
|
||||
<script context="module" lang="ts">
|
||||
</script>
|
||||
|
||||
export let overrideGlobalSettings = false
|
||||
<script lang="ts">
|
||||
import GlobalSettings from '$components/GlobalSettings.svelte';
|
||||
import TitledSection from '$components/TitledSection.svelte';
|
||||
|
||||
export let overrideGlobalSettings = false;
|
||||
</script>
|
||||
|
||||
<div class="section">
|
||||
<TitledSection title="Override global settings" toggleable={true}>
|
||||
<GlobalSettings />
|
||||
</TitledSection>
|
||||
<TitledSection title="Override global settings" toggleable={true}>
|
||||
<GlobalSettings />
|
||||
</TitledSection>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
grid-gap: 1rem;
|
||||
.section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
grid-gap: 1rem;
|
||||
|
||||
&__title {
|
||||
display: flex;
|
||||
grid-gap: 1rem;
|
||||
align-items: center;
|
||||
&__title {
|
||||
display: flex;
|
||||
grid-gap: 1rem;
|
||||
align-items: center;
|
||||
|
||||
&::after {
|
||||
flex: 1 1;
|
||||
content: " ";
|
||||
background-color: hsla(0, 0%, 100%, 0.2);
|
||||
height: 0.2rem;
|
||||
border-radius: var(--rounded-max);
|
||||
}
|
||||
}
|
||||
|
||||
&__items {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
grid-gap: 1rem;
|
||||
padding: 0 8px;
|
||||
}
|
||||
&::after {
|
||||
flex: 1 1;
|
||||
content: ' ';
|
||||
background-color: hsla(0, 0%, 100%, 0.2);
|
||||
height: 0.2rem;
|
||||
border-radius: var(--rounded-max);
|
||||
}
|
||||
}
|
||||
|
||||
&__items {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
grid-gap: 1rem;
|
||||
padding: 0 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
<script context="module" lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { Checkbox, FormField, TextInput, Button } from "omorphia"
|
||||
import GlobalSettings from "$components/GlobalSettings.svelte"
|
||||
import GlobalSettings from '$components/GlobalSettings.svelte';
|
||||
</script>
|
||||
|
||||
<div class="section">
|
||||
<GlobalSettings />
|
||||
<GlobalSettings />
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
|
||||
Reference in New Issue
Block a user