From 34eeb5da197f273932923b25bbdb5ae3cc67c15c Mon Sep 17 00:00:00 2001 From: Kevin Dew Date: Thu, 12 Jan 2023 22:01:55 +0000 Subject: [PATCH 1/3] Remove superfluous classnames These class names don't have any effect (they are not associated with styles or scripts). I assume these are artefacts from the Whitehall -> Government Frontend migration. --- .../histories/10_downing_street.html.erb | 24 +++++++-------- app/views/histories/history.html.erb | 16 +++++----- app/views/histories/lancaster_house.html.erb | 30 +++++++------------ 3 files changed, 28 insertions(+), 42 deletions(-) diff --git a/app/views/histories/10_downing_street.html.erb b/app/views/histories/10_downing_street.html.erb index 04f7c23f5..f744e5350 100644 --- a/app/views/histories/10_downing_street.html.erb +++ b/app/views/histories/10_downing_street.html.erb @@ -91,13 +91,11 @@

The Romans first came to Britain under the command of Julius Caesar in 55 BC. Making their capital at Londinium downriver, the Romans chose Thorney Island – a marshy piece of land lying between two branches of the river Tyburn that flowed from Hampstead Heath to the Thames – as the site for their early settlement.

These Roman settlements, and those of the Anglo-Saxons and Normans who supplanted them, were not very successful. The area was prone to plague and its inhabitants were very poor. A charter granted by the Mercian King Offa in the year 785 refers to “the terrible place called Thorney Island”. It took royal patronage to give the area prestige. King Canute (reigned 1017 to 1035) built a palace in the area, and Edward the Confessor (reigned 1042 to 1066) and William the Conqueror (reigned 1066 to 1087) maintained a royal presence there. The position of Westminster (as the area became known) as the centre of government and the church was solidified following the construction of the great abbey nearby, on Edward's orders.

-
-
- " alt="Whitehall from St James’s Park – Hendrick Danckerts c.1675"> -
-

Whitehall from St James’s Park – Hendrick Danckerts c.1675

-
-
+
+ " alt="Whitehall from St James’s Park – Hendrick Danckerts c.1675"> +
+

Whitehall from St James’s Park – Hendrick Danckerts c.1675

+

The earliest building known to have stood on the site of Downing Street was the Axe brewery owned by the Abbey of Abingdon in the Middle Ages. By the early 1500s, it had fallen into disuse.

@@ -271,13 +269,11 @@

Larry has been in residence since 15 February 2011, he is the first cat at Number 10 to be bestowed with the official title Chief Mouser.

Larry was recruited from Battersea Dogs & Cats Home on recommendation for his mousing skills. He joined the Number 10 household and has made a significant impact.

-
-
- " alt="Larry the cat sitting on a table where the cabinet meet."> -
-

Larry the cat

-
-
+
+ " alt="Larry the cat sitting on a table where the cabinet meet."> +
+

Larry the cat

+

He has captured the hearts of the Great British public and the press teams often camped outside the front door. In turn the nation sends him gifts and treats daily.

diff --git a/app/views/histories/history.html.erb b/app/views/histories/history.html.erb index 30bb17eb1..da0952787 100644 --- a/app/views/histories/history.html.erb +++ b/app/views/histories/history.html.erb @@ -12,7 +12,7 @@
-
+

@@ -25,17 +25,17 @@

Governments are remembered for their leaders and the course they set for their country. The British government has a long and fascinating history, and exploring its past can help us understand how it is run today.

The information here provides a starting point for research. It includes objective factual content and research carried out by independent and civil service historians.

-
+
<%= image_tag "history/horse-guards-vintage.jpg", alt: "An old painting of the Horse Guards building.", loading: "lazy", style: "width:100%" %>
Thomas Shotter Boys – A View of the Horse Guards from Whitehall. Government Art Collection.
-
+

-
+
<%= image_tag 'how-gov-works/churchill_01.jpg', alt: "", loading: "lazy", style: "width:100%" %>
@@ -61,7 +61,7 @@
-
+

@@ -100,16 +100,16 @@
-
+
<%= image_tag 'history/government-buildings.jpg', alt: "", loading: "lazy", style: "width:100%" %>
-
+

-
+
<%= image_tag 'history/historical-documents.jpg', alt: "", loading: "lazy", style: "width:100%" %>
diff --git a/app/views/histories/lancaster_house.html.erb b/app/views/histories/lancaster_house.html.erb index 442672ba8..13cdc2c67 100644 --- a/app/views/histories/lancaster_house.html.erb +++ b/app/views/histories/lancaster_house.html.erb @@ -94,10 +94,8 @@

The grand hall and staircase

-
-
- " alt="Lancaster House grand hall and staircase"> -
+
+ " alt="Lancaster House grand hall and staircase">

