Refactor to use a heading class for height when using header-illustrations

This fixes a glitch highlighted in #3259, where the css class stopped applying
when the view was moved to a different controller.

We're moving to having each view responsible for their layout, and commonly having
override classes explicitly in the relevant views. So we can follow that pattern here.
This commit is contained in:
Andy Allan 2021-07-21 11:45:37 +01:00
parent b7bedff1ce
commit 2443e7dd65
5 changed files with 6 additions and 7 deletions

View file

@ -1035,13 +1035,8 @@ tr.turn:hover {
/* Overrides for pages that use new layout conventions */
.users-new,
.users-create,
.users-terms,
.users-confirm {
.content-heading .content-inner {
height: 200px;
}
.header-illustration-heading {
height: 200px;
}
.header-illustration {

View file

@ -1,3 +1,4 @@
<% content_for :heading_class, "header-illustration-heading" %>
<% content_for :heading do %>
<h1><%= t ".heading" %></h1>
<div class='header-illustration confirm-main'></div>

View file

@ -1,3 +1,4 @@
<% content_for :heading_class, "header-illustration-heading" %>
<% content_for :heading do %>
<h1><%= t "users.new.title" %></h1>
<div class='header-illustration new-user-main'></div>

View file

@ -2,6 +2,7 @@
<%= javascript_include_tag "user" %>
<% end %>
<% content_for :heading_class, "header-illustration-heading" %>
<% content_for :heading do %>
<h1><%= t ".title" %></h1>
<div class='header-illustration new-user-main'></div>

View file

@ -2,6 +2,7 @@
<%= javascript_include_tag "user" %>
<% end %>
<% content_for :heading_class, "header-illustration-heading" %>
<% content_for :heading do %>
<h1><%= t ".heading" %></h1>
<div class='header-illustration new-user-terms'></div>