From da9c15d43c6c6184d6a27dc17d296ca99d492bc9 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Mon, 26 Jan 2015 17:16:32 +0100 Subject: [PATCH] basic stuff added --- .../stylesheets/scss/notifications.scss | 24 ++++++++++ app/views/layouts/_notifications.html.haml | 44 ++++++++++++++++++- 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/scss/notifications.scss b/app/assets/stylesheets/scss/notifications.scss index 07afe92f..58055060 100644 --- a/app/assets/stylesheets/scss/notifications.scss +++ b/app/assets/stylesheets/scss/notifications.scss @@ -19,4 +19,28 @@ color: $gray; opacity: 0.4; z-index: 0; +} + +.notification--dropdown { + min-width: 370px; +} + +.notification--dropdown-media { + padding: 3px 5px; +} + +.notification--dropdown-user, .notification--dropdown-text { + margin-bottom: 0px; + overflow: hidden; +} + +.notification--dropdown-user { + margin-top: 3px; +} + +.notification--dropdown-img { + min-height: 32px; + min-width: 32px; + height: 32px; + width: 32px; } \ No newline at end of file diff --git a/app/views/layouts/_notifications.html.haml b/app/views/layouts/_notifications.html.haml index 12282da0..c85e4a8c 100644 --- a/app/views/layouts/_notifications.html.haml +++ b/app/views/layouts/_notifications.html.haml @@ -1 +1,43 @@ -= nav_entry "Notifications", notifications_path, badge: notification_count \ No newline at end of file += nav_entry "Notifications", notifications_path, badge: notification_count +%li.dropdown.hidden-xs + %a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"} + Notifications + %span.badge= notification_count + %ul.dropdown-menu.notification--dropdown + %li + .media.notification--dropdown-media + .pull-left + %img.img-rounded.notification--dropdown-img + .media-body + %h6.media-heading.notification--dropdown-user + username + .notification--dropdown-text + followed you 33 minutes ago + %li + .media.notification--dropdown-media + .pull-left + %img.img-rounded.notification--dropdown-img + .media-body + %h6.media-heading.notification--dropdown-user + username + .notification--dropdown-text + smiled at your answer about 1 hour ago + %li + .media.notification--dropdown-media + .pull-left + %img.img-rounded.notification--dropdown-img + .media-body + %h6.media-heading.notification--dropdown-user + username + .notification--dropdown-text + answered your question about 4 hours ago + %li + .media.notification--dropdown-media + .pull-left + %img.img-rounded.notification--dropdown-img + .media-body + %h6.media-heading.notification--dropdown-user + username + .notification--dropdown-text + commented on your answer about 5 hours ago + %li= link_to "Show all Notifications", notifications_path \ No newline at end of file