diff --git a/app/assets/stylesheets/article-show.scss b/app/assets/stylesheets/article-show.scss index 6dd58d708..d52ef5ff2 100644 --- a/app/assets/stylesheets/article-show.scss +++ b/app/assets/stylesheets/article-show.scss @@ -55,8 +55,10 @@ header{ margin-top:60px; z-index:2; padding-top: 42%; - border-top-left-radius: 3px; - border-top-right-radius: 3px; + @media screen and ( min-width: 880px ){ + border-top-left-radius: 3px; + border-top-right-radius: 3px; + } } .category-banner{ height:250px; @@ -64,13 +66,20 @@ header{ } } +.home .container{ + @media screen and ( min-width: 1250px ){ + margin-left: 25px; + } +} + .container{ width:880px; max-width:100%; background:white; box-shadow: $shadow; margin:60px auto 20px; - @media screen and ( min-width: 880px ){ + text-align: left; + @media screen and ( min-width: 1250px ){ margin-top:80px; border-radius: 3px; } @@ -839,6 +848,9 @@ header{ margin-top:20px; margin-bottom:0px; padding-bottom:20px; + a{ + color: $black; + } .inner{ width:800px; max-width:calc(100% - 40px); @@ -861,10 +873,10 @@ header{ padding-top:5px; padding-right:10px; padding-bottom:8px; - font-weight:300; + font-weight:400; font-size:0.9em; @media screen and ( min-width: 520px ){ - font-size:18px; + font-size:17px; } } .social{ diff --git a/app/assets/stylesheets/articles.scss b/app/assets/stylesheets/articles.scss index efa85e010..b3ddb6188 100644 --- a/app/assets/stylesheets/articles.scss +++ b/app/assets/stylesheets/articles.scss @@ -9,6 +9,7 @@ min-height:440px; margin:auto; max-width:1250px; + text-align: left; @media screen and ( min-width: 950px ){ margin-top:22px; } diff --git a/app/assets/stylesheets/minimal.scss b/app/assets/stylesheets/minimal.scss index fa1804397..bfbde7489 100644 --- a/app/assets/stylesheets/minimal.scss +++ b/app/assets/stylesheets/minimal.scss @@ -25,6 +25,7 @@ @import 'delete-confirm'; @import 'preact/onboarding-modal'; @import 'tag-edit'; +@import 'sticky-nav'; @import 'ltags/LiquidTags'; diff --git a/app/assets/stylesheets/more-articles.scss b/app/assets/stylesheets/more-articles.scss index 4ceab65a2..76d0485c6 100644 --- a/app/assets/stylesheets/more-articles.scss +++ b/app/assets/stylesheets/more-articles.scss @@ -5,6 +5,9 @@ text-align:center; font-family: $helvetica; margin:40px auto; + @media screen and ( min-width: 1250px ){ + margin-left: 25px; + } a{ color:rgb(19, 19, 19); } @@ -86,6 +89,10 @@ margin:20px auto; position: relative; overflow:hidden; + @media screen and ( min-width: 1250px ){ + margin-left: 25px; + } + a{ color: $black; } diff --git a/app/assets/stylesheets/sticky-nav.scss b/app/assets/stylesheets/sticky-nav.scss new file mode 100644 index 000000000..d6bfbf07f --- /dev/null +++ b/app/assets/stylesheets/sticky-nav.scss @@ -0,0 +1,103 @@ +@import 'variables'; + +.primary-sticky-nav { + display: none; + @media screen and ( min-width: 1250px ){ + display: block; + position: fixed; + left: calc(50% + 298px); + top: 74px; + bottom: 30px; + width: 310px; + display: flex; + flex-flow: column wrap; + overflow: hidden; + z-index: 100; + } + .primary-sticky-nav-author{ + a{ + color: $black; + } + img{ + width: 32px; + height: 32px; + border-radius: 360px; + margin-right: 5px; + vertical-align: -8px; + } + .primary-sticky-nav-author-name{ + font-size:1.3em; + font-weight: bold; + } + .primary-sticky-nav-author-summary{ + font-weight: 400; + color: $medium-gray; + padding: 10px 0px 5px; + font-style: italic; + font-size:0.9em; + } + .primary-sticky-nav-author-follow{ + padding-top:8px; + button{ + width:135px; + font-size:1.1em; + border:0px; + border-radius:3px; + padding: 4px 3px; + } + } + } + .primary-sticky-nav-profile-image{ + width: 20px; + border-radius: 100px; + vertical-align: -4px; + } + .primary-sticky-nav-title{ + padding-top:25px; + margin-left: 10px; + font-weight: bold; + font-size:1.1em; + } + .primary-sticky-nav-element{ + display: block; + padding: 10px 13px; + font-size:0.9em; + font-weight: bold; + background: white; + margin-top: 10px; + margin-left: 10px; + border: 1px solid $light-medium-gray; + box-shadow: 3px 4px 0px $light-medium-gray; + color: $dark-gray; + width: 262px; + border-radius: 3px; + &.sticky-join-cta{ + margin-top: 12px; + padding: 16px 13px; + background: lighten($yellow, 16%); + border: 1px solid darken($yellow, 15%); + box-shadow: 5px 6px 0px darken($yellow, 15%); + img{ + width: 19px; + margin-left: 3px; + margin-right: 2px; + vertical-align: -3px; + } + &:hover{ + background: lighten($yellow, 12%); + border: 1px solid darken($yellow, 12%); + box-shadow: 5px 6px 0px darken($yellow, 12%); + } + } + .primary-sticky-nav-element-details{ + margin-top:9px; + font-size: 0.7em; + color: $medium-gray; + } + &:hover{ + color: $black; + border: 1px solid darken($light-medium-gray, 15%); + box-shadow: 3px 4px 0px darken($light-medium-gray, 15%); + } + } +} \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4f81211a3..b43533091 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -131,11 +131,6 @@ module ApplicationHelper org.bg_color_hex end - def org_text_or_blue(org) - return "#557de8" unless (org && org.text_color_hex) - org.text_color_hex - end - def sanitized_article_body(processed_html) ActionController::Base.helpers.sanitize processed_html.html_safe, tags: %w(button strong em a table tbody thead tfoot th tr td col colgroup del p h1 h2 h3 h4 h5 h6 blockquote time div span i em u b ul ol li dd dl dt q code pre img sup sub cite center br small hr video source figcaption add ruby rp rt), diff --git a/app/models/user.rb b/app/models/user.rb index e690a9271..fc919f86b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -75,6 +75,7 @@ class User < ApplicationRecord after_create :send_welcome_notification after_save :bust_cache after_save :subscribe_to_mailchimp_newsletter + after_save :conditionally_resave_articles after_create :estimate_default_language! before_validation :set_username before_validation :downcase_email @@ -125,6 +126,10 @@ class User < ApplicationRecord end end + def tag_line + summary + end + def index_id "users-#{id}" end @@ -314,6 +319,9 @@ class User < ApplicationRecord def core_profile_details_changed? saved_change_to_username? || saved_change_to_name? || + saved_change_to_summary? || + saved_change_to_bg_color_hex? || + saved_change_to_text_color_hex? || saved_change_to_profile_image? || saved_change_to_github_username? || saved_change_to_twitter_username? diff --git a/app/views/articles/_comments_actions.html.erb b/app/views/articles/_comments_actions.html.erb index af30d219a..562aa8b5c 100644 --- a/app/views/articles/_comments_actions.html.erb +++ b/app/views/articles/_comments_actions.html.erb @@ -1,8 +1,7 @@ -