summaryrefslogtreecommitdiffhomepage
path: root/apioforum/templates
diff options
context:
space:
mode:
Diffstat (limited to 'apioforum/templates')
-rw-r--r--apioforum/templates/base.html10
-rw-r--r--apioforum/templates/common.html7
-rw-r--r--apioforum/templates/user_settings.html26
-rw-r--r--apioforum/templates/view_forum.html6
-rw-r--r--apioforum/templates/view_user.html7
5 files changed, 47 insertions, 9 deletions
diff --git a/apioforum/templates/base.html b/apioforum/templates/base.html
index bf3748f..3eb112e 100644
--- a/apioforum/templates/base.html
+++ b/apioforum/templates/base.html
@@ -19,25 +19,25 @@
<p><a href="{{url_for('index')}}">home</a></p>
{% if g.user %}
- <p>{{ g.user }}</p>
+ <p><a href="{{url_for('user.view_user', username=g.user)}}">{{g.user}}</a></p>
{% if is_admin %}
<p><a href="{{url_for('admin.admin_page')}}">admin</a></p>
{% endif %}
<p>
- <a href="{{ url_for('auth.logout',next=path_for_next) }}">
+ <a href="{{url_for('auth.logout',next=path_for_next)}}">
logout
</a>
</p>
{% else %}
<p>
- <a href="{{ url_for('auth.login',next=path_for_next) }}">
+ <a href="{{url_for('auth.login',next=path_for_next)}}">
login
</a>
</p>
<p>
- <a href="{{ url_for('auth.register',next=path_for_next) }}">
+ <a href="{{url_for('auth.register',next=path_for_next)}}">
register
</a>
</p>
@@ -60,6 +60,8 @@
</main>
{% endblock %}
<script>/* bees */</script>
+ <!-- citrons was here -->
+ <!-- Complete hybridisation of various species of wild duck gene pools could result in the extinction of many indigenous waterfowl. -->
</body>
</html>
diff --git a/apioforum/templates/common.html b/apioforum/templates/common.html
index 2e59b2c..c484a9d 100644
--- a/apioforum/templates/common.html
+++ b/apioforum/templates/common.html
@@ -1,8 +1,13 @@
+{% macro disp_user(username) -%}
+<a href="{{url_for('user.view_user',username=username)}}" class="username">{{username}}</a>
+{%- endmacro %}
+
{% macro disp_post(post, buttons=False) %}
<div class="post" id="post_{{post.id}}">
<div class="post-heading">
<span class="post-heading-a">
- <span class="post-heading-em">{{post.author}}</span> {{ts(post.created)}}
+ <span class="post-heading-em">{{disp_user(post.author)}}</span>
+ {{ts(post.created)}}
{% if post.edited %}
(edited {{ts(post.updated)}})
{% endif %}
diff --git a/apioforum/templates/user_settings.html b/apioforum/templates/user_settings.html
new file mode 100644
index 0000000..fdd447f
--- /dev/null
+++ b/apioforum/templates/user_settings.html
@@ -0,0 +1,26 @@
+{% extends 'base.html' %}
+{% block header %}<h1>{% block title %}user settings{% endblock %}</h1>{% endblock %}
+{% block content %}
+<form method="post">
+<fieldset>
+<legend>change password</legend>
+<p>if you want to change your password, make sure you check the "change password?" box.</p>
+<label for="do_chpass">change password?</label>
+<input type="checkbox" id="do_chpass" name="do_chpass"><br>
+<label for="password">current password</label>
+<input type="text" id="password" name="password"><br>
+<label for="new_password">new password</label>
+<input type="text" id="new_password" name="new_password">
+</fieldset>
+<fieldset>
+<legend>change bio</legend>
+<p>if you want to change your bio, make sure you check the "change bio?" box.</p>
+<label for="do_chbio">change bio?</label>
+<input type="checkbox" name="do_chbio" id="do_chbio"><br>
+<textarea class="new-post-box" name="bio">{{user.bio or "hail GEORGE"}}</textarea>
+</fieldset>
+<p>confirm changes?</p>
+<input type="submit" value="confirm">
+<a href="{{url_for('user.view_user',username=user.username)}}">cancel</a>
+</form>
+{% endblock %}
diff --git a/apioforum/templates/view_forum.html b/apioforum/templates/view_forum.html
index 3edb7f0..59c594b 100644
--- a/apioforum/templates/view_forum.html
+++ b/apioforum/templates/view_forum.html
@@ -1,5 +1,5 @@
{% extends 'base.html' %}
-{% from 'common.html' import ts, tag %}
+{% from 'common.html' import ts, tag, disp_user %}
{% block header %}<h1>{% block title %}apioforum{%endblock%}</h1>{%endblock%}
{%block nmcontent%}
<main class="widemain">
@@ -50,10 +50,10 @@
{{tag(the_tag)}}
{% endfor %}
</div>
- <div class="threadlisting-part threadlisting-part-creator">{{thread.creator}}</div>
+ <div class="threadlisting-part threadlisting-part-creator">{{disp_user(thread.creator)}}</div>
<div class="threadlisting-part threadlisting-part-created">{{ts(thread.created)}}</div>
<div class="threadlisting-part threadlisting-part-updated">{{ts(thread.updated)}}</div>
- <div class="threadlisting-part threadlisting-part-lastactivityby">{{thread.last_user}}</div>
+ <div class="threadlisting-part threadlisting-part-lastactivityby">{{disp_user(thread.last_user)}}</div>
<div class="threadlisting-part threadlisting-part-numreplies">{{thread.num_replies}}</div>
</div>
{%endfor%}
diff --git a/apioforum/templates/view_user.html b/apioforum/templates/view_user.html
index 93618a5..f773978 100644
--- a/apioforum/templates/view_user.html
+++ b/apioforum/templates/view_user.html
@@ -5,6 +5,11 @@
{% endblock %}
{%block content%}
+<div class="user-top-bar">
+ {% if g.user == user.username %}
+ <a class="actionbutton" href="{{url_for('user.edit_user',username=user.username)}}">settings</a>
+ {% endif %}
+</div>
<div class="user_info">
<div class="user_bio_quote">
<div class="user_bio">{{rendered_bio|safe}}</div>
@@ -13,7 +18,7 @@
<dl>
<dt>joined</dt>
{% if user.joined %}
- <dd>{{ts(user.joined)}}</dd>
+ <dd>{{ts(user.joined)}} ago</dd>
{% else %}
<dd>a very long time ago</dd>
{% endif %}