Skip to content

Commit e4f01c5

Browse files
authored
Merge pull request #1129 from isaacphysics/hotfix/bluesky-icon
Hotfix/bluesky icon
2 parents d0b7158 + 2940b3b commit e4f01c5

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed
Loading

src/app/components/elements/list-groups/SocialLinks.tsx

+18-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import React from "react";
2-
import {ListGroup, ListGroupItem} from "reactstrap";
2+
import {Col, Row} from "reactstrap";
33
import {SITE_TITLE, siteSpecific, SOCIAL_LINKS} from "../../../services";
44
import {ExternalLink} from "../ExternalLink";
5+
import chunk from 'lodash/chunk';
56

67
const getSocialIcon = (name: string) => {
78
if (name === "x (twitter)") {
@@ -11,33 +12,36 @@ const getSocialIcon = (name: string) => {
1112
};
1213

1314
export const SocialLinksRow = () => {
15+
const linksByColumn = chunk(Object.entries(SOCIAL_LINKS), 2);
1416
return (
1517
<div className='footer-links footer-links-social'>
1618
{
1719
siteSpecific(
1820
// Physics
1921
<>
20-
<h5>Get social</h5>
21-
<ListGroup className='mt-3 pb-5 py-lg-3 link-list d-md-flex flex-row'>
22-
{Object.entries(SOCIAL_LINKS).map(([_, {name, href}]) =>
23-
<ListGroupItem key={name} className='border-0 px-0 py-0 pb-1 bg-transparent'>
24-
<ExternalLink href={href}>
25-
<img src={getSocialIcon(name.toLowerCase())} alt={`${SITE_TITLE} on ${name}`}
26-
className='social-logo'/>
27-
</ExternalLink>
28-
</ListGroupItem>
29-
)}
30-
</ListGroup>
22+
<h5>Get social</h5>
23+
<Row>
24+
{linksByColumn.map((column, index) => (
25+
<Col key={index}>
26+
{column.map(([_, {name, href}]) =>
27+
<ExternalLink href={href} key={name}>
28+
<img src={getSocialIcon(name.toLowerCase())} alt={`${SITE_TITLE} on ${name}`}
29+
className='social-logo'/>
30+
</ExternalLink>
31+
)}
32+
</Col>
33+
))}
34+
</Row>
3135
</>,
3236
// CS
3337
<>
34-
<h2>Get social</h2>
38+
<h2>Get social</h2>
3539
<div className='mt-1 text-nowrap'>
3640
{Object.entries(SOCIAL_LINKS).map(([_, {name, href}]) =>
3741
<div className={"me-3 d-inline-block"} key={name}>
3842
<ExternalLink href={href}>
3943
<img src={getSocialIcon(name.toLowerCase())} alt={`${SITE_TITLE} on ${name}`}
40-
className='img-fluid footer-social-logo'/>
44+
className='img-fluid footer-social-logo'/>
4145
</ExternalLink>
4246
</div>
4347
)}

src/app/services/constants.ts

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export const SOCIAL_LINKS = siteSpecific(
7676
youtube: {name: "YouTube", href: "https://www.youtube.com/user/isaacphysics"},
7777
twitter: {name: "X (Twitter)", href: "https://twitter.com/isaacphysics"},
7878
facebook: {name: "Facebook", href: "https://www.facebook.com/isaacphysicsUK"},
79+
bluesky: {name: "Bluesky", href: "https://bsky.app/profile/isaacphysics.org"},
7980
},
8081
{
8182
facebook: {name: "Facebook", href: "https://www.facebook.com/RaspberryPiFoundation"},

0 commit comments

Comments
 (0)