On entering the house through the portico, the hall opens up to reveal a sweeping staircase in a deliberate echo of Versailles. This and the rococo balustrade are both part of Benjamin Wyatt’s original design.

@@ -105,10 +103,8 @@ -
-
- " alt="Lancaster House long gallery"> -
+
+ " alt="Lancaster House long gallery">

The long gallery can hold up to 200 people seated theatre-style or 150 for a seated dinner. Alternatively, it can accommodate a conference table for up to 60, with a further 120 people seated beside and behind the table. The long gallery provides a dramatic backdrop for big events; it is perfect for opening or closing ceremonies and receptions for up to 350 people.

@@ -119,10 +115,8 @@

The music room

-
-
- " alt="Lancaster House music room"> -
+
+ " alt="Lancaster House music room">

The music room can accommodate a boardroom table for 36 and theatre style for 100. It can also accommodate lunch or dinner for up to 76 people.

@@ -131,10 +125,8 @@

The state drawing room

-
-
- " alt="Lancaster House state drawing room"> -
+
+ " alt="Lancaster House state drawing room">

The state drawing room is suitable for a wide range of events. It can accommodate 40 people at a boardroom table, 34 for a lunch or dinner, and 120 for a reception.

@@ -143,10 +135,8 @@

The green room

-
-
- " alt="Lancaster House green room"> -
+
+ " alt="Lancaster House green room">

The green room is ideal as a dining room for up to 20 people. As a press briefing room, it can seat 28 people theatre style. Ministers have also used it as a private office during conferences.

From 2c97cbd3442101f624b9f473fc892aad2d36589b Mon Sep 17 00:00:00 2001 From: Kevin Dew Date: Thu, 12 Jan 2023 22:03:39 +0000 Subject: [PATCH 2/3] Fix broken columns for /government/history This layout was broken because the figure element margins led to it exceeding it's allocated width. I opted to use a design system override class to resolve this as they seemed to be the precedent for managing the styles on this page. --- app/views/histories/history.html.erb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/histories/history.html.erb b/app/views/histories/history.html.erb index da0952787..6459f3b28 100644 --- a/app/views/histories/history.html.erb +++ b/app/views/histories/history.html.erb @@ -25,10 +25,12 @@

Governments are remembered for their leaders and the course they set for their country. The British government has a long and fascinating history, and exploring its past can help us understand how it is run today.

The information here provides a starting point for research. It includes objective factual content and research carried out by independent and civil service historians.

-
- <%= image_tag "history/horse-guards-vintage.jpg", alt: "An old painting of the Horse Guards building.", loading: "lazy", style: "width:100%" %> -
Thomas Shotter Boys – A View of the Horse Guards from Whitehall. Government Art Collection.
-
+
+
+ <%= image_tag "history/horse-guards-vintage.jpg", alt: "An old painting of the Horse Guards building.", loading: "lazy", style: "width:100%" %> +
Thomas Shotter Boys – A View of the Horse Guards from Whitehall. Government Art Collection.
+
+
From 156cac7278148403f1bb22ec03036de8e8eceacf Mon Sep 17 00:00:00 2001 From: Kevin Dew Date: Thu, 12 Jan 2023 22:09:55 +0000 Subject: [PATCH 3/3] Replace inline styles with override classes The usage of inline styles is going to be disallowed at the CSP level to reduce the damage HTML injection can do [1]. This replaces the usages of these inline styles with Design System override classes. I went for these rather than creating a new class as there didn't seem to be any precedent for specific classes for this part of the site, yet a variety of precedence in using override classes. [1]: https://github.com/alphagov/govuk_app_config/pull/279 --- app/views/histories/10_downing_street.html.erb | 2 +- app/views/histories/11_downing_street.html.erb | 2 +- app/views/histories/1_horse_guards_road.html.erb | 2 +- app/views/histories/history.html.erb | 8 ++++---- app/views/histories/king_charles_street.html.erb | 2 +- app/views/histories/lancaster_house.html.erb | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/histories/10_downing_street.html.erb b/app/views/histories/10_downing_street.html.erb index f744e5350..59d1397ef 100644 --- a/app/views/histories/10_downing_street.html.erb +++ b/app/views/histories/10_downing_street.html.erb @@ -21,7 +21,7 @@
@@ -112,7 +112,7 @@
- <%= image_tag 'history/historical-documents.jpg', alt: "", loading: "lazy", style: "width:100%" %> + <%= image_tag 'history/historical-documents.jpg', alt: "", loading: "lazy", class: "govuk-!-width-full" %>
<%= render "govuk_publishing_components/components/heading", { diff --git a/app/views/histories/king_charles_street.html.erb b/app/views/histories/king_charles_street.html.erb index 9af6983e9..54b5db2f2 100644 --- a/app/views/histories/king_charles_street.html.erb +++ b/app/views/histories/king_charles_street.html.erb @@ -21,7 +21,7 @@