snipt/snipt/templates/base.html

158 lines
6.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en" class="{% block html-class %}{% endblock %}">
<head>
<title>{% block page-title %}Snipt{% endblock %}</title>
<meta charset="utf-8" />
<meta name="description" content="Long-term memory for coders. Share and store code snippets." />
{% if debug %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/reset.css" />
<link rel="stylesheet/less" href="{{ STATIC_URL }}css/style.less" />
<link rel="stylesheet" href="{{ STATIC_URL }}css/bootstrap.css" />
<link rel="stylesheet" href="{{ STATIC_URL }}css/themes.css" />
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/a_underscore.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/b_jquery.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/c_json2.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/d_backbone.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/e_bootstrap.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/plugins/jquery.infieldlabel.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/plugins/jquery.hotkeys.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/plugins/jquery.ui.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/src/application.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/src/modules/site.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/src/modules/snipt.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}css/less.js"></script>
{% else %}
<link rel="stylesheet" href="{{ STATIC_URL }}cache/snipt.css" />
<script type="text/javascript" src="{{ STATIC_URL }}cache/snipt.js"></script>
{% endif %}
<!--[if IE]>
<style type="text/css">
.group {
display: block;
zoom: 1;
}
</style>
<![endif]-->
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body class="{% block body-class %}{% endblock %}">
<header class="main">
<div class="inner">
<div class="shadey"></div>
<h1><a href="/">Snipt</a></h1>
<form class="search" action="/public/search/" method="get">
<fieldset>
<div class="fields infield">
<label for="search-query">Search public snipts</label>
<input type="text" id="search-query" name="q" value="" />
</div>
</fieldset>
</form>
<nav class="public">
<ul>
<li>
<a href="/public/" {% if '/public/' in request.path or not request.user.is_authenticated %} class="active"{% endif %}>Public snipts</a>
</li>
{% if not request.user.is_authenticated %}
<li>
<a href="/login/">Log in</a>
</li>
<li>
<a href="/signup/">Sign up</a>
</li>
{% else %}
<li>
<a href="/" {% if request.user.username in request.path %} class="active"{% endif %}>My snipts</a>
</li>
{% endif %}
</ul>
</nav>
<aside class="nav"></aside>
</div>
</header>
<header class="sub">
<div class="inner group">
<ul class="bcrumb">
<li class="prompt">/</li>
{% block breadcrumb %}{% endblock %}
</ul>
<div class="shortcuts">
Type "?" for KB shortcuts
</div>
</div>
</header>
<section class="main group">
<div class="inner">
{% block content %}{% endblock %}
</div>
{% block aside %}
<aside class="main">
<section class="ad">
<div class="asset">
<a href="http://www.adsbycoffee.org/">
<img src="https://snipt.s3.amazonaws.com/images/ad.png" alt="" />
Ads by Coffee is a non-profit advertising agency exclusively for charity organizations.
</a>
</div>
<div class="meta">
<a href="http://www.adsbycoffee.org/">Ads by Coffee</a>
</div>
</section>
{% block tags %}{% endblock %}
<nav class="footer">
<ul>
<li class="api">
<a href="/api/">API</a>
</li>
<li class="twitter">
<a href="https://twitter.com/#!/snipt">@snipt</a>
</li>
<li class="twitter">
<a href="https://twitter.com/#!/nicksergeant">@nicksergeant</a>
</li>
<li class="twitter">
<a href="https://twitter.com/#!/nickadamssays">@nickadamssays</a>
</li>
</ul>
</nav>
</aside>
{% endblock %}
<div class="left-y ruler"></div>
<div class="right-y ruler"></div>
</section>
<div class="modal hide" id="keyboard-shortcuts">
<div class="modal-header">
<a href="#" class="close js-dismiss">×</a>
<h3>Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<a href="#" class="btn primary">Save changes</a>
<a href="#" class="btn">Close</a>
</div>
</div>
{% if not debug %}
<script type="text/javascript">
//<![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-514462-44']);
_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';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
})();
//]]>
</script>
{% endif %}
</body>
</html>