* Remove extra character from meta_keywords in /listings/index.html.erb * Remove meta_keywords from MANDATORY_CONFIGS * Add and use meta_keywords_tag helper * Use modern tag syntax instead of deprecated syntax * Add and use meta_keywords_default helper * Add and use meta_keywords_article helper * Remove * from meta_keywords_field.label * Update meta_keyword specs to account for no keywords being set
67 lines
2.6 KiB
Text
67 lines
2.6 KiB
Text
<% title "Notifications" %>
|
|
|
|
<%= content_for :page_meta do %>
|
|
<link rel="canonical" href="<%= app_url("/notifications") %>" />
|
|
<meta name="description" content="Notifications inbox for <%= community_name %>">
|
|
<%= meta_keywords_default %>
|
|
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:url" content="<%= app_url("/notifications") %>" />
|
|
<meta property="og:title" content="Notifications - <%= community_name %>" />
|
|
<meta property="og:description" content="Notifications inbox for <%= community_name %>" />
|
|
<meta property="og:site_name" content="<%= community_qualified_name %>" />
|
|
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
<meta name="twitter:site" content="@<%= SiteConfig.social_media_handles["twitter"] %>">
|
|
<meta name="twitter:title" content="Notifications - <%= community_name %>">
|
|
<meta name="twitter:description" content="Notifications inbox for <%= community_name %>">
|
|
<% end %>
|
|
|
|
<script>
|
|
/**
|
|
* A script that tracks clicks for welcome notifications.
|
|
* The notification must have `trackNotification` as its onclick event
|
|
* in order for this to be triggered.
|
|
*
|
|
* @param {Event} The click event on the notification.
|
|
*/
|
|
function trackNotification(event) {
|
|
const target = event.target;
|
|
const { parentElement: { id: title }, text } = target;
|
|
|
|
// TODO: [@forem/delightful]: This event doesn't appear to be firing on Honeybadger.
|
|
// We probably want to remove it eventually if we continually don't see it being triggered.
|
|
if (!title) {
|
|
Honeybadger.notify(`Could not find parentElement.id when clicking on event target text: ${text}`);
|
|
}
|
|
|
|
ahoy.track("Clicked Welcome Notification", { title, text, target: target.toString() });
|
|
}
|
|
</script>
|
|
|
|
<% if user_signed_in? %>
|
|
<div class="home" id="notifications-container">
|
|
<div class="side-bar">
|
|
<%= render "notifications/nav_menu" %>
|
|
</div>
|
|
<div class="articles-list" id="articles-list">
|
|
<%= render "notifications/nav_menu_filter" %>
|
|
<%= render "notifications_list", params: params %>
|
|
</div>
|
|
|
|
<%# new or less active users that don't have a page worth of notifications
|
|
won't be shown the "load more" button %>
|
|
<% if @notifications.size >= @initial_page_size %>
|
|
<div class="load-more-wrapper">
|
|
<button id="load-more-button" type="button" class="crayons-btn crayons-btn--secondary">
|
|
Load More
|
|
</button>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="side-bar sidebar-additional"></div>
|
|
</div>
|
|
<%= render "articles/fitvids" %>
|
|
<% else %>
|
|
<%= render "devise/registrations/registration_form" %>
|
|
<% end %>
|