Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Commit d9685b9

Browse files
authored
Update homepage and other small fixes (#198)
* Update conf and chapter section * Fix accessibility warnings for speaker component * Add external link component * Fix speaker css * Fix mobile padding on sponsorship section * Update links to external conference pages * Add some 2019 photos * Set font size of icon in external link * Load font awesome styles before SSR icon * Prevent fontawesome from dynamically adding its css since we did it manually * Update homepage copy
1 parent ea20f03 commit d9685b9

20 files changed

Lines changed: 148 additions & 85 deletions

src/components/link/index.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import React from 'react'
2+
// This ensures that the icon CSS is loaded immediately before attempting to render icons
3+
import '@fortawesome/fontawesome-svg-core/styles.css'
4+
import { config } from '@fortawesome/fontawesome-svg-core'
5+
// Prevent fontawesome from dynamically adding its css since we did it manually above
6+
config.autoAddCss = false
7+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
8+
import { faExternalLinkAlt, faFilePdf } from '@fortawesome/free-solid-svg-icons'
9+
import { faMeetup } from '@fortawesome/free-brands-svg-icons'
10+
11+
export const ExternalLink = ({ href, text, icon }) => {
12+
function setIcon() {
13+
switch (icon) {
14+
case 'pdf':
15+
return faFilePdf
16+
case 'meetup':
17+
return faMeetup
18+
default:
19+
return faExternalLinkAlt
20+
}
21+
}
22+
23+
return (
24+
<a href={href} className="link" target="_blank" rel="noopener noreferrer">
25+
{text}&nbsp;
26+
<FontAwesomeIcon icon={setIcon()} aria-hidden />
27+
</a>
28+
)
29+
}

src/components/menu/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
import React, { useState } from 'react'
2+
// This ensures that the icon CSS is loaded immediately before attempting to render icons
3+
import '@fortawesome/fontawesome-svg-core/styles.css'
4+
import { config } from '@fortawesome/fontawesome-svg-core'
5+
// Prevent fontawesome from dynamically adding its css since we did it manually above
6+
config.autoAddCss = false
27
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
38
import { faBars, faTimes } from '@fortawesome/free-solid-svg-icons'
49
import { navigate } from 'gatsby'

src/components/speaker/index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,12 @@ export const SpeakerButton = ({ speaker }) => {
145145
const SpeakerHeadshot = ({ speaker }) => {
146146
const [dialogIsOpen, setDialogIsOpen] = useState(false)
147147
return (
148-
<>
149-
<figure className={styles.speaker} onClick={() => setDialogIsOpen(true)}>
148+
<button
149+
className={styles.speakerHeadshotButton}
150+
onClick={() => setDialogIsOpen(true)}
151+
onKeyDown={() => setDialogIsOpen(true)}
152+
>
153+
<figure className={styles.speaker}>
150154
<img
151155
src={speaker.headshot ? speaker.headshot : randomPlaceholder()}
152156
alt={`${speaker.name} headshot`}
@@ -164,7 +168,7 @@ const SpeakerHeadshot = ({ speaker }) => {
164168
speaker={speaker}
165169
showLinkToTalk={true}
166170
/>
167-
</>
171+
</button>
168172
)
169173
}
170174

src/components/speaker/speaker.module.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,25 @@
6363
}
6464
}
6565

66+
.speakerHeadshotButton {
67+
-webkit-appearance: unset;
68+
line-height: unset;
69+
background: none;
70+
border: none;
71+
text-align: unset;
72+
padding: 0;
73+
align-items: unset;
74+
color: unset;
75+
display: unset;
76+
&:focus {
77+
outline: none;
78+
.headshot {
79+
box-shadow: 8px 8px var(--tan);
80+
cursor: pointer;
81+
}
82+
}
83+
}
84+
6685
/* Speaker Dialog Styles */
6786

6887
.dialog {

src/components/sponsors/index.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react'
22

33
import Sponsor from '../sponsor'
4+
import { ExternalLink } from '../link'
45

56
import styles from './sponsors.module.css'
67

@@ -68,14 +69,11 @@ const Sponsors = ({ sponsors, isConference }) => {
6869
<span className="italic">sponsor@writespeakcode.com</span> to
6970
learn more.
7071
</p>
71-
<a
72-
className="link"
73-
target="_blank"
74-
rel="noopener noreferrer"
72+
<ExternalLink
7573
href="https://drive.google.com/file/d/1X-nDSHYiPiPT79Rc1xUAZCNxvr67ei6J/view?usp=sharing"
76-
>
77-
2019 Sponsorship Prospectus
78-
</a>
74+
text="2019 Sponsorship Prospectus"
75+
icon="pdf"
76+
/>
7977
</div>
8078
</div>
8179
</div>

src/components/sponsors/sponsors.module.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
.info {
10-
padding: 2em;
10+
padding: 2em 2em 0 2em;
1111
}
1212

1313
.wrap {
@@ -39,7 +39,7 @@
3939
}
4040

4141
.cta {
42-
padding: 2em;
42+
padding: 0 2em 2em 2em;
4343
a {
4444
margin-top: 1em;
4545
display: inline;
@@ -101,10 +101,12 @@
101101
.cta {
102102
max-width: 35%;
103103
margin: 2em;
104+
padding: 2em;
104105
}
105106

106107
.info {
107108
max-width: 50%;
109+
padding: 2em;
108110
}
109111

110112
.grid {

src/images/photos/WSC2019-15.jpg

9.84 MB
Loading

src/images/photos/WSC2019-216.jpg

7.54 MB
Loading

src/images/photos/WSC2019-290.jpg

13.7 MB
Loading

src/images/photos/WSC2019-292.jpg

12.6 MB
Loading

0 commit comments

Comments
 (0)