From 8d749ee187ffa5c8e271f80df4b89dce9c56d661 Mon Sep 17 00:00:00 2001 From: Katherine Martin <78093815+martikat@users.noreply.github.com> Date: Wed, 24 Apr 2024 16:25:56 +0100 Subject: [PATCH] Remove styling and code which is not being used --- app/assets/stylesheets/about.scss | 120 ------- app/assets/stylesheets/application.scss | 4 - app/assets/stylesheets/eyfs-header.scss | 62 ---- .../stylesheets/eyfs-mobile-navigation.scss | 340 ------------------ app/assets/stylesheets/hfeyp-v2.scss | 11 - app/assets/stylesheets/links.scss | 6 - app/helpers/application_helper.rb | 14 - app/javascript/controllers/index.js | 2 +- 8 files changed, 1 insertion(+), 558 deletions(-) delete mode 100644 app/assets/stylesheets/about.scss delete mode 100644 app/assets/stylesheets/eyfs-header.scss delete mode 100644 app/assets/stylesheets/eyfs-mobile-navigation.scss delete mode 100644 app/assets/stylesheets/hfeyp-v2.scss diff --git a/app/assets/stylesheets/about.scss b/app/assets/stylesheets/about.scss deleted file mode 100644 index e913ad41..00000000 --- a/app/assets/stylesheets/about.scss +++ /dev/null @@ -1,120 +0,0 @@ -.light-grey-box .govuk-button-group .govuk-link:last-child { - margin-bottom: 0; -} - -.menu-btn { - display: none; - - &:checked ~ .dfe-vertical-nav { - display: block; - } - - &:not(:checked) ~ .dfe-vertical-nav { - display: none; - - @include govuk-media-query($from: tablet) { - display: block; - } - } -} - -label.menu-icon { - display: flex; - align-items: center; - font-weight: bold; - gap: govuk-spacing(2); - color: $govuk-link-colour; - - @include govuk-media-query($from: tablet) { - display: none; - } -} - -.dfe-vertical-nav { - font-weight: 400; - font-size: 16px; - line-height: 1.14286; -} - -.dfe-vertical-nav__section { - margin: 0 0 govuk-spacing(4); - padding: 0px; - list-style-type: none; -} - -.dfe-vertical-nav__section-item { - border-left: 4px solid govuk-colour('mid-grey'); - font-size: 16px; - line-height: 1.25; - - &:hover { - border-left: 4px solid $department-for-education-websafe; - } - - &--current { - border-left: 4px solid $department-for-education; - font-weight: 700; - background: govuk-colour('light-grey'); - - .dfe-vertical-nav__link { - border-left-color: $department-for-education; - font-weight: 700; - color: $department-for-education; - - &:hover { - text-decoration: none; - } - } - } - -} - -.dfe-vertical-nav__link { - display: block; - padding: 7px 30px 8px 10px; - text-decoration: none; - margin-bottom: govuk-spacing(1); - color: $department-for-education; - - &:active, - &:hover { - color: govuk-colour('blue'); - border-left-color: $department-for-education-websafe; - box-shadow: none; - outline: 0; - } - - &:focus { - background: govuk-colour('yellow'); - color: govuk-colour('black'); - box-shadow: none; - outline: 0; - } -} - -.about-module-box { - background: $light-blue; - display: flex; - flex-direction: column-reverse; - margin-bottom: govuk-spacing(6); - - @include govuk-media-query($from: tablet) { - flex-direction: row; - } - - p:last-child { - margin-bottom: 0; - } - - &-panel { - flex: 100%; - padding: 1.5em; - background-size: cover; - background-position: center; - - @include govuk-media-query($from: tablet) { - flex: 50%; - padding: 3em; - } - } -} diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 856f80fb..35b350c0 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -25,22 +25,18 @@ $govuk-page-width: 1200px; $light-blue: tint($department-for-education-websafe, 90%); @import 'dfe-header'; -// @import 'hfeyp-v2'; @import 'video'; @import 'page-contents'; @import 'metadata'; @import 'print'; -// @import 'about'; @import 'card'; @import 'side-nav'; @import 'other-resources'; @import 'cta'; @import 'subnav'; -// @import 'eyfs-header'; -// @import 'eyfs-mobile-navigation'; @import 'links'; * { diff --git a/app/assets/stylesheets/eyfs-header.scss b/app/assets/stylesheets/eyfs-header.scss deleted file mode 100644 index bca2c40f..00000000 --- a/app/assets/stylesheets/eyfs-header.scss +++ /dev/null @@ -1,62 +0,0 @@ -@include govuk-exports("app-header") { - - // Move the blue border from the container to the header so that it spans - // the full width of the page - .app-header { - border-bottom: 10px solid $govuk-brand-colour; - } - - .app-header__container { - margin-bottom: 0; - border-bottom: 0; - } - - // Override the default 33% width on the logo in GOV.UK Frontend (prevents - // unnecessary wrapping of "GOV.UK Design System" on smaller tablet / desktop - // viewports) - .app-header__logo { - width: auto; - display: inline-block; - } - - .app-header-mobile-nav-toggler-wrapper { - display: block; - float: right; - } - - - - .app-header-mobile-nav-toggler { - display: none; - min-height: 40px; // match the height of the search box - - margin-bottom: govuk-spacing(2); - padding-right: govuk-spacing(1); - padding-left: govuk-spacing(1); - border: 1px solid transparent; // Override the button default border, keep this around for when users change their colours - box-shadow: none; // Override the button default box shadow - - &, - &:hover { - background-color: transparent; // Override the button default green - } - - &::after { - @include govuk-shape-arrow($direction: down, $base: 10px, $display: inline-block); - content: ""; - margin-left: govuk-spacing(1); - border-top-color: currentColor; - } - - &--active::after { - @include govuk-shape-arrow($direction: up, $base: 10px, $display: inline-block); - border-bottom-color: currentColor; - } - - .js-enabled & { - @include govuk-media-query($until: tablet) { - display: inline; - } - } - } -} diff --git a/app/assets/stylesheets/eyfs-mobile-navigation.scss b/app/assets/stylesheets/eyfs-mobile-navigation.scss deleted file mode 100644 index 748c130e..00000000 --- a/app/assets/stylesheets/eyfs-mobile-navigation.scss +++ /dev/null @@ -1,340 +0,0 @@ - div.govuk-header__content button.govuk-header__menu-button { - cursor: pointer; - font-size: 20px; - } - - .eyfs-menu-button--border{ - border: 3px solid #fff; - } - - .app-mobile-nav { - border-bottom: 1px solid #b1b4b6; - color: #fff; - } - .app-mobile-nav--active { - display:block; - } - @media (min-width: 50.0625em) { - .app-subnav--mobile { - display:none; - } - .js-enabled .govuk-header__menu-button { - display: none; - } - .app-mobile-nav { - display: none; - } - } - - @media (max-width: 40.0525em) { - .no-js .app-mobile-nav { - display:block - } - } - .app-mobile-nav__list { - margin:0; - padding:0; - list-style:none; - } - .app-mobile-subnav-section { - display:none; - .app-mobile-nav__subnav-item { - //padding: 12px 0px; - } - } - .app-mobile-nav-subnav-toggler { - position:relative; - } - - .learning-section-mobile-nav { - position: relative; - padding: 16px 0px 16px 15px; - background-color: #f8f8f8; - } - - .app-mobile-nav-subnav-toggler__link { - font-weight:700; - font-size:19px; - font-size:1.1875rem - } - - .app-mobile-nav-subnav-toggler__link:not(:focus):hover { - color:#1d70b8 - } - .app-mobile-nav-subnav-toggler__link, - .app-mobile-nav__link { - text-decoration:none - } - .app-mobile-nav-subnav-toggler__link:after, - .app-mobile-nav__link:after { - content:""; - position:absolute; - top:0; - right:0; - bottom:0; - left:0 - } - .app-mobile-nav__subnav { - display:none; - margin-top: 4px; - } - .js-enabled .app-mobile-nav__subnav--active { - display:block - } - .app-mobile-nav__subnav-item { - display:block; - position:relative; - padding:12px 20px; - background-color: #ffffff; - } - .app-mobile-nav__subnav-item--current { - padding-left:16px; - border-left:4px solid #1d70b8; - } - .app-mobile-nav__theme { - font-family:"GDS Transport",arial,sans-serif; - -webkit-font-smoothing:antialiased; - -moz-osx-font-smoothing:grayscale; - margin:0; - padding:20px 20px 5px 20px; - color:#505a5f; - font-size:19px; - font-size:1.1875rem; - font-weight:normal - } - @media print { - .app-mobile-nav__theme { - font-family:sans-serif - } - } - .app-navigation { - font-family:"GDS Transport",arial,sans-serif; - -webkit-font-smoothing:antialiased; - -moz-osx-font-smoothing:grayscale; - font-weight:700; - font-size:16px; - font-size:1rem; - line-height:1.25; - -webkit-box-sizing:border-box; - box-sizing:border-box; - width:100%; - background-color:#f8f8f8 - } - @media print { - .app-navigation { - font-family:sans-serif - } - } - @media (min-width: 40.0625em) { - .app-navigation { - font-size:19px; - font-size:1.1875rem; - line-height:1.31579 - } - } - @media print { - .app-navigation { - font-size:14pt; - line-height:1.15 - } - } - @media (max-width: 40.0525em) { - .app-navigation { - display:none - } - } - .app-navigation__list { - position:relative; - left:-15px; - margin:0; - padding:0; - list-style:none - } - .app-navigation__list-item { - -webkit-box-sizing:border-box; - box-sizing:border-box; - display:block; - position:relative; - height:50px; - padding:0 15px; - float:left; - line-height:50px - } - .app-navigation__list-item--current { - border-bottom:4px solid #1d70b8 - } - .app-navigation__link { - font-weight:700; - text-decoration:none - } - .app-navigation__link:not(:focus):visited { - color:#1d70b8 - } - .app-navigation__link:not(:focus):hover { - color:#1d70b8; - text-decoration:underline - } - .app-navigation__link:after { - content:""; - position:absolute; - top:0; - right:0; - bottom:0; - left:0 - } - .app-navigation__list-item--current .app-navigation__link:hover { - text-decoration:none - } - .app-options { - margin-bottom:10px; - padding:0 - } - @media (min-width: 40.0625em) { - .app-options { - margin-bottom:15px - } - } - .app-options__table { - max-width:38em - } - @media (min-width: 20em) { - .app-options__table { - table-layout:fixed - } - .app-options__table .govuk-table__header, - .app-options__table .govuk-table__cell { - padding-right:10px; - word-break:break-word - } - } - @media (min-width: 20em) { - .app-options__limit-table-cell { - width:29% - } - } - .app-page-navigation { - margin-top:0; - margin-bottom:30px; - padding-left:20px; - list-style:none - } - .app-page-navigation__item { - font-family:"GDS Transport",arial,sans-serif; - -webkit-font-smoothing:antialiased; - -moz-osx-font-smoothing:grayscale; - font-weight:400; - font-size:16px; - font-size:1rem; - line-height:1.25; - margin-bottom:10px - } - @media print { - .app-page-navigation__item { - font-family:sans-serif - } - } - @media (min-width: 40.0625em) { - .app-page-navigation__item { - font-size:19px; - font-size:1.1875rem; - line-height:1.31579 - } - } - @media print { - .app-page-navigation__item { - font-size:14pt; - line-height:1.15 - } - } - @media (min-width: 40.0625em) { - .app-page-navigation__item { - display:none - } - } - .app-page-navigation__item::before { - content:"\2014 "; - margin-left:-20px; - padding-right:5px - } - @media (min-width: 40.0625em) { - .app-pane.app-pane--enabled { - display:-webkit-box; - display:-ms-flexbox; - display:flex; - -webkit-box-orient:vertical; - -webkit-box-direction:normal; - -ms-flex-direction:column; - flex-direction:column - } - } - @media (min-width: 40.0625em) { - .app-pane__body { - display:-webkit-box; - display:-ms-flexbox; - display:flex; - position:relative; - min-height:0; - overflow:inherit - } - } - @media (min-width: 72.5em) { - .app-pane__body { - width:100% - } - } - @media (max-width: 40.0525em) { - .app-pane__subnav { - display:none - } - } - @media (min-width: 40.0625em) { - .app-pane__subnav { - width:210px; - -webkit-box-flex:0; - -ms-flex:0 0 auto; - flex:0 0 auto - } - } - @media (min-width: 48.0625em) { - .app-pane__subnav { - width:260px - } - } - @media (min-width: 40.0625em) { - .app-pane__subnav-mobile-overview { - display:none - } - } - @media (min-width: 40.0625em) { - .app-pane__content { - display:-webkit-box; - display:-ms-flexbox; - display:flex; - min-width:0; - -webkit-box-flex:1; - -ms-flex:1 1 100%; - flex:1 1 100%; - -webkit-box-orient:vertical; - -webkit-box-direction:normal; - -ms-flex-direction:column; - flex-direction:column - } - } - .no-flexbox.no-flexboxtweener .app-pane { - height:auto; - overflow:visible - } - .no-flexbox.no-flexboxtweener .app-pane:after { - content:""; - display:block; - clear:both - } - .no-flexbox.no-flexboxtweener .app-pane__body { - display:block - } - .no-flexbox.no-flexboxtweener .app-pane__subnav { - width:260px; - float:left; - overflow-x:hidden; - border-right:0 - } diff --git a/app/assets/stylesheets/hfeyp-v2.scss b/app/assets/stylesheets/hfeyp-v2.scss deleted file mode 100644 index f89bd6d5..00000000 --- a/app/assets/stylesheets/hfeyp-v2.scss +++ /dev/null @@ -1,11 +0,0 @@ -// .content-with-side-menu { -// padding-left: 30px; -// } - -// .hf-tab-width { -// width: 19% -// } - -// th.govuk-table__header { -// background: #ebf2f6; -// } diff --git a/app/assets/stylesheets/links.scss b/app/assets/stylesheets/links.scss index 9cefb1dd..dfb2e4a0 100644 --- a/app/assets/stylesheets/links.scss +++ b/app/assets/stylesheets/links.scss @@ -1,9 +1,3 @@ -// .govuk-link, a, .app-step-nav-header__title, .app-step-nav-related__link { -// font-family: "GDS Transport", arial, sans-serif; -// -webkit-font-smoothing: antialiased; -// -moz-osx-font-smoothing: grayscale; -// } - .govuk-breadcrumbs li { font-size: 16px; } diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b8d15241..cc9310aa 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -11,21 +11,7 @@ def navigation active: item.slug == section, classes: %w[dfe-header__navigation-item], ) - - # header.with_action_link( - # text: item.title, - # href: item.path, - # options: { inverse: true } - # ) end - - # menu.each do |item| - # header.with_action_link( - # text: item.title, - # href: item.path, - # options: { inverse: true } - # ) - # end end end diff --git a/app/javascript/controllers/index.js b/app/javascript/controllers/index.js index a58f5012..1231ab93 100644 --- a/app/javascript/controllers/index.js +++ b/app/javascript/controllers/index.js @@ -2,4 +2,4 @@ import { Application } from '@hotwired/stimulus' import Reveal from 'stimulus-reveal-controller' const application = Application.start() -application.register('reveal', Reveal) \ No newline at end of file +application.register('reveal', Reveal)