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:
@@ -119,7 +119,7 @@
|
||||
</header>
|
||||
|
||||
<div id="page">
|
||||
<% if !CurrentUser.is_anonymous? && !CurrentUser.is_gold? && cookies[:hide_upgrade_account_notice].blank? && params[:action] != "upgrade_information" %>
|
||||
<% unless !CurrentUser.is_anonymous? && !CurrentUser.is_gold? && cookies[:hide_upgrade_account_notice].blank? && params[:action] != "upgrade_information" %>
|
||||
<%= render "users/upgrade_notice" %>
|
||||
<% end %>
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
<%= render "moderator/post/queues/notice" %>
|
||||
<% end %>
|
||||
|
||||
<div class="ui-corner-all ui-state-highlight" id="notice" style="<%= "display: none;" unless flash[:notice] %>">
|
||||
<div class="notice notice-info" id="notice" style="<%= "display: none;" unless flash[:notice] %>">
|
||||
<span class="prose"><%= format_text(flash[:notice], inline: true) %>.</span>
|
||||
<a href="#" id="close-notice-link">close</a>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% if show_moderation_notice? %>
|
||||
<div class="ui-corner-all ui-state-highlight" id="mod-notice">
|
||||
<div class="notice notice-info notice-large" id="mod-notice">
|
||||
<span>You haven't moderated any posts in awhile. Consider checking out the <%= link_to "queue", random_moderator_post_queue_path(:return_to => request.original_url) %>.</span>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% if (position == "bottom" && CurrentUser.user.new_post_navigation_layout) || (position == "top" && !CurrentUser.user.new_post_navigation_layout) %>
|
||||
<div id="nav-links" class="post-notice post-notice-search">
|
||||
<div id="nav-links" class="notice post-notice post-notice-search">
|
||||
<% if post.presenter.has_sequential_navigation?(params) %>
|
||||
<%= render "posts/partials/show/search_seq", :post => post %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% if post.is_flagged? && !post.is_deleted? && post.flags.any? %>
|
||||
<div class="post-notice post-notice-flagged">
|
||||
<div class="notice notice-small post-notice post-notice-flagged">
|
||||
<p>This post was flagged for review (<%= link_to "learn more", wiki_pages_path(:title => "howto:flag") %>): </p>
|
||||
|
||||
<%= render "post_flags/reasons", flags: post.flags %>
|
||||
@@ -7,13 +7,13 @@
|
||||
<% end %>
|
||||
|
||||
<% if post.is_banned? %>
|
||||
<div class="post-notice post-notice-banned">
|
||||
<div class="notice notice-small post-notice post-notice-banned">
|
||||
The artist requested removal of this page
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if post.is_deleted? %>
|
||||
<div class="post-notice post-notice-deleted">
|
||||
<div class="notice notice-small post-notice post-notice-deleted">
|
||||
<% if post.flags.any? %>
|
||||
<p>This post was deleted for the following reasons: </p>
|
||||
<%= render "post_flags/reasons", flags: post.flags %>
|
||||
@@ -30,7 +30,7 @@
|
||||
<% end %>
|
||||
|
||||
<% if post.is_pending? || post.is_flagged? %>
|
||||
<div class="post-notice post-notice-pending">
|
||||
<div class="notice notice-small post-notice post-notice-pending">
|
||||
<% if post.is_pending? %>
|
||||
This post is pending approval.
|
||||
(<%= link_to "learn more", wiki_pages_path(:title => "about:mod_queue") %>)
|
||||
@@ -48,28 +48,28 @@
|
||||
<% end %>
|
||||
|
||||
<% if (post.is_flagged? || post.is_deleted?) && post.appeals.any? %>
|
||||
<div class="post-notice post-notice-appealed">
|
||||
<div class="notice notice-small post-notice post-notice-appealed">
|
||||
<p>This post was appealed:</p>
|
||||
<%= render "post_appeals/reasons", appeals: post.appeals %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if post.parent_id && post.parent_exists? %>
|
||||
<div class="post-notice post-notice-child">
|
||||
<div class="notice notice-small post-notice post-notice-child">
|
||||
<%= has_parent_message(post, @parent_post_set) %>
|
||||
<div id="has-parent-relationship-preview"><%= @parent_post_set.presenter.post_previews_html(self) %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if post.has_visible_children? %>
|
||||
<div class="post-notice post-notice-parent">
|
||||
<div class="notice notice-small post-notice post-notice-parent">
|
||||
<%= has_children_message(post, @children_post_set) %>
|
||||
<div id="has-children-relationship-preview"><%= @children_post_set.presenter.post_previews_html(self) %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if post.visible? && post.has_large? && !post.is_ugoira? %>
|
||||
<div class="post-notice post-notice-resized" id="image-resize-notice" style="<%= CurrentUser.default_image_size == "original" ? "display: none;" : "" %>">
|
||||
<div class="notice notice-small post-notice post-notice-resized" id="image-resize-notice" style="<%= CurrentUser.default_image_size == "original" ? "display: none;" : "" %>">
|
||||
<span>Resized to <%= number_to_percentage post.resize_percentage.floor, :precision => 0 %> of original (<%= link_to "view original", post.tagged_file_url, :id => "image-resize-link" %>)</span>
|
||||
<span style="display: none;">Loading...</span>
|
||||
</div>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<h1>New Wiki Page</h1>
|
||||
|
||||
<% if @wiki_page.title.present? %>
|
||||
<div class="ui-corner-all ui-state-highlight notice">
|
||||
<div class="notice notice-info notice-small" id="new-wiki-page-notice">
|
||||
This wiki page does not yet exist. The form below will allow you to create a new page for <%= @wiki_page.title %>. It will act as an explanation on how to use the tag for other users on the site.
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user