Skip to content

Commit

Permalink
Update links in header to icons
Browse files Browse the repository at this point in the history
  • Loading branch information
molly committed Nov 22, 2023
1 parent fbaef38 commit f23c573
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 42 deletions.
23 changes: 12 additions & 11 deletions src/components/timeline/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import PropTypes from "prop-types";
import { WindowWidthPropType } from "../../hooks/useWindowWidth";

import { STORAGE_URL } from "../../constants/urls";
import { SOCIAL } from "../../constants/navigation";

import Link from "next/link";
import ExternalLink from "../ExternalLink";
Expand Down Expand Up @@ -74,17 +75,6 @@ const Header = forwardRef(function Header(

const renderLinks = () => (
<>
<p>
Follow on{" "}
<ExternalLink href="https://twitter.com/web3isgreat">
Twitter
</ExternalLink>
,{" "}
<ExternalLink href="https://indieweb.social/@web3isgreat">
Mastodon
</ExternalLink>
, or <Link href="/feed.xml">RSS</Link>.{" "}
</p>
<p>
Created by{" "}
<ExternalLink href="https://www.mollywhite.net/">
Expand All @@ -96,6 +86,17 @@ const Header = forwardRef(function Header(
</ExternalLink>{" "}
for weekly recaps.
</p>
<ul className="social-links">
{SOCIAL.map((link) => (
<li key={link.label}>
<ExternalLink href={link.href}>
<i className={`fa-fw ${link.icon}`} aria-hidden={true} alt="">
<span className="sr-only">{link.label}</span>
</i>
</ExternalLink>
</li>
))}
</ul>
</>
);

Expand Down
49 changes: 29 additions & 20 deletions src/constants/navigation.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
export const SOCIAL = [
{
label: "Twitter",
href: "https://twitter.com/web3isgreat",
icon: "fab fa-twitter",
},
{
label: "Mastodon",
href: "https://indieweb.social/@web3isgreat",
icon: "fab fa-mastodon",
},
{
label: "Bluesky",
href: "https://bsky.app/profile/web3isgoinggreat.com",
icon: "fas fa-square",
},
{
label: "Instagram",
href: "https://www.instagram.com/web3isgoinggreat/",
icon: "fab fa-instagram",
},
{
label: "Threads",
href: "https://www.threads.net/@web3isgoinggreat",
icon: "fab fa-threads",
},
];

export const NAVIGATION = [
{
label: "About",
Expand All @@ -24,26 +52,7 @@ export const NAVIGATION = [
label: "Follow",
key: "follow-header",
children: [
{
label: "Twitter",
href: "https://twitter.com/web3isgreat",
},
{
label: "Mastodon",
href: "https://indieweb.social/@web3isgreat",
},
{
label: "Bluesky",
href: "https://bsky.app/profile/web3isgoinggreat.com",
},
{
label: "Instagram",
href: "https://www.instagram.com/web3isgoinggreat/",
},
{
label: "Threads",
href: "https://www.threads.net/@web3isgoinggreat",
},
...SOCIAL,
{
label: "Newsletter",
href: "https://newsletter.mollywhite.net/",
Expand Down
14 changes: 3 additions & 11 deletions src/styles/main.sass
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ header.page-header.timeline-page

ul
padding: 0px

li
list-style: none
list-style: none

footer.page-footer
padding: 10px 10px
Expand Down Expand Up @@ -708,14 +706,8 @@ table
li
display: inline

&:not(:first-child):before
color: $header-footer-body-color
padding: 10px

// Avoid screenreaders reading the decorative character where supported
// https://github.com/molly/web3-is-going-great/pull/25#issuecomment-1004279568
content: ""
content: "" / ""
a
border-bottom: none

.timeline-entry.single
display: flex
Expand Down

0 comments on commit f23c573

Please sign in to comment.