regluit/frontend/templates/base.html

209 lines
8.6 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
{# raw url references raise test errors in tests for django registration; this is a workaround #}
{% url privacy as privacyurl %}
2011-12-16 22:19:59 +00:00
{% url terms as termsurl %}
{% url manage_account as editurl %}
{% url rightsholders as rhtoolsurl %}
{% url faq as faqurl %}
2012-01-15 18:19:35 +00:00
{% url about as abouturl %}
{% url press as pressurl %}
{% url rh_admin as adminurl %}
{% url landing as landingurl %}
{% url new_edition '' '' as editionurl %}
2013-01-27 01:35:52 +00:00
{% url libraries as librariesurl %}
{% url about_specific 'main' as aboutmainurl %}
{% load truncatechars %}
<html>
<head>
2012-03-09 20:04:10 +00:00
<meta charset="utf-8" />
<title>unglue.it {% block title %}{% endblock %}</title>
2013-05-24 18:54:05 +00:00
<link type="text/css" rel="stylesheet" href="/static/css/sitewide4.css" />
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">
<p><a href="/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">
<a href="{{ landingurl }}"><img src="/static/images/logo.png" alt="unglue.it" title="unglue.it" /></a>
</div>
{% if not suppress_search_box %}
<div class="js-search">
<div class="js-search-inner">
<form action="{% url search %}" method="get">
<div class="inputalign">
2011-12-12 21:09:18 +00:00
<input type="text" id="watermark" size="25" onfocus="imgfocus()" onblur="imgblur(15)" class="inputbox" name="q" value="{{ q }}">
<input type="submit" class="button">
</div>
</form>
</div>
</div>
{% endif %}
2012-10-19 16:01:28 +00:00
{% if user.is_authenticated %}
<div class="js-topmenu" id="authenticated">
<ul class="menu">
<li>
<a href="#"><span id="welcome">Hi, {{ user.username }}</span></a>
2012-10-19 16:01:28 +00:00
</li>
2012-11-20 20:28:45 +00:00
<li>
<img class="user-avatar" src="{{ user.profile.avatar_url }}" height=36 width="36" alt="Avatar for {{ user.username }}" title="{{ user.username }}" />
{% 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">
<li><a href="{% url supporter user %}">My Books</a></li>
2012-10-19 16:19:56 +00:00
<li>
<a 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>
<li><a href="{% url supporter user %}#edit" id="profile_edit"><span>Profile Settings</span></a></li>
2012-11-20 18:40:25 +00:00
<li><a href="{% url manage_account %}"><span>Account &amp; Pledges</span></a></li>
2012-10-19 16:01:28 +00:00
<li><a href="{% url auth_logout %}"><span>Sign Out</span></a></li>
</ul>
</div>
{% else %}
<div class="js-topmenu">
<ul class="menu">
<li><a href="{% url superlogin %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}" class="hijax"><span>Sign In</span></a></li>
{% if not suppress_search_box %}
{% ifnotequal request.get_full_path "/accounts/register/" %}
{% comment %}
don't display this on landing page where it's superseded by big signup box in splash area
{% endcomment %}
<li id="expander" class="last"><a href="{% url registration_register %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}"><span>Sign Up</span></a></li>
{% endifnotequal %}
{% endif %}
2012-10-19 16:01:28 +00:00
</ul>
</div>
{% endif %}
</div>
</div>
{% block news %}
{% if not suppress_search_box %}
{% comment %}
2012-09-11 18:03:33 +00:00
<div class="launch_top">
2013-12-26 00:38:37 +00:00
Happy <a href="https://twitter.com/ebookday">#ebookday</a>! We're celebrating with a list of <a href="{% url cc_list%}">Creative Commons eBooks</a>
</div>
{% endcomment %}
{% endif %}
{% 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>
<li><a href="{{ aboutmainurl }}" class="hijax">Concept</a></li>
2012-10-19 16:01:28 +00:00
<li><a href="{{ abouturl }}">Team</a></li>
<li><a href="http://blog.unglue.it">Blog</a></li>
<li><a href="{{ pressurl }}">Press</a></li>
<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 %}
<li><a href="{{ editurl }}">Account Settings</a></li>
{% endif %}
<li><a href="{{ rhtoolsurl }}">Rights Holder Tools</a></li>
<li><a href="{{ privacyurl }}">Privacy</a></li>
<li><a href="{{ termsurl }}">Terms of Use</a></li>
{% for library in user.libraries.all %}
<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 %}
<li><a href="{{ adminurl }}">Unglue.it Administration</a></li>
<li><a href="{{ editionurl }}">Create New Editions</a></li>
{% 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>
2012-10-19 16:01:28 +00:00
<li><a href="{{ faqurl }}">General FAQ</a></li>
<li><a href="{% url faq_location 'rightsholders' %}">Author/Publisher FAQ</a></li>
2012-10-19 16:01:28 +00:00
<li><a href="{% url api_help %}">API</a></li>
<li><a href="mailto:support@gluejar.com">support@gluejar.com</a>
2013-01-27 01:35:52 +00:00
<li><a href="{{ librariesurl }}">Unglue.it &hearts; 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>
2012-10-19 16:01:28 +00:00
<li>General inquiries</li>
<li><a href="mailto:faq@gluejar.com">faq@gluejar.com</a></li>
<li>Rights Holders</li>
<li><a href="mailto:rights@gluejar.com">rights@gluejar.com</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>