Skip to content

Commit 7d9cb41

Browse files
authored
Merge pull request #523 from Datawheel/release
Release
2 parents f9f689f + 6bf6739 commit 7d9cb41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2220
-1253
lines changed

app/App.css

Lines changed: 96 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,12 @@ td > a,
8484
transition: color 0.2s;
8585

8686
/* interactions */
87-
&:hover, &:focus {
87+
/* increase visiblility when focusing via keyboard */
88+
&:focus {
89+
color: var(--sky-black);
90+
text-decoration: underline;
91+
}
92+
&:hover {
8893
color: var(--sky);
8994
}
9095
&:active {
@@ -94,8 +99,7 @@ td > a,
9499
/* danger text */
95100
&.danger-text:hover,
96101
&.danger-text:focus {
97-
color: var(--danger);
98-
opacity: 0.8; /* approximate sky color value */
102+
color: var(--danger-dark);
99103
}
100104
}
101105

@@ -161,6 +165,13 @@ td > a,
161165
box-shadow: 0 2px 1em rgba(35, 50, 51, 0.15);
162166
z-index: 1;
163167
}
168+
169+
/* disabled state */
170+
/* NOTE: remember to also set `tabIndex="-1"` */
171+
&.is-disabled {
172+
@add-mixin disable-field;
173+
opacity: 0.3;
174+
}
164175
}
165176

166177
/* danger button */
@@ -235,6 +246,17 @@ blueprint overrides
235246
background-color: rgba(245, 245, 255, 0.7);
236247
}*/
237248

249+
/* overlay in front of nav */
250+
.pt-portal,
251+
.pt-overlay {
252+
z-index: 100;
253+
}
254+
255+
/* give rando div a z-index so the content isn't hidden on mobile (wtf blueprint) */
256+
.pt-overlay div:not([class]){
257+
z-index: 1;
258+
}
259+
238260
.pt-input {
239261
border-radius: var(--radius-sm);
240262
}
@@ -264,7 +286,8 @@ blueprint overrides
264286
} */
265287

