Skip to content

Commit 0b54b4e

Browse files
lancebeckerBrandon Johnson
authored andcommitted
Start enhancing the responsive view
1 parent da8f62f commit 0b54b4e

File tree

4 files changed

+143
-20
lines changed

4 files changed

+143
-20
lines changed

css/main.scss

Lines changed: 111 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import 'mixins.scss';
2+
13
html,body {
24
margin: 0;
35
padding: 0;
@@ -15,6 +17,7 @@ img {
1517

1618
.primary-navigation {
1719
display: flex;
20+
flex-direction: column;
1821
background: #fff;
1922
padding: 10px 0;
2023

@@ -29,7 +32,7 @@ img {
2932
font-weight: bold;
3033
margin-right: 15px;
3134
padding: 0px 5px;
32-
font-size: 0.9rem;
35+
font-size: 0.4rem;
3336
letter-spacing: 0.03rem;
3437
border: 3px solid transparent;
3538

@@ -43,14 +46,30 @@ img {
4346
border: 3px solid #e5cf5f;
4447
}
4548

49+
@include break-at( sm ) {
50+
flex-direction: row;
51+
52+
a {
53+
font-size: 0.9rem;
54+
}
55+
56+
}
57+
4658
}
4759

4860
.primary-header {
49-
font-size: 3.45rem;
5061
font-weight: bold;
5162
text-transform: uppercase;
52-
padding-top: 15px;
53-
margin-bottom: 65px;
63+
text-align: center;
64+
font-size: 2rem;
65+
margin-bottom: 30px;
66+
67+
@include break-at( sm ) {
68+
padding-top: 15px;
69+
margin-bottom: 65px;
70+
font-size: 3.45rem;
71+
}
72+
5473
}
5574

5675
.hero-container {
@@ -74,8 +93,14 @@ img {
7493
}
7594

7695
.hero-container-content {
77-
max-width: 1000px;
78-
padding: 50px 0 0;
96+
width: 100%;
97+
padding: 20px;
98+
99+
@include break-at( sm ) {
100+
max-width: 1000px;
101+
padding: 50px 0 0;
102+
}
103+
79104
}
80105

81106
.sponsered-by-label {
@@ -102,7 +127,14 @@ img {
102127
.button-row {
103128
display: flex;
104129
align-items: center;
105-
margin: 50px 0 0;
130+
margin: 30px 0 0;
131+
flex-direction: column;
132+
133+
@include break-at( sm ) {
134+
flex-direction: row;
135+
margin: 50px 0 0;
136+
}
137+
106138
}
107139

108140
.outline-button {
@@ -111,15 +143,22 @@ img {
111143
justify-content: center;
112144
border: 2px solid #000;
113145
padding: 8px 10px;
146+
margin-bottom: 10px;
114147
font-weight: bold;
115-
margin-right: 10px;
116148
background: none;
117149
cursor: pointer;
118150
min-height: 55px;
119151
box-sizing: border-box;
120152
transition: all 0.2s ease-out;
121153
text-decoration: none;
122154
color: #000;
155+
width: 80%;
156+
157+
@include break-at( sm ) {
158+
width: auto;
159+
margin-right: 10px;
160+
margin-bottom: 0;
161+
}
123162

124163
&.small-button {
125164
max-width: 150px;
@@ -169,13 +208,33 @@ img {
169208
align-items: center;
170209
justify-content: center;
171210
flex-direction: column;
172-
margin: 15% 0;
211+
margin: 10px 0 0;
212+
213+
@include break-at( sm ) {
214+
margin: 15% 0;
215+
}
216+
173217
}
174218

175219
.sponser-container-row {
176220
display: flex;
177221
align-items: center;
178222
justify-content: center;
223+
flex-direction: column;
224+
225+
.sponser {
226+
margin-bottom: 10px;
227+
}
228+
229+
@include break-at( sm ) {
230+
flex-direction: row;
231+
232+
.sponser {
233+
margin-bottom: 0;
234+
}
235+
236+
}
237+
179238
}
180239

181240
.sponsored-by-title {
@@ -215,10 +274,18 @@ img {
215274
.secondary-content {
216275
position: relative;
217276
display: flex;
218-
margin: 3% auto;
277+
flex-direction: column;
278+
margin: 10px 30px;
219279
border: 5px solid #e5cf5f;
220280
padding: 20px;
221-
max-width: 1000px;
281+
282+
@include break-at( sm ) {
283+
margin: 3% auto;
284+
flex-direction: row;
285+
max-width: 1000px;
286+
width: 100%;
287+
}
288+
222289
}
223290

224291
.secondary-content-header {
@@ -235,9 +302,19 @@ img {
235302
.tilt-left {
236303

237304
.secondary-content-header {
238-
top: -10px;
239-
left: -35px;
240305
transform: rotate( -1deg );
306+
top: 5px;
307+
left: 5px;
308+
}
309+
310+
311+
@include break-at( sm ) {
312+
313+
.secondary-content-header {
314+
top: -10px;
315+
left: -35px;
316+
}
317+
241318
}
242319

243320
}
@@ -260,17 +337,27 @@ img {
260337
}
261338

262339
.secondary-content-blurb {
263-
width: 85%;
264340
margin-top: 45px;
265341
font-size: 1.1rem;
266342
padding-bottom: 10px;
267343
border-bottom: 1px solid #efefef;
344+
345+
@include break-at( sm ) {
346+
width: 85%;
347+
}
348+
268349
}
269350

270351
.map-container {
271-
width: 500px;
272-
height: 350px;
352+
width: 100%;
353+
height: 250px;
273354
background: #eee;
355+
356+
@include break-at( sm ) {
357+
max-width: 500px;
358+
height: 350px;
359+
}
360+
274361
}
275362

276363
address {
@@ -328,11 +415,17 @@ address {
328415
.interior-page {
329416
position: relative;
330417
background: #ffffff;
331-
padding: 75px 25px 25px;
332-
max-width: 960px;
333418
box-sizing: border-box;
334419
margin: 2% auto;
335420
border: 5px solid #e5cf5f;
421+
padding: 20px;
422+
423+
@include break-at( sm ) {
424+
margin: 2% auto;
425+
max-width: 960px;
426+
padding: 75px 25px 25px;
427+
}
428+
336429
}
337430

338431
.code-of-conduct {

css/mixins.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
$breakpoints: (
2+
sm: 600px,
3+
gt-sm: 960px,
4+
md: 960px,
5+
gt-md: 1280px,
6+
lg: 1280px,
7+
gt-lg: 1920px,
8+
xl: 1920px
9+
);
10+
11+
@mixin break-at( $name-or-min-width ) {
12+
$min-width: 0;
13+
@if map-has-key($breakpoints, $name-or-min-width) {
14+
$min-width: map-get($breakpoints, $name-or-min-width);
15+
}
16+
@else if type-of($name-or-min-width) == 'number' and not unitless($name-or-min-width) {
17+
$min-width: $name-or-min-width;
18+
}
19+
@else {
20+
@error(
21+
"No breakpoint named "
22+
+ $name-or-min-width
23+
+ " in $breakpoints. Available breakpoints:"
24+
+ inspect($breakpoints) + ". You can also pass in a value like 500px.");
25+
}
26+
@media only screen and ( min-width: $min-width ) {
27+
@content;
28+
}
29+
}

pages/_template.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Link } from 'react-router'
44
import { prefixLink } from 'gatsby-helpers'
55
import Headroom from 'react-headroom'
66
import '../css/markdown-styles'
7+
import '../css/mixins.scss'
78
import '../css/main.scss'
89
import { config } from 'config'
910

@@ -21,7 +22,7 @@ module.exports = React.createClass({
2122
<Headroom style={{background: '#fff'}}>
2223
<Container className="primary-navigation" >
2324
<Link to={prefixLink('/')} >
24-
<img className="logo" src="images/javascriptmn.png" />
25+
<img className="logo" src="/images/javascriptmn.png" />
2526
</Link>
2627
<Link to={prefixLink('/about/')} >
2728
About

pages/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<div class="sponser-container">
3030

31-
<div class="sponsored-by-title">Sponsored By:</div>
31+
<div class="sponsored-by-title">Hosted By:</div>
3232

3333
<div class="sponser-container-row">
3434
<div class="sponser">

0 commit comments

Comments
 (0)