From eb8e348ec11405b0bb78fea162b7a83905f5eca6 Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Mon, 19 Sep 2022 20:31:38 -0700 Subject: [PATCH] chore: Update design of the help-center articles (#5459) - Update designs - Fixes meta tags - Update typography --- app/javascript/portal/application.scss | 62 +------------ app/views/layouts/portal.html.erb | 46 +++++----- .../api/v1/portals/_category-block.html.erb | 67 +++++++++----- .../public/api/v1/portals/_footer.html.erb | 8 +- .../public/api/v1/portals/_header.html.erb | 55 ++++++------ .../public/api/v1/portals/_hero.html.erb | 10 ++- .../api/v1/portals/articles/index.html.erb | 2 - .../api/v1/portals/articles/show.html.erb | 83 ++++++++++------- .../categories/_category-block.html.erb | 4 +- .../api/v1/portals/categories/_hero.html.erb | 4 +- .../api/v1/portals/categories/index.html.erb | 2 - .../api/v1/portals/categories/show.html.erb | 90 +++++++++++-------- app/views/public/api/v1/portals/show.html.erb | 10 +-- package.json | 1 + tailwind.config.js | 5 +- yarn.lock | 5 ++ 16 files changed, 228 insertions(+), 226 deletions(-) diff --git a/app/javascript/portal/application.scss b/app/javascript/portal/application.scss index 8e744f28d..0c4703e0e 100644 --- a/app/javascript/portal/application.scss +++ b/app/javascript/portal/application.scss @@ -7,7 +7,7 @@ @import 'widget/assets/scss/buttons'; @import 'widget/assets/scss/mixins'; @import 'widget/assets/scss/forms'; -@import 'shared/assets/fonts/widget_fonts'; +@import 'shared/assets/fonts/inter'; html, body { @@ -16,63 +16,3 @@ body { -webkit-font-smoothing: antialiased; height: 100%; } - -.woot-survey-wrap { - height: 100%; -} - -.blog-content { - @apply text-lg; - @apply font-sans; - @apply text-slate-800; - @apply leading-normal; - - h1, - h2, - h3, - h4, - h5, - h6 { - @apply font-sans leading-relaxed font-extrabold text-slate-900; - @apply mb-4; - @apply mt-8; - } - - h1 { - @apply text-5xl leading-normal; - } - - h2 { - @apply text-4xl leading-normal; - } - - h3 { - @apply text-3xl leading-normal; - } - - h4 { - @apply text-2xl leading-normal; - } - - p { - @apply text-lg; - @apply font-sans; - @apply text-slate-800; - @apply leading-relaxed; - @apply mb-4; - } - - ul { - @apply list-disc; - @apply pl-8; - @apply ml-4; - } - - li { - @apply text-lg; - @apply font-sans; - @apply text-slate-800; - @apply leading-relaxed; - @apply mb-2; - } -} diff --git a/app/views/layouts/portal.html.erb b/app/views/layouts/portal.html.erb index 8f0e8eff9..533c32d10 100644 --- a/app/views/layouts/portal.html.erb +++ b/app/views/layouts/portal.html.erb @@ -14,29 +14,25 @@ By default, it renders: - - - - - - <%= javascript_pack_tag 'portal' %> - <%= stylesheet_pack_tag 'portal' %> - - - <%= csrf_meta_tags %> - <%= @portal.page_title%> - - - - -
-
- <%= render "public/api/v1/portals/header", portal: @portal %> - <%= yield %> - <%= render "public/api/v1/portals/footer" %> -
-
- - - + + + + <%= javascript_pack_tag 'portal' %> + <%= stylesheet_pack_tag 'portal' %> + <%= csrf_meta_tags %> + <% if content_for?(:head) %> + <%= yield(:head) %> + <% else %> + <%= @portal.page_title%> + <% end %> + + +
+
+ <%= render "public/api/v1/portals/header", portal: @portal %> + <%= yield %> + <%= render "public/api/v1/portals/footer" %> +
+
+ diff --git a/app/views/public/api/v1/portals/_category-block.html.erb b/app/views/public/api/v1/portals/_category-block.html.erb index e7d8f1d32..9f03b7aea 100644 --- a/app/views/public/api/v1/portals/_category-block.html.erb +++ b/app/views/public/api/v1/portals/_category-block.html.erb @@ -1,9 +1,12 @@ -

<%= category.name %> -

<%= category.articles.published.size %> articles + + + <%= category.articles.published.size %> + <%= category.articles.published.size === 1 ? 'article': 'articles' %> +
<% if category.articles.published.size == 0 %> @@ -11,32 +14,52 @@

No articles here

<% else %> - <% category.articles.published.take(5).each do |article| %> -
- <%= article.title %> - - - - - -
+ <% category.articles.published.take(5).each do |article| %> + + <% end %> <% end %> - <% end %> -
- - + View all articles - + + d="M13.267 4.209a.75.75 0 0 0-1.034 1.086l6.251 5.955H3.75a.75.75 0 0 0 0 1.5h14.734l-6.251 5.954a.75.75 0 0 0 1.034 1.087l7.42-7.067a.996.996 0 0 0 .3-.58.758.758 0 0 0-.001-.29.995.995 0 0 0-.3-.578l-7.419-7.067Z" + /> diff --git a/app/views/public/api/v1/portals/_footer.html.erb b/app/views/public/api/v1/portals/_footer.html.erb index e7961d310..cd69a4fe4 100644 --- a/app/views/public/api/v1/portals/_footer.html.erb +++ b/app/views/public/api/v1/portals/_footer.html.erb @@ -1,6 +1,8 @@ - -