Skip to content

Commit

Permalink
Merge pull request #1947 from DFE-Digital/feature/update-dfe-design-s…
Browse files Browse the repository at this point in the history
…ystem

Update for DfE Design System changes
  • Loading branch information
mec authored Oct 11, 2024
2 parents f55a39e + d5bd393 commit 2e25631
Show file tree
Hide file tree
Showing 6 changed files with 214 additions and 355 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased][unreleased]

### Changed

- New DfE font and header have been applied to the application.

## [Release-91][release-91]

### Added
Expand Down
12 changes: 8 additions & 4 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Import DfE Frontend early so it gets overidden
@import "dfefrontend";

// get the Inter font
@import url("https://rsms.me/inter/inter.css");

$govuk-font-url-function: "font-url";
$govuk-image-url-function: "image-url";
$govuk-global-styles: true;
Expand All @@ -6,16 +12,14 @@ $govuk-global-styles: true;
$govuk-page-width: 1200px;
$moj-page-width: $govuk-page-width;

// do not user GDS Transport
$govuk-font-family: BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
Cantarell, "Helvetica Neue", sans-serif;
// Use the DfE font 'Inter', do not user GDS Transport
$govuk-font-family: "Inter", sans-serif;

$dfe-blue: #003a69;

@import "govuk-frontend/govuk/all";
@import "accessible-autocomplete/src/autocomplete";

@import "dfefrontend";

@import "@ministryofjustice/frontend/moj/settings/all";
@import "@ministryofjustice/frontend/moj/helpers/all";
Expand Down
15 changes: 9 additions & 6 deletions app/views/shared/_dfe_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@
<a class="dfe-header__link dfe-header__link--service " href="<%= root_path %>" aria-label="DfE homepage">
<%= image_tag("dfe-logo.png", class: "dfe-logo", alt: "DfE Homepage") %>
<%= image_tag("dfe-logo-alt.png", class: "dfe-logo-hover", alt: "DfE Homepage") %>
<span class="dfe-header__service-name">
<%= t("service_name") %>
</span>
</a>
</div>
<div class="dfe-header__content" id="content-header">
<div class="dfe-header__menu">
<button class="dfe-header__menu-toggle" id="toggle-menu" aria-controls="header-navigation" aria-expanded="false">Menu</button>
</div>
<div class="dfe-header__menu">
<button class="dfe-header__menu-toggle" id="toggle-menu" aria-controls="header-navigation" aria-expanded="false">Menu</button>
</div>
<%= render partial: "shared/navigation/dfe_header_search" %>
</div>
</div>

<div class="govuk-width-container dfe-header__service-name">
<a href="<%= root_path %>" class="dfe-header__link--service"><%= t("service_name") %></a>
</div>

<%= render partial: "shared/navigation/dfe_header_navigation" if policy(:navigation).show_header_navigation? %>

</header>
4 changes: 4 additions & 0 deletions config/initializers/content_security_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
Rails.application.configure do
config.content_security_policy do |policy|
policy.default_src :self
policy.style_src :self,
"https://rsms.me/inter/inter.css"
policy.font_src :self,
"https://rsms.me"
policy.script_src :self,
"www.googletagmanager.com"
policy.img_src :self,
Expand Down
134 changes: 1 addition & 133 deletions vendor/assets/javascript/dfefrontend.js

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

Loading

0 comments on commit 2e25631

Please sign in to comment.