Skip to content

Commit d265d02

Browse files
Merge branch 'main' into newsletter-icon
2 parents 2db0944 + 8bfdb19 commit d265d02

File tree

7 files changed

+40
-3
lines changed

7 files changed

+40
-3
lines changed

components/Footer.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { FaZhihu } from '@react-icons/all-files/fa/FaZhihu'
44
import { FaGithub } from '@react-icons/all-files/fa/FaGithub'
55
import { FaLinkedin } from '@react-icons/all-files/fa/FaLinkedin'
66
import { FaEnvelopeOpenText } from '@react-icons/all-files/fa/FaEnvelopeOpenText'
7+
import { FaYoutube } from '@react-icons/all-files/fa/FaYoutube'
78
import { IoSunnyOutline } from '@react-icons/all-files/io5/IoSunnyOutline'
89
import { IoMoonSharp } from '@react-icons/all-files/io5/IoMoonSharp'
910

@@ -106,6 +107,17 @@ export const FooterImpl: React.FC = () => {
106107
rel='noopener noreferrer'
107108
>
108109
<FaEnvelopeOpenText />
110+
)}
111+
112+
{config.youtube && (
113+
<a
114+
className={styles.youtube}
115+
href={`https://www.youtube.com/${config.youtube}`}
116+
title={`YouTube ${config.author}`}
117+
target='_blank'
118+
rel='noopener noreferrer'
119+
>
120+
<FaYoutube />
109121
</a>
110122
)}
111123
</div>

components/PageSocial.module.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@
100100
border-color: #c9510c;
101101
}
102102

103+
.youtube .actionBgPane {
104+
background: #FF0000;
105+
}
106+
.youtube:hover {
107+
border-color: #FF0000;
108+
}
109+
103110
.medium .actionBgPane {
104111
background: #00ab6c;
105112
}

components/PageSocial.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ const socialLinks: SocialLink[] = [
5555
<path d="M12 .64L8.23 3H5V5L2.97 6.29C2.39 6.64 2 7.27 2 8V18C2 19.11 2.9 20 4 20H20C21.11 20 22 19.11 22 18V8C22 7.27 21.61 6.64 21.03 6.29L19 5V3H15.77M7 5H17V9.88L12 13L7 9.88M8 6V7.5H16V6M5 7.38V8.63L4 8M19 7.38L20 8L19 8.63M8 8.5V10H16V8.5Z" />
5656
</svg>
5757
)
58+
},
59+
60+
config.youtube && {
61+
name: 'youtube',
62+
href: `https://www.youtube.com/${config.youtube}`,
63+
title: `YouTube ${config.youtube}`,
64+
icon: (
65+
<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 24 24">
66+
<path d="M10,15L15.19,12L10,9V15M21.56,7.17C21.69,7.64 21.78,8.27 21.84,9.07C21.91,9.87 21.94,10.56 21.94,11.16L22,12C22,14.19 21.84,15.8 21.56,16.83C21.31,17.73 20.73,18.31 19.83,18.56C19.36,18.69 18.5,18.78 17.18,18.84C15.88,18.91 14.69,18.94 13.59,18.94L12,19C7.81,19 5.2,18.84 4.17,18.56C3.27,18.31 2.69,17.73 2.44,16.83C2.31,16.36 2.22,15.73 2.16,14.93C2.09,14.13 2.06,13.44 2.06,12.84L2,12C2,9.81 2.16,8.2 2.44,7.17C2.69,6.27 3.27,5.69 4.17,5.44C4.64,5.31 5.5,5.22 6.82,5.16C8.12,5.09 9.31,5.06 10.41,5.06L12,5C16.19,5 18.8,5.16 19.83,5.44C20.73,5.69 21.31,6.27 21.56,7.17Z" />
67+
</svg>
68+
)
5869
}
5970
].filter(Boolean)
6071

components/styles.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@
101101
color: #c9510c;
102102
}
103103

104+
.youtube:hover {
105+
color: #ff0000;
106+
}
107+
104108
.linkedin:hover {
105109
color: #0077b5;
106110
}

lib/config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export const language: string = getSiteConfig('language', 'en')
5656
// social accounts
5757
export const twitter: string | null = getSiteConfig('twitter', null)
5858
export const github: string | null = getSiteConfig('github', null)
59+
export const youtube: string | null = getSiteConfig('youtube', null)
5960
export const linkedin: string | null = getSiteConfig('linkedin', null)
6061
export const newsletter: string | null = getSiteConfig('newsletter', null)
6162
export const zhihu: string | null = getSiteConfig('zhihu', null)
@@ -146,8 +147,8 @@ export const site: Site = {
146147
export const fathomId = isDev ? null : process.env.NEXT_PUBLIC_FATHOM_ID
147148
export const fathomConfig = fathomId
148149
? {
149-
excludedDomains: ['localhost', 'localhost:3000']
150-
}
150+
excludedDomains: ['localhost', 'localhost:3000']
151+
}
151152
: undefined
152153

153154
export const posthogId = process.env.NEXT_PUBLIC_POSTHOG_ID

lib/site-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface SiteConfig {
1414
github?: string
1515
linkedin?: string
1616
newsletter?: string
17+
youtube?: string
1718
zhihu?: string
1819

1920
defaultPageIcon?: string | null

site.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ export default siteConfig({
2020
twitter: 'transitive_bs',
2121
github: 'transitive-bullshit',
2222
linkedin: 'fisch2',
23-
// newsletter: '#', //Use full newsletter URL
23+
// newsletter: '#', // optional newsletter URL
24+
// youtube: '#', // optional youtube channel name or `channel/UCGbXXXXXXXXXXXXXXXXXXXXXX`
2425

2526
// default notion icon and cover images for site-wide consistency (optional)
2627
// page-specific values will override these site-wide defaults

0 commit comments

Comments
 (0)