Add some borders. Fix style override when switching pages

This commit is contained in:
2026-02-12 20:00:43 +01:00
parent ec1c8b0f5b
commit cc417535fa
6 changed files with 54 additions and 58 deletions

View File

@@ -393,10 +393,6 @@ table:not(.form) {
min-width: 100%; min-width: 100%;
} }
tr {
border-bottom: 1px var(--separator) solid;
}
tr>td { tr>td {
padding: 0.2em 0.5em; padding: 0.2em 0.5em;
} }

View File

@@ -47,13 +47,16 @@ onMount(() => {
return return
} }
// Custom CSS rules for the whole viewer // Custom CSS rules for the whole viewer. The MainMenu applies its
document.documentElement.style = css_from_path(nav.path) // styles to the <html> element. So we apply to the <body> element, our
// styles take precedence since they're lower level, and we can clean it
// up afterwards without overwriting global style
document.body.style = css_from_path(nav.path)
}) })
return () => { return () => {
page_sub() page_sub()
nav_sub() nav_sub()
document.documentElement.style = "" document.body.style = ""
} }
}) })

View File

@@ -185,7 +185,7 @@ onMount(() => {
max-width: 100%; max-width: 100%;
background: var(--body_background); background: var(--body_background);
border-radius: 8px; border-radius: 8px;
padding: 2px; border: 1px solid var(--separator);
text-align: initial; text-align: initial;
} }
.card_component { .card_component {

View File

@@ -135,6 +135,7 @@ these padding divs to move it 25% up */
border-radius: 18px 18px 8px 8px; border-radius: 18px 18px 8px 8px;
overflow: hidden; overflow: hidden;
text-align: left; text-align: left;
border: 1px solid var(--separator);
} }
.header { .header {
flex-grow: 0; flex-grow: 0;

View File

@@ -20,10 +20,10 @@ const toggle_menu = (e: MouseEvent) => {
menu_collapsed = !menu_collapsed menu_collapsed = !menu_collapsed
} }
onMount(async () => { onMount(() => {
menu_collapsed = document.documentElement.clientWidth < 1000 menu_collapsed = document.documentElement.clientWidth < 1000
await loading_run(async () => { loading_run(async () => {
const user = await get_user() const user = await get_user()
if (user.username === undefined || user.username === "") { if (user.username === undefined || user.username === "") {
return return

View File

@@ -15,8 +15,7 @@ onMount(() => {
}) })
</script> </script>
{#if $global_navigator.path.length > 1} <MenuEntry id="tree_parents" collapsed={menu_collapsed}>
<MenuEntry id="tree_parents" collapsed={menu_collapsed}>
{#snippet title()} {#snippet title()}
<div class="title">Parent directories</div> <div class="title">Parent directories</div>
<button title="Navigate up" onclick={() => global_navigator.navigate_up()}> <button title="Navigate up" onclick={() => global_navigator.navigate_up()}>
@@ -36,11 +35,9 @@ onMount(() => {
{/if} {/if}
{/each} {/each}
{/snippet} {/snippet}
</MenuEntry> </MenuEntry>
{/if}
{#if siblings.length !== 0} <MenuEntry id="tree_siblings" collapsed={menu_collapsed}>
<MenuEntry id="tree_siblings" collapsed={menu_collapsed}>
{#snippet title()} {#snippet title()}
<div class="title">Siblings</div> <div class="title">Siblings</div>
<button title="Open previous sibling" onclick={() => global_navigator.open_sibling(-1)}> <button title="Open previous sibling" onclick={() => global_navigator.open_sibling(-1)}>
@@ -63,8 +60,7 @@ onMount(() => {
{/if} {/if}
{/each} {/each}
{/snippet} {/snippet}
</MenuEntry> </MenuEntry>
{/if}
<style> <style>
.title { .title {