Skip to content

Commit

Permalink
Remove important metadata component
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-kirwan committed Nov 11, 2024
1 parent c06405b commit b08d095
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 102 deletions.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,8 @@ $govuk-include-default-font-face: false;
.constrained-image {
max-width: 100%;
}

.inverse-background {
background: $govuk-brand-colour;
color: govuk-colour("white");
}
52 changes: 0 additions & 52 deletions app/assets/stylesheets/components/_important-metadata.scss

This file was deleted.

24 changes: 11 additions & 13 deletions app/views/components/_important_metadata.html.erb
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
<% add_app_component_stylesheet("important-metadata") %>
<%
title = local_assigns[:title]
items = local_assigns[:items] || {}
items = items.reject { |k,v| v.nil? }
items = items.merge(items) { |k,v| Array(v).join(", ") }
margin_bottom_class = " app-c-important-metadata--bottom-margin" unless local_assigns[:margin_bottom]
classes = %w(inverse-background)
classes << "responsive-bottom-margin" unless local_assigns[:margin_bottom]
-%>
<% if items.any? %>
<div class="app-c-important-metadata<%= margin_bottom_class %>">
<% if title %>
<h2 class="app-c-important-metadata__title"><%= sanitize title %></h2>
<% end %>
<dl class="app-c-important-metadata__list">
<% items.each do |title, definition| %>
<dt class="app-c-important-metadata__term"><%= sanitize title.to_s %>: </dt>
<dd class="app-c-important-metadata__definition"><%= sanitize definition %></dd>
<% end %>
</dl>
</div>
<%= content_tag :div, class: classes do %>
<%= render "govuk_publishing_components/components/metadata", {
inverse: true,
other: items,
margin_bottom: 0,
title: title,
} %>
<% end %>
<% end %>
36 changes: 0 additions & 36 deletions app/views/components/docs/important_metadata.yml

This file was deleted.

1 change: 0 additions & 1 deletion config/initializers/dartsass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"components/_contents-list-with-body.scss" => "components/_contents-list-with-body.css",
"components/_download-link.scss" => "components/_download-link.css",
"components/_figure.scss" => "components/_figure.css",
"components/_important-metadata.scss" => "components/_important-metadata.css",
"components/_published-dates.scss" => "components/_published-dates.css",
"views/_guide.scss" => "views/_guide.css",
"views/_html-publication.scss" => "views/_html-publication.css",
Expand Down

0 comments on commit b08d095

Please sign in to comment.