mirror of https://github.com/hykilpikonna/AquaDX
[S] Better home page tab styling
parent
dfd8d1b0c9
commit
15004b6ba2
|
@ -68,22 +68,6 @@
|
||||||
> span
|
> span
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
> div, > a
|
|
||||||
cursor: pointer
|
|
||||||
transition: $transition
|
|
||||||
text-decoration: underline 1px solid transparent
|
|
||||||
text-underline-offset: 0.1em
|
|
||||||
|
|
||||||
display: flex
|
|
||||||
align-items: center
|
|
||||||
color: unset
|
|
||||||
font-weight: unset
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
color: $c-main
|
|
||||||
text-decoration-color: $c-main
|
|
||||||
text-underline-offset: 0.5em
|
|
||||||
|
|
||||||
@media (max-width: $w-mobile)
|
@media (max-width: $w-mobile)
|
||||||
justify-content: center
|
justify-content: center
|
||||||
|
|
||||||
|
|
|
@ -176,6 +176,16 @@ main.content
|
||||||
@media (max-width: $w-mobile)
|
@media (max-width: $w-mobile)
|
||||||
margin: 100px 0 0
|
margin: 100px 0 0
|
||||||
|
|
||||||
|
> h2.outer-title
|
||||||
|
margin-top: -3.5rem
|
||||||
|
//color: transparent
|
||||||
|
//background-color: rgba($c-main, 70%)
|
||||||
|
//-webkit-background-clip: text
|
||||||
|
//background-clip: text
|
||||||
|
//text-shadow: rgb(0 0 0 / 50%) 0 5px 6px
|
||||||
|
|
||||||
|
@media (max-width: $w-mobile)
|
||||||
|
text-align: center
|
||||||
|
|
||||||
// Overlay
|
// Overlay
|
||||||
.overlay
|
.overlay
|
||||||
|
@ -206,4 +216,21 @@ main.content
|
||||||
max-width: 400px
|
max-width: 400px
|
||||||
|
|
||||||
.no-margin
|
.no-margin
|
||||||
margin: 0
|
margin: 0
|
||||||
|
|
||||||
|
nav
|
||||||
|
> div, > a
|
||||||
|
cursor: pointer
|
||||||
|
transition: $transition
|
||||||
|
text-decoration: underline 1px solid transparent
|
||||||
|
text-underline-offset: 0.1em
|
||||||
|
|
||||||
|
display: flex
|
||||||
|
align-items: center
|
||||||
|
color: unset
|
||||||
|
font-weight: unset
|
||||||
|
|
||||||
|
&:hover
|
||||||
|
color: $c-main
|
||||||
|
text-decoration-color: $c-main
|
||||||
|
text-underline-offset: 0.5em
|
|
@ -5,15 +5,20 @@
|
||||||
import {FADE_IN, FADE_OUT} from "../libs/config";
|
import {FADE_IN, FADE_OUT} from "../libs/config";
|
||||||
|
|
||||||
let tab = 0;
|
let tab = 0;
|
||||||
|
let tabs = ["Portal", "Link Card", "Game Setup"];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main class="content">
|
<main class="content">
|
||||||
<h2>Welcome to AquaDX!</h2>
|
<h2 class="outer-title">Home</h2>
|
||||||
|
|
||||||
<nav class="tabs">
|
<nav class="tabs">
|
||||||
<button class:active={tab === 0} on:click={() => tab = 0}>Welcome</button>
|
{#each tabs as t, i}
|
||||||
<button class:active={tab === 1} on:click={() => tab = 1}>Link Card</button>
|
<div class="clickable"
|
||||||
<button class:active={tab === 2} on:click={() => tab = 2}>Setup Instructions</button>
|
class:active={tab === i}
|
||||||
|
on:click={() => tab = i}
|
||||||
|
on:keydown={(e) => e.key === "Enter" && (tab = i)}
|
||||||
|
role="button" tabindex={i}>{t}
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{#if tab === 0}
|
{#if tab === 0}
|
||||||
|
@ -28,4 +33,16 @@
|
||||||
<SetupInstructions/>
|
<SetupInstructions/>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<style lang="sass">
|
||||||
|
@import "../vars"
|
||||||
|
|
||||||
|
.tabs
|
||||||
|
display: flex
|
||||||
|
gap: 1rem
|
||||||
|
|
||||||
|
div
|
||||||
|
&.active
|
||||||
|
color: $c-main
|
||||||
|
</style>
|
Loading…
Reference in New Issue