From 31ebfa0a8288755ee4024b01cbf036f186c55fa5 Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 17 Sep 2019 00:28:41 -0500 Subject: [PATCH] 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 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). --- app/helpers/tags_helper.rb | 10 +++++----- app/javascript/src/styles/base/020_base.scss | 14 ++------------ app/javascript/src/styles/base/040_colors.css | 8 +------- app/javascript/src/styles/common/simple_form.scss | 4 +++- app/javascript/src/styles/specific/forum.scss | 4 ---- app/javascript/src/styles/specific/notes.scss | 5 +++++ .../src/styles/specific/user_upgrades.scss | 6 ------ app/views/application/_update_notice.html.erb | 4 ++-- app/views/dmails/show.html.erb | 2 +- app/views/forum_topics/show.html.erb | 2 +- app/views/iqdb_queries/_matches.html.erb | 4 ++-- app/views/posts/partials/index/_posts.html.erb | 4 ++-- app/views/sessions/new.html.erb | 2 +- app/views/uploads/_related_posts.html.erb | 2 +- app/views/user_name_change_requests/show.html.erb | 2 +- app/views/user_upgrades/new.html.erb | 4 ++-- app/views/users/_statistics.html.erb | 2 +- 17 files changed, 30 insertions(+), 49 deletions(-) diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb index 21c32d62b..41b43a51a 100644 --- a/app/helpers/tags_helper.rb +++ b/app/helpers/tags_helper.rb @@ -5,32 +5,32 @@ module TagsHelper html = "" if tag.antecedent_alias - html << "

This tag has been aliased to " + html << "

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 "learn more", wiki_pages_path(title: "help:tag_aliases")}).

" end if tag.consequent_aliases.present? - html << "

The following tags are aliased to this tag: " + html << "

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 << " (#{link_to "learn more", wiki_pages_path(title: "help:tag_aliases")}).

" end automatic_tags = TagImplication.automatic_tags_for([tag.name]) if automatic_tags.present? - html << "

This tag automatically adds " + html << "

This tag automatically adds " 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")}).

" end if tag.antecedent_implications.present? - html << "

This tag implicates " + html << "

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 << " (#{link_to "learn more", wiki_pages_path(title: "help:tag_implications")}).

" end if tag.consequent_implications.present? - html << "

The following tags implicate this tag: " + html << "

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 << " (#{link_to "learn more", wiki_pages_path(title: "help:tag_implications")}).

" end diff --git a/app/javascript/src/styles/base/020_base.scss b/app/javascript/src/styles/base/020_base.scss index 570bd372f..76a03ff52 100644 --- a/app/javascript/src/styles/base/020_base.scss +++ b/app/javascript/src/styles/base/020_base.scss @@ -80,18 +80,8 @@ table tfoot { margin-top: 2em; } -.hint { - color: var(--hint-color); +.fineprint { + color: var(--fineprint-color); font-style: italic; -} - -.tn { font-size: 0.8em; - color: var(--translation-note-color); -} - -p.info { - color: var(--info-color); - font-style: italic; - font-size: 80%; } diff --git a/app/javascript/src/styles/base/040_colors.css b/app/javascript/src/styles/base/040_colors.css index 0910dc464..04adb90d3 100644 --- a/app/javascript/src/styles/base/040_colors.css +++ b/app/javascript/src/styles/base/040_colors.css @@ -1,14 +1,10 @@ :root { --body-background-color: white; - --hint-color: #666; - --translation-note-color: gray; - - --info-color: #AAA; + --fineprint-color: #888; --link-color: hsl(213, 100%, 50%); --link-hover-color: hsl(213, 100%, 75%); - --note-highlight-color: var(--preview-pending-color); --subnav-menu-background-color: #F5F5FF; @@ -20,7 +16,6 @@ --user-upgrade-gold-background-color: #FFF380; --user-upgrade-platinum-background-color: #EEE; --user-upgrade-table-row-hover-background-color: #FEF; - --user-upgrade-cost-footnote-color: gray; --table-header-border: 2px solid #666; --table-header-text-color: #333; @@ -55,7 +50,6 @@ --forum-locked-topic-color: gray; --forum-level-restricted-topic-color: #F66; --forum-deleted-topic-color: gray; - --forum-info-color: #AAA; --forum-vote-up-color: green; --forum-vote-meh-color: goldrenrod; --forum-vote-down-color: red; diff --git a/app/javascript/src/styles/common/simple_form.scss b/app/javascript/src/styles/common/simple_form.scss index 4dc05d850..0495ede3c 100644 --- a/app/javascript/src/styles/common/simple_form.scss +++ b/app/javascript/src/styles/common/simple_form.scss @@ -1,3 +1,5 @@ +@import "../base/020_base.scss"; + form.simple_form { margin: 0 0 1em 0; @@ -21,8 +23,8 @@ form.simple_form { } .hint { + @extend .fineprint; padding-left: 1em; - font-size: 70%; } &.text { diff --git a/app/javascript/src/styles/specific/forum.scss b/app/javascript/src/styles/specific/forum.scss index 29b9bc8e8..89ebcf0d5 100644 --- a/app/javascript/src/styles/specific/forum.scss +++ b/app/javascript/src/styles/specific/forum.scss @@ -59,10 +59,6 @@ div.list-of-forum-posts { } div#c-forum-topics { - span.info { - color: var(--forum-info-color); - } - span.new { font-size: 80%; color: var(--forum-new-topic-color); diff --git a/app/javascript/src/styles/specific/notes.scss b/app/javascript/src/styles/specific/notes.scss index aa4ec997a..b0ec5bb59 100644 --- a/app/javascript/src/styles/specific/notes.scss +++ b/app/javascript/src/styles/specific/notes.scss @@ -34,6 +34,11 @@ div#note-container { font-size: 0.8em; } + .tn { + font-size: 0.8em; + color: var(--note-tn-color); + } + ruby { rt { font-size: 0.8em; diff --git a/app/javascript/src/styles/specific/user_upgrades.scss b/app/javascript/src/styles/specific/user_upgrades.scss index 10ba0c162..40856af45 100644 --- a/app/javascript/src/styles/specific/user_upgrades.scss +++ b/app/javascript/src/styles/specific/user_upgrades.scss @@ -44,12 +44,6 @@ div#c-user-upgrades { 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; - } } } } diff --git a/app/views/application/_update_notice.html.erb b/app/views/application/_update_notice.html.erb index dcb6d474b..ea49afad4 100644 --- a/app/views/application/_update_notice.html.erb +++ b/app/views/application/_update_notice.html.erb @@ -1,7 +1,7 @@ <%# record, interval %> <% if record.respond_to?(:updater) && record.updater_id != record.creator_id %> -

Updated by <%= link_to_user record.updater %> <%= time_ago_in_words_tagged(record.updated_at) %>

+

Updated by <%= link_to_user record.updater %> <%= time_ago_in_words_tagged(record.updated_at) %>

<% elsif record.updated_at - record.created_at > (local_assigns[:interval] || 5.minutes) %> -

Updated <%= time_ago_in_words_tagged(record.updated_at) %>

+

Updated <%= time_ago_in_words_tagged(record.updated_at) %>

<% end %> diff --git a/app/views/dmails/show.html.erb b/app/views/dmails/show.html.erb index b7451d8a8..6e1c48992 100644 --- a/app/views/dmails/show.html.erb +++ b/app/views/dmails/show.html.erb @@ -18,7 +18,7 @@ <%= format_text(@dmail.body) %> <% if @dmail.is_automated? %> -

+

This is an automated message. Responses will not be seen. If you have any questions either message a moderator or ask in the forum.

<% end %> diff --git a/app/views/forum_topics/show.html.erb b/app/views/forum_topics/show.html.erb index a9111459d..2322a6421 100644 --- a/app/views/forum_topics/show.html.erb +++ b/app/views/forum_topics/show.html.erb @@ -12,7 +12,7 @@ <% end %> -

Posted under <%= link_to @forum_topic.category_name, forum_topics_path(:search => {:category_id => @forum_topic.category_id}) %>

+

Posted under <%= link_to @forum_topic.category_name, forum_topics_path(:search => {:category_id => @forum_topic.category_id}) %>

<% if @forum_topic.is_locked? %>
diff --git a/app/views/iqdb_queries/_matches.html.erb b/app/views/iqdb_queries/_matches.html.erb index 7b13e4f33..592f2ec1f 100644 --- a/app/views/iqdb_queries/_matches.html.erb +++ b/app/views/iqdb_queries/_matches.html.erb @@ -1,11 +1,11 @@ <% if @matches.present? %>

Similar Posts

-

Found <%= pluralize(@matches.length, "similar post") %>:

+

Found <%= pluralize(@matches.length, "similar post") %>:

<% @matches.each do |match| %> <%= PostPresenter.preview(match["post"], :tags => "status:any", :similarity => match["score"], :size => true) %> <% end %> <% else %>

Similar Posts

-

No similar posts found.

+

No similar posts found.

<% end %> diff --git a/app/views/posts/partials/index/_posts.html.erb b/app/views/posts/partials/index/_posts.html.erb index f45c00a25..d19253eb2 100644 --- a/app/views/posts/partials/index/_posts.html.erb +++ b/app/views/posts/partials/index/_posts.html.erb @@ -4,7 +4,7 @@
<% if post_set.hidden_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") %>).
<% end %> @@ -20,7 +20,7 @@ <% end %> <% if show_tag_change_notice? %> -
+

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) %>.

<% end %> diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 7f92dc545..70c2c2799 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -18,7 +18,7 @@
-

+

New to <%= Danbooru.config.app_name %>? <%= link_to "Create a new account", new_user_path %>.

diff --git a/app/views/uploads/_related_posts.html.erb b/app/views/uploads/_related_posts.html.erb index 9af989261..d76e0a877 100644 --- a/app/views/uploads/_related_posts.html.erb +++ b/app/views/uploads/_related_posts.html.erb @@ -4,7 +4,7 @@