Skip to content

Commit 38fbdc3

Browse files
committed
feat: add social
1 parent 20430bf commit 38fbdc3

File tree

10 files changed

+38
-104
lines changed

10 files changed

+38
-104
lines changed

global.css

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
@import '@unocss/reset/tailwind.css';
22
@unocss all;
33

4+
#intro {
5+
@apply md:w-xs lg:w-md xl:w-xl relative left-1/2 p-15 pt-[30vh];
6+
}
7+
48
h1 {
59
@apply text-4xl font-montserrat font-900 pb-5 pt-10;
610
}
@@ -18,15 +22,14 @@ a {
1822
}
1923

2024
.ch-scrollycoding {
25+
/* --ch-scrollycoding-sticker-width: 420px; */
2126
@apply max-w-screen-xl flex-row-reverse mx-auto my-0 gap-0;
2227

2328
.ch-scrollycoding-content {
2429
@apply flex-1 text-brand-1 p-10 bg-brand-2;
2530

2631
.ch-scrollycoding-step-content {
27-
@apply px-5 max-w-lg min-w-0;
28-
/* @apply w-full */
29-
/* @apply border-none; */
32+
@apply px-5 box-border md:w-xs lg:w-md xl:w-xl;
3033

3134
.ch-codeblock,
3235
.ch-codegroup,
@@ -49,6 +52,7 @@ a {
4952
.ch-scrollycoding-sticker {
5053
@apply flex-1 max-h-unset h-screen top-0 py-5 px-10 bg-brand-1;
5154

55+
.ch-codeblock,
5256
.ch-codegroup {
5357
--ch-t-colorScheme: dark;
5458
--ch-t-foreground: #a6accd;
@@ -81,23 +85,14 @@ a {
8185
--ch-t-list-activeSelectionForeground: #e4f0fb;
8286
--ch-t-list-hoverBackground: #30334080;
8387
--ch-t-list-hoverForeground: #e4f0fb;
84-
@apply max-h-unset h-screen;
8588
}
8689

87-
.ch-codeblock {
88-
--ch-t-background: var(--brand-1);
89-
--ch-t-tab-activeBackground: var(--brand-1);
90-
--ch-t-tab-inactiveBackground: var(--brand-1);
91-
--ch-t-tab-activeBorder: #ffffff1f;
92-
--ch-t-editorGroupHeader-tabsBackground: var(
93-
--brand-1
94-
);
95-
--ch-t-lighter-inlineBackground: var(--brand-1);
90+
.ch-codegroup {
91+
@apply max-h-unset h-screen;
9692
}
9793

9894
.ch-expand-dialog-content {
99-
@apply border-4;
100-
border-color: var(--brand-2);
95+
@apply border-4 border-brand-2;
10196

10297
.ch-code-browser-sidebar {
10398
@apply bg-brand-2;

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"sort-by": "^1.2.0"
2929
},
3030
"devDependencies": {
31+
"@iconify-json/mdi": "^1.1.64",
3132
"@unocss/postcss": "^0.58.8",
3233
"@unocss/transformer-directives": "^0.58.8",
3334
"@vitejs/plugin-react": "^4.2.1",

pages/_app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import '@code-hike/mdx/dist/index.css'
22
import App from 'next/app'
33
import '../global.css'
44
import Dropdown from './components/Dropdown'
5+
import Social from './components/Social'
56
import { THEME } from './common/constants'
67

78
export default function MyApp({
@@ -20,6 +21,9 @@ export default function MyApp({
2021
>
2122
<div className="min-h-screen md:bg-gradient-to-r from-brand-1 from-50% to-brand-2 to-50%">
2223
<Dropdown className="fixed top-5 right-5 md:right-1/2 md:translate-x-1/2" />
24+
<div className="absolute w-[50vw] pt-[30vh] flex justify-end px-20 text-brand-2">
25+
<Social />
26+
</div>
2327
<Component {...pageProps} />
2428
</div>
2529
</div>

pages/components/Intro.jsx

Lines changed: 0 additions & 10 deletions
This file was deleted.

pages/components/Item.jsx

Lines changed: 0 additions & 30 deletions
This file was deleted.

pages/components/Layout.jsx

Lines changed: 0 additions & 39 deletions
This file was deleted.

pages/components/Social.jsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@ function Social({ className = '' }) {
33
<div
44
className={`flex flex-col items-center gap-6 ${className}`}
55
>
6-
<img
7-
alt="Yulei Chen"
8-
src="/avatar.png"
9-
className="h-35 w-35 hue-rotate-[var(--img-hue-rotate)]"
10-
/>
6+
<a href="https://yulei.monster">
7+
<img
8+
alt="Yulei Chen"
9+
src="/avatar.png"
10+
className="h-35 w-35 hue-rotate-[var(--img-hue-rotate)]"
11+
/>
12+
</a>
1113
<div className="flex gap-3">
1214
<a
1315
className="i-mdi-github text-3xl"
14-
href="https://github.com/yuleicul"
16+
href="https://github.com/yuleicul/react-router-tutorial"
1517
/>
16-
<a
18+
{/* <a
1719
className="i-mdi-youtube text-3xl"
1820
href="https://www.youtube.com/@code_tuner"
19-
/>
21+
/> */}
2022
{/* <a className="i-mdi-rss text-3xl" /> */}
2123
</div>
2224
</div>

pages/index.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<CH.Scrollycoding showCopyButton={true} showExpandButton={true} lineNumbers={true}>
1+
<section id="intro">
22

33
# React Router Tutorial
44

@@ -8,7 +8,9 @@ April 1, 2024
88

99
An alternative take on [React Router's official tutorial](https://reactrouter.com/en/main/start/tutorial), built with [CodeHike](https://codehike.org/).
1010

11-
---
11+
</section>
12+
13+
<CH.Scrollycoding showCopyButton={true} showExpandButton={true} lineNumbers={true}>
1214

1315
Welcome to the tutorial! We'll be building a small, but feature-rich app that lets you keep track of your contacts. We expect it to take between 30-60m if you're following along.
1416

pnpm-lock.yaml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/avatar.png

68.1 KB
Loading

0 commit comments

Comments
 (0)