64 lines
2.6 KiB
HTML
64 lines
2.6 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block page-title %}/ {% if snipt.title %}{{ snipt.title }}{% else %}Untitled{% endif %} / {{ user.username }} - {{ block.super }}{% endblock %}
|
|
{% block html-class %}detail{% endblock %}
|
|
{% block body-class %}{% if request.path == '/api/' and request.user.is_authenticated %}api{% else %}detail{% endif %}{% endblock %}
|
|
|
|
{% block js %}
|
|
{{ block.super }}
|
|
window.detail = true;
|
|
{% endblock %}
|
|
|
|
{% block breadcrumb %}
|
|
<li><a href="/{{ user.username }}/">{{ user.username }}</a></li>
|
|
<li><span class="prompt">/</span> <a href="{{ snipt.get_absolute_url }}">{{ snipt.title }}</a></li>
|
|
{% endblock %}
|
|
|
|
{% block aside %}
|
|
{% if request.path == '/api/' and request.user.is_authenticated %}
|
|
{{ block.super }}
|
|
<aside class="api-info api-creds">
|
|
<div class="api-inner">
|
|
<h5>Your API credentials:</h5>
|
|
<ul>
|
|
<li>Username: <strong>{{ request.user.username }}</strong></li>
|
|
<li>User ID: <strong>{{ request.user.id }}</strong></li>
|
|
<li>API Key: <br /><input type="text" value="{{ request.user.api_key.key }}" /></li>
|
|
</ul>
|
|
</div>
|
|
</aside>
|
|
<aside class="api-info immediate-help">
|
|
<div class="api-inner">
|
|
<h5>Need immediate help?</h5>
|
|
<p>Join our lead developer “nicksergeant” in <strong>#snipt</strong> on irc.freenode.net.</p>
|
|
</div>
|
|
</aside>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="snipts" id="snipts">
|
|
{% with 'true' as detail %}
|
|
{% include "snipts/snipt-list.html" %}
|
|
{% endwith %}
|
|
{% if not debug %}
|
|
<div id="disqus_thread"></div>
|
|
<script type="text/javascript">
|
|
var disqus_shortname = 'snipt-net';
|
|
{% if debug %}
|
|
var disqus_developer = 1;
|
|
{% endif %}
|
|
var disqus_url = '{{ snipt.get_full_absolute_url }}{% if not snipt.public %}?key={{ snipt.key }}{% endif %}';
|
|
var disqus_title = '{{ snipt.title }}';
|
|
var disqus_identifier = {{ snipt.id }};
|
|
|
|
(function() {
|
|
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
|
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
|
|
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
|
})();
|
|
</script>
|
|
{% endif %}
|
|
</section>
|
|
{% endblock %}
|