From bf8e2e53f1f4b1263d1ddaeef004a5e10c6cfb82 Mon Sep 17 00:00:00 2001 From: ludwiczakpawel Date: Fri, 2 Oct 2020 12:37:39 +0200 Subject: [PATCH] Titles & subtitles cleanup (#10508) * . * . * . --- app/assets/stylesheets/components/cards.scss | 46 +------------------ .../stylesheets/components/headers.scss | 42 +++++++++++++++-- app/assets/stylesheets/moderators.scss | 4 -- app/javascript/readingList/readingList.jsx | 2 +- .../admin/badge_achievements/award.html.erb | 2 +- app/views/admin/badges/edit.html.erb | 2 +- app/views/admin/badges/index.html.erb | 2 +- app/views/admin/badges/new.html.erb | 2 +- app/views/admin/broadcasts/edit.html.erb | 2 +- app/views/admin/broadcasts/new.html.erb | 2 +- app/views/admin/broadcasts/show.html.erb | 2 +- app/views/admin/chat_channels/index.html.erb | 4 +- app/views/admin/display_ads/edit.html.erb | 2 +- app/views/admin/display_ads/new.html.erb | 2 +- app/views/admin/events/index.html.erb | 6 +-- .../feedback_messages/_abuse_reports.html.erb | 2 +- .../admin/feedback_messages/index.html.erb | 2 +- app/views/admin/growth/index.html.erb | 2 +- app/views/admin/html_variants/edit.html.erb | 2 +- app/views/admin/html_variants/new.html.erb | 2 +- app/views/admin/listings/edit.html.erb | 2 +- app/views/admin/listings/index.html.erb | 2 +- app/views/admin/organizations/show.html.erb | 2 +- app/views/admin/pages/edit.html.erb | 2 +- app/views/admin/pages/index.html.erb | 2 +- app/views/admin/pages/new.html.erb | 2 +- app/views/admin/permissions/index.html.erb | 2 +- app/views/admin/podcasts/edit.html.erb | 2 +- .../admin/response_templates/edit.html.erb | 2 +- .../admin/response_templates/index.html.erb | 2 +- .../admin/response_templates/new.html.erb | 2 +- app/views/admin/sponsorships/edit.html.erb | 2 +- app/views/admin/sponsorships/new.html.erb | 2 +- app/views/admin/tags/show.html.erb | 2 +- app/views/admin/tools/index.html.erb | 4 +- app/views/admin/welcome/index.html.erb | 2 +- app/views/articles/_bottom_content.html.erb | 2 +- app/views/articles/_collection.html.erb | 2 +- .../articles/_full_comment_area.html.erb | 2 +- .../articles/_sidebar_additional.html.erb | 4 +- app/views/articles/_sidebar_campaign.html.erb | 2 +- app/views/articles/_sticky_nav.html.erb | 6 +-- app/views/articles/index.html.erb | 2 +- app/views/articles/search.html.erb | 2 +- app/views/articles/tag_index.html.erb | 2 +- app/views/dashboards/followers.html.erb | 2 +- .../following_organizations.html.erb | 2 +- .../dashboards/following_podcasts.html.erb | 2 +- app/views/dashboards/following_tags.html.erb | 2 +- app/views/dashboards/following_users.html.erb | 2 +- app/views/dashboards/show.html.erb | 4 +- app/views/dashboards/subscriptions.html.erb | 2 +- app/views/listings/edit.html.erb | 2 +- app/views/listings/index.html.erb | 2 +- app/views/listings/new.html.erb | 2 +- .../moderations/_mod_sidebar_left.html.erb | 6 +-- app/views/moderations/index.html.erb | 2 +- app/views/notifications/_nav_menu.html.erb | 22 +++------ app/views/pages/sponsors.html.erb | 2 +- app/views/users/_profile_header.html.erb | 2 +- app/views/users/edit.html.erb | 6 +-- app/views/users/show.html.erb | 2 +- 62 files changed, 115 insertions(+), 139 deletions(-) diff --git a/app/assets/stylesheets/components/cards.scss b/app/assets/stylesheets/components/cards.scss index e3c228537..bafc63cdd 100644 --- a/app/assets/stylesheets/components/cards.scss +++ b/app/assets/stylesheets/components/cards.scss @@ -1,7 +1,5 @@ @import '../config/import'; -$card-divider: 1px solid var(--body-bg); - .crayons-card { border-radius: var(--radius); background: var(--card-bg); @@ -16,55 +14,13 @@ $card-divider: 1px solid var(--body-bg); &__header { padding: var(--su-3) var(--su-4); - border-bottom: $card-divider; + border-bottom: 1px solid var(--body-bg); display: flex; justify-content: space-between; align-items: center; - - &__headline { - font-size: var(--fs-l); - font-weight: var(--fw-bold); - color: var(--base-100); - - a { - color: inherit; - &:hover { - color: var(--link-color-hover); - } - } - } - } - - &__subheader { - padding: var(--su-2) 0; - display: flex; - justify-content: space-between; - align-items: center; - - &__title { - color: var(--base-80); - font-weight: var(--fw-bold); - } - } - - &__title { - color: var(--card-headline); - font-weight: var(--fw-bold); } &__body { padding: var(--su-4); } - - &__inner-section { - margin-bottom: var(--su-4); - - &:last-child { - margin-bottom: 0; - } - - .crayons-card__section-header { - padding-top: 0; - } - } } diff --git a/app/assets/stylesheets/components/headers.scss b/app/assets/stylesheets/components/headers.scss index bea3480ae..e2ab50f7f 100644 --- a/app/assets/stylesheets/components/headers.scss +++ b/app/assets/stylesheets/components/headers.scss @@ -1,7 +1,39 @@ -.crayons-subheader { - color: var(--base-90); - font-size: var(--fs-base); +@import '../config/import'; + +.crayons-title, +.crayons-subtitle-1, +.crayons-subtitle-2, +.crayons-subtitle-3 { font-weight: var(--fw-bold); - padding-left: var(--su-2); - margin-bottom: var(--su-2); + color: var(--base-90); +} + +.crayons-title { + color: var(--base-100); + font-size: var(--fs-2xl); + + @media (min-width: $breakpoint-s) { + font-size: var(--fs-3xl); + } +} + +.crayons-subtitle-1 { + font-size: var(--fs-xl); + @media (min-width: $breakpoint-s) { + font-size: var(--fs-2xl); + } +} + +.crayons-subtitle-2 { + font-size: var(--fs-l); + @media (min-width: $breakpoint-s) { + font-size: var(--fs-xl); + } +} + +.crayons-subtitle-3 { + font-size: var(--fs-base); + @media (min-width: $breakpoint-s) { + font-size: var(--fs-l); + } } diff --git a/app/assets/stylesheets/moderators.scss b/app/assets/stylesheets/moderators.scss index 1f125db9e..ac21bd7c5 100644 --- a/app/assets/stylesheets/moderators.scss +++ b/app/assets/stylesheets/moderators.scss @@ -14,10 +14,6 @@ border-radius: var(--radius) var(--radius) 0 0; border-bottom: 2px solid var(--base-10); padding: var(--su-6) var(--su-4); - - .tag-view { - color: var(--base-90); - } } .mod-index-list-header { diff --git a/app/javascript/readingList/readingList.jsx b/app/javascript/readingList/readingList.jsx index 411919c47..46c1530dd 100644 --- a/app/javascript/readingList/readingList.jsx +++ b/app/javascript/readingList/readingList.jsx @@ -182,7 +182,7 @@ export class ReadingList extends Component { return (
-

+

{isStatusViewValid ? 'Reading list' : 'Archive'} {` (${totalCount > 0 ? totalCount : '0'})`}

diff --git a/app/views/admin/badge_achievements/award.html.erb b/app/views/admin/badge_achievements/award.html.erb index 1fac61094..29dfad63e 100644 --- a/app/views/admin/badge_achievements/award.html.erb +++ b/app/views/admin/badge_achievements/award.html.erb @@ -1,4 +1,4 @@ -

Award Badges

+

Award Badges

Warning: Usernames are case-sensitive and must be all lowercase! This task will fail silently when supplied with incorrect usernames.
diff --git a/app/views/admin/badges/edit.html.erb b/app/views/admin/badges/edit.html.erb index 751a2c40e..01d5bd7a0 100644 --- a/app/views/admin/badges/edit.html.erb +++ b/app/views/admin/badges/edit.html.erb @@ -1,5 +1,5 @@
-

<%= "Edit Badge #{@badge.id}" %>

+

<%= "Edit Badge #{@badge.id}" %>

<%= link_to "Back to All Badges", admin_badges_path, class: "btn btn-primary " %> diff --git a/app/views/admin/badges/index.html.erb b/app/views/admin/badges/index.html.erb index e550ec0f0..ec0bc8f72 100644 --- a/app/views/admin/badges/index.html.erb +++ b/app/views/admin/badges/index.html.erb @@ -1,5 +1,5 @@
-

Badges

+

Badges

<%= link_to "Create Badge", new_admin_badge_path, class: "btn btn-primary" %> diff --git a/app/views/admin/badges/new.html.erb b/app/views/admin/badges/new.html.erb index c5f46c264..bc7ad940d 100644 --- a/app/views/admin/badges/new.html.erb +++ b/app/views/admin/badges/new.html.erb @@ -1,4 +1,4 @@ -

Create badge

+

Create badge

<%= form_for [:admin, @badge], method: :post do |form| %> diff --git a/app/views/admin/broadcasts/edit.html.erb b/app/views/admin/broadcasts/edit.html.erb index 5ff153f78..9cf1c3258 100644 --- a/app/views/admin/broadcasts/edit.html.erb +++ b/app/views/admin/broadcasts/edit.html.erb @@ -1,4 +1,4 @@ -

Edit broadcast:

+

Edit broadcast:

<%= form_for([:admin, @broadcast], method: :patch) do %> <%= render "form" %> diff --git a/app/views/admin/broadcasts/new.html.erb b/app/views/admin/broadcasts/new.html.erb index f68179beb..79e18fbb8 100644 --- a/app/views/admin/broadcasts/new.html.erb +++ b/app/views/admin/broadcasts/new.html.erb @@ -1,4 +1,4 @@ -

Make a new broadcast:

+

Make a new broadcast:

<%= form_for([:admin, @broadcast], method: :post) do %> <%= render "form" %> diff --git a/app/views/admin/broadcasts/show.html.erb b/app/views/admin/broadcasts/show.html.erb index 153b2cb65..248ac9f86 100644 --- a/app/views/admin/broadcasts/show.html.erb +++ b/app/views/admin/broadcasts/show.html.erb @@ -1,5 +1,5 @@
-

<%= @broadcast.title %>

+

<%= @broadcast.title %>

<%= link_to "Destroy", url_for(action: :destroy, id: @broadcast.id), method: :delete, data: { confirm: "Are you sure?" }, class: "btn btn-danger" %> <%= link_to "Edit", edit_admin_broadcast_path, class: "btn btn-primary" %> diff --git a/app/views/admin/chat_channels/index.html.erb b/app/views/admin/chat_channels/index.html.erb index 0cc7a77b7..32221eb7b 100644 --- a/app/views/admin/chat_channels/index.html.erb +++ b/app/views/admin/chat_channels/index.html.erb @@ -1,5 +1,5 @@
-

Create Channel

+

Create Channel

<%= form_for [:admin, ChatChannel.new], html: { class: "inline-form" } do |f| %>
@@ -15,7 +15,7 @@
-

Channels

+

Channels

<%= search_form_for @q, url: admin_chat_channels_path, class: "form-inline ml-auto" do |f| %> <%= f.label :channel_name_cont, "Channel Name", class: "sr-only" %> <%= f.search_field :channel_name_cont, placeholder: "Channel Name", class: "form-control mx-3" %> diff --git a/app/views/admin/display_ads/edit.html.erb b/app/views/admin/display_ads/edit.html.erb index 04771823c..98b2f95dc 100644 --- a/app/views/admin/display_ads/edit.html.erb +++ b/app/views/admin/display_ads/edit.html.erb @@ -1,4 +1,4 @@ -

Edit Display Ad:

+

Edit Display Ad:

<%= form_for([:admin, @display_ad], method: :patch) do %> <%= render "form" %> diff --git a/app/views/admin/display_ads/new.html.erb b/app/views/admin/display_ads/new.html.erb index 5d6c01c4c..f4981c256 100644 --- a/app/views/admin/display_ads/new.html.erb +++ b/app/views/admin/display_ads/new.html.erb @@ -1,4 +1,4 @@ -

Make a new Display Ad:

+

Make a new Display Ad:

<%= form_for([:admin, @display_ad], method: :post) do %> <%= render "form" %> diff --git a/app/views/admin/events/index.html.erb b/app/views/admin/events/index.html.erb index 33ab6134d..d76033047 100644 --- a/app/views/admin/events/index.html.erb +++ b/app/views/admin/events/index.html.erb @@ -1,5 +1,5 @@
-

Create New Event

+

Create New Event

<%= form_for @event, url: { controller: "events", action: "create" } do |f| %> <%= render "event_form", f: f, event: @event %> @@ -7,7 +7,7 @@
-

Upcoming Events

+

Upcoming Events

<% @events.each do |event| %> <% if event.starts_at.future? %> event cover image @@ -19,7 +19,7 @@
-

Past Events

+

Past Events

<% @events.each do |event| %> <% if !event.starts_at.future? %> event cover image diff --git a/app/views/admin/feedback_messages/_abuse_reports.html.erb b/app/views/admin/feedback_messages/_abuse_reports.html.erb index f07c11475..5988c223b 100644 --- a/app/views/admin/feedback_messages/_abuse_reports.html.erb +++ b/app/views/admin/feedback_messages/_abuse_reports.html.erb @@ -1,5 +1,5 @@
-

Abuse reports

+

Abuse reports