Skip to content

Commit

Permalink
Merge pull request #34 from fac-14/frontendtuesday
Browse files Browse the repository at this point in the history
Frontendtuesday
  • Loading branch information
MissArray authored Sep 18, 2018
2 parents f7aa704 + bd922ab commit e3ff535
Show file tree
Hide file tree
Showing 25 changed files with 250 additions and 84 deletions.
45 changes: 45 additions & 0 deletions public/images/left-arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions public/js/checkboxlocalstoragebackground.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
var checkboxes = document.querySelectorAll('.govuk-checkboxes__input');

checkboxes.forEach(function (i) {
i.addEventListener('click', clickFunc);
if(sessionStorage.hasOwnProperty(i.value)){
i.checked = true;
}
})

function clickFunc() {
if(this.checked){
sessionStorage.setItem(this.value + '-background', this.value);
} else {
if(sessionStorage.hasOwnProperty(this.value)){
sessionStorage.removeItem(this.value);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ checkboxes.forEach(function (i) {

function clickFunc() {
if(this.checked){
sessionStorage.setItem(this.value, this.value);
sessionStorage.setItem(this.value + '-resource', this.value);
} else {
if(sessionStorage.hasOwnProperty(this.value)){
sessionStorage.removeItem(this.value);
Expand Down
75 changes: 57 additions & 18 deletions public/stylesheets/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/stylesheets/main.css.map

Large diffs are not rendered by default.

64 changes: 56 additions & 8 deletions public/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ $body-font: 'Source Sans Pro', sans-serif;
$bold-font: 900;
$regular-font: 400;
// $heading-1: 5.063em;
$heading-1: 3.375em;
$heading-2: 2.25em;
$base-font-size: 1em;
$smaller-font-size: 0.667em;
$larger-font-size: 1.5em;
$heading-1: 3.375rem;
$heading-2: 2.25rem;
$base-font-size: 1.5rem;
$smaller-font-size: 0.667rem;
$larger-font-size: 1.5rem;

// COLOR VARIABLES

Expand All @@ -42,7 +42,8 @@ $accent-colour-dark: #C8A415;
$o-grid-is-silent: false;

$round-image: 50%;
$small-image: 200px;
$small-image: 75%;
$very-small-image: 20px;

// MIX-INS

Expand Down Expand Up @@ -73,10 +74,42 @@ h1 {
font-size: $heading-1;
}

progress[value] {
appearance: none;
-webkit-appearance: none;
-moz-apperance: none;
width: 100%;
height: 100%;
}

progress[value]::-webkit-progress-bar {
background: $primary-bg-colour-light;
box-shadow: 0 2px 5px $primary-bg-colour inset;
}

progress[value]::-webkit-progress-value {
background-color: $accent-colour;
}

progress {
appearance: none;
-webkit-appearance: none;
-moz-apperance: none;
width: 100%;
height: 100%;
background: $primary-bg-colour-light;
box-shadow: 0 2px 5px $primary-bg-colour inset;
}

progress[value]::-moz-progress-bar {
background-color: $accent-colour;
box-shadow: 0 2px 5px $primary-bg-colour inset;
}

// CLASSES

.full-viewport {
min-height: 100vh;
min-height: 95vh;
width: 100vw;
}

Expand Down Expand Up @@ -114,6 +147,12 @@ h1 {
padding-right: 10px;
}

.centered-content-no-padding {
display: flex;
align-items: center;
justify-content: center;
}

.eight-padding {
padding: 8px;
}
Expand All @@ -126,8 +165,18 @@ h1 {
padding: 32px;
}

.progressbar {
position: fixed;
width: 100%;
height: 5%;
left: 0;
bottom: 0;
background: white;
}

// IDS


// #test-container {
// @include oGridContainer();
// }
Expand Down Expand Up @@ -156,7 +205,6 @@ img {
radius: $round-image;
}
width: $small-image;
height: $small-image;
max-width: 90%;
}

Expand Down
5 changes: 4 additions & 1 deletion src/controllers/background.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
exports.get = (req, res) => {
res.render('background', {
layout: 'scrollable'
layout: 'scrollable',
progressamt: '40',
title: 'Background',
pageInfo: 'Please check all the boxes you feel are things holding you back from getting into tech.'
});
}
7 changes: 6 additions & 1 deletion src/controllers/home.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
exports.get = (req, res) => {
res.render('home', {activePage:{home: true}})
res.render('home',
{
activePage:{home: true},
progressamt: '0',
title: 'Tech Access App'
})
}
5 changes: 4 additions & 1 deletion src/controllers/moreinfo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
exports.get = (req, res) => {
res.render('moreinfo', {
layout: 'scrollable'
layout: 'moreinfo',
progressamt: '80',
title: 'More Info',
pageInfo: 'If you\'d like to, you can give us more detail about your background. We can\'t use these to tailor your results yet, but we hope to use this infromation to improve our service down the line.'
});
}
4 changes: 3 additions & 1 deletion src/controllers/resources.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
exports.get = (req, res) => {
res.render('resources', {
layout: 'scrollable'
progressamt: '60',
title: 'Resources',
pageInfo: 'Please check all the boxes of the types of resources you feel would be most helpful to get you into tech.'
});
}
13 changes: 6 additions & 7 deletions src/controllers/results.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
exports.get = (req, res) => {
res.render('results',
{
layout: 'scrollable',
progressamt: '100',
title: 'Results',
pageInfo: 'Based on the checkboxes you have selected, here are your results.'
});
res.render('results', {
layout: 'scrollable',
progressamt: '100',
title: 'Results',
pageInfo: 'Based on the checkboxes you have selected, here are your results.'
});
}
Loading

0 comments on commit e3ff535

Please sign in to comment.