refactor: align nav bar stylings with VuePress

pull/79/head
Kia King Ishii 4 years ago
parent f9ddbc1682
commit a7e1b7a155

@ -36,6 +36,16 @@
} }
.nav-links { .nav-links {
display: flex;
align-items: center;
height: 35px;
list-style-type: none; list-style-type: none;
transform: translateY(1px);
}
@media screen and (max-width: 719px) {
.nav-links {
display: none;
}
} }
</style> </style>

@ -1,35 +1,46 @@
<template> <template>
<a <div class="nav-item">
class="nav-link" <a
:class="classes" class="nav-link"
:href="href" :class="classes"
:target="target" :href="href"
:rel="rel" :target="target"
:aria-label="item.ariaLabel" :rel="rel"
> :aria-label="item.ariaLabel"
{{ item.text }} >
<OutboundLink v-if="isExternalLink" /> {{ item.text }}
</a> <OutboundLink v-if="isExternalLink" />
</a>
</div>
</template> </template>
<script src="./NavBarLink"></script> <script src="./NavBarLink"></script>
<style> <style>
.nav-link { .nav-item {
color: var(--text-color); position: relative;
display: inline-block;
margin-left: 1.5rem; margin-left: 1.5rem;
font-weight: 600; line-height: 2rem;
}
.nav-link {
display: inline-block; display: inline-block;
height: 1.75rem; margin-bottom: -2px;
line-height: 1.75rem; border-bottom: 2px solid transparent;
font-size: 0.9rem;
font-weight: 500;
line-height: 1.4rem;
color: var(--text-color);
white-space: nowrap;
} }
.nav-link:hover, .nav-link:hover,
.nav-link.active { .nav-link.active {
border-bottom: 2px solid var(--accent-color); border-bottom-color: var(--accent-color);
} }
.nav-link.external:hover { .nav-link.external:hover {
border-bottom: 0; border-bottom-color: transparent;
} }
</style> </style>

@ -1,5 +1,7 @@
body { body {
padding: 0;
margin: 0; margin: 0;
background-color: #fff;
} }
* { * {
@ -7,10 +9,10 @@ body {
} }
.theme { .theme {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
font-size: 16px;
color: var(--text-color); color: var(--text-color);
} }
@ -26,11 +28,12 @@ header {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0 1.75rem 0 1.5rem; padding: 0.7rem 1.5rem;
} }
@media screen and (max-width: 719px) { @media screen and (max-width: 719px) {
header { header {
padding: 0 1.75rem 0 4rem; padding-left: 4rem;
} }
} }

@ -1,6 +1,6 @@
.theme { .theme {
--border-color: rgb(226, 232, 240); --border-color: rgb(226, 232, 240);
--header-height: 4rem; --header-height: 3.6rem;
--sidebar-width: 20rem; --sidebar-width: 20rem;
--text-color: #2c3e50; --text-color: #2c3e50;
--text-color-light: #476582; --text-color-light: #476582;

Loading…
Cancel
Save