regluit/frontend/templates/base.html

193 lines
8.5 KiB
HTML

<!DOCTYPE html>
{% load truncatechars %}{% load sass_tags %}
<html>
<head>
<meta charset="utf-8" />
<meta name="referrer" content="origin" />
<title>unglue.it {% block title %}{% endblock %}</title>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@unglueit" />
{% block extra_meta %}{% endblock %}
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/sitewide4.scss' %}" />
<link REL="SHORTCUT ICON" HREF="/static/images/favicon.ico">
{% block extra_css %}{% endblock %}
<script type="text/javascript" src="{{ jquery_home }}"></script>
<script type="text/javascript" src="/static/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/static/js/sitewide1.js"></script>
<script type="text/javascript" src="/static/js/watermark_init.js"></script>
<script type="text/javascript" src="/static/js/watermark_change.js"></script>
{% block extra_js %}
{% endblock %}
{% if show_langs %}
<script>
var $j = jQuery.noConflict();
$j(document).ready(function(){
$j('.show_langs').click(function(){
$j(this).next().toggle();
});
});
</script>
{% endif %}
{% block extra_head %}
{% endblock %}
</head>
<body>
<div id="feedback">
<p><a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}" class="nounderline">Feedback</a></p>
</div>
<div id="about_expandable">
<div id="about_collapser" class="collapser_x">X</div>
<div id="lightbox">
<!-- content will be inserted here by hijax.js -->
</div>
</div>
<div id="js-page-wrap">
<div id="js-header">
<div class="js-main">
<div class="js-logo">
<a href="{% url 'landing' %}"><img src="/static/images/logo.png" alt="unglue.it" title="unglue.it" /></a>
</div>
{% block search_box %}
{% if not suppress_search_box %}
<div class="js-search">
<div class="js-search-inner">
<form action="{% url 'search' %}" method="get">
<div class="inputalign">
<input type="text" id="nowatermark" size="25" onfocus="imgfocus()" onblur="imgblur(15)" class="inputbox" name="q" value="{{ q }}">
<input type="submit" class="button">
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}
{% block signin %}
{% if user.is_authenticated %}
<div class="js-topmenu" id="authenticated">
<ul class="menu">
<li>
<a class="notbutton" href="#"><span id="welcome">Hi, {{ user.username }} <i class="fa fa-chevron-down"> </i></span></a>
</li>
<li>{% block avatar %}
<img class="user-avatar" src="{{ user.profile.avatar_url }}" height=36 width="36" alt="Avatar for {{ user.username }}" title="{{ user.username }}" />{% endblock %}
{% if unseen_count %}
<a href="/notification"><span id="i_haz_notifications_badge">{{ unseen_count }}</span></a>
{% endif %}
</li>
</ul>
<ul id="user_menu">
<li><a class="notbutton" href="{% url 'supporter' user %}">My Faves</a></li>
<li>
<a class="notbutton" href="/notification"><span>Notices</span>
{% if unseen_count %}
<span id="i_haz_notifications" class="unseen_count">{{ unseen_count }}</span>
{% else %}
<span id="no_notifications_for_you" class="unseen_count">0</span>
{% endif %}
</a>
</li>
<li><a class="notbutton" href="{% url 'supporter' user %}#edit" id="profile_edit"><span>Profile Settings</span></a></li>
<li><a class="notbutton" href="{% url 'manage_account' %}"><span>Account &amp; Pledges</span></a></li>
{% if user.rights_holder.all %}
<li><a class="notbutton" href="{% url 'rightsholders' %}">Rights Holder Tools</a></li>
{% endif %}
<li><a class="notbutton" href="{% url 'auth_logout' %}"><span>Sign Out</span></a></li>
</ul>
</div>
{% else %}
<div class="js-topmenu">
<ul class="menu">
<li><a class="notbutton hijax" href="{% url 'superlogin' %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}"><span>Sign In</span></a></li>
{% if not suppress_search_box %}
{% if request.get_full_path != "/accounts/register/" %}
<li class="last"><a class="btn btn-signup" href="{% url 'registration_register' %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}">Sign Up <i class="fa fa-chevron-right"></i></a></li>
{% endif %}
{% endif %}
</ul>
</div>
{% endif %}
{% endblock %}
</div>
</div>
{% block news %}
{% endblock %}
{% block topsection %}{% endblock %}
{% block content %}{% endblock %}
</div>
{% block footer %}
<div id="footer">
<div class="js-main">
<div class="column">
<span>About Unglue.it</span>
<ul>
<li><a href="{% url 'about_specific' 'main' %}" class="hijax">Concept</a></li>
<li><a href="https://blog.unglue.it">Blog</a></li>
<li><a href="{% url 'press' %}">Press</a></li>
<li><a href="http://eepurl.com/fKLfI">Newsletter</a></li>
</ul>
</div>
<div class="column">
<span>Your account</span>
<ul>
{% if user.is_authenticated %}
<li><a href="{% url 'manage_account' %}">Account Settings</a></li>
<li><a href="{% url 'new_edition' '' '' %}">Add Books to Unglue.it</a></li>
{% endif %}
<li><a href="{% url 'rightsholders' %}">For Rights Holders</a></li>
<li><a href="{% url 'privacy' %}">Privacy</a></li>
<li><a href="{% url 'terms' %}">Terms of Use</a></li>
{% for library in user.libraries.all %}
<li><a href="{% url 'library_admin' library.id %}">{{ library }} Administration</a></li>
{% endfor %}
{% if user.is_staff %}
<li><a href="{% url 'rh_admin' %}">Unglue.it Administration</a></li>
{% endif %}
</ul>
</div>
<div class="column">
<span>Help</span>
<ul>
<li><a href="{% url 'faq' %}">General FAQ</a></li>
<li><a href="{% url 'faq_location' 'rightsholders' %}">Author/Publisher FAQ</a></li>
<li><a href="{% url 'api_help' %}">API</a></li>
<li><a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}">Support</a>
<li><a href="{% url 'libraries' %}">Unglue.it for Libraries</a>
</ul>
</div>
<div class="column">
<span>Contact</span>
<ul>
<li> <a href="mailto:info@ebookfoundation.org"><i class="fa fa-envelope fa-2x"></i></a> <a href="https://twitter.com/unglueit"><i class="fa fa-twitter fa-2x"></i></a> <a href="https://facebook/com/unglueit"><i class="fa fa-facebook fa-2x"></i></a></li>
</ul>
</div>
</div>
</div>
{% endblock %}
{% block counter %}
{% if show_google_analytics %}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-28369982-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{% endif %}
{% endblock %}
</body>
</html>