From b05c319c2fc85bf8512052ff1bf2c8333ed17b85 Mon Sep 17 00:00:00 2001 From: Lisa Sy Date: Thu, 3 Sep 2020 20:32:44 -0400 Subject: [PATCH] Update nav menu in Notification to use crayons-link styling (#10196) [deploy] * Move nav code into partials * Update small styling with new nav menu --- app/assets/stylesheets/notifications.scss | 20 ++++ app/views/notifications/_nav_menu.html.erb | 35 ++++++ .../notifications/_nav_menu_filter.html.erb | 38 ++++++ app/views/notifications/index.html.erb | 113 +----------------- 4 files changed, 95 insertions(+), 111 deletions(-) create mode 100644 app/views/notifications/_nav_menu.html.erb create mode 100644 app/views/notifications/_nav_menu_filter.html.erb diff --git a/app/assets/stylesheets/notifications.scss b/app/assets/stylesheets/notifications.scss index 375614782..2499f72d6 100644 --- a/app/assets/stylesheets/notifications.scss +++ b/app/assets/stylesheets/notifications.scss @@ -435,6 +435,26 @@ } } +.notification-nav { + margin-bottom: var(--su-4); + + &:last-child { + margin-bottom: 0; + } + + header { + color: var(--base-80); + } + + .crayons-link { + margin-bottom: var(--su-1); + + &:last-child { + margin-bottom: 0; + } + } +} + .notifications-filter__list { li { margin-bottom: var(--su-1); diff --git a/app/views/notifications/_nav_menu.html.erb b/app/views/notifications/_nav_menu.html.erb new file mode 100644 index 000000000..713458fdf --- /dev/null +++ b/app/views/notifications/_nav_menu.html.erb @@ -0,0 +1,35 @@ + + diff --git a/app/views/notifications/_nav_menu_filter.html.erb b/app/views/notifications/_nav_menu_filter.html.erb new file mode 100644 index 000000000..20203551e --- /dev/null +++ b/app/views/notifications/_nav_menu_filter.html.erb @@ -0,0 +1,38 @@ +
+ <% if @organizations.present? %> +
+ +
+ <% end %> + + +
diff --git a/app/views/notifications/index.html.erb b/app/views/notifications/index.html.erb index a60290d92..7487bf198 100644 --- a/app/views/notifications/index.html.erb +++ b/app/views/notifications/index.html.erb @@ -42,119 +42,10 @@ <% if user_signed_in? %>
- -
- <% if @organizations.present? %> -
- -
- <% end %> - - -
+ <%= render "notifications/nav_menu_filter" %> <%= render "notifications_list", params: params %>