regluit/frontend/templates/base.html

219 lines
8.9 KiB
HTML

<!DOCTYPE html>
{# raw url references raise test errors in tests for django registration; this is a workaround #}
{% url privacy as privacyurl %}
{% url terms as termsurl %}
{% url manage_account as editurl %}
{% url rightsholders as rhtoolsurl %}
{% url faq as faqurl %}
{% url about as abouturl %}
{% url press as pressurl %}
{% url rh_admin as adminurl %}
{% url landing as landingurl %}
{% url new_edition '' '' as editionurl %}
{% load truncatechars %}
<html>
<head>
<meta charset="utf-8" />
<title>unglue.it {% block title %}{% endblock %}</title>
<link type="text/css" rel="stylesheet" href="/static/css/sitewide2.css" />
<link REL="SHORTCUT ICON" HREF="/static/images/favicon.ico">
{% block extra_css %}{% endblock %}
{% block base_js %}
<script type="text/javascript" src="{{ jquery_home }}"></script>
{% endblock %}
<script type="text/javascript" src="/static/js/hijax.js?v=1"></script>
{% block extra_js %}
{% endblock %}
<script type="text/javascript" src="/static/js/watermark_init.js"></script>
<script type="text/javascript" src="/static/js/watermark_change.js"></script>
{% if show_langs %}
<script>
var $j = jQuery.noConflict();
$j(document).ready(function(){
$j('.show_langs').click(function(){
$j(this).next().toggle();
});
});
</script>
{% endif %}
<script>
var $j = jQuery.noConflict();
$j(document).ready(function(){
// make drop-down menu happen when they click on their name
$j('#authenticated').click(function(){
$j('#user_menu').toggle();
$j(this).toggleClass('highlight');
});
// but suppress it if they're clicking on the badge link to the notifications page
$j('#i_haz_notifications_badge').click(function() {
event.stopPropagation();
});
});
</script>
{% 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>
<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="{{ 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">
<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 %}
{% if user.is_authenticated %}
<div class="js-topmenu" id="authenticated">
<ul class="menu">
<li>
<a href="#"><span id="welcome">Hi, {{ user.username }}</span></a>
</li>
<li>
{% if user.profile.pic_url %}
<img class="user-avatar" src="{{ user.profile.pic_url }}" height=36 width="36" alt="Picture of {{ user.username }}" title="{{ user.username }}" />
{% else %}
<img class="user-avatar" src="/static/images/header/avatar.png" height="36" width="36" alt="Generic Ungluer Avatar" title="Ungluer" />
{% endif %}
{% 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 href="{% url supporter supporter_username=user.username %}">Wishlist</a></li>
<li>
<a href="/notification"><span>Messages</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 href="{% url supporter supporter_username=user.username %}#edit" id="profile_edit"><span>Profile Settings</span></a></li>
<li><a href="{% url manage_account %}"><span>Account &amp; Pledges</span></a></li>
<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 auth_login %}?next={% firstof request.path '/' %}" 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 %}"><span>Sign Up</span></a></li>
{% endifnotequal %}
{% endif %}
</ul>
</div>
{% endif %}
</div>
</div>
{% block news %}
<div class="launch_top">
We unglued <a href="/work/81834/">one book</a>. Amazon <a href="http://blog.unglue.it/2012/08/09/open-thread-amazon-forces-unglue-it-to-suspend-crowdfunding-for-creative-commons-ebooks/">shut us down</a>. Now we're back. Help us unglue <a href="https://unglue.it/campaigns/ending">four more books</a>! <br />
</div>
{% 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="/about/main/" class="hijax">Concept</a></li>
<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>
</ul>
</div>
<div class="column">
<span>Your account</span>
<ul>
{% 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>
{% if user.is_staff %}
<li><a href="{{ adminurl }}">Unglue.it Administration</a></li>
<li><a href="{{ editionurl }}">Create New Editions</a></li>
{% endif %}
</ul>
</div>
<div class="column">
<span>Help</span>
<ul>
<li><a href="{{ faqurl }}">General FAQ</a></li>
<li><a href="/faq/rightsholders/">Rights Holder FAQ</a></li>
<li><a href="{% url api_help %}">API</a></li>
<li><a href="mailto:support@gluejar.com">support@gluejar.com</a>
</ul>
</div>
<div class="column">
<span>Contact</span>
<ul>
<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>
</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>