Skip to content

Commit 26e79a5

Browse files
refactor: remove uneed wrappers
1 parent 6939c60 commit 26e79a5

File tree

5 files changed

+31
-59
lines changed

5 files changed

+31
-59
lines changed

src/layouts/AdminLayout.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
flex: 1;
88
display: flex;
99
flex-direction: column;
10-
overflow-y: auto; /* scroll */
1110
}
1211

1312
.content {

src/layouts/AdminLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const AdminLayout = ({ children }: AdminLayoutProps) => {
1313
<AdminNav />
1414
<main className={styles.main}>
1515
<div className={styles.content}>{children}</div>
16-
<Footer></Footer>
16+
<Footer />
1717
</main>
1818
</div>
1919
</>

src/layouts/UserLayout.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { ReactNode } from "react";
2+
import { Footer } from "../shared/components/Footer/Footer";
23
import styles from "./UserLayout.module.css";
34

45
interface UserLayoutProps {
@@ -7,8 +8,11 @@ interface UserLayoutProps {
78

89
export const UserLayout = ({ children }: UserLayoutProps) => {
910
return (
10-
<div className={styles.container}>
11-
<div className={styles.content}>{children}</div>
12-
</div>
11+
<>
12+
<div className={styles.container}>
13+
<div className={styles.content}>{children}</div>
14+
</div>
15+
<Footer />
16+
</>
1317
);
1418
};
Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,25 @@
11
.footer {
22
background-color: var(--background-color-primary);
33
border-top: solid 1px var(--background-color-tertiary);
4-
outline: 1px solid var(--background-color-tertiary);
4+
}
5+
6+
.footer a {
7+
color: inherit;
8+
text-decoration: underline;
9+
text-underline-offset: 0.2rem;
510
}
611

712
.inner {
813
display: flex;
9-
justify-content: space-between;
1014
flex-wrap: wrap;
1115
align-items: center;
1216
max-width: 1200px;
17+
width: 100%;
1318
margin: 0 auto;
14-
padding: 0.75rem clamp(12px, 2.5vw, 24px);
15-
gap: 12px;
16-
}
17-
.inner a {
18-
color: var(--color-body);
19-
}
20-
21-
.left {
22-
font-size: 1rem;
23-
color: var(--color-body);
24-
}
25-
26-
.right {
27-
display: flex;
19+
padding: 1rem 1.5rem;
2820
gap: 1rem;
29-
color: var(--color-body);
30-
}
31-
@media (max-width: 400px) {
32-
.footer {
33-
padding: 0px;
34-
}
35-
.inner {
36-
justify-content: center;
37-
}
38-
.left,
39-
.right {
40-
width: 100%;
41-
display: flex;
42-
justify-content: center;
43-
}
4421
}
45-
.link {
46-
text-decoration: underline;
47-
text-decoration-color: var(--color-body);
48-
text-underline-offset: 0.2rem;
22+
23+
.credit {
24+
flex-grow: 1;
4925
}

src/shared/components/Footer/Footer.tsx

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,18 @@ export const Footer = () => {
55
return (
66
<footer className={styles.footer}>
77
<div className={styles.inner}>
8-
<div className={styles.left}>
9-
<p>
10-
Core System by{" "}
11-
<a href="https://sdc-nycu.notion.site/welcome" className={styles.link}>
12-
NYCU SDC
13-
</a>
14-
</p>
15-
</div>
16-
<div className={styles.right}>
17-
<a href="https://github.com" target="_blank" rel="noopener noreferrer">
18-
<Github size={20} />
19-
</a>
20-
<a href="https://instagram.com/nycu_sdc" target="_blank" rel="noopener noreferrer">
21-
<Instagram size={20} />
22-
</a>
23-
<a href="https://www.facebook.com/NYCUSDC/" target="_blank" rel="noopener noreferrer">
24-
<Facebook size={20} />
25-
</a>
26-
</div>
8+
<p className={styles.credit}>
9+
Core System by <a href="https://sdc-nycu.notion.site/welcome">NYCU SDC</a>
10+
</p>
11+
<a href="https://github.com" target="_blank" rel="noopener noreferrer" aria-label="GitHub">
12+
<Github size={20} />
13+
</a>
14+
<a href="https://instagram.com/nycu_sdc" target="_blank" rel="noopener noreferrer" aria-label="Instagram">
15+
<Instagram size={20} />
16+
</a>
17+
<a href="https://www.facebook.com/NYCUSDC/" target="_blank" rel="noopener noreferrer" aria-label="Facebook">
18+
<Facebook size={20} />
19+
</a>
2720
</div>
2821
</footer>
2922
);

0 commit comments

Comments
 (0)