Skip to content

Commit 2cd1b29

Browse files
committed
feat: refine styles
1 parent 62da44a commit 2cd1b29

File tree

4 files changed

+10
-18
lines changed

4 files changed

+10
-18
lines changed

src/components/Header/Header.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function Header() {
1515
Welcome to my site. I'm SNORLAX.
1616
</p>
1717
<FlexBox>
18-
<MoneyButton style={{ "margin": "1rem" }} onClick={clickHandler}> Sponsor me </MoneyButton>
18+
<MoneyButton className="sponsor" onClick={clickHandler}> Sponsor me </MoneyButton>
1919
<Octocat />
2020
</FlexBox>
2121
<SponsorDialog open={isDialogOpen} closeHandler={() => { setIsDialogOpen(false) }} />

src/components/Header/index.css

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
.github-corner {
22
border-bottom: 0;
3-
position: fixed;
4-
right: 0;
53
text-decoration: none;
6-
top: 0;
74
z-index: 1;
85
}
96

@@ -46,8 +43,12 @@
4643
width: var(--header-height);
4744
}
4845

46+
.sponsor {
47+
margin: 1rem
48+
}
49+
4950
.marquee {
50-
width: 60%;
51+
/* width: 55%; */
5152
font-family: "华文彩云";
5253
font-size: 3rem;
5354
margin: 0;
@@ -59,14 +60,14 @@
5960

6061
@keyframes marquee {
6162
0% {
62-
transform: translate(50%, 0);
63+
transform: translate(33%, 0);
6364
}
6465

6566
50% {
6667
transform: translate(0%, 0);
6768
}
6869

6970
100% {
70-
transform: translate(50%, 0);
71+
transform: translate(33%, 0);
7172
}
7273
}

src/index.css

-11
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ h1 {
4141
}
4242

4343
button {
44-
border-radius: 8px;
4544
border: 1px solid transparent;
46-
padding: 0.6em 1.2em;
4745
font-size: 1em;
4846
font-weight: 500;
4947
font-family: inherit;
@@ -52,15 +50,6 @@ button {
5250
transition: border-color 0.25s;
5351
}
5452

55-
button:hover {
56-
border-color: #646cff;
57-
}
58-
59-
button:focus,
60-
button:focus-visible {
61-
outline: 4px auto -webkit-focus-ring-color;
62-
}
63-
6453
@media (prefers-color-scheme: light) {
6554
:root {
6655
color: #213547;

src/views/Layout/index.css

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
height: var(--header-height);
55
right: 0;
66
top: 0;
7+
display: flex;
8+
justify-content: space-between;
79
}
810

911
.content {

0 commit comments

Comments
 (0)