From fbdd80d5fc3734fc726707294940e20698728c31 Mon Sep 17 00:00:00 2001 From: Ashwin Vaswani Date: Wed, 19 Dec 2018 13:47:44 -0800 Subject: [PATCH] Add headings to header tags (#1003) * updating all headers to have h* tags, or changing elements * Remove commented out binding.pry * Remove unused page * Use article instead of div for consistency * Update snapshot with new section tag * Use h4 tags again for new views --- app/assets/stylesheets/article-show.scss | 2 +- app/assets/stylesheets/articles.scss | 7 +++ app/assets/stylesheets/index-comments.scss | 6 ++- .../stylesheets/preact/sidebar-widget.scss | 3 ++ .../__snapshots__/article.test.jsx.snap | 4 +- app/javascript/chat/article.jsx | 2 +- .../sidebar-widget/SidebarWidget.jsx | 2 +- app/views/articles/_markdown_form.html.erb | 6 +-- app/views/articles/_sidebar.html.erb | 4 +- .../articles/_sidebar_additional.html.erb | 22 ++++----- app/views/articles/_special_sidebar.html.erb | 2 +- app/views/articles/search/_sidebar.html.erb | 2 +- app/views/articles/show.html.erb | 12 ++--- app/views/articles/tags/_sidebar.html.erb | 6 +-- .../tags/_sidebar_additional.html.erb | 4 +- app/views/badges/show.html.erb | 5 +- app/views/events/index.html.erb | 6 +-- app/views/events/show.html.erb | 4 +- app/views/giveaways/edit.html.erb | 4 +- app/views/giveaways/new.html.erb | 4 +- app/views/notifications/index.html.erb | 2 +- app/views/organizations/_sidebar.html.erb | 4 +- .../_sidebar_additional.html.erb | 2 +- app/views/pages/about.html.erb | 4 +- app/views/pages/appacademy_info.html.erb | 47 ------------------- app/views/pages/badges.html.erb | 4 +- app/views/pages/bounty.html.erb | 4 +- app/views/pages/code_of_conduct.html.erb | 4 +- app/views/pages/editor_guide.html.erb | 6 +-- app/views/pages/faq.html.erb | 4 +- app/views/pages/information.html.erb | 6 +-- app/views/pages/markdown_basics.html.erb | 4 +- app/views/pages/membership.html.erb | 6 +-- app/views/pages/now.html.erb | 4 +- app/views/pages/org_info.html.erb | 4 +- app/views/pages/privacy.html.erb | 4 +- app/views/pages/report-abuse.html.erb | 4 +- app/views/pages/scholarships.html.erb | 4 +- app/views/pages/sponsors.html.erb | 8 ++-- app/views/pages/sponsorship_faq.html.erb | 4 +- app/views/pages/survey.html.erb | 4 +- app/views/pages/swagnets.html.erb | 5 +- app/views/pages/terms.html.erb | 4 +- app/views/pages/workshops.html.erb | 6 +-- app/views/podcast_episodes/_sidebar.html.erb | 2 +- .../stripe_subscriptions/create.html.erb | 4 +- app/views/users/_comments_section.html.erb | 6 +-- app/views/users/_sidebar.html.erb | 8 ++-- app/views/users/_sidebar_additional.html.erb | 2 +- .../internal_users_controller_spec.rb | 1 - 50 files changed, 99 insertions(+), 179 deletions(-) delete mode 100644 app/views/pages/appacademy_info.html.erb diff --git a/app/assets/stylesheets/article-show.scss b/app/assets/stylesheets/article-show.scss index 8d4ad52c7..4368497a0 100644 --- a/app/assets/stylesheets/article-show.scss +++ b/app/assets/stylesheets/article-show.scss @@ -44,7 +44,7 @@ border-top-right-radius:2px; } } -header{ +article{ padding:0px 0px; position:relative; .image{ diff --git a/app/assets/stylesheets/articles.scss b/app/assets/stylesheets/articles.scss index 9fc873cf8..6f50cc3dc 100644 --- a/app/assets/stylesheets/articles.scss +++ b/app/assets/stylesheets/articles.scss @@ -964,6 +964,9 @@ &:hover{ opacity:1; } + h4{ + margin: 0; + } &.signin-cta-widget{ background: lighten($purple, 3%); border: 1px solid darken($bold-blue, 5%); @@ -1030,6 +1033,10 @@ font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; a{ color: $black; + h4{ + display: inline-block; + margin: 0; + } &:hover{ text-decoration: underline; } diff --git a/app/assets/stylesheets/index-comments.scss b/app/assets/stylesheets/index-comments.scss index 89cfc75c4..ecfe9c28c 100644 --- a/app/assets/stylesheets/index-comments.scss +++ b/app/assets/stylesheets/index-comments.scss @@ -35,6 +35,10 @@ @media screen and ( min-width: 430px ){ font-size:19px; } + h4{ + margin: 0; + font-weight: 500; + } } a{ color:$black; @@ -66,4 +70,4 @@ font-size:18.5px; } } -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/preact/sidebar-widget.scss b/app/assets/stylesheets/preact/sidebar-widget.scss index c7beaa7f4..c32d49981 100644 --- a/app/assets/stylesheets/preact/sidebar-widget.scss +++ b/app/assets/stylesheets/preact/sidebar-widget.scss @@ -3,6 +3,9 @@ .sidebar-additional{ .widget{ .widget-suggested-follows-container{ + h4{ + margin: 0; + } .widget-body{ .widget-list-item__suggestions{ .widget-list-item__close-button{ diff --git a/app/javascript/chat/__tests__/__snapshots__/article.test.jsx.snap b/app/javascript/chat/__tests__/__snapshots__/article.test.jsx.snap index 927d187e7..b94000a4f 100644 --- a/app/javascript/chat/__tests__/__snapshots__/article.test.jsx.snap +++ b/app/javascript/chat/__tests__/__snapshots__/article.test.jsx.snap @@ -24,7 +24,7 @@ exports[`
should load article 1`] = `
-
+
should load article 1`] = ` } } /> -
+
diff --git a/app/javascript/chat/article.jsx b/app/javascript/chat/article.jsx index e27c2260d..db4051cf4 100644 --- a/app/javascript/chat/article.jsx +++ b/app/javascript/chat/article.jsx @@ -100,7 +100,7 @@ export default class Article extends Component { }); let coverImage = ''; if (article.cover_image) { - coverImage =
+ coverImage =
} return (
diff --git a/app/javascript/sidebar-widget/SidebarWidget.jsx b/app/javascript/sidebar-widget/SidebarWidget.jsx index 0d470552a..1e52ad9b6 100644 --- a/app/javascript/sidebar-widget/SidebarWidget.jsx +++ b/app/javascript/sidebar-widget/SidebarWidget.jsx @@ -79,7 +79,7 @@ class SidebarWidget extends Component { return (
-
{'who to follow'}
+

who to follow

{users}
diff --git a/app/views/articles/_markdown_form.html.erb b/app/views/articles/_markdown_form.html.erb index 23e75101d..055979d4b 100644 --- a/app/views/articles/_markdown_form.html.erb +++ b/app/views/articles/_markdown_form.html.erb @@ -85,13 +85,13 @@
<% if current_user.organization %> @@ -100,7 +100,7 @@
<% end %> -

+

diff --git a/app/views/articles/_sidebar.html.erb b/app/views/articles/_sidebar.html.erb index 21d6fbac1..7b8721989 100644 --- a/app/views/articles/_sidebar.html.erb +++ b/app/views/articles/_sidebar.html.erb @@ -5,7 +5,7 @@ <%= render "articles/sidebar_nav" %>
- key links +

key links

" alt="Twitter logo" class="social-icon" /> diff --git a/app/views/articles/_sidebar_additional.html.erb b/app/views/articles/_sidebar_additional.html.erb index 0d7580187..b24dd14f3 100644 --- a/app/views/articles/_sidebar_additional.html.erb +++ b/app/views/articles/_sidebar_additional.html.erb @@ -4,7 +4,7 @@ <% unless user_signed_in? %>