Raw / Raw Nice.
parent
d105dd57d6
commit
e7b06a91a0
|
@ -0,0 +1,12 @@
|
|||
body {
|
||||
margin: 0;
|
||||
}
|
||||
div.highlight, div.linenodiv {
|
||||
margin-top: -8px;
|
||||
}
|
||||
div.linenodiv {
|
||||
padding-right: 5px;
|
||||
}
|
||||
div.highlight > pre, div.linenodiv > pre {
|
||||
margin-bottom: 5px;
|
||||
}
|
|
@ -1 +1,14 @@
|
|||
{{ snipt.code|safe }}
|
||||
{% if 'nice' not in request.GET %}{{ snipt.code|safe }}{% else %}<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{{ snipt.title }}</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/raw.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/themes.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="autumn">
|
||||
{{ snipt.stylized|safe }}
|
||||
</div>
|
||||
</body>
|
||||
</html>{% endif %}
|
||||
|
|
|
@ -87,7 +87,10 @@
|
|||
<% if (snipt.public) { %>
|
||||
<li class="comments"><a href="<%= snipt.absolute_url %>#disqus_thread" data-disqus-identifier="<%= snipt.id %>"></a></li>
|
||||
<% } %>
|
||||
<li class="raw"><a href="<%= snipt.raw_url %>">Raw</a></li>
|
||||
<li class="raw">
|
||||
<a href="<%= snipt.raw_url %>">Raw</a> /
|
||||
<a href="<%= snipt.raw_url %>?nice">Raw Nice</a>
|
||||
</li>
|
||||
</ul>
|
||||
</footer>
|
||||
<div class="modal hide copy-modal">
|
||||
|
|
|
@ -173,7 +173,10 @@
|
|||
{% if snipt.public %}
|
||||
<li class="comments"><a href="{{ snipt.get_full_absolute_url }}#disqus_thread" data-disqus-identifier="{{ snipt.pk }}"></a></li>
|
||||
{% endif %}
|
||||
<li class="raw"><a href="{{ snipt.get_raw_url }}">Raw</a></li>
|
||||
<li class="raw">
|
||||
<a href="{{ snipt.get_raw_url }}">Raw</a> /
|
||||
<a href="{{ snipt.get_raw_url }}?nice">Raw Nice</a>
|
||||
</li>
|
||||
{% if detail and snipt.public %}
|
||||
<li class="tweet">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-dnt="true" data-count="none" data-url="{{ snipt.get_full_absolute_url }}" data-text="“{{ snipt.title }}” on @Snipt">Tweet</a>
|
||||
|
|
|
@ -244,6 +244,9 @@ def raw(request, snipt_key):
|
|||
else:
|
||||
mimetype='text/plain'
|
||||
|
||||
if 'nice' in request.GET:
|
||||
mimetype='text/html'
|
||||
|
||||
return render_to_response('snipts/raw.html',
|
||||
{'snipt': snipt},
|
||||
context_instance=RequestContext(request),
|
||||
|
|
Loading…
Reference in New Issue