-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web): improve NavBar design (#1522)
- Loading branch information
Showing
12 changed files
with
101 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,4 @@ apps/librelingo_tools/dist | |
*.tsbuildinfo | ||
report.*.*.json | ||
/coverage/ | ||
apps/docs/build/ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<script lang="typescript"> | ||
import LinkOrButton from "../primitives/LinkOrButton.svelte" | ||
import { createEventDispatcher } from "svelte" | ||
|
||
const dispatch = createEventDispatcher() | ||
export let href: string | null = null | ||
</script> | ||
|
||
<div> | ||
<LinkOrButton href={href} on:click="{() => dispatch('click')}"> | ||
<slot /> | ||
</LinkOrButton> | ||
</div> | ||
|
||
<style type="text/scss"> | ||
div :global(*) { | ||
display: block; | ||
padding: 6px; | ||
color: var(--navbar-text-color); | ||
border-radius: var(--button-radius-small); | ||
|
||
&:hover, &:focus { | ||
background-color: var(--navbar-highlight-color); | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
<style type="text/scss"> | ||
.buttonset { | ||
height: 100%; | ||
display: flex; | ||
gap: var(--spacing-medium); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div> | ||
<slot /> | ||
</div> | ||
|
||
<style type="text/scss"> | ||
div { | ||
display: block; | ||
padding: 6px; | ||
color: var(--navbar-text-color); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<script lang="typescript"> | ||
import { createEventDispatcher } from "svelte" | ||
|
||
const dispatch = createEventDispatcher() | ||
export let href: string | null = null | ||
</script> | ||
|
||
{#if href !== null} | ||
<a href={href} {...$$restProps}> | ||
<slot /> | ||
</a> | ||
{/if} | ||
|
||
{#if href === null} | ||
<button on:click={() => dispatch("click")} {...$$restProps}> | ||
<slot /> | ||
</button> | ||
{/if} | ||
|
||
<style type="text/scss"> | ||
button { | ||
display: block; | ||
background: transparent; | ||
border: 0; | ||
font-size: inherit; | ||
cursor: pointer; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { Given } from "cypress-cucumber-preprocessor/steps" | ||
|
||
Given(/I see an? "(.*)" link in the navbar/, (text) => { | ||
cy.get("nav[role=navigation] a").contains(text).should("be.visible") | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d99a410
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: