css: standardize styling of fineprint text.

Fineprint text was variously styled with `.info`, `.tn`, `.hint`, or
`.cost-footnote` css classes. Standardize on `.fineprint` instead. Use
`.hint` only for form hints and `.tn` only for <tn> tags in translation
notes.

Incidentally changes the font size of form hints to 0.8em (was 0.7em)
and the color of fineprint to #888 (was #AAA or #666).
This commit is contained in:
evazion
2019-09-17 00:28:41 -05:00
parent c325bfa199
commit 31ebfa0a82
17 changed files with 30 additions and 49 deletions

View File

@@ -5,32 +5,32 @@ module TagsHelper
html = "" html = ""
if tag.antecedent_alias if tag.antecedent_alias
html << "<p class='hint'>This tag has been aliased to " html << "<p class='fineprint'>This tag has been aliased to "
html << link_to(tag.antecedent_alias.consequent_name, show_or_new_wiki_pages_path(:title => tag.antecedent_alias.consequent_name)) html << link_to(tag.antecedent_alias.consequent_name, show_or_new_wiki_pages_path(:title => tag.antecedent_alias.consequent_name))
html << " (#{link_to "learn more", wiki_pages_path(title: "help:tag_aliases")}).</p>" html << " (#{link_to "learn more", wiki_pages_path(title: "help:tag_aliases")}).</p>"
end end
if tag.consequent_aliases.present? if tag.consequent_aliases.present?
html << "<p class='hint'>The following tags are aliased to this tag: " html << "<p class='fineprint'>The following tags are aliased to this tag: "
html << raw(tag.consequent_aliases.map {|x| link_to(x.antecedent_name, show_or_new_wiki_pages_path(:title => x.antecedent_name))}.join(", ")) html << raw(tag.consequent_aliases.map {|x| link_to(x.antecedent_name, show_or_new_wiki_pages_path(:title => x.antecedent_name))}.join(", "))
html << " (#{link_to "learn more", wiki_pages_path(title: "help:tag_aliases")}).</p>" html << " (#{link_to "learn more", wiki_pages_path(title: "help:tag_aliases")}).</p>"
end end
automatic_tags = TagImplication.automatic_tags_for([tag.name]) automatic_tags = TagImplication.automatic_tags_for([tag.name])
if automatic_tags.present? if automatic_tags.present?
html << "<p class='hint'>This tag automatically adds " html << "<p class='fineprint'>This tag automatically adds "
html << raw(automatic_tags.map {|x| link_to(x, show_or_new_wiki_pages_path(:title => x))}.join(", ")) html << raw(automatic_tags.map {|x| link_to(x, show_or_new_wiki_pages_path(:title => x))}.join(", "))
html << " (#{link_to "learn more", wiki_pages_path(title: "help:autotags")}).</p>" html << " (#{link_to "learn more", wiki_pages_path(title: "help:autotags")}).</p>"
end end
if tag.antecedent_implications.present? if tag.antecedent_implications.present?
html << "<p class='hint'>This tag implicates " html << "<p class='fineprint'>This tag implicates "
html << raw(tag.antecedent_implications.map {|x| link_to(x.consequent_name, show_or_new_wiki_pages_path(:title => x.consequent_name))}.join(", ")) html << raw(tag.antecedent_implications.map {|x| link_to(x.consequent_name, show_or_new_wiki_pages_path(:title => x.consequent_name))}.join(", "))
html << " (#{link_to "learn more", wiki_pages_path(title: "help:tag_implications")}).</p>" html << " (#{link_to "learn more", wiki_pages_path(title: "help:tag_implications")}).</p>"
end end
if tag.consequent_implications.present? if tag.consequent_implications.present?
html << "<p class='hint'>The following tags implicate this tag: " html << "<p class='fineprint'>The following tags implicate this tag: "
html << raw(tag.consequent_implications.map {|x| link_to(x.antecedent_name, show_or_new_wiki_pages_path(:title => x.antecedent_name))}.join(", ")) html << raw(tag.consequent_implications.map {|x| link_to(x.antecedent_name, show_or_new_wiki_pages_path(:title => x.antecedent_name))}.join(", "))
html << " (#{link_to "learn more", wiki_pages_path(title: "help:tag_implications")}).</p>" html << " (#{link_to "learn more", wiki_pages_path(title: "help:tag_implications")}).</p>"
end end

View File

@@ -80,18 +80,8 @@ table tfoot {
margin-top: 2em; margin-top: 2em;
} }
.hint { .fineprint {
color: var(--hint-color); color: var(--fineprint-color);
font-style: italic; font-style: italic;
}
.tn {
font-size: 0.8em; font-size: 0.8em;
color: var(--translation-note-color);
}
p.info {
color: var(--info-color);
font-style: italic;
font-size: 80%;
} }

View File

@@ -1,14 +1,10 @@
:root { :root {
--body-background-color: white; --body-background-color: white;
--hint-color: #666; --fineprint-color: #888;
--translation-note-color: gray;
--info-color: #AAA;
--link-color: hsl(213, 100%, 50%); --link-color: hsl(213, 100%, 50%);
--link-hover-color: hsl(213, 100%, 75%); --link-hover-color: hsl(213, 100%, 75%);
--note-highlight-color: var(--preview-pending-color);
--subnav-menu-background-color: #F5F5FF; --subnav-menu-background-color: #F5F5FF;
@@ -20,7 +16,6 @@
--user-upgrade-gold-background-color: #FFF380; --user-upgrade-gold-background-color: #FFF380;
--user-upgrade-platinum-background-color: #EEE; --user-upgrade-platinum-background-color: #EEE;
--user-upgrade-table-row-hover-background-color: #FEF; --user-upgrade-table-row-hover-background-color: #FEF;
--user-upgrade-cost-footnote-color: gray;
--table-header-border: 2px solid #666; --table-header-border: 2px solid #666;
--table-header-text-color: #333; --table-header-text-color: #333;
@@ -55,7 +50,6 @@
--forum-locked-topic-color: gray; --forum-locked-topic-color: gray;
--forum-level-restricted-topic-color: #F66; --forum-level-restricted-topic-color: #F66;
--forum-deleted-topic-color: gray; --forum-deleted-topic-color: gray;
--forum-info-color: #AAA;
--forum-vote-up-color: green; --forum-vote-up-color: green;
--forum-vote-meh-color: goldrenrod; --forum-vote-meh-color: goldrenrod;
--forum-vote-down-color: red; --forum-vote-down-color: red;

View File

@@ -1,3 +1,5 @@
@import "../base/020_base.scss";
form.simple_form { form.simple_form {
margin: 0 0 1em 0; margin: 0 0 1em 0;
@@ -21,8 +23,8 @@ form.simple_form {
} }
.hint { .hint {
@extend .fineprint;
padding-left: 1em; padding-left: 1em;
font-size: 70%;
} }
&.text { &.text {

View File

@@ -59,10 +59,6 @@ div.list-of-forum-posts {
} }
div#c-forum-topics { div#c-forum-topics {
span.info {
color: var(--forum-info-color);
}
span.new { span.new {
font-size: 80%; font-size: 80%;
color: var(--forum-new-topic-color); color: var(--forum-new-topic-color);

View File

@@ -34,6 +34,11 @@ div#note-container {
font-size: 0.8em; font-size: 0.8em;
} }
.tn {
font-size: 0.8em;
color: var(--note-tn-color);
}
ruby { ruby {
rt { rt {
font-size: 0.8em; font-size: 0.8em;

View File

@@ -44,12 +44,6 @@ div#c-user-upgrades {
background-color: var(--user-upgrade-table-row-hover-background-color); background-color: var(--user-upgrade-table-row-hover-background-color);
} }
} }
p.cost-footnote {
font-size: 80%;
color: var(--user-upgrade-cost-footnote-color);
margin: 0;
}
} }
} }
} }

View File

@@ -1,7 +1,7 @@
<%# record, interval %> <%# record, interval %>
<% if record.respond_to?(:updater) && record.updater_id != record.creator_id %> <% if record.respond_to?(:updater) && record.updater_id != record.creator_id %>
<p class="info">Updated by <%= link_to_user record.updater %> <%= time_ago_in_words_tagged(record.updated_at) %></p> <p class="fineprint edit-notice">Updated by <%= link_to_user record.updater %> <%= time_ago_in_words_tagged(record.updated_at) %></p>
<% elsif record.updated_at - record.created_at > (local_assigns[:interval] || 5.minutes) %> <% elsif record.updated_at - record.created_at > (local_assigns[:interval] || 5.minutes) %>
<p class="info">Updated <%= time_ago_in_words_tagged(record.updated_at) %></p> <p class="fineprint edit-notice">Updated <%= time_ago_in_words_tagged(record.updated_at) %></p>
<% end %> <% end %>

View File

@@ -18,7 +18,7 @@
<%= format_text(@dmail.body) %> <%= format_text(@dmail.body) %>
<% if @dmail.is_automated? %> <% if @dmail.is_automated? %>
<p class="tn"> <p class="fineprint">
This is an automated message. Responses will not be seen. If you have any questions either message a moderator or ask in the forum. This is an automated message. Responses will not be seen. If you have any questions either message a moderator or ask in the forum.
</p> </p>
<% end %> <% end %>

View File

@@ -12,7 +12,7 @@
<% end %> <% end %>
</h1> </h1>
<p class="info">Posted under <%= link_to @forum_topic.category_name, forum_topics_path(:search => {:category_id => @forum_topic.category_id}) %></p> <p class="fineprint">Posted under <%= link_to @forum_topic.category_name, forum_topics_path(:search => {:category_id => @forum_topic.category_id}) %></p>
<% if @forum_topic.is_locked? %> <% if @forum_topic.is_locked? %>
<div class="notice"> <div class="notice">

View File

