Skip to content

Commit

Permalink
Merge pull request #2321 from alphagov/publish-the-signon-privacy-notice
Browse files Browse the repository at this point in the history
Publish /privacy-notice page
  • Loading branch information
mike29736 authored Aug 24, 2023
2 parents bafaac7 + 77c48d9 commit 9f0f858
Show file tree
Hide file tree
Showing 8 changed files with 376 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@import "govuk_publishing_components/all_components";
@import "user_research_recruitment_banner";

// Components from this application
@import "components/*";

// TODO: move into component
.gem-c-success-alert,
.gem-c-error-alert {
Expand Down
13 changes: 13 additions & 0 deletions app/assets/stylesheets/components/_contact-details.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.app-c-contact-details {
@include govuk-font($size: 19);
@include govuk-text-colour;
padding-left: govuk-spacing(3);
// Margin top intended to collapse
// This adds an additional 10px to the paragraph above
@include govuk-responsive-margin(6, "top");
@include govuk-responsive-margin(6, "bottom");

clear: both;

border-left: 1px solid $govuk-border-colour;
}
4 changes: 3 additions & 1 deletion app/controllers/root_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class RootController < ApplicationController
layout "admin_layout"

include UserPermissionsControllerMethods
before_action :authenticate_user!
before_action :authenticate_user!, except: :privacy_notice
skip_after_action :verify_authorized

def index
Expand All @@ -15,6 +15,8 @@ def signin_required
@application = ::Doorkeeper::Application.find_by(id: session.delete(:signin_missing_for_application))
end

def privacy_notice; end

private

def show_user_research_recruitment_banner?
Expand Down
7 changes: 7 additions & 0 deletions app/views/components/_contact_details.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="app-c-contact-details">
<% if defined? text %>
<%= text %>
<% elsif block_given? %>
<%= yield %>
<% end %>
</div>
19 changes: 19 additions & 0 deletions app/views/components/docs/contact_details.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Contact Details
description: Use the contact details component to differentiate a line or block of contact details from the surrounding content.
body: |
Optional markdown providing further detail about the component
accessibility_criteria: |
All text must have a contrast ratio higher than 4.5:1 against the background colour to meet [WCAG AA](https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast)
examples:
default:
data:
text: "contact@info.gov.uk"

with_block:
description: |
Note that the component applies no formatting to the contents passed to it. There are guidelines covering the use of various types of contact details in [the Style guide](https://www.gov.uk/guidance/style-guide/a-to-z-of-gov-uk-style).
data:
block: |
Address Line 1
<br>
Address Line 2
12 changes: 11 additions & 1 deletion app/views/layouts/admin_layout.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<span class="govuk-caption-l"><%= yield(:context) %></span>
<h1 class="govuk-heading-l"><%= yield(:title) %></h1>
<h1 class="govuk-heading-l">
<% if yield(:page_heading).present? %>
<%= yield(:page_heading) %>
<% else %>
<%= yield(:title) %>
<% end %>
</h1>
</div>
</div>
<%= yield %>
Expand All @@ -59,6 +65,10 @@
{
href: "https://www.gov.uk/government/content-publishing",
text: "How to write, publish, and improve content",
},
{
href: privacy_notice_path,
text: "Privacy notice",
}
].compact
}
Expand Down
Loading

0 comments on commit 9f0f858

Please sign in to comment.