Skip to content

Commit

Permalink
styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Jones committed May 2, 2024
1 parent 14f8dfd commit ef4d41a
Show file tree
Hide file tree
Showing 10 changed files with 6,140 additions and 15,042 deletions.
2 changes: 1 addition & 1 deletion app/assets/js/dfefrontend.js

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

2 changes: 1 addition & 1 deletion app/assets/js/govuk/govuk-frontend.min.js

Large diffs are not rendered by default.

89 changes: 86 additions & 3 deletions app/assets/scss/_topnav.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,87 @@
.dfe-topnav {
background-color: govuk-shade($color_dfe-blue, 30);
.dfe-topnav{
background-color: govuk-shade($color_dfe-blue, 30);
}

.dfe-topnav ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
line-height: 1.4em;
}

.dfe-topnav li a {
display: block;
text-align: center;
padding: 8px 12px 8px 12px;
font-size: 14px;
font-size: 0.875rem;
line-height: 1.71429;
text-decoration: none;
color: $color_dfe-white;
}

@media (min-width: 40.0625em) {
.dfe-topnav li a {
font-size: 16px;
font-size: 1rem;
line-height: 1.5;
}

}

@media print {
.dfe-topnav li a {
font-size: 14pt;
line-height: 1.2;
}
}

.dfe-topnav li {
float: left;
margin-bottom: 0px;
font-size: 16px;
}

.dfe-topnav li a:focus {
background: #ffdd00;
color: #171b1f !important;
}

.dfe-topnav li a:hover {
background-color: $color_dfe-blue;
color: #ffffff;
}

.dfe-topnav li a:hover:focus {
color: #ffffff !important;
}

.dfe-topnav li a:hover {
color: #ffffff;
}

.dfe-topnav .active {
color: #ffffff;
font-weight: 700;
background-color: $color_dfe-blue;
}

.dfe-topnav .active:focus {
color: #171b1f;
}

.dfe-topnav ul.right {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
float: right;
}



@media (min-width: 61.875em) {
.dfe-topnav {
display: block;
}
}
128 changes: 12 additions & 116 deletions app/assets/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ $govuk-new-link-styles: true;
$govuk-global-styles: true;

@import 'node_modules/govuk-frontend/dist/govuk/all';
@import 'node_modules/dfe-frontend-alpha/packages/dfefrontend';
@import 'node_modules/dfe-webfrontend/packages/dfefrontend';

@import './_hero.scss';
@import './_topnav.scss';
@import './_banner.scss';
@import './_cards.scss';
@import './_listpanels.scss';
@import './_subnav.scss';
@import './_bordered.scss';
Expand All @@ -20,7 +19,11 @@ $govuk-global-styles: true;
@include govuk-width-container;
}

.govuk-tag{max-width: 100%;}


.govuk-tag {
max-width: 100%;
}

a:visited {
color: $govuk-link-colour;
Expand Down Expand Up @@ -1392,90 +1395,6 @@ code {
margin-right: auto;
}

.dfe-topnav ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
line-height: 1.4em;
}

.dfe-topnav li a {
display: block;
text-align: center;
padding: 8px 12px 8px 12px;
font-size: 14px;
font-size: 0.875rem;
line-height: 1.71429;
text-decoration: none;
color: $color_dfe-white;
}

@media (min-width: 40.0625em) {
.dfe-topnav li a {
font-size: 16px;
font-size: 1rem;
line-height: 1.5;
}
}

@media print {
.dfe-topnav li a {
font-size: 14pt;
line-height: 1.2;
}
}

.dfe-topnav li {
float: left;
margin-bottom: 0px;
font-size: 16px;
}

.dfe-topnav li a:focus {
background: #ffdd00;
color: #171b1f !important;
}

.dfe-topnav li a:hover {
background-color: $color_dfe-blue;
color: #ffffff;
}

.dfe-topnav li a:hover:focus {
color: #ffffff !important;
}

.dfe-topnav li a:hover {
color: #ffffff;
}

.dfe-topnav .active {
color: #ffffff;
font-weight: 700;
background-color: $color_dfe-blue;
}

.dfe-topnav .active:focus {
color: #171b1f;
}

.dfe-topnav ul.right {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
float: right;
}



@media (min-width: 61.875em) {
.dfe-topnav {
display: block;
}
}