@@ -1,11 +1,11 @@
<% if @matches.present? %> <% if @matches.present? %>
<h3>Similar Posts</h3> <h3>Similar Posts</h3>
<p class="hint">Found <%= pluralize(@matches.length, "similar post") %>:</p> <p class="fineprint">Found <%= pluralize(@matches.length, "similar post") %>:</p>
<% @matches.each do |match| %> <% @matches.each do |match| %>
<%= PostPresenter.preview(match["post"], :tags => "status:any", :similarity => match["score"], :size => true) %> <%= PostPresenter.preview(match["post"], :tags => "status:any", :similarity => match["score"], :size => true) %>
<% end %> <% end %>
<% else %> <% else %>
<h3>Similar Posts</h3> <h3>Similar Posts</h3>
<p class="hint">No similar posts found.</p> <p class="fineprint">No similar posts found.</p>
<% end %> <% end %>

View File

@@ -4,7 +4,7 @@
</div> </div>
<% if post_set.hidden_posts.present? %> <% if post_set.hidden_posts.present? %>
<div class="tn hidden-posts-notice"> <div class="fineprint hidden-posts-notice">
<% if post_set.banned_posts.present? %> <% if post_set.banned_posts.present? %>
<%= post_set.banned_posts.size %> post(s) were removed from this page at the artist's request (<%= link_to "learn more", wiki_pages_path(title: "banned_artist") %>).<br> <%= post_set.banned_posts.size %> post(s) were removed from this page at the artist's request (<%= link_to "learn more", wiki_pages_path(title: "banned_artist") %>).<br>
<% end %> <% end %>
@@ -20,7 +20,7 @@
<% end %> <% end %>
<% if show_tag_change_notice? %> <% if show_tag_change_notice? %>
<div class="tag-change-notice"> <div class="fineprint tag-change-notice">
<p>This tag is the subject of an ongoing discussion. If you have any relevant information, please join the <%= link_to "discussion", forum_topic_path(TagChangeNoticeService.get_forum_topic_id(params[:tags]) || 1) %>.</p> <p>This tag is the subject of an ongoing discussion. If you have any relevant information, please join the <%= link_to "discussion", forum_topic_path(TagChangeNoticeService.get_forum_topic_id(params[:tags]) || 1) %>.</p>
</div> </div>
<% end %> <% end %>

View File

@@ -18,7 +18,7 @@
<label for="remember" id="remember-label">Remember</label> <label for="remember" id="remember-label">Remember</label>
</div> </div>
<p class="hint"> <p class="fineprint">
New to <%= Danbooru.config.app_name %>? <%= link_to "Create a new account", new_user_path %>. New to <%= Danbooru.config.app_name %>? <%= link_to "Create a new account", new_user_path %>.
</p> </p>

View File

@@ -4,7 +4,7 @@
<div id="related-posts-by-source"> <div id="related-posts-by-source">
<h3>Related Posts</h3> <h3>Related Posts</h3>
<p class="hint"> <p class="fineprint">
Found <%= link_to pluralize(source.related_posts.total_count, "other post"), posts_path(tags: source.related_posts_search_query) %> from the same source: Found <%= link_to pluralize(source.related_posts.total_count, "other post"), posts_path(tags: source.related_posts_search_query) %> from the same source:
</p> </p>

View File

@@ -47,7 +47,7 @@
<% @change_request.feedback.each do |feedback| %> <% @change_request.feedback.each do |feedback| %>
<li class="feedback-category-<%= feedback.category %>"> <li class="feedback-category-<%= feedback.category %>">
<p><%= feedback.body %></p> <p><%= feedback.body %></p>
<p class="info">Submitted by <%= link_to_user feedback.creator.name %> <%= time_ago_in_words_tagged feedback.created_at %></p> <p class="fineprint">Submitted by <%= link_to_user feedback.creator.name %> <%= time_ago_in_words_tagged feedback.created_at %></p>
</li> </li>
<% end %> <% end %>
</ul> </ul>

View File

@@ -23,8 +23,8 @@
<tr> <tr>
<td>Cost</td> <td>Cost</td>
<td>Free</td> <td>Free</td>
<td>$20<p class="cost-footnote">One time fee</p></td> <td>$20<div class="fineprint">One time fee</div></td>
<td>$40<p class="cost-footnote">One time fee</p></td> <td>$40<div class="fineprint">One time fee</div></td>
</tr> </tr>
<tr> <tr>
<td>Tag Limit</td> <td>Tag Limit</td>

View File

@@ -193,7 +193,7 @@
<th>API Limits</th> <th>API Limits</th>
<td> <td>
<%= CurrentUser.user.remaining_api_limit %> <%= CurrentUser.user.remaining_api_limit %>
/ <%= CurrentUser.user.api_burst_limit %> <span class="hint">(may not be up to date)</span> / <%= CurrentUser.user.api_burst_limit %> <span class="fineprint">(may not be up to date)</span>
</td> </td>
</tr> </tr>
<% end %> <% end %>