File tree Expand file tree Collapse file tree 5 files changed +33
-36
lines changed Expand file tree Collapse file tree 5 files changed +33
-36
lines changed Original file line number Diff line number Diff line change 31
31
.grid {
32
32
margin-top : 1em ;
33
33
}
34
- @media screen and (min-width : 30em ) {
34
+
35
+ .sponsorLogo {
36
+ max-width : 125px ;
37
+ margin-top : 1em ;
38
+ }
39
+
40
+ @media screen and (min-width : 50em ) {
35
41
.grid {
36
42
display : grid;
37
43
grid-template-columns : 2fr 1fr ;
38
44
grid-column-gap : 1em ;
39
45
margin-top : 0 ;
40
46
}
41
- }
42
-
43
- .sponsorLogo {
44
- max-width : 125px ;
47
+ .sponsorLogo {
48
+ margin-top : 0 ;
49
+ }
45
50
}
46
51
47
52
.food {
Original file line number Diff line number Diff line change
1
+ // @TODO Create separate component files for all the components in this file
1
2
import React , { useState } from 'react'
2
3
import { Link } from 'gatsby'
3
4
import { Dialog } from '@reach/dialog'
@@ -119,11 +120,17 @@ const randomPlaceholder = () => {
119
120
export const SpeakerButton = ( { speaker } ) => {
120
121
const [ dialogIsOpen , setDialogIsOpen ] = useState ( false )
121
122
return (
122
- < span className = { styles . speakerBtn } >
123
+ < >
123
124
< button
124
125
onClick = { ( ) => setDialogIsOpen ( true ) }
125
126
className = { styles . dialogButton }
126
127
>
128
+ { speaker . headshot && (
129
+ < img
130
+ src = { speaker . headshot }
131
+ alt = { `${ speaker . name } headshot thumbnail` }
132
+ />
133
+ ) }
127
134
{ speaker . name }
128
135
</ button >
129
136
< SpeakerDialog
@@ -132,7 +139,7 @@ export const SpeakerButton = ({ speaker }) => {
132
139
speaker = { speaker }
133
140
showLinkToTalk = { false }
134
141
/>
135
- </ span >
142
+ </ >
136
143
)
137
144
}
138
145
Original file line number Diff line number Diff line change 1
1
/* Speaker Regular Button Styles */
2
2
.dialogButton {
3
- display : block;
3
+ display : flex;
4
+ align-items : center;
5
+ margin : 1em 0 ;
6
+ padding : 0 ;
7
+ padding-right : 0.5em ;
4
8
color : var (--navy );
5
9
background : transparent;
6
10
font-weight : var (--semi-bold );
7
- padding-bottom : 0.25em ;
8
- margin-top : 1em ;
9
11
border-color : inherit;
10
12
border-style : solid;
11
13
font-size : 0.9em ;
14
16
cursor : pointer;
15
17
color : var (--tan );
16
18
}
17
- }
18
-
19
- @media screen and (min-width : 30em ) {
20
- .speakerBtn {
21
- display : inline-flex;
22
- padding-right : 1em ;
19
+ img {
20
+ max-width : 30px ;
21
+ margin-right : 0.5em ;
23
22
}
24
23
}
25
24
Original file line number Diff line number Diff line change 1
- import React , { useState } from 'react'
1
+ import React from 'react'
2
2
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
3
3
import {
4
4
faLaptopCode ,
7
7
faStar ,
8
8
faBookOpen ,
9
9
} from '@fortawesome/free-solid-svg-icons'
10
- import { SpeakerDialog } from '../speaker'
10
+ import { SpeakerButton } from '../speaker'
11
11
import { parameterize } from '../../utils/helpers'
12
12
13
13
import styles from './talk.module.css'
@@ -30,28 +30,18 @@ export const TalkType = ({ type, secondary }) => {
30
30
}
31
31
32
32
const Talk = ( { speaker } ) => {
33
- const [ dialogIsOpen , setDialogIsOpen ] = useState ( false )
34
33
const talk = speaker . talks [ 0 ]
35
34
if ( talk . year && talk . title && talk . desc && talk . desc && talk . type ) {
36
35
return (
37
36
< section className = { styles . section } id = { parameterize ( talk . title ) } >
38
37
< div >
39
38
< h2 className = "title" > { talk . title } </ h2 >
40
- < TalkType type = { talk . type } />
41
- < button
42
- onClick = { ( ) => setDialogIsOpen ( true ) }
43
- className = { styles . dialogButton }
44
- >
45
- { speaker . name }
46
- </ button >
39
+ < div >
40
+ < TalkType type = { talk . type } />
41
+ </ div >
42
+ < SpeakerButton speaker = { speaker } />
47
43
</ div >
48
44
< p > { talk . desc } </ p >
49
- < SpeakerDialog
50
- dialogIsOpen = { dialogIsOpen }
51
- setDialogIsOpen = { setDialogIsOpen }
52
- speaker = { speaker }
53
- showLinkToTalk = { false }
54
- />
55
45
</ section >
56
46
)
57
47
}
Original file line number Diff line number Diff line change 17
17
margin-right : 0.5em ;
18
18
}
19
19
20
- .type {
21
- font-weight : var (--light );
22
- }
23
-
24
20
.secondary {
25
21
font-size : 0.8em ;
26
22
margin : 0 0.5em ;
You can’t perform that action at this time.
0 commit comments