2012-06-17 03:15:46 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2012-10-24 18:52:53 +02:00
|
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
2013-01-04 07:12:44 +01:00
|
|
|
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon.png" />
|
|
|
|
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon.png" />
|
|
|
|
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-144.png" />
|
|
|
|
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144.png" />
|
2012-10-24 18:52:53 +02:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<meta name="robots" content="noarchive,noodp,noydir" />
|
2012-12-08 20:08:27 +01:00
|
|
|
<meta name="referrer" content="always" />
|
2014-12-09 17:06:48 +01:00
|
|
|
<meta name="theme-color" content="#AC130D" />
|
2015-12-31 16:13:34 +01:00
|
|
|
<% if @meta_tags %>
|
|
|
|
<% @meta_tags.each do |k,v| %>
|
|
|
|
<meta name="<%= k %>" content="<%= v %>" />
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2015-11-02 02:56:30 +01:00
|
|
|
<link rel="shortcut icon" href="/favicon.ico" />
|
2012-07-07 01:10:08 +02:00
|
|
|
<% if @short_url %>
|
|
|
|
<link rev="canonical" rel="self alternate shorter shorturl shortlink"
|
|
|
|
href="<%= @short_url %>" />
|
|
|
|
<% end %>
|
2013-06-30 08:29:51 +02:00
|
|
|
<title><%= @title.present? ? "#{@title} | " : "" %><%=
|
|
|
|
Rails.application.name %></title>
|
2014-02-17 17:09:33 +01:00
|
|
|
<%= stylesheet_link_tag "application", :media => "all" %>
|
2012-06-30 18:18:36 +02:00
|
|
|
<% if @user %>
|
2014-01-10 06:24:41 +01:00
|
|
|
<%= javascript_include_tag "application" %>
|
2012-06-30 18:18:36 +02:00
|
|
|
<script>
|
|
|
|
Lobsters.curUser = '<%= @user.id %>';
|
|
|
|
</script>
|
|
|
|
<% end %>
|
2014-01-10 06:24:41 +01:00
|
|
|
<%= csrf_meta_tags %>
|
|
|
|
<% if @rss_link %>
|
2014-03-12 23:50:51 +01:00
|
|
|
<link rel="alternate" type="application/rss+xml"
|
|
|
|
title="<%= @rss_link[:title] %>" href="<%= @rss_link[:href] %>" />
|
2014-01-10 06:24:41 +01:00
|
|
|
<% end %>
|
2015-04-28 16:51:50 +02:00
|
|
|
<% if @comments_rss_link %>
|
|
|
|
<link rel="alternate" type="application/rss+xml"
|
|
|
|
title="<%= @comments_rss_link[:title] %>"
|
|
|
|
href="<%= @comments_rss_link[:href] %>" />
|
|
|
|
<% end %>
|
2012-06-17 03:15:46 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
2012-07-04 04:49:11 +02:00
|
|
|
<div id="wrapper">
|
2012-08-17 20:36:30 +02:00
|
|
|
<div id="header">
|
|
|
|
<div id="headerleft">
|
2016-06-19 02:25:57 +02:00
|
|
|
<a id="l_holder" style="background-color: #<%= @traffic_color %>;"
|
|
|
|
href="/" title="<%= Rails.application.name %> (Current traffic: <%=
|
|
|
|
@traffic.to_i %>)"></a>
|
2012-08-17 20:36:30 +02:00
|
|
|
|
2012-09-19 20:32:52 +02:00
|
|
|
<% links = {
|
2016-06-10 23:24:02 +02:00
|
|
|
"/" => @cur_url == "/" ? Rails.application.name : t('.homelink'),
|
|
|
|
"/recent" => t('.recentlink'),
|
|
|
|
"/comments" => t('.commentslink')
|
2012-09-19 20:32:52 +02:00
|
|
|
} %>
|
|
|
|
|
2016-06-22 21:42:10 +02:00
|
|
|
<% if @user && @user.can_submit_stories? %>
|
2016-06-10 23:24:02 +02:00
|
|
|
<% links.merge!({ "/threads" => t('.yourthreadslink'),
|
|
|
|
"/stories/new" => t('.submitstorylink') }) %>
|
2012-08-17 20:36:30 +02:00
|
|
|
<% end %>
|
2012-09-19 20:32:52 +02:00
|
|
|
|
2016-06-10 23:24:02 +02:00
|
|
|
<% links.merge!({ "/search" => t('.searchlink') }) %>
|
2012-08-17 20:36:30 +02:00
|
|
|
|
2012-09-07 16:18:15 +02:00
|
|
|
<% if @cur_url.present? && !links.keys.include?(@cur_url) &&
|
|
|
|
@heading.present? %>
|
2012-08-17 20:36:30 +02:00
|
|
|
<span id="headertitle">
|
2012-09-07 16:18:15 +02:00
|
|
|
<a href="<%= @cur_url %>"><%= @heading %></a>
|
2012-08-17 20:36:30 +02:00
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<span class="headerlinks">
|
|
|
|
<% links.each do |u,v| %>
|
|
|
|
<a href="<%= u %>" <%= u == @cur_url ? raw("class=\"cur_url\"") :
|
|
|
|
"" %>><%= v %></a>
|
|
|
|
<% end %>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
|
2014-08-04 04:44:10 +02:00
|
|
|
<div id="headerright">
|
2012-08-17 20:36:30 +02:00
|
|
|
<span class="headerlinks">
|
2013-08-05 09:16:33 +02:00
|
|
|
<a href="/filters" <%= @cur_url == "/filters" ?
|
2016-06-10 23:28:00 +02:00
|
|
|
raw("class=\"cur_url\"") : "" %>><%= t('.filterslink') %></a>
|
2012-08-17 20:36:30 +02:00
|
|
|
<% if @user %>
|
|
|
|
<% if (count = @user.unread_message_count) > 0 %>
|
2013-01-24 21:06:10 +01:00
|
|
|
<a href="/messages" class="new_messages <%= @cur_url == "/messages" ?
|
2016-06-14 18:18:25 +02:00
|
|
|
"cur_url" : "" %>"><%= t(".newmessagelink", :count => count)
|
|
|
|
%></a>
|
2012-08-17 20:36:30 +02:00
|
|
|
<% else %>
|
2013-01-24 21:06:10 +01:00
|
|
|
<a href="/messages" <%= @cur_url == "/messages" ?
|
2016-06-10 23:28:00 +02:00
|
|
|
raw("class=\"cur_url\"") : "" %>><%= t('.messageslink') %></a>
|
2012-08-17 20:36:30 +02:00
|
|
|
<% end %>
|
|
|
|
|
2013-01-24 21:06:10 +01:00
|
|
|
<a href="/settings" <%= @cur_url == "/settings" ?
|
|
|
|
raw("class=\"cur_url\"") : "" %>><%= @user.username %>
|
|
|
|
(<%= @user.karma %>)</a>
|
2012-08-17 20:36:30 +02:00
|
|
|
|
2016-06-10 23:24:02 +02:00
|
|
|
<%= link_to t('.logoutlink'), { :controller => "login", :action => "logout" },
|
|
|
|
:data => { :confirm => t('.confirmlogoutlink') },
|
2012-08-17 20:36:30 +02:00
|
|
|
:method => "post" %>
|
|
|
|
<% else %>
|
2016-06-10 23:28:00 +02:00
|
|
|
<a href="/login"><%= t('.loginlink') %></a>
|
2012-08-17 20:36:30 +02:00
|
|
|
<% end %>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clear"></div>
|
|
|
|
</div>
|
2013-02-14 01:50:51 +01:00
|
|
|
|
2012-07-04 04:49:11 +02:00
|
|
|
<div id="inside">
|
2015-03-10 23:40:57 +01:00
|
|
|
<% [ :error, :success, :notice ].each do |f| %>
|
|
|
|
<% if flash[f].present? %>
|
|
|
|
<div class="flash-<%= f %>"><%= flash[f] %></div>
|
|
|
|
<% end %>
|
2012-06-30 21:14:35 +02:00
|
|
|
<% end %>
|
|
|
|
|
2012-06-17 03:15:46 +02:00
|
|
|
<%= yield %>
|
2013-10-18 22:55:20 +02:00
|
|
|
|
|
|
|
<div id="footer">
|
2016-06-10 23:28:00 +02:00
|
|
|
<a href="/moderations"><%= t('.moderationloglink') %></a>
|
2014-01-13 06:37:59 +01:00
|
|
|
<% if @user && !@user.is_new? &&
|
|
|
|
(iqc = InvitationRequest.verified_count) > 0 %>
|
2016-06-10 23:28:00 +02:00
|
|
|
<a href="/invitations"><%= t('.invitationqueuelink') %>(<%= iqc %>)</a>
|
2013-10-18 22:55:20 +02:00
|
|
|
<% end %>
|
2016-04-06 20:19:46 +02:00
|
|
|
<% if @user && @user.is_moderator? &&
|
|
|
|
(hrc = HatRequest.count) > 0 %>
|
2016-06-10 23:34:19 +02:00
|
|
|
<a href="/hats/requests"><%= t('.hatrequestlink') %> (<%= hrc %>)</a>
|
2016-04-06 20:19:46 +02:00
|
|
|
<% end %>
|
2016-06-10 23:28:00 +02:00
|
|
|
<a href="/chat"><%= t('.chatlink') %></a>
|
|
|
|
<a href="/privacy"><%= t('.privacylink') %></a>
|
|
|
|
<a href="/about"><%= t('.aboutlink') %></a>
|
2013-10-18 22:55:20 +02:00
|
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
2012-07-04 04:49:11 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2012-06-17 03:15:46 +02:00
|
|
|
</body>
|
|
|
|
</html>
|