Add logo to home page

This commit is contained in:
2023-09-05 22:55:20 +08:00
parent 54b10d2c31
commit af2ca2888b
4 changed files with 32 additions and 43 deletions

View File

@@ -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;
}

View File

@@ -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;
}
}
}

1
src/assets/css/home.scss Normal file
View File

@@ -0,0 +1 @@
@import url(header.scss);

View File

@@ -1,9 +1,14 @@
import React from 'react' import React from 'react'
import '@/assets/css/home.scss'
const Home: React.FC = () => { const Home: React.FC = () => {
return ( return (
<> <>
<h1>FatWeb</h1> <header className={'nav'}>
<a className={'logo'} href={'https://fatweb.top'}>
<span className={'title'}>FatWeb</span>
</a>
</header>
</> </>
) )
} }