regluit/frontend/templates/base.html

193 lines
8.5 KiB
HTML
Raw Normal View History

2016-05-11 14:36:20 +00:00
<!DOCTYPE html>
2018-01-30 03:56:18 +00:00
{% load truncatechars %}{% load sass_tags %}
<html>
<head>
2012-03-09 20:04:10 +00:00
<meta charset="utf-8" />
2015-06-04 19:15:59 +00:00
<meta name="referrer" content="origin" />
<title>unglue.it {% block title %}{% endblock %}</title>
2018-01-05 21:23:56 +00:00
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@unglueit" />
{% block extra_meta %}{% endblock %}
2018-01-30 03:56:18 +00:00
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/sitewide4.scss' %}" />
2011-11-15 18:54:13 +00:00
<link REL="SHORTCUT ICON" HREF="/static/images/favicon.ico">
{% block extra_css %}{% endblock %}
2012-03-08 02:47:40 +00:00
<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">
2015-08-18 15:03:49 +00:00
<p><a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}" class="nounderline">Feedback</a></p>
</div>
2012-05-21 14:03:56 +00:00
<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>
2012-05-21 14:03:56 +00:00
<div id="js-page-wrap">
2011-10-14 02:19:14 +00:00
<div id="js-header">
<div class="js-main">
<div class="js-logo">
2016-05-11 14:36:20 +00:00
<a href="{% url 'landing' %}"><img src="/static/images/logo.png" alt="unglue.it" title="unglue.it" /></a>
</div>
2016-04-26 18:38:32 +00:00
{% block search_box %}
{% if not suppress_search_box %}
<div class="js-search">
<div class="js-search-inner">
2015-04-28 03:24:02 +00:00
<form action="{% url 'search' %}" method="get">
<div class="inputalign">
2015-02-12 15:00:01 +00:00
<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 %}
2016-04-26 18:38:32 +00:00
{% endblock %}
2016-05-25 15:53:29 +00:00
{% block signin %}
2012-10-19 16:01:28 +00:00
{% if user.is_authenticated %}
<div class="js-topmenu" id="authenticated">
<ul class="menu">
<li>
2016-06-20 17:08:23 +00:00
<a class="notbutton" href="#"><span id="welcome">Hi, {{ user.username }} <i class="fa fa-chevron-down"> </i></span></a>
2012-10-19 16:01:28 +00:00
</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>
2012-10-19 16:01:28 +00:00
<ul id="user_menu">
2015-04-28 03:24:02 +00:00
<li><a class="notbutton" href="{% url 'supporter' user %}">My Faves</a></li>
2012-10-19 16:19:56 +00:00
<li>
<a class="notbutton" href="/notification"><span>Notices</span>
2012-10-19 16:19:56 +00:00
{% 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>
2015-04-28 03:24:02 +00:00
<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>
2014-04-09 19:11:34 +00:00
{% if user.rights_holder.all %}
2016-05-11 14:36:20 +00:00
<li><a class="notbutton" href="{% url 'rightsholders' %}">Rights Holder Tools</a></li>
2014-04-09 19:11:34 +00:00
{% endif %}
2015-04-28 03:24:02 +00:00
<li><a class="notbutton" href="{% url 'auth_logout' %}"><span>Sign Out</span></a></li>
2012-10-19 16:01:28 +00:00
</ul>
</div>
{% else %}
<div class="js-topmenu">
<ul class="menu">
2016-06-20 17:08:23 +00:00
<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 %}
2016-07-25 18:50:19 +00:00
{% if request.get_full_path != "/accounts/register/" %}
2015-04-28 03:24:02 +00:00
<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>
2016-07-25 18:50:19 +00:00
{% endif %}
{% endif %}
2012-10-19 16:01:28 +00:00
</ul>
</div>
{% endif %}
2016-05-25 15:53:29 +00:00
{% endblock %}
</div>
</div>
{% block news %}
{% endblock %}
{% block topsection %}{% endblock %}
{% block content %}{% endblock %}
2012-01-10 21:27:31 +00:00
</div>
{% block footer %}
2011-09-13 18:35:06 +00:00
<div id="footer">
<div class="js-main">
2011-11-15 21:14:09 +00:00
<div class="column">
<span>About Unglue.it</span>
2012-03-08 02:47:40 +00:00
<ul>
2016-05-11 14:36:20 +00:00
<li><a href="{% url 'about_specific' 'main' %}" class="hijax">Concept</a></li>
2016-04-12 18:32:22 +00:00
<li><a href="https://blog.unglue.it">Blog</a></li>
2016-05-11 14:36:20 +00:00
<li><a href="{% url 'press' %}">Press</a></li>
2012-10-19 16:01:28 +00:00
<li><a href="http://eepurl.com/fKLfI">Newsletter</a></li>
2012-03-08 02:47:40 +00:00
</ul>
2011-11-15 21:14:09 +00:00
</div>
<div class="column">
2012-03-08 02:47:40 +00:00
<span>Your account</span>
<ul>
2012-10-19 16:01:28 +00:00
{% if user.is_authenticated %}
2016-05-11 14:36:20 +00:00
<li><a href="{% url 'manage_account' %}">Account Settings</a></li>
2017-11-07 15:43:40 +00:00
<li><a href="{% url 'new_edition' '' '' %}">Add Books to Unglue.it</a></li>
2012-10-19 16:01:28 +00:00
{% endif %}
2017-11-07 15:43:40 +00:00
<li><a href="{% url 'rightsholders' %}">For Rights Holders</a></li>
2016-05-11 14:36:20 +00:00
<li><a href="{% url 'privacy' %}">Privacy</a></li>
<li><a href="{% url 'terms' %}">Terms of Use</a></li>
{% for library in user.libraries.all %}
2015-04-28 03:24:02 +00:00
<li><a href="{% url 'library_admin' library.id %}">{{ library }} Administration</a></li>
{% endfor %}
2012-10-19 16:01:28 +00:00
{% if user.is_staff %}
2016-05-11 14:36:20 +00:00
<li><a href="{% url 'rh_admin' %}">Unglue.it Administration</a></li>
2012-10-19 16:01:28 +00:00
{% endif %}
2012-03-08 02:47:40 +00:00
</ul>
2011-11-15 21:14:09 +00:00
</div>
<div class="column">
2012-03-08 02:47:40 +00:00
<span>Help</span>
<ul>
2016-05-11 14:36:20 +00:00
<li><a href="{% url 'faq' %}">General FAQ</a></li>
2015-04-28 03:24:02 +00:00
<li><a href="{% url 'faq_location' 'rightsholders' %}">Author/Publisher FAQ</a></li>
<li><a href="{% url 'api_help' %}">API</a></li>
2015-08-18 15:03:49 +00:00
<li><a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}">Support</a>
2017-11-18 21:35:19 +00:00
<li><a href="{% url 'libraries' %}">Unglue.it for Libraries</a>
2012-03-08 02:47:40 +00:00
</ul>
2011-11-15 21:14:09 +00:00
</div>
<div class="column">
2012-03-08 02:47:40 +00:00
<span>Contact</span>
<ul>
2018-04-25 15:23:29 +00:00
<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>
2012-03-08 02:47:40 +00:00
</ul>
2011-11-15 21:14:09 +00:00
</div>
2012-03-08 02:47:40 +00:00
</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>