-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from DFE-Digital/246-static-pages
[155] Add govuk markdown and cookies page
- Loading branch information
Showing
10 changed files
with
178 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
class StaticController < ApplicationController | ||
layout "two_thirds" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,5 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" class="govuk-template"> | ||
<head> | ||
<title><%= [yield(:page_title).presence, t('service.name')].compact.join(' - ') %></title> | ||
<% content_for :content do %> | ||
<%= yield %> | ||
<% end %> | ||
<%= csrf_meta_tags %> | ||
<%= csp_meta_tag %> | ||
<%= tag :meta, name: 'viewport', content: 'width=device-width, initial-scale=1' %> | ||
<%= tag :meta, property: 'og:image', content: asset_path('images/govuk-opengraph-image.png') %> | ||
<%= tag :meta, name: 'theme-color', content: '#0b0c0c' %> | ||
<%= favicon_link_tag asset_path('images/favicon.ico') %> | ||
<%= favicon_link_tag asset_path('images/govuk-mask-icon.svg'), rel: 'mask-icon', type: 'image/svg', color: "#0b0c0c" %> | ||
<%= favicon_link_tag asset_path('images/govuk-apple-touch-icon.png'), rel: 'apple-touch-icon', type: 'image/png' %> | ||
<%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-152x152.png'), rel: 'apple-touch-icon', type: 'image/png', size: '152x152' %> | ||
<%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-167x167.png'), rel: 'apple-touch-icon', type: 'image/png', size: '167x167' %> | ||
<%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-180x180.png'), rel: 'apple-touch-icon', type: 'image/png', size: '180x180' %> | ||
<%= stylesheet_link_tag :main %> | ||
<%= javascript_include_tag :application, defer: true %> | ||
</head> | ||
|
||
<body class="govuk-template__body"> | ||
<%= javascript_tag nonce: true do %> | ||
document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled'); | ||
<% end %> | ||
<%= govuk_skip_link %> | ||
<%= govuk_header(service_name: t("service.name")) do |header| | ||
if current_dsi_user | ||
header.with_navigation_item(href: "/sign-out", text: "Sign out") | ||
else | ||
header.with_navigation_item(href: "/sign-in", text: "Sign in") | ||
end | ||
|
||
if support_interface? | ||
header.with_navigation_item(href: "/support/features", text: "Features") | ||
header.with_navigation_item(href: "/support/uploads/new", text: "File upload") | ||
end | ||
end %> | ||
|
||
<div class="govuk-width-container"> | ||
<%= govuk_phase_banner(tag: { text: "Beta" }) do %> | ||
This is a new service – your | ||
<%= govuk_link_to("feedback", main_app.feedbacks_path) %> | ||
will help us to improve it. | ||
<% end %> | ||
<%= govuk_back_link(href: yield(:back_link_url)) if content_for?(:back_link_url) %> | ||
<%= yield(:breadcrumbs) if content_for?(:breadcrumbs) %> | ||
<main class="govuk-main-wrapper" id="main-content" role="main"> | ||
<%= yield %> | ||
</main> | ||
</div> | ||
|
||
<%= render GovukComponent::FooterComponent.new do |footer| %> | ||
<% footer.with_meta do %> | ||
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow"> | ||
<h2 class="govuk-heading-m">Get help</h2> | ||
<p class="govuk-!-font-size-16"> | ||
Email: <%= govuk_mail_to t('service.email'), t('service.email'), class: "govuk-footer__link" %> | ||
<br> | ||
You’ll get a response within 3 working days. | ||
</p> | ||
|
||
<p class="govuk-!-font-size-16">Phone: 020 7593 5393<br>Monday to Friday, 9am to 5pm (except public holidays)</p> | ||
<hr class="govuk-section-break govuk-section-break--l"> | ||
|
||
<h2 class="govuk-visually-hidden">Footer links</h2> | ||
|
||
<ul class="govuk-footer__inline-list"> | ||
<li class="govuk-footer__inline-list-item"> | ||
<%= govuk_link_to("Accessibility", "/qualifications/accessibility", class: "govuk-footer__link") %> | ||
</li> | ||
<li class="govuk-footer__inline-list-item"> | ||
<%= govuk_link_to("Cookies", "/qualifications/cookies", class: "govuk-footer__link") %> | ||
</li> | ||
<li class="govuk-footer__inline-list-item"> | ||
<%= govuk_link_to("Privacy notice", "/qualifications/privacy", class: "govuk-footer__link") %> | ||
</li> | ||
</ul> | ||
|
||
<svg aria-hidden="true" focusable="false" class="govuk-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41"> | ||
<path fill="currentColor" d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"></path> | ||
</svg> | ||
|
||
<span class="govuk-footer__licence-description">All content is available under the <%= govuk_link_to("Open Government Licence v3.0", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", class: "govuk-footer__link") %>, except where otherwise stated</span> | ||
</div> | ||
|
||
<div class="govuk-footer__meta-item"> | ||
<%= footer.copyright %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
</body> | ||
</html> | ||
<%= render template: 'layouts/base' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" class="govuk-template"> | ||
<head> | ||
<title><%= [yield(:page_title).presence, t('service.name')].compact.join(' - ') %></title> | ||
|
||
<%= csrf_meta_tags %> | ||
<%= csp_meta_tag %> | ||
<%= tag :meta, name: 'viewport', content: 'width=device-width, initial-scale=1' %> | ||
<%= tag :meta, property: 'og:image', content: asset_path('images/govuk-opengraph-image.png') %> | ||
<%= tag :meta, name: 'theme-color', content: '#0b0c0c' %> | ||
<%= favicon_link_tag asset_path('images/favicon.ico') %> | ||
<%= favicon_link_tag asset_path('images/govuk-mask-icon.svg'), rel: 'mask-icon', type: 'image/svg', color: "#0b0c0c" %> | ||
<%= favicon_link_tag asset_path('images/govuk-apple-touch-icon.png'), rel: 'apple-touch-icon', type: 'image/png' %> | ||
<%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-152x152.png'), rel: 'apple-touch-icon', type: 'image/png', size: '152x152' %> | ||
<%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-167x167.png'), rel: 'apple-touch-icon', type: 'image/png', size: '167x167' %> | ||
<%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-180x180.png'), rel: 'apple-touch-icon', type: 'image/png', size: '180x180' %> | ||
<%= stylesheet_link_tag :main %> | ||
<%= javascript_include_tag :application, defer: true %> | ||
</head> | ||
|
||
<body class="govuk-template__body"> | ||
<%= javascript_tag nonce: true do %> | ||
document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled'); | ||
<% end %> | ||
<%= govuk_skip_link %> | ||
<%= govuk_header(service_name: t("service.name")) do |header| | ||
if current_dsi_user | ||
header.with_navigation_item(href: "/sign-out", text: "Sign out") | ||
else | ||
header.with_navigation_item(href: "/sign-in", text: "Sign in") | ||
end | ||
|
||
if support_interface? | ||
header.with_navigation_item(href: "/support/features", text: "Features") | ||
header.with_navigation_item(href: "/support/uploads/new", text: "File upload") | ||
end | ||
end %> | ||
|
||
<div class="govuk-width-container"> | ||
<%= govuk_phase_banner(tag: { text: "Beta" }) do %> | ||
This is a new service – your | ||
<%= govuk_link_to("feedback", main_app.feedbacks_path) %> | ||
will help us to improve it. | ||
<% end %> | ||
<%= govuk_back_link(href: yield(:back_link_url)) if content_for?(:back_link_url) %> | ||
<%= yield(:breadcrumbs) if content_for?(:breadcrumbs) %> | ||
<main class="govuk-main-wrapper" id="main-content" role="main"> | ||
<%= yield :content %> | ||
</main> | ||
</div> | ||
|
||
<%= render GovukComponent::FooterComponent.new do |footer| %> | ||
<% footer.with_meta do %> | ||
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow"> | ||
<h2 class="govuk-heading-m">Get help</h2> | ||
<p class="govuk-!-font-size-16"> | ||
Email: <%= govuk_mail_to t('service.email'), t('service.email'), class: "govuk-footer__link" %> | ||
<br> | ||
You’ll get a response within 3 working days. | ||
</p> | ||
|
||
<p class="govuk-!-font-size-16">Phone: 020 7593 5393<br>Monday to Friday, 9am to 5pm (except public holidays)</p> | ||
<hr class="govuk-section-break govuk-section-break--l"> | ||
|
||
<h2 class="govuk-visually-hidden">Footer links</h2> | ||
|
||
<ul class="govuk-footer__inline-list"> | ||
<li class="govuk-footer__inline-list-item"> | ||
<%= govuk_link_to("Accessibility", "/accessibility", class: "govuk-footer__link") %> | ||
</li> | ||
<li class="govuk-footer__inline-list-item"> | ||
<%= govuk_link_to("Cookies", "/cookies", class: "govuk-footer__link") %> | ||
</li> | ||
<li class="govuk-footer__inline-list-item"> | ||
<%= govuk_link_to("Privacy notice", "/privacy", class: "govuk-footer__link") %> | ||
</li> | ||
</ul> | ||
|
||
<svg aria-hidden="true" focusable="false" class="govuk-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41"> | ||
<path fill="currentColor" d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"></path> | ||
</svg> | ||
|
||
<span class="govuk-footer__licence-description">All content is available under the <%= govuk_link_to("Open Government Licence v3.0", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", class: "govuk-footer__link") %>, except where otherwise stated</span> | ||
</div> | ||
|
||
<div class="govuk-footer__meta-item"> | ||
<%= footer.copyright %> | ||
</div> | ||
<% end %> | ||
<% end %> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<% content_for :content do %> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= yield %> | ||
</div> | ||
</div> | ||
<% end %> | ||
<%= render template: 'layouts/base' %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<% content_for :page_title, 'Cookies' %> | ||
|
||
# Cookies | ||
|
||
Cookies are small files saved on your phone, tablet or computer when you visit | ||
a website. | ||
|
||
We use cookies to make the <%= t('service.name') %> service work and | ||
collect information about how you use our service. | ||
|
||
## Essential cookies | ||
|
||
Essential cookies keep your information secure while you use the <%= | ||
t('service.name') %> service. We do not need to ask permission to use them. | ||
|
||
<table class="govuk-table"> | ||
<caption class="govuk-visually-hidden">Essential cookies</caption> | ||
<thead class="govuk-table__head"> | ||
<tr class="govuk-table__row"> | ||
<th class="govuk-table__header">Name</th> | ||
<th class="govuk-table__header">Purpose</th> | ||
<th class="govuk-table__header">Expires</th> | ||
</tr> | ||
</thead> | ||
<tbody class="govuk-table__body"> | ||
<tr class="govuk-table__row"> | ||
<td class="govuk-table__cell"> | ||
_check_the_childrens_barred_list_session | ||
</td> | ||
<td class="govuk-table__cell" width="50%"> | ||
Keeps you signed in | ||
</td> | ||
<td class="govuk-table__cell"> | ||
When you close your browser | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
class MarkdownTemplate | ||
def self.call(template, source) | ||
erb_handler = ActionView::Template.registered_template_handler(:erb) | ||
compiled_source = erb_handler.call(template, source) | ||
"GovukMarkdown.render(begin;#{compiled_source};end).html_safe" | ||
end | ||
end | ||
|
||
ActionView::Template.register_template_handler :md, MarkdownTemplate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters