From af2ca2888b5fdfdb60fc906f8558f0090c828ae0 Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Tue, 5 Sep 2023 22:55:20 +0800 Subject: [PATCH] Add logo to home page --- src/App.css | 42 -------------------------------------- src/assets/css/header.scss | 25 +++++++++++++++++++++++ src/assets/css/home.scss | 1 + src/pages/Home.tsx | 7 ++++++- 4 files changed, 32 insertions(+), 43 deletions(-) delete mode 100644 src/App.css create mode 100644 src/assets/css/header.scss create mode 100644 src/assets/css/home.scss diff --git a/src/App.css b/src/App.css deleted file mode 100644 index b9d355d..0000000 --- a/src/App.css +++ /dev/null @@ -1,42 +0,0 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - -.logo { - height: 6em; - padding: 1.5em; - will-change: filter; - transition: filter 300ms; -} -.logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); -} -.logo.react:hover { - filter: drop-shadow(0 0 2em #61dafbaa); -} - -@keyframes logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} - -@media (prefers-reduced-motion: no-preference) { - a:nth-of-type(2) .logo { - animation: logo-spin infinite 20s linear; - } -} - -.card { - padding: 2em; -} - -.read-the-docs { - color: #888; -} diff --git a/src/assets/css/header.scss b/src/assets/css/header.scss new file mode 100644 index 0000000..891575f --- /dev/null +++ b/src/assets/css/header.scss @@ -0,0 +1,25 @@ +.nav { + display: flex; + position: fixed; + align-items: center; + z-index: 1; + width: 100%; + height: 70px; + background-color: white; + border: { + bottom: { + width: 1px; + style: solid; + color: rgba(204, 204, 204, .33); + } + } + + .logo { + padding: 0 40px; + + .title { + font-size: 2.8em; + font-family: century gothic, texgyreadventor, stheiti, sans-serif; + } + } +} \ No newline at end of file diff --git a/src/assets/css/home.scss b/src/assets/css/home.scss new file mode 100644 index 0000000..1bd162e --- /dev/null +++ b/src/assets/css/home.scss @@ -0,0 +1 @@ +@import url(header.scss); \ No newline at end of file diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 28044c9..ff09f43 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -1,9 +1,14 @@ import React from 'react' +import '@/assets/css/home.scss' const Home: React.FC = () => { return ( <> -

FatWeb

+
+ + FatWeb + +
) }