266288
/* override blueprint disabled style */
267-
&:disabled {
289+
&:disabled,
290+
&.pt-disabled {
268291
color: var(--white) !important;
269292
background-color: var(--light-2) !important;
270293
}
@@ -339,8 +362,8 @@ blueprint overrides
339362

340363
/* fix dialog container bug */
341364
.pt-dialog-container {
342-
width: 100vw;
343-
height: 100vh;
365+
@add-mixin absolute-expand;
366+
position: fixed !important;
344367
}
345368

346369
.pt-dialog {
@@ -352,6 +375,11 @@ blueprint overrides
352375
&.is-fullscreen {
353376
width: calc(100% - var(--gutter-lg));
354377
height: calc(100vh - var(--gutter-lg));
378+
379+
@add-mixin max-sm {
380+
width: calc(100% - var(--gutter-sm));
381+
height: calc(100vh - var(--gutter-sm));
382+
}
355383
}
356384

357385
/* center align alert contents */
@@ -556,8 +584,7 @@ label.pt-control {
556584
color: var(--sky-dark);
557585

558586
/* interactions */
559-
/* NOTE: it's a div, so there's no :focus */
560-
&:hover {
587+
&:hover, &:focus {
561588
color: var(--sky);
562589
}
563590
}
@@ -585,19 +612,35 @@ layout
585612
----------------------------------- */
586613

587614
/* fix overflow */
615+
html,
588616
body {
589-
overflow-y: auto;
590617
overflow-x: hidden;
591618
}
592-
/* if vh units are supported, move overflow to app */
593-
@supports (height: 100vh) {
594-
body {
595-
overflow-y: hidden;
619+
/* behind the bottom toolbar in iOS safari */
620+
body {
621+
background-color: var(--sky-light);
622+
}
623+
624+
/* prevent double overflow scrolling when overlays are open */
625+
/* NOTE: .pt-overlay-open is automatically applied to the body element */
626+
body.pt-overlay-open,
627+
body.pt-overlay-open #app {
628+
overflow-y: hidden !important;
629+
630+
& .pt-overlay,
631+
& .pt-overlay-backdrop {
632+
overflow: hidden !important;
596633
}
597-
#app {
634+
635+
& .pt-dialog {
636+
overflow-y: auto;
637+
}
638+
}
639+
640+
/* inline dialog fixes */
641+
.pt-overlay-inline {
642+
& .pt-dialog {
598643
overflow-y: auto;
599-
overflow-x: hidden;
600-
height: 100vh;
601644
}
602645
}
603646

@@ -925,6 +968,12 @@ form field layout
925968
@add-mixin text-input-theme;
926969
}
927970

971+
/* min font size for mobile */
972+
&.font-sm > input:not([type=submit]):not([type=file]),
973+
&.font-sm > textarea {
974+
font-size: 16px;
975+
}
976+
928977
/* textarea min/max height */
929978
& > textarea {
930979
min-height: 11rem;
@@ -1130,13 +1179,24 @@ form field layout
11301179
padding-top: 0.25em;
11311180
padding-bottom: 0.375em;
11321181
opacity: 0;
1182+
1183+
/* hover & focus states */
1184+
&:hover ~ .fake-file-select:after,
1185+
&:focus ~ .fake-file-select:after {
1186+
background-color: var(--sky-black);
1187+
}
1188+
1189+
/* focus state */
1190+
&:focus ~ .fake-file-select {
1191+
background-color: var(--sky-light);
1192+
}
11331193
}
11341194
/* make real field and fake field take up width of container */
11351195
& .field-input {
11361196
width: 100%;
11371197

11381198
/* interactions */
1139-
&:hover, &:focus {
1199+
&:hover {
11401200
& ~ .fake-file-select {
11411201
background-color: var(--white);
11421202
border-color: var(--sky-dark);
@@ -1197,6 +1257,10 @@ form field layout
11971257
text-align: center;
11981258
border-radius: 1.5em;
11991259
}
1260+
@add-mixin min-md {
1261+
border-top-right-radius: 2px;
1262+
border-bottom-right-radius: 2px;
1263+
}
12001264
}
12011265
}
12021266

@@ -1228,6 +1292,11 @@ form field layout
12281292
@add-mixin font-md;
12291293
}
12301294

1295+
/* icon color on :focus */
1296+
&:focus-within .pt-icon-calendar {
1297+
color: var(--sky-dark);
1298+
}
1299+
12311300
/* THE PICKER */
12321301
/* offset positioning, make it stop uncentering itself */
12331302
& .pt-overlay {
@@ -1366,11 +1435,21 @@ utility classes
13661435
display: none !important;
13671436
}
13681437
}
1438+
.u-hide-above-xs {
1439+
@add-mixin min-xs {
1440+
display: none !important;
1441+
}
1442+
}
13691443
.u-hide-above-sm {
13701444
@add-mixin min-sm {
13711445
display: none !important;
13721446
}
13731447
}
1448+
.u-hide-above-md {
1449+
@add-mixin min-md {
1450+
display: none !important;
1451+
}
1452+
}
13741453

13751454
/* vertially align child content via flexbox */
13761455
.u-vertical-align-children {

app/App.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, {Component} from "react";
22
import {connect} from "react-redux";
3-
import {Canon, isAuthenticated} from "datawheel-canon";
3+
import {Canon, isAuthenticated} from "@datawheel/canon-core";
44
import PropTypes from "prop-types";
55
import Helmet from "react-helmet";
66

@@ -142,7 +142,7 @@ class App extends Component {
142142
const isAdmin = this.props.router.location.pathname.includes("admin") ? true : false;
143143

144144
return (
145-
<Canon id="app" className={bareRoute && "share-app"}>
145+
<div id="app" className={bareRoute && "share-app"}>
146146
<Helmet link={ header.link } meta={ meta } />
147147
{
148148
!bareRoute && (location.href.includes("dev.") || location.href.includes("nightly."))
@@ -162,7 +162,7 @@ class App extends Component {
162162
{ !isHome && !isAdmin ? <Clouds /> : null }
163163
<LoadingSpinner />
164164
</div> }
165-
</Canon>
165+
</div>
166166
);
167167

168168
}

app/Islands.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ then add the theme name to the @each loop below */
2727
.island-$(theme) {
2828
/* set background image paths */
2929
& .island-image,
30+
& .mobile-island-image,
3031
& > .island-link-image,
3132
& .lessonplan-header-image {
3233
background-image: url("/islands/island-$(theme).png");
@@ -59,8 +60,8 @@ then add the theme name to the @each loop below */
5960
}
6061
/* set color */
6162
& .island-path .code-block.is-done .side,
63+
& .island-path .code-block.is-next .side,
6264
& .pt-dialog-header-title,
63-
6465
& .lessonplan-toc > *,
6566
& .item-editor-inner h1,
6667
& .item-editor-inner h2 {
@@ -88,7 +89,9 @@ then add the theme name to the @each loop below */
8889
}
8990
& .button:not(.inverted-button):not(.danger-button),
9091
&.pt-button,
91-
& .pt-button {
92+
& .pt-button,
93+
& .code-block.is-next,
94+
& .code-block.is-done {
9295
background-color: var(--$(theme)-island-medium);
9396
border-color: var(--$(theme)-island-medium);
9497
/* interactions */
@@ -120,8 +123,7 @@ then add the theme name to the @each loop below */
120123
color: var(--$(theme)-island-dark);
121124

122125
/* interactions */
123-
/* NOTE: it's a div, so there's no :focus */
124-
&:hover {
126+
&:hover, &:focus {
125127
color: var(--$(theme)-island-medium);
126128
}
127129
}

app/components/CTA.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44
.cta {
55
/* sizing */
66
padding: 2.5rem var(--gutter-lg) 2rem var(--gutter-lg);
7-
max-width: 47.5rem; /* 760px */
7+
width: 47.5rem; /* 760px */
8+
max-width: calc(100% - var(--gutter-xs));
89
/* positioning */
910
margin-left: auto;
1011
margin-right: auto;
11-
margin-top: 10rem;
12+
margin-top: 12rem;
1213

14+
/* decrease padding on small screens */
15+
@add-mixin max-xs { padding: 1rem; }
16+
17+
/* scale up margin */
1318
@add-mixin min-xs { margin-top: 15rem; }
1419
@add-mixin min-sm { margin-top: 18rem; }
1520
@add-mixin min-lg { margin-top: calc(15% + 10vh); }

app/components/CTA.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "./CTA.css";
77

88
import {Dialog} from "@blueprintjs/core";
99

10-
/**
10+
/**
1111
* Call To Action Component, encourage users to sign up after visiting SEO-enable page
1212
*/
1313

@@ -30,7 +30,7 @@ class CTA extends Component {
3030

3131
return (
3232
<div className="cta u-text-center">
33-
33+
3434
{/* avatar */}
3535
<img className="cta-avatar-img" alt=""
3636
src="/avatars/avatar-excited-transparent.png"
@@ -45,7 +45,7 @@ class CTA extends Component {
4545
</h2>
4646

4747
{/* login | signup button */}
48-
<button className="cta-button pt-button pt-intent-primary font-md u-margin-top-md" onClick={this.authForm.bind(this, "signup")}>
48+
<button className="cta-button button font-md u-margin-top-md" onClick={this.authForm.bind(this, "signup")}>
4949
{ t("Home.GetStarted") }
5050
</button>
5151

app/components/Clouds.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1+
@import 'mixins.css';
2+
3+
#Canon,
14
#app {
2-
background-image: linear-gradient(var(--sky) 0, var(--sky-light) 100%);
5+
/* fixed gradient bg */
6+
&:after {
7+
/* pseudo stuff */
8+
content: '';
9+
display: block;
10+
/* positioning */
11+
@add-mixin absolute-expand;
12+
position: fixed !important;
13+
z-index: -1;
14+
background-image: linear-gradient(var(--sky) 0, var(--sky-light) 100%);
15+
}
316
}
417

518
#clouds {

0 commit comments

Comments
 (0)