Add some borders. Fix style override when switching pages
This commit is contained in:
@@ -393,10 +393,6 @@ table:not(.form) {
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
tr {
|
||||
border-bottom: 1px var(--separator) solid;
|
||||
}
|
||||
|
||||
tr>td {
|
||||
padding: 0.2em 0.5em;
|
||||
}
|
||||
|
||||
@@ -47,13 +47,16 @@ onMount(() => {
|
||||
return
|
||||
}
|
||||
|
||||
// Custom CSS rules for the whole viewer
|
||||
document.documentElement.style = css_from_path(nav.path)
|
||||
// Custom CSS rules for the whole viewer. The MainMenu applies its
|
||||
// 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 () => {
|
||||
page_sub()
|
||||
nav_sub()
|
||||
document.documentElement.style = ""
|
||||
document.body.style = ""
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ onMount(() => {
|
||||
max-width: 100%;
|
||||
background: var(--body_background);
|
||||
border-radius: 8px;
|
||||
padding: 2px;
|
||||
border: 1px solid var(--separator);
|
||||
text-align: initial;
|
||||
}
|
||||
.card_component {
|
||||
|
||||
@@ -135,6 +135,7 @@ these padding divs to move it 25% up */
|
||||
border-radius: 18px 18px 8px 8px;
|
||||
overflow: hidden;
|
||||
text-align: left;
|
||||
border: 1px solid var(--separator);
|
||||
}
|
||||
.header {
|
||||
flex-grow: 0;
|
||||
|
||||
@@ -20,10 +20,10 @@ const toggle_menu = (e: MouseEvent) => {
|
||||
menu_collapsed = !menu_collapsed
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
onMount(() => {
|
||||
menu_collapsed = document.documentElement.clientWidth < 1000
|
||||
|
||||
await loading_run(async () => {
|
||||
loading_run(async () => {
|
||||
const user = await get_user()
|
||||
if (user.username === undefined || user.username === "") {
|
||||
return
|
||||
|
||||
@@ -15,7 +15,6 @@ onMount(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
{#if $global_navigator.path.length > 1}
|
||||
<MenuEntry id="tree_parents" collapsed={menu_collapsed}>
|
||||
{#snippet title()}
|
||||
<div class="title">Parent directories</div>
|
||||
@@ -37,9 +36,7 @@ onMount(() => {
|
||||
{/each}
|
||||
{/snippet}
|
||||
</MenuEntry>
|
||||
{/if}
|
||||
|
||||
{#if siblings.length !== 0}
|
||||
<MenuEntry id="tree_siblings" collapsed={menu_collapsed}>
|
||||
{#snippet title()}
|
||||
<div class="title">Siblings</div>
|
||||
@@ -64,7 +61,6 @@ onMount(() => {
|
||||
{/each}
|
||||
{/snippet}
|
||||
</MenuEntry>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.title {
|
||||
|
||||
Reference in New Issue
Block a user