Initial commit
This commit is contained in:
9
denote/templates/add_user.html
Normal file
9
denote/templates/add_user.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/user/add" method="post">{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" name="add" value="Add" />
|
||||
<input type="submit" name="cancel" value="Cancel" />
|
||||
</form>
|
||||
{% endblock %}
|
24
denote/templates/base.html
Normal file
24
denote/templates/base.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Dénote{% if user.get_full_name|length != 0 %} - {{ user.get_full_name }}{% endif %}</title>
|
||||
<link rel="icon" type="image/png" href="{{ STATIC_URL }}images/favicon.png" />
|
||||
{% block head %} {% endblock %}
|
||||
<link href="{{ STATIC_URL }}css/denote.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/denote.js"> </script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Header -->
|
||||
<div class="settings"><a href="/user/edit">Settings</a> <a href="/disconnect">Disconnect</a></div>
|
||||
<!-- Left panel -->
|
||||
<div id="left_panel">
|
||||
<a id="home_icon" href="/" alt="Home"><img src="{{ STATIC_URL }}images/home.png"/></a><br/><br/>
|
||||
</div>
|
||||
<div id="main_panel">
|
||||
<div id="content">
|
||||
{% block content %} {% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<br/><br/><br/>
|
||||
<center><a href="http://indefero.soutade.fr/p/denote">Dénote</a> 0.1</center>
|
||||
</body>
|
||||
</html>
|
75
denote/templates/base_user.html
Normal file
75
denote/templates/base_user.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Dénote{% if user.get_full_name|length != 0 %} - {{ user.get_full_name }}{% endif %}</title>
|
||||
<link rel="icon" type="image/png" href="{{ STATIC_URL }}images/favicon.png" />
|
||||
{% block head %} {% endblock %}
|
||||
<link href="{{ STATIC_URL }}css/denote.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="{{ STATIC_URL }}css/pygments.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}js/denote.js"> </script>
|
||||
<script type="text/javascript">
|
||||
var hidden_categories = "{{ user.hidden_categories }}";
|
||||
hidden_categories = hidden_categories.split(",");
|
||||
function get_csrf_token() { return '{{ csrf_token }}';}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="startup();">
|
||||
<!-- Header -->
|
||||
<div class="settings"><a href="/user/edit">Settings</a> <a href="/disconnect">Disconnect</a></div>
|
||||
<!-- Left panel -->
|
||||
<div id="left_panel">
|
||||
<a id="home_icon" href="/" alt="Home"><img src="{{ STATIC_URL }}images/home.png"/></a><br/><br/>
|
||||
<a href="/note/add">Add a note</a>
|
||||
<div id="categories">
|
||||
{% for meta_note in notes_by_category %}
|
||||
<div class="category" category_id="{{ meta_note.category_id }}">
|
||||
<div id="category_{{ meta_note.category_id }}" class="name" ondblclick="edit_category({{ meta_note.category_id }}, '{{ meta_note.category }}')">
|
||||
<img id="minus_{{ meta_note.category_id }}" src="{{ STATIC_URL }}images/denote_minus.png" onclick="hide_category({{ meta_note.category_id }});"/><img id="plus_{{ meta_note.category_id }}" src="{{ STATIC_URL }}images/denote_plus.png" onclick="show_category({{ meta_note.category_id }});"/>{{ meta_note.category }} ({{ meta_note.notes|length }})
|
||||
</div>
|
||||
<div class="edit_category" id="edit_category_{{ meta_note.category_id }}">
|
||||
<form id="form_edit_category_{{ meta_note.category_id }}" action="/category/edit/{{ meta_note.category_id }}" method="post" onsubmit="return submit_category_name({{ meta_note.category_id }}, '{{ meta_note.category }}');">
|
||||
{% csrf_token %}
|
||||
<input id="cat_name_{{ meta_note.category_id }}" onkeypress="handleKeyPress(event, {{ meta_note.category_id }}, '{{ meta_note.category }}')" onblur="end_edit_category({{ meta_note.category_id }})" name="new_cat_name"/>
|
||||
</form>
|
||||
</div>
|
||||
<div id="content_{{ meta_note.category_id }}" class="content" >
|
||||
{% for note in meta_note.notes %}
|
||||
<div class="note">
|
||||
<a href="/note/{{ note.id}}"><div class="title">{{ note.title }}</div></a>
|
||||
<div class="date">{{ note.created_date }}</div>
|
||||
<div class="summary">{{ note.short_summary }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% if notes_without_category|length != 0 %}
|
||||
<div class="category" category_id="-1">
|
||||
<div id="category_-1" class="name">
|
||||
<img id="minus_-1" src="{{ STATIC_URL }}images/denote_minus.png" onclick="hide_category(-1);"/><img id="plus_-1" src="{{ STATIC_URL }}images/denote_plus.png" onclick="show_category(-1);"/>Other ({{ notes_without_category|length }})</div>
|
||||
<div id="content_-1" class="content">
|
||||
{% for note in notes_without_category %}
|
||||
<div class="note">
|
||||
<a href="/note/{{ note.id}}"><div class="title">{{ note.title }}</div></a>
|
||||
<div class="date">{{ note.created_date }}</div>
|
||||
<div class="summary">{{ note.short_summary }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{% if notes_by_category|length == 0 %}
|
||||
<b>Any note</b>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Main panel -->
|
||||
<div id="main_panel">
|
||||
<div id="content">
|
||||
{% block content %} {% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<br/><br/><br/>
|
||||
<center><a href="http://indefero.soutade.fr/p/denote">Dénote</a> 0.1</center>
|
||||
</body>
|
||||
</html>
|
13
denote/templates/edit_user.html
Normal file
13
denote/templates/edit_user.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="edit_profile">Edit your profile<br/><br/></div>
|
||||
{% if edited %}
|
||||
<p class="edited">User successfuly updated</p>
|
||||
{% endif %}
|
||||
<form action="/user/edit" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" name="edit" value="Edit" /><input type="submit" name="cancel" value="Cancel" /><input type="submit" name="delete" value="Delete" onclick="return confirm('Do you really want to delete your account ?')"/>
|
||||
</form>
|
||||
{% endblock %}
|
34
denote/templates/login.html
Normal file
34
denote/templates/login.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Dénote</title>
|
||||
<link rel="icon" type="image/png" href="{{ STATIC_URL }}images/favicon.png" />
|
||||
<link href="{{ STATIC_URL }}css/denote.css" rel="stylesheet" type="text/css"/>
|
||||
<style type="text/css">
|
||||
div.form {
|
||||
margin-left:40%;
|
||||
}
|
||||
|
||||
#login_failed {
|
||||
color:red;
|
||||
font-weight:bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="logo">
|
||||
<a href="http://indefero.soutade.fr/p/denote"><img src="{{ STATIC_URL }}images/denote_logo.png"/></a>
|
||||
</div>
|
||||
<div class="form">
|
||||
<form method="post" action="/index">
|
||||
{% csrf_token %}
|
||||
{% if login_failed %} <p id="login_failed">Login or password is invalid</p> {% endif %}
|
||||
<table>
|
||||
<tr><td>Login</td><td><input type="text" name="login"/></td></tr>
|
||||
<tr><td>Password</td><td><input id="password" type="password" name="password"/></td></tr>
|
||||
<tr><td/><td><input type="submit" value="Connect"/></td></tr>
|
||||
<tr><td/><td><a href="/user/add">Create an account</a></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
15
denote/templates/user_index.html
Normal file
15
denote/templates/user_index.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends "base_user.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% for note in notes %}
|
||||
<div class="note">
|
||||
{% if note.category != None %}
|
||||
<div class="title"><a href="/note/{{ note.id }}">{{ note.title }} [{{ note.category.name }}]</a></div>
|
||||
{% else %}
|
||||
<div class="title"><a href="/note/{{ note.id }}">{{ note.title }}</a></div>
|
||||
{% endif %}
|
||||
<div class="date">{{ note.modified_date }}</div>
|
||||
<div class="summary">{{ note.long_summary }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
136
denote/templates/user_note.html
Normal file
136
denote/templates/user_note.html
Normal file
@@ -0,0 +1,136 @@
|
||||
{% extends "base_user.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="note">
|
||||
{% if note != None %}
|
||||
<div id="title" class="title" ondblclick="edit_note();">{{ note.title }}</div>
|
||||
{% if note.category != None %}
|
||||
<div class="category">{{ note.category.name }}</div>
|
||||
{% endif %}
|
||||
<div id="transformed_content">{{ note.transformed_text|safe }}</div>
|
||||
<div class="edit_button"><input id="edit_button" type="button" value="Edit" onclick="edit_note();"/> <form id="form_delete" action="/note/{{ note.id }}" method="post">{% csrf_token %}<input type="submit" name="delete" value="Delete" onclick="return confirm('Do you really want to delete this note ?')"/></form></div>
|
||||
<div id="div_edit">
|
||||
<form id="form_edit" action="/note/{{ note.id }}" method="post">{% csrf_token %}
|
||||
{{ note_form.as_p }}
|
||||
Category <input name="category" list="all_categories" {% if note.category != None %} value="{{ note.category.name }}" {% endif %}>
|
||||
<datalist id="all_categories">
|
||||
{% for category in categories %}
|
||||
<option value="{{ category.name }}"></option>
|
||||
{% endfor %}
|
||||
</datalist><br/>
|
||||
<input type="submit" name="edit" value="Edit" />
|
||||
<input type="button" value="Cancel" onclick="cancel_edit_note();"/>
|
||||
</form>
|
||||
<b>Markdown syntax</b><br /><br />
|
||||
<table>
|
||||
<tr>
|
||||
<td class="markdown_help">
|
||||
<pre style="display:inline">_italic_</pre> <span style="font-style:italic">italic</span><br/>
|
||||
<pre style="display:inline">**bold**</pre> <span style="font-weight:bold">bold</span><br/>
|
||||
<pre style="display:inline">~~line through~~</pre> <span style="text-decoration:line-through">line through</span><br/>
|
||||
<pre style="display:inline">~underline~</pre> <span style="text-decoration:underline">underline</span><br/>
|
||||
<pre style="display:inline">>Citation</pre><br/>
|
||||
<pre>
|
||||
* Unordered list
|
||||
* Second element
|
||||
</pre>
|
||||
<ul>
|
||||
<li>Unordered list
|
||||
<li>Second element
|
||||
</ul>
|
||||
<pre>
|
||||
1. Ordered list
|
||||
1. Second element
|
||||
</pre>
|
||||
<ol>
|
||||
<li>Ordered list
|
||||
<li>Second element
|
||||
</ol>
|
||||
<pre style="display:inline"></pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/>
|
||||
<pre style="display:inline">#[Inline Picture](https://bits.wikimedia.org/images/wikimedia-button.png)</pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/>
|
||||
<pre style="display:inline">[Link](http://www.wikipedia.org)</pre> <a href="http://www.wikipedia.org">Link</a><br/><br/>
|
||||
<pre>
|
||||
Code : 4 whitespaces ahead
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre># Title # or
|
||||
Title
|
||||
=====</pre>
|
||||
<h1>Title</h1>
|
||||
<pre>## Sub title ## or
|
||||
Sub title
|
||||
---------</pre>
|
||||
<h2>Sub title</h2>
|
||||
<pre>### Sub sub title ###</pre>
|
||||
<h3>Sub sub title</h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="form_add">
|
||||
<form action="/note/add" method="post">{% csrf_token %}
|
||||
{{ note_form.as_p }}
|
||||
Category <input name="category" list=all_categories>
|
||||
<datalist id="all_categories">
|
||||
{% for category in categories %}
|
||||
<option value="{{ category.name }}"></option>
|
||||
{% endfor %}
|
||||
</datalist><br/>
|
||||
<input type="submit" name="add" value="Add" />
|
||||
<input type="submit" name="cancel" value="Cancel" />
|
||||
</form>
|
||||
</div>
|
||||
<b>Markdown syntax</b><br /><br />
|
||||
<table>
|
||||
<tr>
|
||||
<td class="markdown_help">
|
||||
<pre style="display:inline">_italic_</pre> <span style="font-style:italic">italic</span><br/>
|
||||
<pre style="display:inline">**bold**</pre> <span style="font-weight:bold">bold</span><br/>
|
||||
<pre style="display:inline">~~line through~~</pre> <span style="text-decoration:line-through">line through</span><br/>
|
||||
<pre style="display:inline">~underline~</pre> <span style="text-decoration:underline">underline</span><br/>
|
||||
<pre style="display:inline">>Citation</pre><br/>
|
||||
<pre>
|
||||
* Unordered list
|
||||
* Second element
|
||||
</pre>
|
||||
<ul>
|
||||
<li>Unordered list
|
||||
<li>Second element
|
||||
</ul>
|
||||
<pre>
|
||||
1. Ordered list
|
||||
1. Second element
|
||||
</pre>
|
||||
<ol>
|
||||
<li>Ordered list
|
||||
<li>Second element
|
||||
</ol>
|
||||
<pre style="display:inline"></pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/>
|
||||
<pre style="display:inline">#[Inline Picture](https://bits.wikimedia.org/images/wikimedia-button.png)</pre><img src="https://bits.wikimedia.org/images/wikimedia-button.png" alt="Picture"/><br/>
|
||||
<pre style="display:inline">[Link](http://www.wikipedia.org)</pre> <a href="http://www.wikipedia.org">Link</a><br/><br/>
|
||||
<pre>
|
||||
Code : 4 whitespaces ahead OR
|
||||
```language
|
||||
Code
|
||||
```
|
||||
</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre># Title # or
|
||||
Title
|
||||
=====</pre>
|
||||
<h1>Title</h1>
|
||||
<pre>## Sub title ## or
|
||||
Sub title
|
||||
---------</pre>
|
||||
<h2>Sub title</h2>
|
||||
<pre>### Sub sub title ###</pre>
|
||||
<h3>Sub sub title</h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user