.dfe-timeline {
Expand Down Expand Up @@ -1993,30 +1912,6 @@ code {



.dfe-header {
border-bottom: none;
}

.dfe-header__navigation {

background: #003a69;
}

.dfe-header__navigation-item--current {
border-bottom: 6px solid $color_dfe-secondary-blue;
}

.dfe-header__navigation-item.dfe-header__navigation-item--current {
box-shadow: none !important;
}



.dfe-header__search *,
.dfe-header__search>* {
border-radius: 0px !important;
}

.dfe-manual-cta-card {
padding: 25px;
border-radius: 2px;
Expand Down Expand Up @@ -2566,7 +2461,7 @@ a.dfe-dh-tag:focus {


blockquote {
margin-left:0px;
margin-left: 0px;
margin-top: 30px;
margin-bottom: 30px;
font-weight: 400;
Expand Down Expand Up @@ -2607,8 +2502,9 @@ ol {
}

/* Accessibility enhancements */
.social-share a:focus, .social-share a:hover {
outline: 2px solid #000; /* High contrast outline for focus */
.social-share a:focus,
.social-share a:hover {
outline: 2px solid #000;
/* High contrast outline for focus */
outline-offset: 2px;
}

}
8 changes: 4 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gulp.task('copy-govuk-js', function () {

gulp.task('copy-dfefrontend-js', function () {
return gulp
.src('node_modules/dfe-frontend-alpha/dist/dfefrontend.js')
.src('node_modules/dfe-webfrontend/dist/dfefrontend.js')
.pipe(copy('app/assets/js', { prefix: 3 }))
})

Expand All @@ -48,7 +48,7 @@ gulp.task(
gulp.task('copy-assets', function () {
return gulp
.src(
'node_modules/dfe-frontend-alpha/packages/assets/**/*.{jpg,jpeg,png,gif,svg}',
'node_modules/dfe-webfrontend/packages/assets/**/*.{jpg,jpeg,png,gif,svg}',
)
.pipe(copy('app/assets/images', { prefix: 6 }))
})
Expand Down Expand Up @@ -97,11 +97,11 @@ gulp.task('watch', function () {
gulp.watch('app/assets/images/**/*.png', gulp.series('process-images'))
gulp.watch('app/assets/images/**/*', gulp.series('process-images-copy'))
gulp.watch(
'node_modules/dfe-frontend-alpha/packages/assets/**/*.{jpg,jpeg,png,gif,svg}',
'node_modules/dfe-webfrontend/packages/assets/**/*.{jpg,jpeg,png,gif,svg}',
gulp.series('copy-assets'),
)
gulp.watch(
'node_modules/dfe-frontend-alpha/dist/dfefrontend.js',
'node_modules/dfe-webfrontend/dist/dfefrontend.js',
gulp.series('process-js'),
)
gulp.watch('app/**/*.*').on('change', browserSync.reload)
Expand Down
52 changes: 26 additions & 26 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var nunjuckEnv = nunjucks.configure(
[
'app/views',
'node_modules/govuk-frontend/dist/',
'node_modules/dfe-frontend-alpha/packages/components',
'node_modules/dfe-webfrontend/packages/components',
],
{
autoescape: true,
Expand Down Expand Up @@ -117,7 +117,7 @@ app.post('/submit-feedback', (req, res) => {
service: "Apply the Service Standard"
},
})
.then((response) => {})
.then((response) => { })
.catch((err) => console.log(err))

return res.sendStatus(200)
Expand All @@ -137,42 +137,42 @@ app.post('/form-response/helpful', (req, res) => {
const date = new Date().toISOString();

base('Data').create([
{
"fields": {
"Response": response,
"Service": service,
"URL": pageURL
}
}
], function(err) {
if (err) {
console.error(err);
return res.status(500).send('Error saving to Airtable');
{
"fields": {
"Response": response,
"Service": service,
"URL": pageURL
}
res.json({ success: true, message: 'Feedback submitted successfully' });
}
], function (err) {
if (err) {
console.error(err);
return res.status(500).send('Error saving to Airtable');
}
res.json({ success: true, message: 'Feedback submitted successfully' });
});
});

// New route for handling detailed feedback submissions
app.post('/form-response/feedback', (req, res) => {
const { response } = req.body;

const service = "Apply the service standard"; // Example service name
const pageURL = req.headers.referer || 'Unknown'; // Attempt to capture the referrer URL
const date = new Date().toISOString();

base('Feedback').create([{
"fields": {
"Feedback": response,
"Service": service,
"URL": pageURL
}
}], function(err) {
if (err) {
console.error(err);
return res.status(500).send('Error saving to Airtable');
}
res.json({ success: true, message: 'Feedback submitted successfully' });
"fields": {
"Feedback": response,
"Service": service,
"URL": pageURL
}
}], function (err) {
if (err) {
console.error(err);
return res.status(500).send('Error saving to Airtable');
}
res.json({ success: true, message: 'Feedback submitted successfully' });
});
});

Expand Down
Loading

0 comments on commit ef4d41a

Please sign in to comment.