Skip to content

Commit 334a1f7

Browse files
lancebeckerBrandon Johnson
authored andcommitted
Make the main navigation a bit more usable on small devices
1 parent 0b54b4e commit 334a1f7

File tree

2 files changed

+116
-31
lines changed

2 files changed

+116
-31
lines changed

css/main.scss

Lines changed: 97 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,11 @@ img {
1717

1818
.primary-navigation {
1919
display: flex;
20-
flex-direction: column;
2120
background: #fff;
2221
padding: 10px 0;
2322

24-
.logo {
25-
width: 25px;
26-
}
27-
2823
a {
24+
display: block;
2925
text-transform: uppercase;
3026
text-decoration: none;
3127
color: #000;
@@ -57,6 +53,55 @@ img {
5753

5854
}
5955

56+
.logo-container {
57+
width: 100px;
58+
59+
a {
60+
display: block;
61+
}
62+
63+
.logo {
64+
display: block;
65+
width: 100%;
66+
}
67+
68+
@include break-at( sm ) {
69+
width: auto;
70+
71+
.logo {
72+
display: block;
73+
width: 25px;
74+
}
75+
76+
}
77+
78+
}
79+
80+
.secondary-nav {
81+
display: flex;
82+
flex-wrap: wrap;
83+
align-items: center;
84+
justify-content: center;
85+
margin: 0 10px;
86+
87+
a {
88+
margin: 0;
89+
flex: 1 1 50%;
90+
text-align: center;
91+
}
92+
93+
@include break-at( sm ) {
94+
flex-wrap: nowrap;
95+
96+
a {
97+
margin-right: 10px;
98+
text-align: left;
99+
flex: unset;
100+
}
101+
}
102+
103+
}
104+
60105
.primary-header {
61106
font-weight: bold;
62107
text-transform: uppercase;
@@ -307,7 +352,6 @@ img {
307352
left: 5px;
308353
}
309354

310-
311355
@include break-at( sm ) {
312356

313357
.secondary-content-header {
@@ -321,29 +365,45 @@ img {
321365

322366
.tilt-right {
323367

324-
.info-column {
325-
padding-left: 20px;
326-
}
327-
328368
.secondary-content-blurb {
369+
margin-top: 10px;
329370
margin-bottom: 10px;
330371
}
331372

332373
.secondary-content-header {
333-
top: -10px;
334-
right: -35px;
374+
right: 5px;
375+
top: 5px;
335376
transform: rotate( 1deg );
336377
}
378+
379+
@include break-at( sm ) {
380+
381+
.secondary-content-blurb {
382+
margin-top: 25px;
383+
}
384+
385+
.info-column {
386+
padding-left: 20px;
387+
}
388+
389+
.secondary-content-header {
390+
top: -10px;
391+
right: -35px;
392+
}
393+
394+
}
395+
337396
}
338397

339398
.secondary-content-blurb {
340399
margin-top: 45px;
341-
font-size: 1.1rem;
400+
font-size: 1rem;
342401
padding-bottom: 10px;
343402
border-bottom: 1px solid #efefef;
344403

345404
@include break-at( sm ) {
346405
width: 85%;
406+
font-size: 1.1rem;
347407
}
348408

349409
}
@@ -418,7 +478,7 @@ address {
418478
box-sizing: border-box;
419479
margin: 2% auto;
420480
border: 5px solid #e5cf5f;
421-
padding: 20px;
481+
padding: 80px 20px 0;
422482

423483
@include break-at( sm ) {
424484
margin: 2% auto;
@@ -461,10 +521,19 @@ address {
461521
}
462522

463523
.tier-title {
464-
font-size: 1.6rem;
524+
font-size: 1.45rem;
465525
font-family: 'Didot';
466526
font-style: oblique;
467-
opacity: 0.6;
527+
opacity: 0.8;
528+
text-align: center;
529+
display: block;
530+
531+
@include break-at( sm ) {
532+
opacity: 0.6;
533+
font-size: 1.6rem;
534+
text-align: left;
535+
}
536+
468537
}
469538

470539
.sponser-tier-2 {
@@ -496,3 +565,15 @@ address {
496565
text-transform: uppercase;
497566
}
498567

568+
.sponsers-page {
569+
570+
.sponser-container-row {
571+
padding: 10px 0;
572+
573+
@include break-at( sm ) {
574+
padding: 40px 0 45px;
575+
}
576+
577+
}
578+
579+
}

pages/_template.jsx

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,25 @@ module.exports = React.createClass({
2121
<div className="site-wrapper">
2222
<Headroom style={{background: '#fff'}}>
2323
<Container className="primary-navigation" >
24-
<Link to={prefixLink('/')} >
25-
<img className="logo" src="/images/javascriptmn.png" />
26-
</Link>
27-
<Link to={prefixLink('/about/')} >
28-
About
29-
</Link>
30-
<Link to={prefixLink('/our_sponsors/')} >
31-
Current Sponsors
32-
</Link>
33-
<Link to={prefixLink('/code-of-conduct/')} >
34-
Code of Conduct
35-
</Link>
36-
<Link className="highlight" to={prefixLink('/speak/')} >
37-
Speak
38-
</Link>
24+
<div className="logo-container">
25+
<Link to={prefixLink('/')} >
26+
<img className="logo" src="/images/javascriptmn.png" />
27+
</Link>
28+
</div>
29+
<div className="secondary-nav">
30+
<Link to={prefixLink('/about/')} >
31+
About
32+
</Link>
33+
<Link to={prefixLink('/our_sponsors/')} >
34+
Current Sponsors
35+
</Link>
36+
<Link to={prefixLink('/code-of-conduct/')} >
37+
Code of Conduct
38+
</Link>
39+
<Link className="highlight" to={prefixLink('/speak/')} >
40+
Speak
41+
</Link>
42+
</div>
3943
</Container>
4044
</Headroom>
4145

0 commit comments

Comments
 (0)