Skip to content

Commit

Permalink
Home page update (#350)
Browse files Browse the repository at this point in the history
* Remove live follower counts

* Tweak header
  • Loading branch information
3b1b authored Jun 30, 2023
1 parent 0b24da8 commit a8d7fb2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 34 deletions.
2 changes: 1 addition & 1 deletion components/HomepageFeaturedContent/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
.title {
grid-area: title;

font-size: 30px;
font-size: 25px;
text-align: center;
max-width: 500px;
margin: 0 auto;
Expand Down
49 changes: 17 additions & 32 deletions components/SocialIcons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,39 @@ import styles from "./index.module.scss";
import {useState, useEffect} from "react";

export default function SocialIcons() {
const [youtubeSubscribers, setYoutubeSubscribers] = useState(null);
const [twitterFollowers, setTwitterFollowers] = useState(null);
const [patreonPatrons, setPatreonPatrons] = useState(null);
const [instagramFollowers, setInstagramFollowers] = useState(null);

// As of 5/21/23. In a perfect world, these would not be used
const fallbackYouTubeCount = 5200000;
const fallbackTwitterCount = 324000;
const fallbackPatronCount = 6300;

useEffect(() => {
fetchFollowerCount(setYoutubeSubscribers, "youtubeSubscribers", "/api/youtube_subscriber_count");
fetchFollowerCount(setTwitterFollowers, "twitterFollowers", "/api/twitter_follower_count");
fetchFollowerCount(setPatreonPatrons, "patreonPatrons", "/api/patreon_member_count");
}, []);

return (
<div className={styles.socialIcons}>
<div className={styles.topRow}>
<Link
link="https://www.youtube.com/3blue1brown"
icon="fab fa-youtube"
tooltip="The main event"
tooltip="Join over 5 million subscribers"
hoverColor="#ff0000"
restingColor="#ff0000"
label={`${formatNumber(youtubeSubscribers || fallbackYouTubeCount)}`}
label={""}
/>
<Link
link="https://twitter.com/3blue1brown"
icon="fab fa-twitter"
tooltip="Occasional animations and mathy threads"
hoverColor="#1DA1F2"
restingColor="#1DA1F2"
label={`${formatNumber(twitterFollowers || fallbackTwitterCount)}`}
label={""}
/>
<Link
link="https://www.patreon.com/3blue1brown"
icon="fab fa-patreon"
tooltip="Support future lessons"
hoverColor="#f96854"
restingColor="#f96854"
label={`${formatNumber(patreonPatrons || fallbackPatronCount)}`}
label={""}
/>
<Link
link="https://www.instagram.com/3blue1brown/"
icon="fab fa-instagram"
tooltip="Animations and video excerpts"
hoverColor="#FFDC80"
restingColor="#FFDC80"
/>
</div>
<div className={styles.restRow}>
Expand All @@ -55,18 +46,18 @@ export default function SocialIcons() {
tooltip="Mailing list for new videos"
hoverColor="#fe5901"
/>
<Link
link="https://www.instagram.com/3blue1brown/"
icon="fab fa-instagram"
tooltip="Animations and video excerpts"
hoverColor="#FFDC80"
/>
<Link
link="https://www.youtube.com/@GrantSanderson"
icon="fab fa-youtube"
tooltip="Second channel"
hoverColor="#ff0000"
/>
<Link
link="https://www.tiktok.com/@3blue1brown"
icon="fab fa-tiktok"
tooltip="Excerpts from the main videos"
hoverColor="#ff0050"
/>
<Link
link="https://www.reddit.com/r/3Blue1Brown/"
icon="fab fa-reddit"
Expand All @@ -91,12 +82,6 @@ export default function SocialIcons() {
tooltip="Chinese translations"
hoverColor="#049ed1"
/>
<Link
link="https://www.tiktok.com/@3blue1brown"
icon="fab fa-tiktok"
tooltip="Excerpts from the main videos"
hoverColor="#ff0050"
/>
<Link
link="https://3blue1brown.substack.com/feed"
icon="fa-solid fa-rss"
Expand Down
2 changes: 1 addition & 1 deletion components/SocialIcons/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
.topRow {
display: inline-flex;
font-size: 1.3em;
margin-bottom: 0em;
margin-bottom: 0.5em;
}

.restRow {
Expand Down

0 comments on commit a8d7fb2

Please sign in to comment.