From e7b06a91a092e31bd9aa237a54167d2b55e56d67 Mon Sep 17 00:00:00 2001 From: Nick Sergeant Date: Fri, 15 Mar 2013 14:58:56 -0400 Subject: [PATCH] Raw / Raw Nice. --- media/css/raw.css | 12 ++++++++++++ snipts/templates/snipts/raw.html | 15 ++++++++++++++- snipts/templates/snipts/snipt-js-template.html | 5 ++++- snipts/templates/snipts/snipt-list.html | 5 ++++- snipts/views.py | 3 +++ 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 media/css/raw.css diff --git a/media/css/raw.css b/media/css/raw.css new file mode 100644 index 0000000..844955d --- /dev/null +++ b/media/css/raw.css @@ -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; +} diff --git a/snipts/templates/snipts/raw.html b/snipts/templates/snipts/raw.html index 5616f6e..e6f3dba 100644 --- a/snipts/templates/snipts/raw.html +++ b/snipts/templates/snipts/raw.html @@ -1 +1,14 @@ -{{ snipt.code|safe }} +{% if 'nice' not in request.GET %}{{ snipt.code|safe }}{% else %} + + + {{ snipt.title }} + + + + + +
+ {{ snipt.stylized|safe }} +
+ +{% endif %} diff --git a/snipts/templates/snipts/snipt-js-template.html b/snipts/templates/snipts/snipt-js-template.html index f2ef8c5..2294389 100644 --- a/snipts/templates/snipts/snipt-js-template.html +++ b/snipts/templates/snipts/snipt-js-template.html @@ -87,7 +87,10 @@ <% if (snipt.public) { %>
  • <% } %> -
  • Raw
  • +
  • + Raw / + Raw Nice +