From 94114352471f006efda2cdb96e09cfa7de11cf19 Mon Sep 17 00:00:00 2001 From: Justineo Date: Fri, 22 Oct 2021 12:15:12 +0800 Subject: [PATCH] feat: add theme color and support mobile devices --- assets/styles/global.styl | 11 +++++- assets/styles/post.styl | 32 ++++++++++++++++ components/OneMenu.vue | 78 ++++++++++++++++++++++++++++++++++----- layouts/default.vue | 17 ++++++++- nuxt.config.js | 3 ++ 5 files changed, 128 insertions(+), 13 deletions(-) diff --git a/assets/styles/global.styl b/assets/styles/global.styl index 6957da3..6275172 100644 --- a/assets/styles/global.styl +++ b/assets/styles/global.styl @@ -35,11 +35,18 @@ input font inherit color inherit -a:focus - outline none +a + -webkit-tap-highlight-color transparent + + &:focus + outline none main line-height 1.5 .DocSearch-Container backdrop-filter blur(4px) + +@media (max-width 480px) + body + margin 0 diff --git a/assets/styles/post.styl b/assets/styles/post.styl index b8b87f3..b2be351 100644 --- a/assets/styles/post.styl +++ b/assets/styles/post.styl @@ -141,6 +141,8 @@ margin-y($top, $bottom = $top) backdrop-filter blur(4px) th + position relative + &::after content "" position absolute @@ -353,3 +355,33 @@ margin-y($top, $bottom = $top) 12% 80% background-color #f2f7ff + +@media (max-width 480px) + .post + padding 30px + + [data-markdown] + h1 + h1& + font-size 24px + + h2 + h2& + font-size 20px + + h3 + h3& + font-size 18px + + h4 + h4& + font-size 16px + h5 + h5& + font-size 14px + + table& + display block + max-width 100% + width fit-content + overflow-x auto diff --git a/components/OneMenu.vue b/components/OneMenu.vue index 20b7c53..b072852 100644 --- a/components/OneMenu.vue +++ b/components/OneMenu.vue @@ -1,9 +1,13 @@