]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blame - www/templates/admin-planet-compose.html
Import of new website.
[people/shoehn/ipfire.org.git] / www / templates / admin-planet-compose.html
CommitLineData
feb02477
MT
1{% extends "admin-base.html" %}
2
3{% block content %}
4 <div class="post">
5 <h3>{{ _("Compose new entry") }}</h3>
6 <form name="entry" method="post">
7 {{ xsrf_form_html() }}
8 <input type="hidden" name="id" value="{{ entry.id }}">
9
10 <table>
11 <tr>
12 <td>{{ _("Title") }}</td>
13 <td><input type="text" name="title" value="{{ entry.title }}"
14 size="50" /></td>
15 </tr>
16 <tr>
17 <td>&nbsp;</td>
18 <td>
940227cb 19 <textarea id="markdown" name="markdown" rows="20" cols="80">{{ entry.markdown }}</textarea>
feb02477
MT
20 </td>
21 </tr>
22 <tr>
23 <td colspan="2">
24 <input type="button" onClick="preview()" value="{{ _("Preview") }}" />
25 <input type="submit" value="{{ _("Save") }}" />
26 </td>
27 </tr>
28 </table>
29 </form>
30 </div>
31
32 <div id="preview"></div>
33{% end block %}
34
35{% block javascript %}
36 <script type="text/javascript">
37 preview = function() {
940227cb 38 $.get("/api/planet/render", { text : $("#markdown").val() },
feb02477
MT
39 function(data) {
40 $("#preview").html(data);
41 }
42 );
43 }
44 </script>
45{% end block %}
46
47{% block sidebar %}
48 <h4>Syntax info</h4>
49 <ul>
50 <li>
51 <a href="http://de.wikipedia.org/wiki/Markdown" target="_blank">Wikipedia</a>
52 </li>
53 </ul>
54{% end block %}