Skip to content

Commit

Permalink
Merge pull request #346 from alphagov/guides-typography-tweaks
Browse files Browse the repository at this point in the history
Tweaks to Guides to match live
  • Loading branch information
NickColley authored May 5, 2017
2 parents 439beaa + af9044e commit c5512b7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
14 changes: 14 additions & 0 deletions app/assets/stylesheets/views/_guide.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,18 @@
margin-left: 1.5em;
padding-left: 0.3em;
}

// FIXME: Remove when typography improvements made to
// govspeak component
//
// Distinguish between part titles (27px) and h2s
// within content of part by reducing font-size
//
// Override h2 sizes to match layout used by alphagov/frontend
// https://github.com/alphagov/static/blob/f44470edc4e4159ea37481985c641034741623ac/app/assets/stylesheets/helpers/_text.scss#L38
.govuk-govspeak {
h2 {
@include bold-24;
}
}
}
16 changes: 9 additions & 7 deletions app/views/content_items/_body_with_related_links.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
title: @content_item.title %>
<%= render 'govuk_component/govspeak',
content: @content_item.body,
direction: page_text_direction %>
<% #https://github.com/alphagov/government-frontend/pull/329#issuecomment-297681738 %>
<% if false && @content_item.last_updated %>
<p class="last-updated">
<%= t 'common.last_updated' %>: <%= @content_item.last_updated %>
</p>
<% end %>
direction: page_text_direction,
disable_youtube_expansions: true %>

<% #https://github.com/alphagov/government-frontend/pull/329#issuecomment-297681738 %>
<% if false && @content_item.last_updated %>
<p class="last-updated">
<%= t 'common.last_updated' %>: <%= @content_item.last_updated %>
</p>
<% end %>
</div>
<%= render 'shared/related_items', content_item: @content_item %>
</div>
3 changes: 2 additions & 1 deletion app/views/content_items/guide.html+print.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
</h1>
<%= render 'govuk_component/govspeak',
content: part['body'],
direction: page_text_direction %>
direction: page_text_direction,
disable_youtube_expansions: true %>
</section>
<% end %>
</div>
Expand Down
3 changes: 2 additions & 1 deletion app/views/content_items/guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

<%= render 'govuk_component/govspeak',
content: @content_item.current_part_body,
direction: page_text_direction %>
direction: page_text_direction,
disable_youtube_expansions: true %>

<%= render 'govuk_component/previous_and_next_navigation', @content_item.previous_and_next_navigation %>

Expand Down

0 comments on commit c5512b7

Please sign in to comment.