create post top button + misc. cleanup
This commit is contained in:
parent
599075219f
commit
f0a0700aa1
5 changed files with 27 additions and 12 deletions
|
|
@ -1,7 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { DateTime } from "luxon";
|
||||
|
||||
import { RiEditLine, RiFlagLine, RiHistoryLine, RiHome2Line, RiUserLine } from "svelte-remixicon";
|
||||
import { RiEditLine, RiFlagLine } from "svelte-remixicon";
|
||||
import type { PostEntry } from "./backend";
|
||||
import SLayout from "./SLayout.svelte";
|
||||
import GuildAbout from "./GuildAbout.svelte";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts">
|
||||
|
||||
import { RiLoginBoxLine, RiLogoutBoxLine, RiSearch2Line, RiSearchLine, RiSettings3Line, RiShieldStarLine, RiUserLine } from "svelte-remixicon";
|
||||
import { RiAddLine, RiLoginBoxLine, RiLogoutBoxLine, RiSearch2Line, RiSearchLine, RiSettings3Line, RiShieldStarLine, RiUserLine } from "svelte-remixicon";
|
||||
import { activePostCount } from "./globals.svelte";
|
||||
import type { UserEntry } from "./backend";
|
||||
|
||||
|
|
@ -39,6 +39,11 @@ let enable_search = $derived(user !== null);
|
|||
<RiUserLine />
|
||||
</a>
|
||||
</li>
|
||||
<li class="nomobile">
|
||||
<a href="/create">
|
||||
<button>Create post</button>
|
||||
</a>
|
||||
</li>
|
||||
{#if user.badges && user.badges.indexOf("administrator") >= 0}
|
||||
<li>
|
||||
<a href="/admin/">
|
||||
|
|
@ -46,6 +51,7 @@ let enable_search = $derived(user !== null);
|
|||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
|
||||
<li><a href="/logout" aria-label="Log out" title="Log out"><RiLogoutBoxLine /></a></li>
|
||||
{:else}
|
||||
<li><a href="/login" aria-label="Log in" title="Log in"><RiLoginBoxLine /></a></li>
|
||||
|
|
@ -108,7 +114,9 @@ let enable_search = $derived(user !== null);
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
button {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,23 +1,28 @@
|
|||
<script lang="ts">
|
||||
import { browser } from "$app/environment";
|
||||
import { RiAddCircleLine, RiChat2Line, RiCompassDiscoverLine, RiHome2Line, RiHomeLine, RiNotificationLine } from "svelte-remixicon";
|
||||
import { RiAddCircleLine, RiChat2Line, RiCompassDiscoverLine, RiHome2Line, RiHomeLine, RiNotificationLine, RiUserLine } from "svelte-remixicon";
|
||||
import { getMe } from "./globals.svelte";
|
||||
|
||||
function rickroll (){
|
||||
if (browser) {
|
||||
window.open( "https://youtu.be/dQw4w9WgXcQ" );
|
||||
}
|
||||
}
|
||||
|
||||
let me = $derived(getMe());
|
||||
</script>
|
||||
|
||||
{#if me}
|
||||
<footer class="mobileonly">
|
||||
<ul class="row">
|
||||
<li><a href="/" title="Homepage"><RiHome2Line size="2em" /></a></li>
|
||||
<li><a href="/" title="Discover"><RiCompassDiscoverLine size="2em" /></a></li>
|
||||
<li><a href="/new" title="Create"><RiAddCircleLine size="2em" /></a></li>
|
||||
<li><a href="/user/yusur" title="Messages"><RiChat2Line size="2em" /></a></li>
|
||||
<li><a href="/create" title="Create"><RiAddCircleLine size="2em" /></a></li>
|
||||
<li><a href="/@{me.username}" title="Profile"><RiUserLine size="2em" /></a></li>
|
||||
<li><a href="?" onclick={rickroll} title="Notifications"><RiNotificationLine size="2em" /></a></li>
|
||||
</ul>
|
||||
</footer>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ let colorThemeCls = $derived(`color-scheme-${colorScheme} color-theme-${colorThe
|
|||
<!-- end SEO tags -->
|
||||
</svelte:head>
|
||||
|
||||
<global-wrapper class={colorThemeCls}>
|
||||
<div class="{colorThemeCls} contents">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/">{appName()}</a>
|
||||
|
|
@ -54,7 +54,7 @@ let colorThemeCls = $derived(`color-scheme-${colorScheme} color-theme-${colorThe
|
|||
</main>
|
||||
|
||||
<MobileFooter />
|
||||
</global-wrapper>
|
||||
</div>
|
||||
|
||||
|
||||
<style>
|
||||
|
|
@ -88,8 +88,13 @@ let colorThemeCls = $derived(`color-scheme-${colorScheme} color-theme-${colorThe
|
|||
|
||||
@media screen and (max-width: 799px) {
|
||||
main {
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
width: 100vw;
|
||||
}
|
||||
}
|
||||
|
||||
.contents {
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import { redirect } from 'sveltekit-flash-message/server';
|
|||
|
||||
export const actions = {
|
||||
default: async (event) => {
|
||||
// TODO login
|
||||
|
||||
const { request } = event;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue