snipt/snipts/templates/snipts/snipt-edit-js-template.html

75 lines
3.7 KiB
HTML
Raw Normal View History

2012-04-22 20:03:50 -07:00
{% load verbatim snipt_tags %}
{% get_lexers as 'lexers' %}
2012-03-09 21:57:53 -08:00
{% verbatim %}
<script id="edit" type="text/html">
<header class="fixed-save">
<div class="inner group">
2012-04-07 21:52:10 -07:00
<% if (snipt.id) { %>
<button class="delete btn btn-secondary">Delete</button>
<% } %>
2012-05-03 19:46:40 -07:00
<button class="save-and-close btn btn-success">Save and Close</button>
2012-03-09 21:57:53 -08:00
<button class="save btn btn-success">Save</button>
<button class="cancel btn btn-secondary">Cancel</button>
</div>
</header>
<div class="inner">
<section class="snipts" id="snipts">
2012-03-20 20:00:49 -07:00
<article id="snipt-<%= snipt.id %>" class="snipt editing">
2012-04-07 21:52:10 -07:00
<% if (snipt.id) { %>
<div class="number">#<%= snipt.id %></div>
<% } %>
2012-03-09 21:57:53 -08:00
<div class="group">
<div class="container">
<header>
<h2>&nbsp;</h2>
<h1>
2012-05-27 11:51:21 -07:00
<input type="text" id="snipt_title" placeholder="Title" value="<% if (snipt.title != 'Untitled') { %><%= snipt.title %><% } %>" />
</h1>
2012-03-09 21:57:53 -08:00
</header>
<section class="code">
<div id="editor"><%= snipt.code %></div>
</section>
<div class="ruler top-x"></div>
<div class="ruler bottom-x"></div>
</div>
<aside>
2012-03-12 20:48:01 -07:00
<div class="in">
2012-03-12 17:21:42 -07:00
<label class="lexer">
2012-03-12 20:48:01 -07:00
<span>Type</span>
2012-03-12 17:21:42 -07:00
<select name="lexer" id="id_lexer">
{% endverbatim %}
{% for lexer in lexers %}
<option value="{{ lexer.1.0 }}">{{ lexer.0 }}</option>
{% endfor %}
{% verbatim %}
</select>
</label>
2012-03-12 20:48:01 -07:00
<label class="public is-private">
2012-04-07 16:11:05 -07:00
<input type="checkbox" <% if (snipt.public) { %>checked="checked"<% } %> name="" value="" />
2012-03-12 20:48:01 -07:00
<span>Public</span>
2012-03-09 21:57:53 -08:00
</label>
2012-05-25 08:05:47 -07:00
<label class="blog-post is-blog-post">
<input type="checkbox" <% if (snipt.blog_post) { %>checked="checked"<% } %> name="" value="" />
<span>Blog post</span>
</label>
2012-05-27 11:51:21 -07:00
<label class="publish-date hidden">
<span>Publish date</span>
<input type="text" placeholder="now, 8pm, tomorrow, 12/25/07, etc." value="<%= snipt.publish_date %>" />
</label>
2012-03-12 20:48:01 -07:00
<label class="tags">
<span>Tags</span>
2012-05-27 11:51:21 -07:00
<textarea placeholder='tag-1, "tag 2", tag3, etc.'><%= snipt.tags_list %></textarea>
2012-03-12 17:21:42 -07:00
</label>
2012-03-09 21:57:53 -08:00
</div>
</aside>
</div>
</article>
</section>
</div>
<div class="left-y ruler"></div>
<div class="right-y ruler"></div>
</script>
{% endverbatim %}