-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c06405b
commit b08d095
Showing
5 changed files
with
16 additions
and
102 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
52 changes: 0 additions & 52 deletions
52
app/assets/stylesheets/components/_important-metadata.scss
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 |
---|---|---|
@@ -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 %> |
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