Skip to content

Commit ea89466

Browse files
authored
Merge pull request #4928 from alphagov/remove-static
[PNP-5602] Remove slimmer/static from Frontend
2 parents 8f51ea8 + 6daeecf commit ea89466

File tree

69 files changed

+181
-188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+181
-188
lines changed

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ gem "plek"
1818
gem "rack-utf8_sanitizer"
1919
gem "rails-i18n"
2020
gem "rails_translation_manager"
21-
gem "slimmer"
2221
gem "sprockets-rails"
2322
gem "terser"
2423
gem "uk_postcode"

Gemfile.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -726,13 +726,6 @@ GEM
726726
simplecov_json_formatter (~> 0.1)
727727
simplecov-html (0.13.1)
728728
simplecov_json_formatter (0.1.4)
729-
slimmer (18.7.0)
730-
json
731-
nokogiri (~> 1.7)
732-
null_logger
733-
plek (>= 1.1.0)
734-
rack (>= 3.0)
735-
rest-client
736729
smart_properties (1.17.0)
737730
sprockets (4.2.2)
738731
concurrent-ruby (~> 1.0)
@@ -821,7 +814,6 @@ DEPENDENCIES
821814
rspec-rails
822815
rubocop-govuk
823816
simplecov
824-
slimmer
825817
sprockets-rails
826818
terser
827819
timecop
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
// This file is linked to in the application.
22
//= require dependencies
33
//= require main
4+
//= require govuk_publishing_components/dependencies
5+
//= require govuk_publishing_components/components/button
6+
//= require govuk_publishing_components/components/cookie-banner
7+
//= require govuk_publishing_components/components/feedback
8+
//= require govuk_publishing_components/components/layout-super-navigation-header
9+
//= require govuk_publishing_components/components/search-with-autocomplete
10+
//= require govuk_publishing_components/components/skip-link

app/assets/stylesheets/application.scss

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
1-
// This flag stops the font from being included in this application's
2-
// stylesheet - the font is being served by Static across all of GOV.UK, so is
3-
// not needed here.
4-
$govuk-include-default-font-face: false;
1+
// This flag includes the font in this application's
2+
// stylesheet - Since we are no longer using Static in frontend,
3+
// it is now set to true.
4+
$govuk-include-default-font-face: true;
55

66
@import "govuk_publishing_components/govuk_frontend_support";
7+
@import "govuk_publishing_components/component_support";
8+
9+
@import "govuk_publishing_components/components/button";
10+
@import "govuk_publishing_components/components/cookie-banner";
11+
@import "govuk_publishing_components/components/feedback";
12+
@import "govuk_publishing_components/components/heading";
13+
@import "govuk_publishing_components/components/input";
14+
@import "govuk_publishing_components/components/label";
15+
@import "govuk_publishing_components/components/layout-footer";
16+
@import "govuk_publishing_components/components/layout-for-public";
17+
@import "govuk_publishing_components/components/layout-super-navigation-header";
18+
@import "govuk_publishing_components/components/search";
19+
@import "govuk_publishing_components/components/search-with-autocomplete";
20+
@import "govuk_publishing_components/components/skip-link";
721

822
// Helper stylesheets (things on more than one page layout)
923
@import "helpers/content-bottom-margin";

app/assets/stylesheets/views/_popular_links.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,3 @@
7575
}
7676
}
7777
}
78-
79-
// Temp override to increase action link icon size
80-
.homepage .gem-c-action-link__icon {
81-
height: 40px;
82-
vertical-align: middle;
83-
width: 56px;
84-
85-
svg {
86-
height: 40px;
87-
width: 40px;
88-
}
89-
}

app/controllers/application_controller.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
class ApplicationController < ActionController::Base
2-
include Slimmer::Headers
3-
include Slimmer::Template
4-
slimmer_template "gem_layout"
5-
62
before_action do
73
I18n.locale = I18n.default_locale
84
end
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
class FlexiblePageController < ContentItemsController
2-
slimmer_template "gem_layout_full_width"
32
end
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
class HomepageController < ContentItemsController
22
include Cacheable
33

4-
slimmer_template "gem_layout_homepage"
4+
layout "full_width"
5+
before_action :set_homepage_layout
6+
7+
private
8+
9+
def set_homepage_layout
10+
@homepage_layout = true
11+
end
512
end

app/controllers/landing_page_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class LandingPageController < ContentItemsController
2-
slimmer_template "gem_layout_full_width"
2+
layout "full_width"
33

44
content_security_policy do |policy|
55
# The map block makes use of the OS api and inline styles

app/controllers/service_manual_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ class ServiceManualController < ContentItemsController
22
include Cacheable
33

44
def index
5-
slimmer_template "gem_layout_full_width"
65
@presenter = ServiceManualHomepagePresenter.new(content_item)
6+
render layout: "full_width"
77
end
88

99
def service_standard

0 commit comments

Comments
 (0)