From 5e55b53e043e28d6efa3ce118b6f62b0ab0f4930 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Fri, 17 Feb 2023 11:37:51 +0800 Subject: [PATCH] feat(theme): home media style --- docs/README.md | 2 +- packages/theme/src/client/components/Home.vue | 41 ++++++++++--------- .../theme/src/client/styles/normalize.scss | 1 + 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/docs/README.md b/docs/README.md index 19d4dede..f9f3abf7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,7 +3,7 @@ home: true banner: /images/bg-home.jpg hero: name: 鹏展博 - profession: 前端开发工程师 + tagline: 前端开发工程师 text: 简单介绍专业技能信息相关的描述 actions: - diff --git a/packages/theme/src/client/components/Home.vue b/packages/theme/src/client/components/Home.vue index 581233e8..d93d0dee 100644 --- a/packages/theme/src/client/components/Home.vue +++ b/packages/theme/src/client/components/Home.vue @@ -71,26 +71,8 @@ const actions = computed(() => { padding: 0 2rem; } -@media (min-width: 960px) { - .plume-home .container { - max-width: 768px; - padding-top: 8rem; - } -} - -@media (min-width: 1440px) { - .plume-home .container { - max-width: 1104px; - padding-top: 8rem; - } - - .plume-home .content .hero-tagline { - font-size: 32px; - } -} - .plume-home .content .hero-name { - font-size: 100px; + font-size: 72px; font-weight: 600; line-height: 1; color: var(--vp-c-text-hero-name); @@ -125,6 +107,27 @@ const actions = computed(() => { /* background-color: rgba(0, 0, 0, 0.25); */ } +@media (min-width: 960px) { + .plume-home .container { + max-width: 768px; + padding-top: 8rem; + } + .plume-home .content .hero-name { + font-size: 100px; + } +} + +@media (min-width: 1440px) { + .plume-home .container { + max-width: 1104px; + padding-top: 8rem; + } + + .plume-home .content .hero-tagline { + font-size: 32px; + } +} + .actions { display: flex; flex-wrap: wrap; diff --git a/packages/theme/src/client/styles/normalize.scss b/packages/theme/src/client/styles/normalize.scss index 5ccb5d8b..3c538682 100644 --- a/packages/theme/src/client/styles/normalize.scss +++ b/packages/theme/src/client/styles/normalize.scss @@ -30,6 +30,7 @@ body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; + transition: color var(--t-color) ease, background-color var(--t-color) ease; } main {