Merge pull request #317 from si1k/newsletter-icon

This commit is contained in:
Travis Fischer
2022-06-02 11:49:54 -04:00
committed by GitHub
7 changed files with 38 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ import { FaTwitter } from '@react-icons/all-files/fa/FaTwitter'
import { FaZhihu } from '@react-icons/all-files/fa/FaZhihu'
import { FaGithub } from '@react-icons/all-files/fa/FaGithub'
import { FaLinkedin } from '@react-icons/all-files/fa/FaLinkedin'
import { FaEnvelopeOpenText } from '@react-icons/all-files/fa/FaEnvelopeOpenText'
import { FaYoutube } from '@react-icons/all-files/fa/FaYoutube'
import { IoSunnyOutline } from '@react-icons/all-files/io5/IoSunnyOutline'
import { IoMoonSharp } from '@react-icons/all-files/io5/IoMoonSharp'
@@ -97,6 +98,17 @@ export const FooterImpl: React.FC = () => {
</a>
)}
{config.newsletter && (
<a
className={styles.newsletter}
href={`${config.newsletter}`}
title={`Newsletter ${config.author}`}
target='_blank'
rel='noopener noreferrer'
>
<FaEnvelopeOpenText />
)}
{config.youtube && (
<a
className={styles.youtube}

View File

@@ -114,6 +114,13 @@
border-color: #00ab6c;
}
.newsletter .actionBgPane {
background: #777777;
}
.newsletter:hover {
border-color: #777777;
}
.email .actionBgPane {
background: #777;
}

View File

@@ -46,6 +46,17 @@ const socialLinks: SocialLink[] = [
)
},
config.newsletter && {
name: 'newsletter',
href: `${config.newsletter}`,
title: `Newsletter ${config.author}`,
icon: (
<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 24 24">
<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" />
</svg>
)
},
config.youtube && {
name: 'youtube',
href: `https://www.youtube.com/${config.youtube}`,

View File

@@ -109,6 +109,10 @@
color: #0077b5;
}
.newsletter:hover {
color: #777777;
}
.comments {
width: 100%;
margin-top: 2em;

View File

@@ -58,6 +58,7 @@ export const twitter: string | null = getSiteConfig('twitter', null)
export const github: string | null = getSiteConfig('github', null)
export const youtube: string | null = getSiteConfig('youtube', null)
export const linkedin: string | null = getSiteConfig('linkedin', null)
export const newsletter: string | null = getSiteConfig('newsletter', null)
export const zhihu: string | null = getSiteConfig('zhihu', null)
// default notion values for site-wide consistency (optional; may be overridden on a per-page basis)

View File

@@ -13,6 +13,7 @@ export interface SiteConfig {
twitter?: string
github?: string
linkedin?: string
newsletter?: string
youtube?: string
zhihu?: string

View File

@@ -20,7 +20,8 @@ export default siteConfig({
twitter: 'transitive_bs',
github: 'transitive-bullshit',
linkedin: 'fisch2',
// youtube: '#', //use custom channel name or `channel/UCGbXXXXXXXXXXXXXXXXXXXXXX`
// newsletter: '#', // optional newsletter URL
// youtube: '#', // optional youtube channel name or `channel/UCGbXXXXXXXXXXXXXXXXXXXXXX`
// default notion icon and cover images for site-wide consistency (optional)
// page-specific values will override these site-wide defaults