2024-06-14 11:33:01 +01:00
|
|
|
<script>
|
2024-06-24 15:23:55 +01:00
|
|
|
import CobaltLogo from "$components/sidebar/CobaltLogo.svelte";
|
|
|
|
import SidebarTab from "$components/sidebar/SidebarTab.svelte";
|
2024-06-14 11:33:01 +01:00
|
|
|
|
2024-06-24 15:23:55 +01:00
|
|
|
import IconDownload from "@tabler/icons-svelte/IconDownload.svelte";
|
|
|
|
import IconCut from "@tabler/icons-svelte/IconCut.svelte";
|
|
|
|
import IconCrop from "@tabler/icons-svelte/IconCrop.svelte";
|
|
|
|
import IconTransform from "@tabler/icons-svelte/IconTransform.svelte";
|
|
|
|
import IconSettings from "@tabler/icons-svelte/IconSettings.svelte";
|
2024-06-16 14:10:58 +01:00
|
|
|
|
2024-06-24 15:23:55 +01:00
|
|
|
import IconComet from "@tabler/icons-svelte/IconComet.svelte";
|
|
|
|
import IconHeart from "@tabler/icons-svelte/IconHeart.svelte";
|
|
|
|
import IconInfoCircle from "@tabler/icons-svelte/IconInfoCircle.svelte";
|
2024-06-14 11:33:01 +01:00
|
|
|
|
2024-06-24 18:46:37 +01:00
|
|
|
const settingsLink = "/settings/general/appearance";
|
2024-06-14 11:33:01 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<nav id="sidebar">
|
|
|
|
<CobaltLogo />
|
|
|
|
<div id="sidebar-tabs">
|
|
|
|
<div id="sidebar-actions" class="sidebar-inner-container">
|
|
|
|
<SidebarTab tabName="save" tabLink="/">
|
2024-06-24 18:46:37 +01:00
|
|
|
<IconDownload />
|
2024-06-14 11:33:01 +01:00
|
|
|
</SidebarTab>
|
|
|
|
<SidebarTab tabName="trim" tabLink="/trim">
|
2024-06-24 18:46:37 +01:00
|
|
|
<IconCut />
|
2024-06-14 11:33:01 +01:00
|
|
|
</SidebarTab>
|
|
|
|
<SidebarTab tabName="crop" tabLink="/crop">
|
2024-06-24 18:46:37 +01:00
|
|
|
<IconCrop />
|
2024-06-14 11:33:01 +01:00
|
|
|
</SidebarTab>
|
|
|
|
<SidebarTab tabName="convert" tabLink="/convert">
|
2024-06-24 18:46:37 +01:00
|
|
|
<IconTransform />
|
2024-06-14 11:33:01 +01:00
|
|
|
</SidebarTab>
|
2024-06-24 18:46:37 +01:00
|
|
|
<SidebarTab tabName="settings" tabLink={settingsLink}>
|
|
|
|
<IconSettings />
|
2024-06-14 11:33:01 +01:00
|
|
|
</SidebarTab>
|
|
|
|
</div>
|
|
|
|
<div id="sidebar-info" class="sidebar-inner-container">
|
|
|
|
<SidebarTab tabName="updates" tabLink="/updates">
|
2024-06-24 18:46:37 +01:00
|
|
|
<IconComet />
|
2024-06-14 11:33:01 +01:00
|
|
|
</SidebarTab>
|
|
|
|
<SidebarTab tabName="donate" tabLink="/donate">
|
2024-06-24 18:46:37 +01:00
|
|
|
<IconHeart />
|
2024-06-14 11:33:01 +01:00
|
|
|
</SidebarTab>
|
|
|
|
<SidebarTab tabName="about" tabLink="/about">
|
2024-06-24 18:46:37 +01:00
|
|
|
<IconInfoCircle />
|
2024-06-14 11:33:01 +01:00
|
|
|
</SidebarTab>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
#sidebar,
|
|
|
|
#sidebar-tabs,
|
|
|
|
.sidebar-inner-container {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
2024-06-14 11:38:10 +01:00
|
|
|
|
2024-06-14 11:33:01 +01:00
|
|
|
#sidebar {
|
2024-06-16 16:45:24 +01:00
|
|
|
background: var(--sidebar-bg);
|
2024-06-14 11:33:01 +01:00
|
|
|
height: 100vh;
|
|
|
|
width: var(--sidebar-width);
|
2024-06-16 14:11:44 +01:00
|
|
|
position: sticky;
|
2024-06-16 17:59:16 +01:00
|
|
|
padding: 0 var(--sidebar-inner-padding);
|
2024-06-14 11:33:01 +01:00
|
|
|
}
|
2024-06-14 11:38:10 +01:00
|
|
|
|
2024-06-14 11:33:01 +01:00
|
|
|
#sidebar-tabs {
|
|
|
|
height: 100%;
|
|
|
|
justify-content: space-between;
|
2024-06-14 16:48:57 +01:00
|
|
|
padding-bottom: var(--padding);
|
2024-06-16 14:50:42 +01:00
|
|
|
overflow-y: scroll;
|
2024-06-14 11:33:01 +01:00
|
|
|
}
|
2024-06-14 12:33:33 +01:00
|
|
|
|
|
|
|
@media screen and (max-width: 535px) {
|
|
|
|
#sidebar,
|
|
|
|
#sidebar-tabs,
|
|
|
|
.sidebar-inner-container {
|
|
|
|
flex-direction: row;
|
|
|
|
}
|
2024-06-16 14:50:42 +01:00
|
|
|
|
2024-06-14 12:33:33 +01:00
|
|
|
#sidebar {
|
|
|
|
width: 100%;
|
2024-06-16 15:39:23 +01:00
|
|
|
height: var(--sidebar-height-mobile);
|
2024-06-14 12:33:33 +01:00
|
|
|
position: fixed;
|
|
|
|
bottom: 0;
|
2024-06-16 17:59:16 +01:00
|
|
|
padding: var(--sidebar-inner-padding) 0;
|
2024-06-20 08:46:01 +01:00
|
|
|
justify-content: center;
|
2024-06-14 12:33:33 +01:00
|
|
|
}
|
2024-06-16 14:50:42 +01:00
|
|
|
|
2024-06-14 12:33:33 +01:00
|
|
|
#sidebar::before {
|
|
|
|
content: '';
|
|
|
|
z-index: 1;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
pointer-events: none;
|
2024-06-16 16:45:24 +01:00
|
|
|
background: var(--sidebar-mobile-gradient);
|
2024-06-14 12:33:33 +01:00
|
|
|
}
|
2024-06-16 14:50:42 +01:00
|
|
|
|
2024-06-14 12:33:33 +01:00
|
|
|
#sidebar-tabs {
|
|
|
|
justify-content: space-around;
|
2024-06-16 14:50:42 +01:00
|
|
|
overflow-y: visible;
|
2024-06-16 15:15:09 +01:00
|
|
|
overflow-x: scroll;
|
2024-06-14 12:33:33 +01:00
|
|
|
padding-bottom: 0;
|
|
|
|
}
|
2024-06-16 17:26:06 +01:00
|
|
|
|
|
|
|
#sidebar :global(.sidebar-inner-container:first-child) {
|
2024-06-16 17:59:16 +01:00
|
|
|
padding-left: calc(var(--border-radius) * 2);
|
2024-06-16 17:26:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#sidebar :global(.sidebar-inner-container:last-child) {
|
2024-06-16 17:59:16 +01:00
|
|
|
padding-right: calc(var(--border-radius) * 2);
|
2024-06-16 17:26:06 +01:00
|
|
|
}
|
2024-06-14 12:33:33 +01:00
|
|
|
}
|
2024-06-14 11:33:01 +01:00
|
|
|
</style>
|