aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/templates
diff options
context:
space:
mode:
Diffstat (limited to 'bn_django/templates')
-rw-r--r--bn_django/templates/base.html7
-rw-r--r--bn_django/templates/comment_list16
-rw-r--r--bn_django/templates/comments/form.html36
-rw-r--r--bn_django/templates/comments/freeform.html11
-rw-r--r--bn_django/templates/frontpage.html1
-rw-r--r--bn_django/templates/newknowldge_table13
6 files changed, 81 insertions, 3 deletions
diff --git a/bn_django/templates/base.html b/bn_django/templates/base.html
index dd66c97..402a959 100644
--- a/bn_django/templates/base.html
+++ b/bn_django/templates/base.html
@@ -3,9 +3,9 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{% block stylesheets %}
-<!--<link rel="STYLESHEET" type="text/css" href="style/default.css" />
-<link rel="STYLESHEET" type="text/css" href="/style/default.css" />-->
-<link rel="STYLESHEET" type="text/css" href="http://static.bryannewbold.com/style/default.css" />
+<link rel="STYLESHEET" type="text/css" href="style/default.css" />
+<link rel="STYLESHEET" type="text/css" href="/style/default.css" />
+<!--<link rel="STYLESHEET" type="text/css" href="http://static.bryannewbold.com/style/default.css" /> -->
{% endblock %}
{% block externaljs %} {% endblock %}
<title>{% block windowtitle %}bryannewbold.com{% endblock %}</title>
@@ -55,6 +55,7 @@
Here lies content!
{% endblock %}
</div>
+{% block commentary %} {% endblock %}
<div class="content_footer" id="footer" name="footer">
<b>
&nbsp;
diff --git a/bn_django/templates/comment_list b/bn_django/templates/comment_list
new file mode 100644
index 0000000..8ed411d
--- /dev/null
+++ b/bn_django/templates/comment_list
@@ -0,0 +1,16 @@
+
+{% if comments %}
+<table class="comments">
+{% for c in comments %}
+<tr><td class="comment_info">
+ <span class="comment_user">{{ c.user }}</span>
+ <span class="comment_date">{{ c.submit_date }}</span>
+ </td><td class="comment_content">
+ <span class="comment_headline">{{ c.headline|escape|wordwrap:80 }}</span>
+ <span class="comment_content">{{ c.content|escape|wordwrap:80 }}</span>
+</td</tr>
+{% endfor %}
+</table>
+{% else %}
+<h3>No comments yet!</h3>
+{% endif %}
diff --git a/bn_django/templates/comments/form.html b/bn_django/templates/comments/form.html
new file mode 100644
index 0000000..316d6a1
--- /dev/null
+++ b/bn_django/templates/comments/form.html
@@ -0,0 +1,36 @@
+{% load i18n %}
+<form {% if photos_optional or photos_required %}enctype="multipart/form-data" {% endif %}action="/comments/post/" method="post">
+
+{% if user.is_authenticated %}
+<p>{% trans "Username:" %} <strong>{{ user.username }}</strong> (<a href="/accounts/logout/">{% trans "Log out" %}</a>)</p>
+{% else %}
+<p><label for="id_username">{% trans "Username:" %}</label> <input type="text" name="username" id="id_username" /><br />{% trans "Password:" %} <input type="password" name="password" id="id_password" /> (<a href="/accounts/password_reset/">{% trans "Forgotten your password?" %}</a>)</p>
+{% endif %}
+
+{% if ratings_optional or ratings_required %}
+<p>{% trans "Ratings" %} ({% if ratings_required %}{% trans "Required" %}{% else %}{% trans "Optional" %}{% endif %}):</p>
+<table>
+<tr><th>&nbsp;</th>{% for value in rating_range %}<th>{{ value }}</th>{% endfor %}</tr>
+{% for rating in rating_choices %}
+<tr><th>{{ rating }}</th>{% for value in rating_range %}<th><input type="radio" name="rating{{ forloop.parentloop.counter }}" value="{{ value }}" /></th>{% endfor %}</tr>
+{% endfor %}
+</table>
+<input type="hidden" name="rating_options" value="{{ rating_options }}" />
+{% endif %}
+
+{% if photos_optional or photos_required %}
+<p><label for="id_photo">{% trans "Post a photo" %}</label> ({% if photos_required %}{% trans "Required" %}{% else %}{% trans "Optional" %}{% endif %}):
+<input type="file" name="photo" id="id_photo" /></p>
+<input type="hidden" name="photo_options" value="{{ photo_options }}" />
+{% endif %}
+
+<p><label for="id_comment">{% trans "Comment:" %}</label><br />
+<textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p>
+
+<p>
+<input type="hidden" name="options" value="{{ options }}" />
+<input type="hidden" name="target" value="{{ target }}" />
+<input type="hidden" name="gonzo" value="{{ hash }}" />
+<input type="submit" name="preview" value="{% trans "Preview comment" %}" />
+</p>
+</form>
diff --git a/bn_django/templates/comments/freeform.html b/bn_django/templates/comments/freeform.html
new file mode 100644
index 0000000..95e5153
--- /dev/null
+++ b/bn_django/templates/comments/freeform.html
@@ -0,0 +1,11 @@
+{% load i18n %}
+<form action="/comments/postfree/" method="post">
+<p><label for="id_person_name">{% trans "Your name:" %}</label> <input type="text" id="id_person_name" name="person_name" /></p>
+<p><label for="id_comment">{% trans "Comment:" %}</label><br /><textarea name="comment" id="id_comment" rows="10" cols="60"></textarea></p>
+<p>
+<input type="hidden" name="options" value="{{ options }}" />
+<input type="hidden" name="target" value="{{ target }}" />
+<input type="hidden" name="gonzo" value="{{ hash }}" />
+<input type="submit" name="preview" value="{% trans "Preview comment" %}" />
+</p>
+</form>
diff --git a/bn_django/templates/frontpage.html b/bn_django/templates/frontpage.html
index 52db15e..1a7acc2 100644
--- a/bn_django/templates/frontpage.html
+++ b/bn_django/templates/frontpage.html
@@ -37,6 +37,7 @@ For more recent content see the <a href="/timeline/">timeline</a>
<div class="col_right">
<div class="col_title">Latest knowledge</div>
{% if latest_knowledge %}
+{% include "newknowldge_table" %}
{% else %}
None yet!
{% endif %}
diff --git a/bn_django/templates/newknowldge_table b/bn_django/templates/newknowldge_table
new file mode 100644
index 0000000..686a12f
--- /dev/null
+++ b/bn_django/templates/newknowldge_table
@@ -0,0 +1,13 @@
+{% if latest_knowledge %}
+<table class="listing">
+{% for l in latest_knowledge %}
+<tr>
+ <td class="date">
+ {{ l.date }}</td>
+ <td class="description">
+ <a href="/k/commit/{{ l.hash }}/" class="description">
+ {{ l.description|truncatewords:6 }}</a></td>
+ </tr>
+{% endfor %}
+</table>
+{% else %}No shortlog!{% endif %}