Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ body {
--background:white;
--color: black;
--accent: #232323;
--light: #f0eeeb;
--light: #ffffff;
--logo: invert(9%) sepia(10%) saturate(418%) hue-rotate(22deg) brightness(98%) contrast(89%);
--dark: #232323;
--dark-accent: rgb(76, 75, 72);
Expand Down
91 changes: 73 additions & 18 deletions src/components/Navbar.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,48 @@
<template>
<div class="navbar">
<div class="navbar" :class="{ 'dark-mode': darkMode }">
<router-link to="/">
<img src="@/assets/logo.svg" />
</router-link>
<router-link to="/card"> Cards </router-link>
<router-link to="/transaction"> Transactions </router-link>
<router-link to="/fundingsource"> Funding </router-link>
<toggle-button :value="darkMode" @change="toggleDarkMode" />
<a href="https://lithic.com" target="_blank"> Learn More </a>
<a href="https://docs.lithic.com" target="_blank"> API Docs </a>
<div>
<router-link
to="/"
exact
class="nav-link"
:class="{ active: $route.path === '/' }"
>
Overview
</router-link>
<router-link
to="/card"
class="nav-link"
:class="{ active: $route.path === '/card' }"
>
Cards
</router-link>
<router-link
to="/fundingsource"
class="nav-link"
:class="{ active: $route.path === '/fundingsource' }"
>
Funding
</router-link>
<a href="https://lithic.com" target="_blank" class="nav-link"
>Learn More</a
>
<a href="https://docs.lithic.com" target="_blank" class="nav-link"
>Docs</a
>
</div>

<div class="switch-container">
<p :class="{ 'dark-text': darkMode }">Light</p>
<toggle-button
:value="darkMode"
@change="toggleDarkMode"
class="toggle"
/>
<p :class="{ 'dark-text': !darkMode }">Dark</p>
</div>
</div>
</template>

Expand All @@ -21,7 +55,7 @@ export default {
},
},
methods: {
toggleDarkMode: function () {
toggleDarkMode() {
this.$store.commit("toggleDarkMode");
},
},
Expand All @@ -36,23 +70,24 @@ export default {
top: 0;
height: 56px;
width: 100%;
background: var(--light, #f0eeeb);
padding: 0 24px;
padding: 0 100px;
background: var(--light, #ffffff);
display: flex;
align-items: center;
justify-content: space-between;

> img {
filter: var(--logo);
height: 20px;
}

> * {
font-weight: bold;
> div > .nav-link {
font-weight: 400;
font-family: "Graphik";
text-decoration: none;
margin-right: 24px;

> img {
filter: var(--logo);
height: 20px;
}

&:nth-child(5) {
&:nth-child(7) {
margin-left: auto;
}

Expand All @@ -63,6 +98,26 @@ export default {
&:hover {
opacity: 0.7;
}

&.active {
text-decoration: underline;
}
}

.switch-container {
display: flex;
align-items: center;
.toggle {
margin: 0 12px;
}
.dark-text {
opacity: 0.5;
}
.dark-mode {
.dark-text {
opacity: 1;
}
}
}
}
</style>