Skip to content

Commit 3819ac6

Browse files
authored
Merge pull request #260 from 1chooo/feature/#104
Feature/#104
2 parents 1600221 + 19ec8b0 commit 3819ac6

File tree

6 files changed

+258
-52
lines changed

6 files changed

+258
-52
lines changed

apps/web/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"remark-gfm": "^4.0.0",
2929
"sharp": "^0.33.5",
3030
"sugar-high": "^0.7.0",
31-
"tailwindcss": "^3.4.10",
3231
"typescript": "^5.5.4",
3332
"web-vitals": "^4.2.3"
3433
},
@@ -66,12 +65,14 @@
6665
"@testing-library/jest-dom": "^6.5.0",
6766
"@testing-library/react": "^16.0.1",
6867
"@types/react-syntax-highlighter": "^15.5.13",
68+
"autoprefixer": "^10.4.20",
6969
"eslint": "9.10.0",
7070
"eslint-config-next": "14.2.7",
7171
"jest": "^29.7.0",
7272
"jest-environment-jsdom": "^29.7.0",
73-
"postcss": "^8",
73+
"postcss": "^8.4.45",
7474
"sass": "^1.77.8",
75-
"sass-loader": "^16.0.1"
75+
"sass-loader": "^16.0.1",
76+
"tailwindcss": "^3.4.11"
7677
}
7778
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from "react";
2+
import "@/styles/side-bar/footer.css";
3+
4+
const Footer: React.FC = () => {
5+
return (
6+
<footer className="footer">
7+
<div className="footer-copyright">© 2024 1chooo</div>
8+
<div className="footer-links">
9+
<a href="https://docs.1chooo.com">Docs</a>
10+
<a href="https://github.com/1chooo/1chooo.com">Vcard Theme</a>
11+
</div>
12+
</footer>
13+
);
14+
};
15+
16+
export default Footer;

apps/web/src/components/side-bar/index.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import React, { useState, useRef } from 'react';
44
import SideBarInfo from './side-bar-info';
55
import SocialList from './social-list';
66
import ContactsList from './contact-list';
7+
import Footer from './footer';
78

89
export const SideBar: React.FC = () => {
910
const [isActive, setIsActive] = useState(false);
@@ -23,6 +24,7 @@ export const SideBar: React.FC = () => {
2324
<ContactsList />
2425
<div className="separator"></div>
2526
<SocialList />
27+
<Footer />
2628
</div>
2729
</aside>
2830
);
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.footer {
2+
color: var(--jet);
3+
padding: 16px 32px;
4+
text-align: center;
5+
font-size: 14px;
6+
color: hsl(0, 0%, 84%);
7+
/* margin-bottom: 10px; */
8+
}
9+
10+
.footer-copyright {
11+
margin-bottom: 8px;
12+
}
13+
14+
.footer-links a {
15+
color: var(--orange-yellow-crayola);
16+
text-decoration: underline;
17+
margin: 0 8px;
18+
}
19+
20+
.footer-links a:hover {
21+
text-decoration: underline;
22+
text-decoration-color: hsla(0, 0%, 84%, 0.7);
23+
}
24+
25+
/* 在移动设备和平板上变为同一行显示 */
26+
@media (max-width: 768px) {
27+
.footer-copyright, .footer-links {
28+
display: inline-block;
29+
margin-bottom: 0;
30+
}
31+
32+
.footer-links {
33+
margin-left: 8px;
34+
}
35+
}

apps/web/tailwind.config.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,12 @@ import type { Config } from "tailwindcss";
22

33
const config: Config = {
44
content: [
5+
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
56
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
67
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
7-
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
88
],
99
theme: {
10-
extend: {
11-
backgroundImage: {
12-
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
13-
"gradient-conic":
14-
"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
15-
},
16-
},
10+
extend: {},
1711
},
1812
plugins: [],
1913
};

0 commit comments

Comments
 (0)