From dbe6f81b4347218bd5b970ceaaabf014b4c481a3 Mon Sep 17 00:00:00 2001 From: ludwiczakpawel Date: Thu, 25 Jun 2020 13:02:38 +0200 Subject: [PATCH] Actions bar fix on Article view (#8903) * flare tag line height * . * dropdown fix + actions bar fix * actions bar on mob * revert --- app/assets/stylesheets/views/article.scss | 19 ++- app/views/articles/_actions.html.erb | 154 +++++++++++----------- app/views/shell/_top.html.erb | 2 +- 3 files changed, 92 insertions(+), 83 deletions(-) diff --git a/app/assets/stylesheets/views/article.scss b/app/assets/stylesheets/views/article.scss index fa521cf5f..f914f4f03 100644 --- a/app/assets/stylesheets/views/article.scss +++ b/app/assets/stylesheets/views/article.scss @@ -341,15 +341,9 @@ right: 0; bottom: 0; padding: var(--su-2); - @supports (padding-bottom: constant(safe-area-inset-bottom)) { - padding-bottom: env(safe-area-inset-bottom); - } - display: flex; - align-items: center; background: var(--body-bg); box-shadow: 0 -1px 1px rgba(0, 0, 0, 0.1); z-index: 100; - justify-content: space-around; @media (min-width: $breakpoint-m) { padding: 0; @@ -361,6 +355,19 @@ justify-content: stretch; top: calc(var(--header-height) + var(--layout-padding) + 6vh); } + + &__inner { + display: flex; + align-items: center; + justify-content: space-around; + padding-bottom: env(safe-area-inset-bottom); + + @media (min-width: $breakpoint-m) { + display: grid; + gap: var(--su-6); + justify-content: stretch; + } + } } .crayons-reaction { diff --git a/app/views/articles/_actions.html.erb b/app/views/articles/_actions.html.erb index 480255e27..5a7038783 100644 --- a/app/views/articles/_actions.html.erb +++ b/app/views/articles/_actions.html.erb @@ -1,82 +1,84 @@
- <% if @article.published? %> +
+ <% if @article.published? %> - <%= render partial: "articles/reaction_button", - locals: { - category: :like, - description: "Heart", - image_path: "heart.svg", - image_active_path: "heart-filled.svg" - } %> - <%= render partial: "articles/reaction_button", - locals: { - category: :unicorn, - description: "Unicorn", - image_path: "unicorn.svg", - image_active_path: "unicorn-filled.svg" - } %> - <%= render partial: "articles/reaction_button", - locals: { - category: :readinglist, - description: "Reading list", - image_path: "save.svg", - image_active_path: "save-filled.svg" - } %> - <% end %> + <%= render partial: "articles/reaction_button", + locals: { + category: :like, + description: "Heart", + image_path: "heart.svg", + image_active_path: "heart-filled.svg" + } %> + <%= render partial: "articles/reaction_button", + locals: { + category: :unicorn, + description: "Unicorn", + image_path: "unicorn.svg", + image_active_path: "unicorn-filled.svg" + } %> + <%= render partial: "articles/reaction_button", + locals: { + category: :readinglist, + description: "Reading list", + image_path: "save.svg", + image_active_path: "save-filled.svg" + } %> + <% end %> -
- -
- -
- - <%= inline_svg_tag("copy.svg", aria: true, id: "article-copy-icon", class: "crayons-icon mx-2 shrink-0", title: "Notifications") %> -
- -
- - - Share to Twitter - - - Share to LinkedIn - - - Share to Reddit - - - Share to Hacker News - - - Share to Facebook - - - - Report Abuse +
+ +
+ +
+ + <%= inline_svg_tag("copy.svg", aria: true, id: "article-copy-icon", class: "crayons-icon mx-2 shrink-0", title: "Notifications") %> +
+ +
+ + + Share to Twitter + + + Share to LinkedIn + + + Share to Reddit + + + Share to Hacker News + + + Share to Facebook + + + + Report Abuse +
diff --git a/app/views/shell/_top.html.erb b/app/views/shell/_top.html.erb index c43bf047a..ce1342cba 100644 --- a/app/views/shell/_top.html.erb +++ b/app/views/shell/_top.html.erb @@ -31,7 +31,7 @@ <%= javascript_packs_with_chunks_tag "Search", "onboardingRedirectCheck", "contentDisplayPolicy", defer: true %> <% end %> <%= yield(:page_meta) %> - + <%= favicon_link_tag SiteConfig.favicon_url %> "> ">