Switch to the free self-hosted version of FontAwesome. We're not using any Pro icons, so the Pro version isn't necessary.
143 lines
5.9 KiB
Plaintext
143 lines
5.9 KiB
Plaintext
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title><%= page_title %></title>
|
|
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
|
<link rel="top" title="<%= Danbooru.config.app_name %>" href="/">
|
|
<%= csrf_meta_tag %>
|
|
<% unless CurrentUser.disable_responsive_mode? %>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<% end %>
|
|
<meta name="current-user-name" content="<%= CurrentUser.name %>">
|
|
<meta name="current-user-id" content="<%= CurrentUser.id %>">
|
|
<meta name="current-user-can-approve-posts" content="<%= CurrentUser.can_approve_posts? %>">
|
|
<meta name="user-comment-threshold" content="<%= CurrentUser.comment_threshold %>">
|
|
<% if CurrentUser.user.blacklisted_tags.present? %>
|
|
<meta name="blacklisted-tags" content="<%= CurrentUser.user.blacklisted_tags.gsub(/(?:\r|\n)+/, ",") %>">
|
|
<% end %>
|
|
<% if flash[:notice] =~ /error/i %>
|
|
<meta name="errors" content="true">
|
|
<% end %>
|
|
<meta name="enable-js-navigation" content="<%= CurrentUser.user.enable_post_navigation %>">
|
|
<meta name="new-post-navigation-layout" content="<%= CurrentUser.user.new_post_navigation_layout %>">
|
|
<meta name="default-image-size" content="<%= CurrentUser.user.default_image_size %>">
|
|
<meta name="enable-auto-complete" content="<%= CurrentUser.user.enable_auto_complete %>">
|
|
<meta name="style-usernames" content="<%= CurrentUser.user.style_usernames? %>">
|
|
<meta name="last-forum-read-at" content="<%= CurrentUser.user.last_forum_read_at %>">
|
|
<meta name="disable-labeled-saved-searches" content="<%= CurrentUser.disable_categorized_saved_searches? %>">
|
|
<meta name="disable-post-tooltips" content="<%= CurrentUser.disable_post_tooltips? %>">
|
|
<%= tag.meta name: "disable-mobile-gestures", content: CurrentUser.disable_mobile_gestures? %>
|
|
<%= auto_discovery_link_tag :atom, posts_path(:format => "atom", :tags => params[:tags]) %>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
|
<%= javascript_pack_tag "application" %>
|
|
<%= stylesheet_pack_tag "application" %>
|
|
<% if CurrentUser.user.custom_style.present? %>
|
|
<%= stylesheet_link_tag custom_style_users_path(md5: Digest::MD5.hexdigest(CurrentUser.user.custom_style)), media: "screen" %>
|
|
<% end %>
|
|
<% if Danbooru.config.twitter_site %>
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context" : "http://schema.org",
|
|
"@type" : "Organization",
|
|
"name" : "<%= Danbooru.config.app_name %>",
|
|
"url" : "<%= root_url %>",
|
|
"sameAs" : [
|
|
"https://twitter.com/<%= Danbooru.config.twitter_site[1..-1] %>"
|
|
]
|
|
}
|
|
</script>
|
|
<% end %>
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "http://schema.org",
|
|
"@type": "WebSite",
|
|
"url" : "<%= root_url %>",
|
|
"potentialAction": [{
|
|
"@type": "SearchAction",
|
|
"target": "<%= posts_url %>?tags={search_term_string}",
|
|
"query-input": "required name=search_term_string"
|
|
}]
|
|
}
|
|
</script>
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "http://schema.org",
|
|
"@type": "WebSite",
|
|
"name": "<%= Danbooru.config.app_name %>",
|
|
"alternateName": "<%= Danbooru.config.description %>",
|
|
"url" : "<%= root_url %>"
|
|
}
|
|
</script>
|
|
<script>
|
|
if (typeof window.Danbooru !== "object") {
|
|
window.Danbooru = {};
|
|
}
|
|
|
|
window.Danbooru.notice = Danbooru.Utility.notice;
|
|
window.Danbooru.error = Danbooru.Utility.error;
|
|
|
|
window._paq = window._paq || [];
|
|
<% if CurrentUser.is_member? && !CurrentUser.opt_out_tracking? %>
|
|
window._paq.push(["setUserId", '<%= CurrentUser.id %>']);
|
|
<% end %>
|
|
window._paq.push(["setDomains", "*.donmai.us"]);
|
|
<% if !CurrentUser.opt_out_tracking? %>
|
|
window._paq.push(["setCustomVariable", 1, "level", <%= CurrentUser.level %>, "visit"]);
|
|
window._paq.push(["setCustomVariable", 2, "age", <%= ((Time.now - CurrentUser.created_at) / 1.year).to_i %>, "visit"]);
|
|
window._paq.push(["setCustomVariable", 3, "postUpdateCount", <%= CurrentUser.post_update_count.to_i / 100 %>, "visit"]);
|
|
window._paq.push(["setCustomVariable", 4, "favoriteCount", <%= CurrentUser.favorite_count.to_i / 100 %>, "visit"]);
|
|
<% end %>
|
|
</script>
|
|
<%= yield :html_header %>
|
|
<%= raw Danbooru.config.custom_html_header_content %>
|
|
</head>
|
|
<%= tag.body **body_attributes(CurrentUser.user) do %>
|
|
<%= render "news_updates/listing" %>
|
|
|
|
<header id="top">
|
|
<h1 id="app-name-header"><%= link_to Danbooru.config.app_name, "/" %></h1>
|
|
|
|
<div id="maintoggle" class="mobile-only">
|
|
<a href="#"><i id="maintoggle-on" class="fas fa-bars"></i></a>
|
|
<a href="#"><i id="maintoggle-off" class="fas fa-times" style="display: none;"></i></a>
|
|
</div>
|
|
|
|
<nav id="nav">
|
|
<%= render "layouts/main_links" %>
|
|
<% if content_for(:secondary_links).present? %>
|
|
<menu id="subnav-menu">
|
|
<%= yield :secondary_links %>
|
|
</menu>
|
|
<% end %>
|
|
</nav>
|
|
</header>
|
|
|
|
<div id="page">
|
|
<% if !CurrentUser.is_anonymous? && !CurrentUser.is_gold? && cookies[:hide_upgrade_account_notice].blank? && params[:action] != "upgrade_information" %>
|
|
<%= render "users/upgrade_notice" %>
|
|
<% end %>
|
|
|
|
<% if CurrentUser.user.is_banned? %>
|
|
<%= render "users/ban_notice" %>
|
|
<% end %>
|
|
|
|
<% if CurrentUser.has_mail? && CurrentUser.dmails.unread.first.present? && (cookies[:hide_dmail_notice].blank? || cookies[:hide_dmail_notice].to_i < CurrentUser.dmails.unread.first.id) %>
|
|
<%= render "users/dmail_notice" %>
|
|
<% end %>
|
|
|
|
<% if CurrentUser.user.can_approve_posts? %>
|
|
<%= render "moderator/post/queues/notice" %>
|
|
<% end %>
|
|
|
|
<div class="notice notice-info" id="notice" style="<%= "display: none;" unless flash[:notice] %>">
|
|
<span class="prose"><%= format_text(flash[:notice], inline: true) %>.</span>
|
|
<a href="#" id="close-notice-link">close</a>
|
|
</div>
|
|
|
|
<%= yield :layout %>
|
|
</div>
|
|
|
|
<%= render "static/footer" %>
|
|
<% end %>
|
|
</html>
|