diff --git a/opentech/apply/funds/templates/funds/submissions.html b/opentech/apply/funds/templates/funds/submissions.html index 9684cb70f57062930ac2a1ce38091390c97c3bbb..dce637a3a2b414b4adbb2bb203f144c98cb5de21 100644 --- a/opentech/apply/funds/templates/funds/submissions.html +++ b/opentech/apply/funds/templates/funds/submissions.html @@ -20,8 +20,8 @@ {% if object_list|length > 0 or active_filters %} <div class="button button--filters button--contains-icons js-open-filters">Filter By</div> - <div class="wrapper wrapper--filters js-filter-wrapper"> - <div class="wrapper wrapper--filters-header"> + <div class="filters js-filter-wrapper"> + <div class="filters__header"> <div class="js-clear-filters">Clear</div> <div>Filter by</div> <div class="js-close-filters">Close</div> diff --git a/opentech/static_src/package.json b/opentech/static_src/package.json index 1f8ab7a43e78183716ab2be0a0c0cd80d9e263b4..7d34f674671066935273c4a506f70b9dadf7ce30 100755 --- a/opentech/static_src/package.json +++ b/opentech/static_src/package.json @@ -95,7 +95,7 @@ "rollup-plugin-sizes": "^0.2.3", "rollup-plugin-uglify": "^1.0.1", "rollup-watch": "^3.2.2", - "sass-lint": "^1.8.2" + "sass-lint": "^1.12.1" }, "engines": { "node": ">=4" diff --git a/opentech/static_src/src/sass/apply/components/_all-submissions.scss b/opentech/static_src/src/sass/apply/components/_all-submissions.scss index 9a23a50fe654d2e4e286909c1bf7e3f6dec34ec5..b846175b077bb7285b3dc7edb49d3269ffa51b10 100644 --- a/opentech/static_src/src/sass/apply/components/_all-submissions.scss +++ b/opentech/static_src/src/sass/apply/components/_all-submissions.scss @@ -1,4 +1,5 @@ -$table-breakpoint: 'tablet-portrait'; +// also in _table.scss +$table-breakpoint: 'tablet-landscape'; .all-submissions { $root: &; @@ -41,7 +42,7 @@ $table-breakpoint: 'tablet-portrait'; } } - &.reviews_stats { + &.reviews_stats { // sass-lint:disable-line class-name-format color: $color--mid-dark-grey; span { diff --git a/opentech/static_src/src/sass/apply/components/_button.scss b/opentech/static_src/src/sass/apply/components/_button.scss index 1cdde11cb1fe9e6f84588b730c802b04f4e25eb5..11725e07451200db77c779cb8c71501234112dd6 100644 --- a/opentech/static_src/src/sass/apply/components/_button.scss +++ b/opentech/static_src/src/sass/apply/components/_button.scss @@ -85,7 +85,7 @@ background: url('./../../images/filters.svg') $color--white no-repeat 93% center; } - @include media-query(tablet-portrait) { + @include media-query(tablet-landscape) { display: none; } } diff --git a/opentech/static_src/src/sass/apply/components/_feed.scss b/opentech/static_src/src/sass/apply/components/_feed.scss index df79653ca8e125bd8c1bf017df31226dca6e7f06..651f9162fb772549cc0339bd1205b52e4765e902 100644 --- a/opentech/static_src/src/sass/apply/components/_feed.scss +++ b/opentech/static_src/src/sass/apply/components/_feed.scss @@ -85,7 +85,7 @@ &--progress { width: 100%; margin: 5px 0 0; - font-size: map-get($font-sizes, milli);; + font-size: map-get($font-sizes, milli); color: $color--black-50; @include media-query(small-tablet) { diff --git a/opentech/static_src/src/sass/apply/components/_filters.scss b/opentech/static_src/src/sass/apply/components/_filters.scss new file mode 100644 index 0000000000000000000000000000000000000000..812e3758fdda9463815598c4d655fe4ae916d40f --- /dev/null +++ b/opentech/static_src/src/sass/apply/components/_filters.scss @@ -0,0 +1,39 @@ +.filters { + display: none; + + @include media-query(tablet-landscape) { + display: block; + } + + &.is-open { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 20; + display: block; + width: 100%; + height: 100vh; + background: $color--white; + } + + &__header { + display: flex; + align-items: center; + justify-content: space-around; + padding: 20px 0; + + @include media-query(tablet-landscape) { + display: none; + } + + > div[class^='js-'] { + color: $color--primary; + + &:hover { + cursor: pointer; + } + } + } +} diff --git a/opentech/static_src/src/sass/apply/components/_form.scss b/opentech/static_src/src/sass/apply/components/_form.scss index b79baf3f1f7999079db32eccf7954bf4c41dae29..4fb6b5b40a89321a5f5d08ece646d880c412d2b6 100644 --- a/opentech/static_src/src/sass/apply/components/_form.scss +++ b/opentech/static_src/src/sass/apply/components/_form.scss @@ -131,7 +131,7 @@ flex-direction: column; padding: 0; - .select2 .select2-selection.select2-selection--single { + .select2 .select2-selection.select2-selection--single { // sass-lint:disable-line force-element-nesting border: 0; border-top: 1px solid $color--mid-grey; @@ -142,6 +142,7 @@ } } + // so the form can be output in any tag > * { flex-basis: auto; margin: 0; @@ -201,7 +202,7 @@ -moz-appearance: none; // sass-lint:disable-line no-vendor-prefixes option { - background-color: white; + background-color: $color--white; } } diff --git a/opentech/static_src/src/sass/apply/components/_messages.scss b/opentech/static_src/src/sass/apply/components/_messages.scss index 3bec88cdc59d65a34d81d96f61482376b0279c6b..509c244c9c1806a98c6e7e481ae8090c458c47b7 100644 --- a/opentech/static_src/src/sass/apply/components/_messages.scss +++ b/opentech/static_src/src/sass/apply/components/_messages.scss @@ -1,16 +1,16 @@ .messages { - width: 100vw; position: relative; - left: 50%; right: 50%; - margin-left: -50vw; + left: 50%; + width: 100vw; margin-right: -50vw; + margin-left: -50vw; &__text { - max-height:1000px; + position: relative; + max-height: 1000px; padding: 15px; padding-right: 35px; - position:relative; border: solid 1px; &--info { @@ -18,20 +18,20 @@ border-color: darken($color--pastel-green, 20%); } - &--warning{ - color: $color--white; + &--warning { font-weight: bold; + color: $color--white; background: $color--error; border-color: darken($color--error, 20%); } &--hide { - max-height: 0px; - padding-top: 0px; - padding-bottom: 0px; + max-height: 0; + padding-top: 0; + padding-bottom: 0; border: 0 none; + transition: all $transition; // sass-lint:disable-line no-transition-all transform-origin: top; - transition: all $transition; } } diff --git a/opentech/static_src/src/sass/apply/components/_nav.scss b/opentech/static_src/src/sass/apply/components/_nav.scss index 243cd36fd3774537f83b91a568592dee6e42b94e..dc003a247088580ef060f68076c3b9e267723a35 100644 --- a/opentech/static_src/src/sass/apply/components/_nav.scss +++ b/opentech/static_src/src/sass/apply/components/_nav.scss @@ -47,10 +47,13 @@ @include media-query(tablet-portrait) { display: inline; - padding: 30px 0; + padding: 40px 0; color: $color--default; } + @include media-query(tablet-landscape) { + padding: 30px 0; + } &--active { &::after { diff --git a/opentech/static_src/src/sass/apply/components/_pagination.scss b/opentech/static_src/src/sass/apply/components/_pagination.scss index 67f49b2b5d024e8ed9be3f92e2ba5bdb5af8892d..4b661189e6aafa26ee40dfbb76441303579172a7 100644 --- a/opentech/static_src/src/sass/apply/components/_pagination.scss +++ b/opentech/static_src/src/sass/apply/components/_pagination.scss @@ -22,7 +22,7 @@ border: 1px solid $color--mid-grey; &::after { - position: absolute;; + position: absolute; top: 18.5px; left: 22.5px; } diff --git a/opentech/static_src/src/sass/apply/components/_reviews-summary.scss b/opentech/static_src/src/sass/apply/components/_reviews-summary.scss index 764216974c66aa8c94c7a0a9d3516936426d8569..82005d63b81028ce0f975c07d2c61f5a33eb6638 100644 --- a/opentech/static_src/src/sass/apply/components/_reviews-summary.scss +++ b/opentech/static_src/src/sass/apply/components/_reviews-summary.scss @@ -2,7 +2,7 @@ display: none; background-color: transparent; - @include media-query(tablet-portrait) { + @include media-query(tablet-landscape) { display: table; } diff --git a/opentech/static_src/src/sass/apply/components/_select2.scss b/opentech/static_src/src/sass/apply/components/_select2.scss index 39c335195b28b1334aa3a9f02e4e869449c89561..962f79c870fbe3719bbf904bb339ea07cfa5bba1 100644 --- a/opentech/static_src/src/sass/apply/components/_select2.scss +++ b/opentech/static_src/src/sass/apply/components/_select2.scss @@ -5,7 +5,7 @@ .select2-container--default, &.select2-container--default { - width: 100% !important; + width: 100% !important; // sass-lint:disable-line no-important .select2-selection--single { height: 55px; @@ -54,8 +54,8 @@ .select2-container { &--default { .select2-results__option--highlighted[aria-selected] { - color: $color--default !important; - background-color: transparentize($color--primary, 0.9) !important; + color: $color--default !important; // sass-lint:disable-line no-important + background-color: transparentize($color--primary, 0.9) !important; // sass-lint:disable-line no-important } } diff --git a/opentech/static_src/src/sass/apply/components/_table.scss b/opentech/static_src/src/sass/apply/components/_table.scss index 40e1c698ac6b3b8d7264ff64fa8be3409539c78c..161ce725d1b3fccb2da6fabda24d52629676f2a9 100644 --- a/opentech/static_src/src/sass/apply/components/_table.scss +++ b/opentech/static_src/src/sass/apply/components/_table.scss @@ -1,4 +1,5 @@ -$table-breakpoint: 'tablet-portrait'; +// also in _all-submissions.scss +$table-breakpoint: 'tablet-landscape'; table { width: 100%; diff --git a/opentech/static_src/src/sass/apply/components/_wrapper.scss b/opentech/static_src/src/sass/apply/components/_wrapper.scss index cd316173056a4f6eba0e82da04882bf50bc50f8c..34405caaff4c050f88e8c4619ff10636b22f03d6 100644 --- a/opentech/static_src/src/sass/apply/components/_wrapper.scss +++ b/opentech/static_src/src/sass/apply/components/_wrapper.scss @@ -176,46 +176,6 @@ } } - &--filters { - display: none; - - @include media-query(tablet-portrait) { - display: block; - } - - &.is-open { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 20; - display: block; - width: 100%; - height: 100vh; - background: $color--white; - } - } - - &--filters-header { - display: flex; - align-items: center; - justify-content: space-around; - padding: 20px 0; - - @include media-query(tablet-portrait) { - display: none; - } - - > div[class^='js-'] { - color: $color--primary; - - &:hover { - cursor: pointer; - } - } - } - &--search { display: flex; flex-direction: column; diff --git a/opentech/static_src/src/sass/apply/main.scss b/opentech/static_src/src/sass/apply/main.scss index 5aea732021064a5754f0dec693b40a92ddf61d70..82e41b6943b1ee57c16d9ff22a7cd1f5040f7928 100755 --- a/opentech/static_src/src/sass/apply/main.scss +++ b/opentech/static_src/src/sass/apply/main.scss @@ -18,6 +18,7 @@ @import 'components/comment'; @import 'components/button'; @import 'components/feed'; +@import 'components/filters'; @import 'components/grid'; @import 'components/heading'; @import 'components/icon'; diff --git a/opentech/static_src/src/sass/public/components/_grid.scss b/opentech/static_src/src/sass/public/components/_grid.scss index 14aaab89f365ea2086f262971da2dbd4c34cfde0..ffffac7b08d35c91c58dfc509b80790f4f518574 100644 --- a/opentech/static_src/src/sass/public/components/_grid.scss +++ b/opentech/static_src/src/sass/public/components/_grid.scss @@ -143,9 +143,9 @@ @include media-query(tablet-landscape) { justify-content: space-between; margin: 3rem 0; - grid-gap: 35px; // sass-lint:disable-line no-misspelled-properties - grid-template-columns: repeat(4, 1fr); text-align: center; + grid-template-columns: repeat(4, 1fr); + grid-gap: 35px; // sass-lint:disable-line no-misspelled-properties } } } diff --git a/opentech/static_src/yarn.lock b/opentech/static_src/yarn.lock index 2a651a465a29a74525b4d571b5508951d55a18fe..ce968a1de2a296c2f6beb0870bbbb2b326be5b92 100755 --- a/opentech/static_src/yarn.lock +++ b/opentech/static_src/yarn.lock @@ -1775,13 +1775,13 @@ from@~0: version "0.1.3" resolved "https://registry.yarnpkg.com/from/-/from-0.1.3.tgz#ef63ac2062ac32acf7862e0d40b44b896f22f3bc" -front-matter@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/front-matter/-/front-matter-2.1.0.tgz#0bdff42cbad2b35c07ac7085811789759f9858c0" +front-matter@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/front-matter/-/front-matter-2.1.2.tgz#f75983b9f2f413be658c93dfd7bd8ce4078f5cdb" dependencies: js-yaml "^3.4.6" -fs-extra@1.0.0, fs-extra@^1.0.0: +fs-extra@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" dependencies: @@ -1789,6 +1789,14 @@ fs-extra@1.0.0, fs-extra@^1.0.0: jsonfile "^2.1.0" klaw "^1.0.0" +fs-extra@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^3.0.0" + universalify "^0.1.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -1955,9 +1963,9 @@ globule@^1.0.0: lodash "~4.16.4" minimatch "~3.0.2" -gonzales-pe@3.4.7: - version "3.4.7" - resolved "https://registry.yarnpkg.com/gonzales-pe/-/gonzales-pe-3.4.7.tgz#17c7be67ad6caff6277a3e387ac736e983d280ec" +gonzales-pe-sl@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/gonzales-pe-sl/-/gonzales-pe-sl-4.2.3.tgz#6a868bc380645f141feeb042c6f97fcc71b59fe6" dependencies: minimist "1.1.x" @@ -2383,6 +2391,12 @@ jsonfile@^2.1.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" + optionalDependencies: + graceful-fs "^4.1.6" + jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -2411,6 +2425,10 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" +known-css-properties@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.3.0.tgz#a3d135bbfc60ee8c6eacf2f7e7e6f2d4755e49a4" + lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" @@ -3439,18 +3457,19 @@ sass-graph@^2.1.1: lodash "^4.0.0" yargs "^4.7.1" -sass-lint@^1.8.2: - version "1.10.2" - resolved "https://registry.yarnpkg.com/sass-lint/-/sass-lint-1.10.2.tgz#825bd6b0da79ddd36a42ffae5b6d44ac4922502b" +sass-lint@^1.12.1: + version "1.12.1" + resolved "https://registry.yarnpkg.com/sass-lint/-/sass-lint-1.12.1.tgz#630f69c216aa206b8232fb2aa907bdf3336b6d83" dependencies: commander "^2.8.1" eslint "^2.7.0" - front-matter "2.1.0" - fs-extra "^1.0.0" + front-matter "2.1.2" + fs-extra "^3.0.1" glob "^7.0.0" globule "^1.0.0" - gonzales-pe "3.4.7" + gonzales-pe-sl "^4.2.3" js-yaml "^3.5.4" + known-css-properties "^0.3.0" lodash.capitalize "^4.1.0" lodash.kebabcase "^4.0.0" merge "^1.2.0" @@ -3880,6 +3899,10 @@ underscore@1.7.x: version "1.7.0" resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.7.0.tgz#6bbaf0877500d36be34ecaa584e0db9fef035209" +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"