* Fix small details in notification results and add filtering * Adjust filter styling * Fix filtering * Add reaction render to comments
63 lines
3 KiB
Text
63 lines
3 KiB
Text
<% title "Notifications" %>
|
|
|
|
<%= content_for :page_meta do %>
|
|
<link rel="canonical" href="https://dev.to/notifications"/>
|
|
<meta name="description" content="Notifications inbox for dev.to">
|
|
<meta name="keywords" content="software development,engineering,rails,javascript,ruby">
|
|
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="https://dev.to/notifications" />
|
|
<meta property="og:title" content="Notifications - dev.to" />
|
|
<meta property="og:description" content="Notifications inbox for dev.to" />
|
|
<meta property="og:site_name" content="The Practical Dev" />
|
|
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
<meta name="twitter:site" content="@ThePracticalDev">
|
|
<meta name="twitter:title" content="Notifications - dev.to">
|
|
<meta name="twitter:description" content="Notifications inbox for dev.to">
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="user-profile-header tag-header" style="background: transparent;padding:0px;margin:22px auto 0px">
|
|
</div>
|
|
|
|
<div class="home" id="notifications-container" style="margin-top:0px;">
|
|
<div class="side-bar">
|
|
<div class="widget fixed-widget">
|
|
<header>
|
|
notifications
|
|
</header>
|
|
<div class="widget-body">
|
|
<a class="query-filter-button <%= "selected" if params[:filter].blank? %>" href="/notifications">ALL</a>
|
|
<a class="query-filter-button <%= "selected" if params[:filter].to_s.downcase == "comments" %>" href="/notifications/comments">COMMENTS</a>
|
|
<a class="query-filter-button <%= "selected" if params[:filter].to_s.downcase == "posts" %>" href="/notifications/posts">POSTS</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="articles-list" id="articles-list">
|
|
<% if user_signed_in? %>
|
|
<div class="notifications-mobile-filters">
|
|
<a class="query-filter-button <%= "selected" if params[:filter].blank? %>" href="/notifications">ALL</a>
|
|
<a class="query-filter-button <%= "selected" if params[:filter].to_s.downcase == "comments" %>" href="/notifications/comments">COMMENTS</a>
|
|
<a class="query-filter-button <%= "selected" if params[:filter].to_s.downcase == "posts" %>" href="/notifications/posts">POSTS</a>
|
|
</div>
|
|
<% notification_count = 0 %>
|
|
<% @notifications.each do |notification| %>
|
|
<% next if (notification.notified_at < 24.hours.ago && notification.aggregated?) %>
|
|
<% notification_count = notification_count + 1 %>
|
|
<% break if notification_count > 45 %>
|
|
<div class="single-article single-article-small-pic <%= "unseen" unless notification.read? %>">
|
|
<%= render "#{notification.notifiable_type.downcase}", notification: notification %>
|
|
</div>
|
|
<% end %>
|
|
<% else %>
|
|
<div class="content notification-content comment-content">
|
|
<%= render "notifications/signup_cta_test" %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<div class="side-bar sidebar-additional"></div>
|
|
</div>
|
|
|
|
<%= render "articles/fitvids" %>
|