From a7e1b7a1556341a4b81d44dad20c7aaa68d40a8d Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Sat, 5 Sep 2020 20:25:47 +0900 Subject: [PATCH] refactor: align nav bar stylings with VuePress --- .../theme-default/components/NavBar.vue | 10 ++++ .../theme-default/components/NavBarLink.vue | 47 ++++++++++++------- src/client/theme-default/styles/layout.css | 11 +++-- src/client/theme-default/styles/vars.css | 2 +- 4 files changed, 47 insertions(+), 23 deletions(-) diff --git a/src/client/theme-default/components/NavBar.vue b/src/client/theme-default/components/NavBar.vue index 5f43c8f8..50f2cffc 100644 --- a/src/client/theme-default/components/NavBar.vue +++ b/src/client/theme-default/components/NavBar.vue @@ -36,6 +36,16 @@ } .nav-links { + display: flex; + align-items: center; + height: 35px; list-style-type: none; + transform: translateY(1px); +} + +@media screen and (max-width: 719px) { + .nav-links { + display: none; + } } diff --git a/src/client/theme-default/components/NavBarLink.vue b/src/client/theme-default/components/NavBarLink.vue index 4a5f57ca..f6f5da6b 100644 --- a/src/client/theme-default/components/NavBarLink.vue +++ b/src/client/theme-default/components/NavBarLink.vue @@ -1,35 +1,46 @@ diff --git a/src/client/theme-default/styles/layout.css b/src/client/theme-default/styles/layout.css index d440bf04..85c914ad 100644 --- a/src/client/theme-default/styles/layout.css +++ b/src/client/theme-default/styles/layout.css @@ -1,5 +1,7 @@ body { + padding: 0; margin: 0; + background-color: #fff; } * { @@ -7,10 +9,10 @@ body { } .theme { - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, - sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + font-size: 16px; color: var(--text-color); } @@ -26,11 +28,12 @@ header { display: flex; align-items: center; justify-content: space-between; - padding: 0 1.75rem 0 1.5rem; + padding: 0.7rem 1.5rem; } + @media screen and (max-width: 719px) { header { - padding: 0 1.75rem 0 4rem; + padding-left: 4rem; } } diff --git a/src/client/theme-default/styles/vars.css b/src/client/theme-default/styles/vars.css index 264691a0..859d6ec4 100644 --- a/src/client/theme-default/styles/vars.css +++ b/src/client/theme-default/styles/vars.css @@ -1,6 +1,6 @@ .theme { --border-color: rgb(226, 232, 240); - --header-height: 4rem; + --header-height: 3.6rem; --sidebar-width: 20rem; --text-color: #2c3e50; --text-color-light: #476582;