css: refactor notice box css.

* Remove .ui-corner-all, .ui-state-highlight, .ui-state-error classes
  from notice boxes.
* Use .notice, .notice-info, .notice-error classes instead.
* Replace <p> elements in notices with <div>'s so that we don't have to
  work around the `margin-bottom: 1em` from <p> elements.
* Replace <h1> elements in notices with <h2>.
* Standardize info notices to use the same shade of light yellow in the
  light theme.
This commit is contained in:
evazion
2019-09-22 14:10:18 -05:00
parent 6b2e6fa3f4
commit e98db8a5b8
14 changed files with 67 additions and 83 deletions

View File

@@ -1,5 +1,5 @@
<div class="ui-corner-all ui-state-error" id="ban-notice">
<h1>Your account has been temporarily banned</h1>
<p>Reason: <span class="prose"><%= format_text CurrentUser.user.recent_ban.reason, inline: true %></span></p>
<p>Your ban will expire in <%= time_ago_in_words(CurrentUser.user.recent_ban.expires_at) %></p>
<div class="notice notice-error notice-large" id="ban-notice">
<h2>Your account has been temporarily banned</h2>
<div>Reason: <span class="prose"><%= format_text CurrentUser.user.recent_ban.reason, inline: true %></span></div>
<div>Your ban will expire in <%= time_ago_in_words(CurrentUser.user.recent_ban.expires_at) %></div>
</div>

View File

@@ -1,4 +1,4 @@
<div class="ui-corner-all ui-state-highlight" id="dmail-notice" data-id="<%= CurrentUser.dmails.unread.first.id %>">
<h1>You have <%= link_to "unread mail", dmails_path(:search => {:owner_id => CurrentUser.id, :to_id => CurrentUser.id}, :folder => "received") %>.</h1>
<p><%= link_to "Close this", "#", :id => "hide-dmail-notice" %></p>
<div class="notice notice-info notice-large" id="dmail-notice" data-id="<%= CurrentUser.dmails.unread.first.id %>">
<h2>You have <%= link_to "unread mail", dmails_path(search: {owner_id: CurrentUser.id, to_id: CurrentUser.id}, folder: "received") %>.</h2>
<div><%= link_to "Close this", "#", id: "hide-dmail-notice" %></div>
</div>

View File

@@ -1,4 +1,4 @@
<div class="ui-corner-all ui-state-highlight" id="upgrade-account-notice">
<h1><%= link_to "Upgrade your account for only $20!", new_user_upgrade_path, id: "goto-upgrade-account" %></h1>
<p><%= link_to "No thanks", "#", :id => "hide-upgrade-account-notice" %></p>
<div class="notice notice-info notice-large" id="upgrade-account-notice">
<h2><%= link_to "Upgrade your account for only $20!", new_user_upgrade_path, id: "goto-upgrade-account" %></h2>
<div><%= link_to "No thanks", "#", id: "hide-upgrade-account-notice" %></div>
</div>