Browse Source

Spaces to tabs in HTML and CSS

pull/2/head
Noah Petherbridge 5 years ago
parent
commit
4b6be02e5a
47 changed files with 1385 additions and 1385 deletions
  1. +6
    -6
      rophako/modules/account/templates/account/login.html
  2. +15
    -15
      rophako/modules/account/templates/account/setup.html
  3. +18
    -18
      rophako/modules/admin/templates/admin/edit_user.html
  4. +3
    -3
      rophako/modules/admin/templates/admin/index.html
  5. +41
    -41
      rophako/modules/admin/templates/admin/users.html
  6. +9
    -9
      rophako/modules/blog/templates/blog/archive.html
  7. +15
    -15
      rophako/modules/blog/templates/blog/categories.inc.html
  8. +5
    -5
      rophako/modules/blog/templates/blog/delete.html
  9. +76
    -76
      rophako/modules/blog/templates/blog/entry.inc.html
  10. +2
    -2
      rophako/modules/blog/templates/blog/index.html
  11. +4
    -4
      rophako/modules/blog/templates/blog/index.inc.html
  12. +20
    -20
      rophako/modules/blog/templates/blog/nav-links.inc.html
  13. +11
    -11
      rophako/modules/blog/templates/blog/sibling-links.html
  14. +141
    -141
      rophako/modules/blog/templates/blog/update.html
  15. +10
    -10
      rophako/modules/comment/templates/comment/edit.html
  16. +62
    -62
      rophako/modules/comment/templates/comment/form.inc.html
  17. +26
    -26
      rophako/modules/comment/templates/comment/index.inc.html
  18. +14
    -14
      rophako/modules/comment/templates/comment/preview.html
  19. +32
    -32
      rophako/modules/comment/templates/comment/privacy.html
  20. +2
    -2
      rophako/modules/comment/templates/comment/unsubscribed.html
  21. +30
    -30
      rophako/modules/contact/templates/contact/index.html
  22. +20
    -20
      rophako/modules/emoticons/templates/emoticons/index.html
  23. +44
    -44
      rophako/modules/photo/templates/photos/album.html
  24. +20
    -20
      rophako/modules/photo/templates/photos/albums.html
  25. +33
    -33
      rophako/modules/photo/templates/photos/arrange_albums.html
  26. +31
    -31
      rophako/modules/photo/templates/photos/arrange_photos.html
  27. +86
    -86
      rophako/modules/photo/templates/photos/crop.html
  28. +3
    -3
      rophako/modules/photo/templates/photos/delete.html
  29. +3
    -3
      rophako/modules/photo/templates/photos/delete_album.html
  30. +24
    -24
      rophako/modules/photo/templates/photos/edit.html
  31. +20
    -20
      rophako/modules/photo/templates/photos/edit_album.html
  32. +20
    -20
      rophako/modules/photo/templates/photos/edit_captions.html
  33. +85
    -85
      rophako/modules/photo/templates/photos/upload.html
  34. +29
    -29
      rophako/modules/photo/templates/photos/view.html
  35. +2
    -2
      rophako/modules/tracking/templates/tracking/index.html
  36. +21
    -21
      rophako/modules/tracking/templates/tracking/referrers.html
  37. +32
    -32
      rophako/modules/tracking/templates/tracking/visitors.html
  38. +2
    -2
      rophako/modules/wiki/templates/wiki/delete.html
  39. +19
    -19
      rophako/modules/wiki/templates/wiki/edit.html
  40. +27
    -27
      rophako/modules/wiki/templates/wiki/history.html
  41. +6
    -6
      rophako/modules/wiki/templates/wiki/list.html
  42. +1
    -1
      rophako/modules/wiki/templates/wiki/missing.html
  43. +9
    -9
      rophako/modules/wiki/templates/wiki/page.html
  44. +53
    -53
      rophako/www/index.html
  45. +49
    -49
      rophako/www/layout.html
  46. +6
    -6
      rophako/www/markdown.html
  47. +198
    -198
      rophako/www/smoke/style.css

+ 6
- 6
rophako/modules/account/templates/account/login.html View File

@@ -8,15 +8,15 @@
<form action="{{ url_for('account.login') }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<fieldset>
<legend>Log In</legend>
<legend>Log In</legend>

<strong>Username:</strong><br>
<input type="text" class="form-control" size="20" name="username" id="username"><p>
<strong>Username:</strong><br>
<input type="text" class="form-control" size="20" name="username" id="username"><p>

<strong>Passphrase:</strong><br>
<input type="password" class="form-control" size="20" name="password"><p>
<strong>Passphrase:</strong><br>
<input type="password" class="form-control" size="20" name="password"><p>

<button type="submit" class="btn btn-primary">Log In</button>
<button type="submit" class="btn btn-primary">Log In</button>
</fieldset>
</form>


+ 15
- 15
rophako/modules/account/templates/account/setup.html View File

@@ -15,27 +15,27 @@ to create the initial Administrator user account.<p>
<form id="setup_form" action="{{ url_for('account.setup') }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<fieldset>
<legend>Admin User</legend>
<legend>Admin User</legend>

Your site needs at least one admin user to log in and manage the site.
You can use any username/password combination you want, but "admin" is
a typical username.<p>
Your site needs at least one admin user to log in and manage the site.
You can use any username/password combination you want, but "admin" is
a typical username.<p>

<strong>Username:</strong><br>
<input type="text" class="form-control" size="40" name="username" id="username" placeholder="admin"><p>
<strong>Username:</strong><br>
<input type="text" class="form-control" size="40" name="username" id="username" placeholder="admin"><p>

<strong>Real name:</strong><br>
<input type="text" class="form-control" size="40" name="name" placeholder="John Doe"><p>
<strong>Real name:</strong><br>
<input type="text" class="form-control" size="40" name="name" placeholder="John Doe"><p>

<strong>Passphrase:</strong><br>
This can be as long as you want. Pick something
<a href="http://xkcd.com/936/" target="_blank">secure!</a><br>
<input type="password" class="form-control" size="40" id="pw1" name="password1" placeholder="correct horse battery staple"><p>
<strong>Passphrase:</strong><br>
This can be as long as you want. Pick something
<a href="http://xkcd.com/936/" target="_blank">secure!</a><br>
<input type="password" class="form-control" size="40" id="pw1" name="password1" placeholder="correct horse battery staple"><p>

<strong>Confirm Passphrase:</strong><br>
<input type="password" class="form-control" size="40" id="pw2" name="password2" placeholder="correct horse battery staple"><p>
<strong>Confirm Passphrase:</strong><br>
<input type="password" class="form-control" size="40" id="pw2" name="password2" placeholder="correct horse battery staple"><p>

<button type="submit" class="btn btn-primary">Next</button>
<button type="submit" class="btn btn-primary">Next</button>
</fieldset>
</form>


+ 18
- 18
rophako/modules/admin/templates/admin/edit_user.html View File

@@ -4,9 +4,9 @@
{% block scripts %}
<script type="text/javascript">
$(document).ready(function() {
$("#delete_button").click(function() {
return window.confirm("Are you sure?");
});
$("#delete_button").click(function() {
return window.confirm("Are you sure?");
});
});
</script>
{% endblock %}
@@ -18,26 +18,26 @@ $(document).ready(function() {
<form action="{{ url_for('admin.edit_user', uid=info['uid']) }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<fieldset>
<legend>User Details</legend>
<legend>User Details</legend>

<strong>Username:</strong><br>
<input type="text" class="form-control" size="20" name="username" value="{{ info['username'] }}"><p>
<strong>Username:</strong><br>
<input type="text" class="form-control" size="20" name="username" value="{{ info['username'] }}"><p>

<strong>Real name:</strong><br>
<input type="text" class="form-control" size="20" name="name" value="{{ info['name'] }}"><p>
<strong>Real name:</strong><br>
<input type="text" class="form-control" size="20" name="name" value="{{ info['name'] }}"><p>

<strong>Reset Password:</strong><br>
<input type="password" class="form-control" size="20" name="password1"><br>
<input type="password" class="form-control" size="20" name="password2"><p>
<strong>Reset Password:</strong><br>
<input type="password" class="form-control" size="20" name="password1"><br>
<input type="password" class="form-control" size="20" name="password2"><p>

<strong>Role:</strong><br>
<select name="role" class="form-control">
<option value="user"{% if info["role"] == "user" %} selected{% endif %}>User</option>
<option value="admin"{% if info["role"] == "admin" %} selected{% endif %}>Admin</option>
</select><p>
<strong>Role:</strong><br>
<select name="role" class="form-control">
<option value="user"{% if info["role"] == "user" %} selected{% endif %}>User</option>
<option value="admin"{% if info["role"] == "admin" %} selected{% endif %}>Admin</option>
</select><p>

<button type="submit" class="btn btn-primary" name="action" value="save">Save Changes</button>
<button type="submit" class="btn btn-warning" name="action" id="delete_button" value="delete">Delete User</button>
<button type="submit" class="btn btn-primary" name="action" value="save">Save Changes</button>
<button type="submit" class="btn btn-warning" name="action" id="delete_button" value="delete">Delete User</button>
</fieldset>
</form>


+ 3
- 3
rophako/modules/admin/templates/admin/index.html View File

@@ -6,14 +6,14 @@
<h1>Admin Center</h1>

<ul>
<li><a href="{{ url_for('admin.users') }}">View and Manage Users</a></li>
<li><a href="{{ url_for('admin.users') }}">View and Manage Users</a></li>
</ul>

<h1>Maintenance Tasks</h1>

<ul>
<li><a href="{{ url_for('admin.rebuild_blog_index') }}">Rebuild Blog Index</a></li>
<li><a href="{{ url_for('admin.rebuild_visitor_counts') }}">Rebuild Visitor Counts</a></li>
<li><a href="{{ url_for('admin.rebuild_blog_index') }}">Rebuild Blog Index</a></li>
<li><a href="{{ url_for('admin.rebuild_visitor_counts') }}">Rebuild Visitor Counts</a></li>
</ul>

{% endblock %}

+ 41
- 41
rophako/modules/admin/templates/admin/users.html View File

@@ -10,59 +10,59 @@
<form action="{{ url_for('admin.create_user') }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<fieldset>
<legend>Create New User</legend>
<legend>Create New User</legend>

<strong>Username:</strong><br>
<input type="text" class="form-control" size="40" name="username" placeholder="soandso"><p>
<strong>Username:</strong><br>
<input type="text" class="form-control" size="40" name="username" placeholder="soandso"><p>

<strong>Real name:</strong><br>
<input type="text" class="form-control" size="40" name="name" placeholder="John Smith"><p>
<strong>Real name:</strong><br>
<input type="text" class="form-control" size="40" name="name" placeholder="John Smith"><p>

<strong>Passphrase:</strong><br>
<input type="password" class="form-control" size="40" name="password1" placeholder="correct horse battery staple"><p>
<strong>Passphrase:</strong><br>
<input type="password" class="form-control" size="40" name="password1" placeholder="correct horse battery staple"><p>

<strong>Confirm:</strong><br>
<input type="password" class="form-control" size="40" name="password2" placeholder="correct horse battery staple"><p>
<strong>Confirm:</strong><br>
<input type="password" class="form-control" size="40" name="password2" placeholder="correct horse battery staple"><p>

<strong>Role:</strong><br>
<select name="role" class="form-control">
<option value="user" selected>User</option>
<option value="admin">Admin</option>
</select>
<strong>Role:</strong><br>
<select name="role" class="form-control">
<option value="user" selected>User</option>
<option value="admin">Admin</option>
</select>

<button type="submit" class="btn btn-primary">Create</button>
<button type="submit" class="btn btn-primary">Create</button>
</fieldset>

<h2>User List</h2>

<table class="table table-wide">
<thead>
<tr>
<th width="100">User ID</th>
<th width="300">Username</th>
<th>Real name</th>
<th width="100">Role</th>
<th width="100">Log in</th>
</tr>
</thead>
<thead>
<tr>
<th width="100">User ID</th>
<th width="300">Username</th>
<th>Real name</th>
<th width="100">Role</th>
<th width="100">Log in</th>
</tr>
</thead>

<tbody>
{% for user in users %}
<tr>
<td>{{ user["uid"] }}</td>
<td><a href="{{ url_for('admin.edit_user', uid=user['uid']) }}">{{ user["username"] }}</a></td>
<td>{{ user["name"] }}</td>
<td>{{ user["role"] }}</td>
<td>
{% if user["role"] != "admin" %}
<a href="{{ url_for('admin.impersonate', uid=user['uid']) }}">Log in as</a>
{% else %}
n/a
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
<tbody>
{% for user in users %}
<tr>
<td>{{ user["uid"] }}</td>
<td><a href="{{ url_for('admin.edit_user', uid=user['uid']) }}">{{ user["username"] }}</a></td>
<td>{{ user["name"] }}</td>
<td>{{ user["role"] }}</td>
<td>
{% if user["role"] != "admin" %}
<a href="{{ url_for('admin.impersonate', uid=user['uid']) }}">Log in as</a>
{% else %}
n/a
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>

{% endblock %}

+ 9
- 9
rophako/modules/blog/templates/blog/archive.html View File

@@ -3,16 +3,16 @@
{% block content %}

{% for date in archive %}
<h1>{{ date["month_friendly"] }}</h1>
<h1>{{ date["month_friendly"] }}</h1>

<ul>
{% for post in date["posts"] %}
<li>
<a href="{{ url_for('blog.entry', fid=post['fid']) }}">{{ post["subject"] }}</a>
&mdash; <em>{{ post['pretty_time'] }} by {{ post['profile']['name'] }}</em>
</li>
{% endfor %}
</ul>
<ul>
{% for post in date["posts"] %}
<li>
<a href="{{ url_for('blog.entry', fid=post['fid']) }}">{{ post["subject"] }}</a>
&mdash; <em>{{ post['pretty_time'] }} by {{ post['profile']['name'] }}</em>
</li>
{% endfor %}
</ul>
{% endfor %}

{% endblock %}

+ 15
- 15
rophako/modules/blog/templates/blog/categories.inc.html View File

@@ -1,19 +1,19 @@
{% for tag in tags %}
{% if not tag["small"] %}
&#0187; <a href="{{ url_for('blog.category', category=tag['category']) }}">{{ tag['category'] }}</a>
<small>({{ tag['count'] }})</small><br>
{% endif %}
{% if not tag["small"] %}
&#0187; <a href="{{ url_for('blog.category', category=tag['category']) }}">{{ tag['category'] }}</a>
<small>({{ tag['count'] }})</small><br>
{% endif %}
{% endfor %}
{% if has_small %}
<div id="blog_show_more" style="display: none">
{% for tag in tags %}
{% if tag["small"] %}
&#0187; <a href="{{ url_for('blog.category', category=tag['category']) }}">{{ tag['category'] }}</a>
<small>({{ tag['count'] }})</small><br>
{% endif %}
{% endfor %}
</div>
<div id="blog_show_less" style="display: block">
&#0164; <a href="#" onClick="$('#blog_show_less').hide(); $('#blog_show_more').show(1000); return false">Show more...</a>
</div>
<div id="blog_show_more" style="display: none">
{% for tag in tags %}
{% if tag["small"] %}
&#0187; <a href="{{ url_for('blog.category', category=tag['category']) }}">{{ tag['category'] }}</a>
<small>({{ tag['count'] }})</small><br>
{% endif %}
{% endfor %}
</div>
<div id="blog_show_less" style="display: block">
&#0164; <a href="#" onClick="$('#blog_show_less').hide(); $('#blog_show_more').show(1000); return false">Show more...</a>
</div>
{% endif %}

+ 5
- 5
rophako/modules/blog/templates/blog/delete.html View File

@@ -5,13 +5,13 @@
<h1>Delete Entry</h1>

<form name="editor" action="{{ url_for('blog.delete', id=post_id) }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="confirm" value="true">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="confirm" value="true">

Are you sure you want to delete the blog post,
"{{ subject }}"?<p>
Are you sure you want to delete the blog post,
"{{ subject }}"?<p>

<button type="submit" class="btn btn-warning">Confirm Deletion</button>
<button type="submit" class="btn btn-warning">Confirm Deletion</button>
</form>

{% endblock %}

+ 76
- 76
rophako/modules/blog/templates/blog/entry.inc.html View File

@@ -3,92 +3,92 @@

{% macro blog_entry(post, from=None) %}

{% if from == "index" %}
<a href="{{ url_for('blog.entry', fid=post['fid']) }}" class="blog-title-index">
{{ post["subject"] }}
</a><p>
{% else %}
{% include "blog/sibling-links.html" %}
<p>
{% endif %}
{% if from == "index" %}
<a href="{{ url_for('blog.entry', fid=post['fid']) }}" class="blog-title-index">
{{ post["subject"] }}
</a><p>
{% else %}
{% include "blog/sibling-links.html" %}
<p>
{% endif %}

<div class="blog-author">
{% if post["avatar"] %}
<img src="/static/avatars/{{ post['avatar'] }}" alt="{{ post['profile']['name'] }}" width="96" height="96">
{% elif post["photo"] %}
<img src="{{ post['photo_url'] }}/{{ post['photo'] }}" alt="{{ post['profile']['name'] }}" width="96" height="96">
{% else %}
<img src="/static/avatars/default.png" alt="{{ post['profile']['name'] }}" width="96" height="96">
{% endif %}
<div class="blog-author">
{% if post["avatar"] %}
<img src="/static/avatars/{{ post['avatar'] }}" alt="{{ post['profile']['name'] }}" width="96" height="96">
{% elif post["photo"] %}
<img src="{{ post['photo_url'] }}/{{ post['photo'] }}" alt="{{ post['profile']['name'] }}" width="96" height="96">
{% else %}
<img src="/static/avatars/default.png" alt="{{ post['profile']['name'] }}" width="96" height="96">
{% endif %}

<div>{{ post["profile"]["username"] }}</div>
</div>
<div>{{ post["profile"]["username"] }}</div>
</div>

<div class="blog-timestamp">
Posted by {{ post["profile"]["name"] }}
on <span title="{{ post['time'] }}">{{ post["pretty_time"] }}</span>
</div>
<div class="blog-timestamp">
Posted by {{ post["profile"]["name"] }}
on <span title="{{ post['time'] }}">{{ post["pretty_time"] }}</span>
</div>

{{ post["rendered_body"] | safe }}
{% if post["snipped"] %}
<p>
<a href="{{ url_for('blog.entry', fid=post['fid']) }}">Read more...</a>
{% endif %}
{{ post["rendered_body"] | safe }}
{% if post["snipped"] %}
<p>
<a href="{{ url_for('blog.entry', fid=post['fid']) }}">Read more...</a>
{% endif %}

<p>
<div class="clear">
<strong>Categories:</strong>
{% if post["categories"]|length == 0 or (post["categories"]|length == 1 and post["categories"][0] == "") %}
<a href="{{ url_for('blog.category', category=settings().blog.default_category) }}">
{{ settings().blog.default_category }}
</a>
{% else %}
<ul class="blog-categories">
{% for tag in post["categories"] %}
<li><a href="{{ url_for('blog.category', category=tag) }}">{{ tag }}</a></li>
{% endfor %}
</ul>
{% endif %}
<p>
<p>
<div class="clear">
<strong>Categories:</strong>
{% if post["categories"]|length == 0 or (post["categories"]|length == 1 and post["categories"][0] == "") %}
<a href="{{ url_for('blog.category', category=settings().blog.default_category) }}">
{{ settings().blog.default_category }}
</a>
{% else %}
<ul class="blog-categories">
{% for tag in post["categories"] %}
<li><a href="{{ url_for('blog.category', category=tag) }}">{{ tag }}</a></li>
{% endfor %}
</ul>
{% endif %}
<p>

[
{% if from == "index" %}
{% if post["comments"] %}{# Allowed comments #}
<a href="{{ url_for('blog.entry', fid=post['fid']) }}#comments">{{ post["comment_count"] }} comment{% if post["comment_count"] != 1 %}s{% endif %}</a>
|
<a href="{{ url_for('blog.entry', fid=post['fid']) }}#addcomment">Add comment</a>
|
{% endif %}
[
{% if from == "index" %}
{% if post["comments"] %}{# Allowed comments #}
<a href="{{ url_for('blog.entry', fid=post['fid']) }}#comments">{{ post["comment_count"] }} comment{% if post["comment_count"] != 1 %}s{% endif %}</a>
|
<a href="{{ url_for('blog.entry', fid=post['fid']) }}#addcomment">Add comment</a>
|
{% endif %}

<a href="{{ url_for('blog.entry', fid=post['fid']) }}">Permalink</a>
{% else %}
<a href="{{ url_for('blog.index') }}">Blog</a>
{% endif %}
<a href="{{ url_for('blog.entry', fid=post['fid']) }}">Permalink</a>
{% else %}
<a href="{{ url_for('blog.index') }}">Blog</a>
{% endif %}

{% if session["login"] %}
|
<a href="{{ url_for('blog.update', id=post['post_id']) }}">Edit</a>
|
<a href="{{ url_for('blog.delete', id=post['post_id']) }}">Delete</a>
{% endif %}
]
</div>
<p>
{% if session["login"] %}
|
<a href="{{ url_for('blog.update', id=post['post_id']) }}">Edit</a>
|
<a href="{{ url_for('blog.delete', id=post['post_id']) }}">Delete</a>
{% endif %}
]
</div>
<p>

{# Show the Google ad after the first post. #}
{% if from == "index" and post["position_index"] == 1 %}
{{ leaderboard() }}
{% endif %}
{# Show the Google ad after the first post. #}
{% if from == "index" and post["position_index"] == 1 %}
{{ leaderboard() }}
{% endif %}

{% if from != "index" %}
{% include "blog/sibling-links.html" %}
<p>
{% if from != "index" %}
{% include "blog/sibling-links.html" %}
<p>

{{ include_page("comment.partial_index",
thread="blog-"+post["post_id"]|string,
subject=post["subject"],
addable=post["comments"],
) | safe }}
{% endif %}
{{ include_page("comment.partial_index",
thread="blog-"+post["post_id"]|string,
subject=post["subject"],
addable=post["comments"],
) | safe }}
{% endif %}

{% endmacro %}

+ 2
- 2
rophako/modules/blog/templates/blog/index.html View File

@@ -3,9 +3,9 @@
{% block content %}

{% if url_category %}
<h1>Category: {{ url_category }}</h1>
<h1>Category: {{ url_category }}</h1>
{% else %}
<h1>My Blog</h1>
<h1>My Blog</h1>
{% endif %}

{{ include_page("blog.partial_index") | safe }}


+ 4
- 4
rophako/modules/blog/templates/blog/index.inc.html View File

@@ -3,11 +3,11 @@
{% include "blog/nav-links.inc.html" %}

{% if count == 0 %}
There are no blog posts yet.
There are no blog posts yet.
{% else %}
{% for post in posts %}
{{ blog_entry(post, from="index") }}
{% endfor %}
{% for post in posts %}
{{ blog_entry(post, from="index") }}
{% endfor %}
{% endif %}

{% include "blog/nav-links.inc.html" %}

+ 20
- 20
rophako/modules/blog/templates/blog/nav-links.inc.html View File

@@ -1,27 +1,27 @@
{# Older/Newer links #}

{% if can_older or can_newer %}
<div class="right">
[
<a href="{{ url_for('blog.rss') }}">RSS Feed</a> |
{% if can_earlier %}
{% if category %}
<a href="{{ url_for('blog.category', category=category) }}?skip={{ earlier }}">&lt; Newer</a>
{% else %}
<a href="{{ url_for('blog.index') }}?skip={{ earlier }}">&lt; Newer</a>
{% endif %}
<div class="right">
[
<a href="{{ url_for('blog.rss') }}">RSS Feed</a> |
{% if can_earlier %}
{% if category %}
<a href="{{ url_for('blog.category', category=category) }}?skip={{ earlier }}">&lt; Newer</a>
{% else %}
<a href="{{ url_for('blog.index') }}?skip={{ earlier }}">&lt; Newer</a>
{% endif %}

{% if can_older %} | {% endif %}
{% endif %}
{% if can_older %} | {% endif %}
{% endif %}

{% if can_older %}
{% if category %}
<a href="{{ url_for('blog.category', category=category) }}?skip={{ older }}">Older &gt;</a>
{% else %}
<a href="{{ url_for('blog.index') }}?skip={{ older }}">Older &gt;</a>
{% endif %}
{% endif %}
{% if can_older %}
{% if category %}
<a href="{{ url_for('blog.category', category=category) }}?skip={{ older }}">Older &gt;</a>
{% else %}
<a href="{{ url_for('blog.index') }}?skip={{ older }}">Older &gt;</a>
{% endif %}
{% endif %}

]
</div>
]
</div>
{% endif %}

+ 11
- 11
rophako/modules/blog/templates/blog/sibling-links.html View File

@@ -1,18 +1,18 @@
{# Older/Newer links #}

{% if post["siblings"][0] or post["siblings"][1] %}
<div class="right">
[
{% if post["siblings"][0] %}
<a href="{{ url_for('blog.entry', fid=post["siblings"][0]['fid']) }}">&lt; {{ post["siblings"][0]['subject'] }}</a>
<div class="right">
[
{% if post["siblings"][0] %}
<a href="{{ url_for('blog.entry', fid=post["siblings"][0]['fid']) }}">&lt; {{ post["siblings"][0]['subject'] }}</a>

{% if post["siblings"][1] %} | {% endif %}
{% endif %}
{% if post["siblings"][1] %} | {% endif %}
{% endif %}

{% if post["siblings"][1] %}
<a href="{{ url_for('blog.entry', fid=post["siblings"][1]['fid']) }}">{{ post["siblings"][1]['subject'] }} &gt;</a>
{% endif %}
{% if post["siblings"][1] %}
<a href="{{ url_for('blog.entry', fid=post["siblings"][1]['fid']) }}">{{ post["siblings"][1]['subject'] }} &gt;</a>
{% endif %}

]
</div>
]
</div>
{% endif %}

+ 141
- 141
rophako/modules/blog/templates/blog/update.html View File

@@ -3,159 +3,159 @@
{% block content %}

{% if preview %}
<h1>Preview: {{ subject }}</h1>
<h1>Preview: {{ subject }}</h1>

{{ rendered_body|safe }}
{{ rendered_body|safe }}

<hr>
<hr>
{% endif %}

<h1>Update Blog</h1>

<form name="editor" action="{{ url_for('blog.update') }}" method="POST">
<input type="hidden" name="id" value="{{ post_id }}">
<input type="hidden" name="author" value="{{ author }}">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<strong>Subject:</strong><br>
<input type="text" class="form-control" size="80" name="subject" value="{{ subject }}"><p>
<strong>Friendly ID:</strong><br>
You can leave this blank if this is a new post. It defaults to be based
on the subject.<br>
<input type="text" class="form-control" size="80" name="fid" value="{{ fid }}"><p>
<strong>Body:</strong><br>
<label>
<input type="radio" name="format" value="markdown"{% if format == "markdown" %} checked{% endif %}> Markdown
</label>
<label>
<input type="radio" name="format" value="html"{% if format == "html" %} checked{% endif %}> HTML
</label><br>
<textarea class="form-control input-lg" cols="80" rows="12" name="body">{{ body }}</textarea><br>
<a href="/markdown" target="_blank">Markdown cheatsheet</a> /
<a href="{{ url_for('emoticons.index') }}" target="_blank">Emoticon reference</a> (opens in new window)<br>
Optional: separate your summary from the rest of the post by typing <code>&lt;snip&gt;</code>
where you want the division to appear.<p>
<strong>Avatar:</strong><br>
<span id="avatar-preview"></span>
<select name="avatar" id="avatar" class="form-control">
<option value=""{% if avatar == "" %} selected{% endif %}>Use my profile picture</option>
{% for pic in avatars %}
<option value="{{ pic }}"{% if avatar == pic %} selected{% endif %}>{{ pic }}</option>
{% endfor %}
</select><p>
<strong>Categories:</strong><br>
<small>Comma-separated list, e.g. General, HTML, Perl, Web Design</small><br>
<input type="text" class="form-control" size="40" name="categories" value="{{ categories }}"><p>
<strong>Privacy:</strong><br>
<select name="privacy" class="form-control">
<option value="public"{% if privacy == "public" %} selected{% endif %}>
Public: everybody can see this blog entry
</option>
<option value="private"{% if privacy == "private" %} selected{% endif %}>
Private: only site admins can see this blog entry
</option>
</select><p>
<strong>Options:</strong><br>
<label>
<input type="checkbox" name="emoticons" value="true"{% if emoticons %} checked{% endif %}>
Enable graphical emoticons
</label><br>
<label>
<input type="checkbox" name="comments" value="true"{% if comments %} checked{% endif %}>
Enable comments on this entry
</label><p>
<strong>Time Stamp:</strong><br>
<input type="text" class="form-control input-sm inline" size="2" name="month" id="month" value="{{ month }}"> /
<input type="text" class="form-control input-sm inline" size="2" name="day" id="day" value="{{ day }}"> /
<input type="text" class="form-control input-sm inline" size="4" name="year" id="year" value="{{ year }}"> @
<input type="text" class="form-control input-sm inline" size="2" name="hour" id="hour" value="{{ hour }}"> :
<input type="text" class="form-control input-sm inline" size="2" name="min" id="min" value="{{ min }}"> :
<input type="text" class="form-control input-sm inline" size="2" name="sec" id="sec" value="{{ sec }}"><br>
mm / dd / yyyy @ hh:mm:ss<br>
<label>
<input type="checkbox" id="autoup" value="yes"{% if post_id == "" %} checked{% endif %}>
Automatically update
</label><p>
<button type="submit" class="btn btn-default" name="action" value="preview">Preview</button>
<button type="submit" class="btn btn-primary" name="action" value="publish">Publish Entry</button>
<input type="hidden" name="id" value="{{ post_id }}">
<input type="hidden" name="author" value="{{ author }}">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<strong>Subject:</strong><br>
<input type="text" class="form-control" size="80" name="subject" value="{{ subject }}"><p>
<strong>Friendly ID:</strong><br>
You can leave this blank if this is a new post. It defaults to be based
on the subject.<br>
<input type="text" class="form-control" size="80" name="fid" value="{{ fid }}"><p>
<strong>Body:</strong><br>
<label>
<input type="radio" name="format" value="markdown"{% if format == "markdown" %} checked{% endif %}> Markdown
</label>
<label>
<input type="radio" name="format" value="html"{% if format == "html" %} checked{% endif %}> HTML
</label><br>
<textarea class="form-control input-lg" cols="80" rows="12" name="body">{{ body }}</textarea><br>
<a href="/markdown" target="_blank">Markdown cheatsheet</a> /
<a href="{{ url_for('emoticons.index') }}" target="_blank">Emoticon reference</a> (opens in new window)<br>
Optional: separate your summary from the rest of the post by typing <code>&lt;snip&gt;</code>
where you want the division to appear.<p>
<strong>Avatar:</strong><br>
<span id="avatar-preview"></span>
<select name="avatar" id="avatar" class="form-control">
<option value=""{% if avatar == "" %} selected{% endif %}>Use my profile picture</option>
{% for pic in avatars %}
<option value="{{ pic }}"{% if avatar == pic %} selected{% endif %}>{{ pic }}</option>
{% endfor %}
</select><p>
<strong>Categories:</strong><br>
<small>Comma-separated list, e.g. General, HTML, Perl, Web Design</small><br>
<input type="text" class="form-control" size="40" name="categories" value="{{ categories }}"><p>
<strong>Privacy:</strong><br>
<select name="privacy" class="form-control">
<option value="public"{% if privacy == "public" %} selected{% endif %}>
Public: everybody can see this blog entry
</option>
<option value="private"{% if privacy == "private" %} selected{% endif %}>
Private: only site admins can see this blog entry
</option>
</select><p>
<strong>Options:</strong><br>
<label>
<input type="checkbox" name="emoticons" value="true"{% if emoticons %} checked{% endif %}>
Enable graphical emoticons
</label><br>
<label>
<input type="checkbox" name="comments" value="true"{% if comments %} checked{% endif %}>
Enable comments on this entry
</label><p>
<strong>Time Stamp:</strong><br>
<input type="text" class="form-control input-sm inline" size="2" name="month" id="month" value="{{ month }}"> /
<input type="text" class="form-control input-sm inline" size="2" name="day" id="day" value="{{ day }}"> /
<input type="text" class="form-control input-sm inline" size="4" name="year" id="year" value="{{ year }}"> @
<input type="text" class="form-control input-sm inline" size="2" name="hour" id="hour" value="{{ hour }}"> :
<input type="text" class="form-control input-sm inline" size="2" name="min" id="min" value="{{ min }}"> :
<input type="text" class="form-control input-sm inline" size="2" name="sec" id="sec" value="{{ sec }}"><br>
mm / dd / yyyy @ hh:mm:ss<br>
<label>
<input type="checkbox" id="autoup" value="yes"{% if post_id == "" %} checked{% endif %}>
Automatically update
</label><p>
<button type="submit" class="btn btn-default" name="action" value="preview">Preview</button>
<button type="submit" class="btn btn-primary" name="action" value="publish">Publish Entry</button>
</form>

{% endblock %}

{% block scripts %}
<script>
var userPic = "{% if userpic %}{{ app['photo_url'] }}/{{ userpic }}{% else %}/static/avatars/default.png{% endif %}";
$(document).ready(function() {
// Preview their selected avatar.
updateAvatar();
$("#avatar").on("change", updateAvatar);
// Start ticking the timestamp updater.
setInterval(timestamps, 500)
});
function updateAvatar() {
var chosen = $("#avatar").val();
var picture = ""; // which pic to show
if (chosen === "") {
picture = userPic;
}
else {
picture = "/static/avatars/" + chosen;
}
// Show the pic
if (picture.length) {
$("#avatar-preview").html("<img src=\"" + picture + "\" alt=\"Preview\"><br>");
}
else {
$("#avatar-preview").html("");
}
}
function timestamps() {
function padout(num) {
if (num < 10) {
return '0' + num;
}
return num;
}
if ($("#autoup").is(":checked")) {
var d = new Date();
var mon = d.getMonth(); // 0..11
var day = d.getDate(); // 1..31
var year = d.getFullYear(); // 2014
var hour = d.getHours(); // 0..23
var min = d.getMinutes(); // 0..59
var sec = d.getSeconds(); // 0..59
// Adjust the dates.
mon++;
mon = padout(mon);
day = padout(day);
hour = padout(hour);
min = padout(min);
sec = padout(sec);
// Update the fields.
$("#month").val(mon);
$("#day").val(day);
$("#year").val(year);
$("#hour").val(hour);
$("#min").val(min);
$("#sec").val(sec);
}
}
var userPic = "{% if userpic %}{{ app['photo_url'] }}/{{ userpic }}{% else %}/static/avatars/default.png{% endif %}";
$(document).ready(function() {
// Preview their selected avatar.
updateAvatar();
$("#avatar").on("change", updateAvatar);
// Start ticking the timestamp updater.
setInterval(timestamps, 500)
});
function updateAvatar() {
var chosen = $("#avatar").val();
var picture = ""; // which pic to show
if (chosen === "") {
picture = userPic;
}
else {
picture = "/static/avatars/" + chosen;
}
// Show the pic
if (picture.length) {
$("#avatar-preview").html("<img src=\"" + picture + "\" alt=\"Preview\"><br>");
}
else {
$("#avatar-preview").html("");
}
}
function timestamps() {
function padout(num) {
if (num < 10) {
return '0' + num;
}
return num;
}
if ($("#autoup").is(":checked")) {
var d = new Date();
var mon = d.getMonth(); // 0..11
var day = d.getDate(); // 1..31
var year = d.getFullYear(); // 2014
var hour = d.getHours(); // 0..23
var min = d.getMinutes(); // 0..59
var sec = d.getSeconds(); // 0..59
// Adjust the dates.
mon++;
mon = padout(mon);
day = padout(day);
hour = padout(hour);
min = padout(min);
sec = padout(sec);
// Update the fields.
$("#month").val(mon);
$("#day").val(day);
$("#year").val(year);
$("#hour").val(hour);
$("#min").val(min);
$("#sec").val(sec);
}
}
</script>
{% endblock %}

+ 10
- 10
rophako/modules/comment/templates/comment/edit.html View File

@@ -7,23 +7,23 @@
Current preview of the comment:<p>

<div class="comment">
{{ comment["formatted_message"]|safe }}
{{ comment["formatted_message"]|safe }}
</div>

<h2>Edit Comment</h2>

<form name="editor" action="{{ url_for('comment.edit', thread=thread, cid=cid) }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="url" value="{{ url }}">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="url" value="{{ url }}">

<strong>Message:</strong><br>
<textarea class="form-control" cols="40" rows="8" name="message">{{ comment["message"] }}</textarea><br>
<small>Comments can be formatted with <a href="/markdown" target="_blank">Markdown</a>,
and you can use<br><a href="{{ url_for('emoticons.index') }}" target="_blank">emoticons</a>
in your comment.</small><p>
<strong>Message:</strong><br>
<textarea class="form-control" cols="40" rows="8" name="message">{{ comment["message"] }}</textarea><br>
<small>Comments can be formatted with <a href="/markdown" target="_blank">Markdown</a>,
and you can use<br><a href="{{ url_for('emoticons.index') }}" target="_blank">emoticons</a>
in your comment.</small><p>

<button type="submit" class="btn btn-default" name="action" value="preview">Preview Comment</button>
<button type="submit" class="btn btn-primary" name="action" value="save">Save</button>
<button type="submit" class="btn btn-default" name="action" value="preview">Preview Comment</button>
<button type="submit" class="btn btn-primary" name="action" value="save">Save</button>
</form>

{% endblock %}

+ 62
- 62
rophako/modules/comment/templates/comment/form.inc.html View File

@@ -1,70 +1,70 @@
{# Common template for leaving a comment/updating the comment preview. #}

{% if commenting_disabled %}
No new comments may be added to this thread.
No new comments may be added to this thread.
{% else %}
<form name="comment" action="{{ url_for('comment.preview') }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="thread" value="{{ thread }}">
<input type="hidden" name="url" value="{{ url }}">
<input type="hidden" name="subject" value="{{ subject }}">
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="left" valign="middle">
Your name:
</td>
<td align="left" valign="middle">
{% if session["login"] %}
<strong>{{ session["name"] }}</strong>
{% else %}
<input type="text" class="form-control" size="40" name="name" value="{{ name }}">
{% endif %}
</td>
</tr>
<tr>
<td align="left" valign="middle">
Your Email:
</td>
<td align="left" valign="middle">
<input type="text" class="form-control" size="40" name="contact" value="{{ contact }}" placeholder="(optional; used for Gravatar icons and subscribing)">
</td>
</tr>
<tr>
<td align="left" valign="top">
Message:
</td>
<td align="left" valign="top">
<textarea class="form-control" cols="40" rows="8" name="message" style="width: 100%">{{ message }}</textarea>
<div>
<small>Comments can be formatted with <a href="/markdown" target="_blank">Markdown</a>,
and you can use<br><a href="{{ url_for('emoticons.index') }}" target="_blank">emoticons</a>
in your comment.</small>
</div>
</td>
</tr>
<tr>
<td colspan="2" align="left" valign="top">
<label>
<input type="checkbox" name="subscribe" value="true"{% if subscribe == "true" %} checked{% endif %}>
Notify me of future comments on this page via e-mail
(<a href="{{ url_for('comment.privacy') }}" target="_blank">Privacy Policy</a>)
</label>
</td>
</tr>
</table><p>
<form name="comment" action="{{ url_for('comment.preview') }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="thread" value="{{ thread }}">
<input type="hidden" name="url" value="{{ url }}">
<input type="hidden" name="subject" value="{{ subject }}">
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td align="left" valign="middle">
Your name:
</td>
<td align="left" valign="middle">
{% if session["login"] %}
<strong>{{ session["name"] }}</strong>
{% else %}
<input type="text" class="form-control" size="40" name="name" value="{{ name }}">
{% endif %}
</td>
</tr>
<tr>
<td align="left" valign="middle">
Your Email:
</td>
<td align="left" valign="middle">
<input type="text" class="form-control" size="40" name="contact" value="{{ contact }}" placeholder="(optional; used for Gravatar icons and subscribing)">
</td>
</tr>
<tr>
<td align="left" valign="top">
Message:
</td>
<td align="left" valign="top">
<textarea class="form-control" cols="40" rows="8" name="message" style="width: 100%">{{ message }}</textarea>
<div>
<small>Comments can be formatted with <a href="/markdown" target="_blank">Markdown</a>,
and you can use<br><a href="{{ url_for('emoticons.index') }}" target="_blank">emoticons</a>
in your comment.</small>
</div>
</td>
</tr>
<tr>
<td colspan="2" align="left" valign="top">
<label>
<input type="checkbox" name="subscribe" value="true"{% if subscribe == "true" %} checked{% endif %}>
Notify me of future comments on this page via e-mail
(<a href="{{ url_for('comment.privacy') }}" target="_blank">Privacy Policy</a>)
</label>
</td>
</tr>
</table><p>

<div style="display: none">
If you can see this, don't touch the following fields.<br>
<input type="text" class="form-control" name="website" value="http://"><br>
<input type="text" class="form-control" name="email" value="">
</div>
<div style="display: none">
If you can see this, don't touch the following fields.<br>
<input type="text" class="form-control" name="website" value="http://"><br>
<input type="text" class="form-control" name="email" value="">
</div>

{% if preview %}
<button class="btn btn-default" type="submit" name="action" value="preview">Refresh Preview</button>
<button class="btn btn-primary" type="submit" name="action" value="submit">Submit Comment</button>
{% else %}
<button class="btn btn-primary" type="submit" name="action" value="preview">Leave Comment</button>
{% endif %}
{% if preview %}
<button class="btn btn-default" type="submit" name="action" value="preview">Refresh Preview</button>
<button class="btn btn-primary" type="submit" name="action" value="submit">Submit Comment</button>
{% else %}
<button class="btn btn-primary" type="submit" name="action" value="preview">Leave Comment</button>
{% endif %}

</form>
</form>
{% endif %}

+ 26
- 26
rophako/modules/comment/templates/comment/index.inc.html View File

@@ -1,39 +1,39 @@
<a name="comments"></a>
{% if header %}
<h1>Comments</h1>
<h1>Comments</h1>
{% endif %}

There {% if comments|length == 1 %}is{% else %}are{% endif %}
{{ comments|length }} comment{% if comments|length != 1 %}s{% endif %}
on this page.<p>
{{ comments|length }} comment{% if comments|length != 1 %}s{% endif %}
on this page.<p>

{% for comment in comments %}
<div class="comment">
<div class="comment-author">
{% if comment["image"] and (comment["image"].startswith('http:') or comment["image"].startswith('https:') or comment["image"].startswith('//')) %}
<img src="{{ comment['image'] }}" alt="Avatar" width="96" height="96">
{% elif comment["image"] %}
<img src="{{ photo_url }}/{{ comment['image'] }}" alt="Avatar" width="96" height="96">
{% else %}
<img src="/static/avatars/default.png" alt="guest" width="96" height="96">
{% endif %}
<div><strong>{% if comment['username'] %}{{ comment['username'] }}{% else %}guest{% endif %}</strong></div>
</div>
<div class="comment">
<div class="comment-author">
{% if comment["image"] and (comment["image"].startswith('http:') or comment["image"].startswith('https:') or comment["image"].startswith('//')) %}
<img src="{{ comment['image'] }}" alt="Avatar" width="96" height="96">
{% elif comment["image"] %}
<img src="{{ photo_url }}/{{ comment['image'] }}" alt="Avatar" width="96" height="96">
{% else %}
<img src="/static/avatars/default.png" alt="guest" width="96" height="96">
{% endif %}
<div><strong>{% if comment['username'] %}{{ comment['username'] }}{% else %}guest{% endif %}</strong></div>
</div>

<strong>Posted on {{ comment["pretty_time"] }} by {{ comment["name"] }}.</strong><p>
<strong>Posted on {{ comment["pretty_time"] }} by {{ comment["name"] }}.</strong><p>

{{ comment["formatted_message"]|safe }}
{{ comment["formatted_message"]|safe }}

<div class="clear">
{% if session["login"] %}
[IP: {{ comment["ip"] }}
|
<a href="{{ url_for('comment.edit', thread=thread, cid=comment['id'], url=url) }}">Edit</a>
|
<a href="{{ url_for('comment.delete', thread=thread, cid=comment['id'], url=url) }}" onclick="return window.confirm('Are you sure?')">Delete</a>]
{% endif %}
</div>
</div><p>
<div class="clear">
{% if session["login"] %}
[IP: {{ comment["ip"] }}
|
<a href="{{ url_for('comment.edit', thread=thread, cid=comment['id'], url=url) }}">Edit</a>
|
<a href="{{ url_for('comment.delete', thread=thread, cid=comment['id'], url=url) }}" onclick="return window.confirm('Are you sure?')">Delete</a>]
{% endif %}
</div>
</div><p>
{% endfor %}

<h2>Add a Comment</h2>


+ 14
- 14
rophako/modules/comment/templates/comment/preview.html View File

@@ -7,26 +7,26 @@
This is a preview of what your comment is going to look like once posted.<p>

<div class="comment">
<div class="comment-author">
{% if contact %}
<img src="{{ gravatar }}" alt="Avatar" width="96" height="96">
{% else %}
<img src="/static/avatars/default.png" alt="guest" width="96" height="96">
{% endif %}<br>
<strong>{% if session["login"] %}{{ session["username"] }}{% else %}guest{% endif %}</strong>
</div>
<div class="comment-author">
{% if contact %}
<img src="{{ gravatar }}" alt="Avatar" width="96" height="96">
{% else %}
<img src="/static/avatars/default.png" alt="guest" width="96" height="96">
{% endif %}<br>
<strong>{% if session["login"] %}{{ session["username"] }}{% else %}guest{% endif %}</strong>
</div>

<strong>Posted on {{ pretty_time }} by {{ name or "Anonymous" }}.</strong><p>
<strong>Posted on {{ pretty_time }} by {{ name or "Anonymous" }}.</strong><p>

{{ preview|safe }}
{{ preview|safe }}

<div class="clear"></div>
<div class="clear"></div>
</div>

{% if subscribe == "true" and contact %}
<p>
You will be subscribed to future comments on this thread. Notification
e-mails will be sent to {{ contact }}.<p>
<p>
You will be subscribed to future comments on this thread. Notification
e-mails will be sent to {{ contact }}.<p>
{% endif %}

<h2>Edit Comment</h2>


+ 32
- 32
rophako/modules/comment/templates/comment/privacy.html View File

@@ -15,46 +15,46 @@ e-mail address in the form below.<p>
<h2>Privacy Policy</h2>

<ul>
<li>
Your e-mail address that you use when you post the comment will only be
used for sending you notifications via e-mail when somebody else replies
to the comment thread and for showing a
<a href="http://www.gravatar.com/" target="_blank">Gravatar</a> next to
your comment.
</li>
<li>
Your e-mail will not be visible to anybody else on this site.
</li>
<li>
Your e-mail won't be given to any spammers so you don't need to worry
about junk mail.
</li>
<li>
You can unsubscribe from individual comment threads by using the link
provided in the notification e-mail. You can unsubscribe from ALL
threads by using the form on this page.
</li>
<li>
Your e-mail address that you use when you post the comment will only be
used for sending you notifications via e-mail when somebody else replies
to the comment thread and for showing a
<a href="http://www.gravatar.com/" target="_blank">Gravatar</a> next to
your comment.
</li>
<li>
Your e-mail will not be visible to anybody else on this site.
</li>
<li>
Your e-mail won't be given to any spammers so you don't need to worry
about junk mail.
</li>
<li>
You can unsubscribe from individual comment threads by using the link
provided in the notification e-mail. You can unsubscribe from ALL
threads by using the form on this page.
</li>
</ul>

<h2>Unsubscribe from All Comment Threads</h2>

<form name="unsubscribe" action="{{ url_for('comment.unsubscribe') }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="thread" value="*">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="thread" value="*">

Enter the e-mail address to be unsubscribed from all threads:<br>
<input type="email" class="form-control" size="40" name="email"><p>
Enter the e-mail address to be unsubscribed from all threads:<br>
<input type="email" class="form-control" size="40" name="email"><p>

<button type="submit" class="btn btn-primary">Unsubscribe</button>
<button type="submit" class="btn btn-primary">Unsubscribe</button>

<div style="display: none">
If you can see this, do not touch these fields.<br>
<input type="text" class="form-control" name="url" value="http://"><br>
<input type="text" class="form-control" name="message" value="">
</div>
<div style="display: none">
If you can see this, do not touch these fields.<br>
<input type="text" class="form-control" name="url" value="http://"><br>
<input type="text" class="form-control" name="message" value="">
</div>
</form>



+ 2
- 2
rophako/modules/comment/templates/comment/unsubscribed.html View File

@@ -6,9 +6,9 @@

The e-mail address <strong>{{ email }}</strong> has been unsubscribed
{% if thread == "*" %}
from all comment threads on this site.
from all comment threads on this site.
{% else %}
from the comment thread "{{ thread }}".
from the comment thread "{{ thread }}".
{% endif %}

{% endblock %}

+ 30
- 30
rophako/modules/contact/templates/contact/index.html View File

@@ -9,39 +9,39 @@ You can use the form below to send me an e-mail.<p>
<form name="contact" action="{{ url_for('contact.send') }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="50%" align="left" valign="middle">
<strong>Your name:</strong><br>
<small>(so I know who you are)</small><br>
<input type="text" class="form-control"size="40" name="name">
</td>
<td width="50%" align="left" valign="middle">
<strong>Your email:</strong><br>
<small>(if you want a response)</small><br>
<input type="email" class="form-control" size="40" name="email">
</td>
</tr>
<tr>
<td colspan="2" align="left" valign="middle">
<strong>Message subject:</strong><br>
<small>(optional)</small><br>
<input type="text" class="form-control" size="40" name="subject" style="width: 100%"><p>
<tr>
<td width="50%" align="left" valign="middle">
<strong>Your name:</strong><br>
<small>(so I know who you are)</small><br>
<input type="text" class="form-control"size="40" name="name">
</td>
<td width="50%" align="left" valign="middle">
<strong>Your email:</strong><br>
<small>(if you want a response)</small><br>
<input type="email" class="form-control" size="40" name="email">
</td>
</tr>
<tr>
<td colspan="2" align="left" valign="middle">
<strong>Message subject:</strong><br>
<small>(optional)</small><br>
<input type="text" class="form-control" size="40" name="subject" style="width: 100%"><p>

<strong>Message:</strong><br>
<small>(required)</small><br>
<textarea class="form-control" cols="40" rows="12" name="message" style="width: 100%"></textarea>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle">
<button type="submit" class="btn btn-primary">Send Message</button>
</td>
</tr>
<strong>Message:</strong><br>
<small>(required)</small><br>
<textarea class="form-control" cols="40" rows="12" name="message" style="width: 100%"></textarea>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle">
<button type="submit" class="btn btn-primary">Send Message</button>
</td>
</tr>
</table>
<div style="display: none">
If you can see these boxes, don't touch them.<br>
<input type="text" class="form-control" size="40" name="contact" value=""><br>
<input type="text" class="form-control" size="40" name="website" value="http://">
If you can see these boxes, don't touch them.<br>
<input type="text" class="form-control" size="40" name="contact" value=""><br>
<input type="text" class="form-control" size="40" name="website" value="http://">
</div>
</form>


+ 20
- 20
rophako/modules/emoticons/templates/emoticons/index.html View File

@@ -5,26 +5,26 @@
<h1>Emoticon Theme: {{ theme_name }}</h1>

<table class="table" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th>Emoticon</th>
<th>Trigger Text</th>
</tr>
</thead>
<tbody>
{% for img in smileys %}
<tr>
<td align="center" valign="middle">
<img src="/static/smileys/{{ theme }}/{{ img['img'] }}">
</td>
<td align="left" valign="middle">
{% for trigger in img['triggers'] %}
{{ trigger }}&nbsp;&nbsp;&nbsp;&nbsp;
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
<thead>
<tr>
<th>Emoticon</th>
<th>Trigger Text</th>
</tr>
</thead>
<tbody>
{% for img in smileys %}
<tr>
<td align="center" valign="middle">
<img src="/static/smileys/{{ theme }}/{{ img['img'] }}">
</td>
<td align="left" valign="middle">
{% for trigger in img['triggers'] %}
{{ trigger }}&nbsp;&nbsp;&nbsp;&nbsp;
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>

{% endblock %}

+ 44
- 44
rophako/modules/photo/templates/photos/album.html View File

@@ -5,57 +5,57 @@
<h1>Album: {{ album }}</h1>

{% if album_info["description"] %}
<div class="photo-description">{{ markdown|safe }}</div><p>
<div class="photo-description">{{ markdown|safe }}</div><p>
{% endif %}

{% if album_info["format"] == "vertical" %}
{% for photo in photos %}
{% set data = photo["data"] %}
{% if data["caption"] %}
<h2>{{ data["caption"] }}</h2>
{% endif %}
<a href="{{ url_for('photo.view_photo', key=photo['key']) }}">
<img src="{{ app['photo_url'] }}/{{ data['large'] }}" class="portrait">
</a><p>
{% if data["description"] %}
<div class="photo-description">{{ data["markdown"]|safe }}</div>
{% endif %}
{% if loop.index < photos|length %}<hr>{% endif %}
{% endfor %}
{% for photo in photos %}
{% set data = photo["data"] %}
{% if data["caption"] %}
<h2>{{ data["caption"] }}</h2>
{% endif %}
<a href="{{ url_for('photo.view_photo', key=photo['key']) }}">
<img src="{{ app['photo_url'] }}/{{ data['large'] }}" class="portrait">
</a><p>
{% if data["description"] %}
<div class="photo-description">{{ data["markdown"]|safe }}</div>
{% endif %}
{% if loop.index < photos|length %}<hr>{% endif %}
{% endfor %}
{% else %}{# classic layout #}
<ul class="photo-grid">
{% for photo in photos %}
<li class="portrait">
<div class="dummy"></div>
<div class="photo-grid-item">
<a href="{{ url_for('photo.view_photo', key=photo['key']) }}">
<img src="{{ app['photo_url'] }}/{{ photo['data']['thumb'] }}" width="100%" height="100%">
<span class="name">{{ photo["data"]["caption"] }}</span>
</a>
</div>
</li>
{% endfor %}
</ul>
<div class="clear"></div>
<ul class="photo-grid">
{% for photo in photos %}
<li class="portrait">
<div class="dummy"></div>
<div class="photo-grid-item">
<a href="{{ url_for('photo.view_photo', key=photo['key']) }}">
<img src="{{ app['photo_url'] }}/{{ photo['data']['thumb'] }}" width="100%" height="100%">
<span class="name">{{ photo["data"]["caption"] }}</span>
</a>
</div>
</li>
{% endfor %}
</ul>
<div class="clear"></div>
{% endif %}

{% if session["login"] %}
<h1>Administrative Options</h1>
<ul>
<li><a href="{{ url_for('photo.upload') }}">Upload a Photo</a></li>
{% if photos|length > 0 %}
<li><a href="{{ url_for('photo.edit_album', album=album) }}">Edit Album Settings</a></li>
<li><a href="{{ url_for('photo.bulk_captions', album=album) }}">Edit Image Titles/Descriptions</a></li>
<li><a href="{{ url_for('photo.arrange_photos', album=album) }}">Rearrange Photos</a></li>
<li><a href="{{ url_for('photo.delete_album', album=album) }}">Delete Album</a></li>
{% endif %}
</ul>
<h1>Administrative Options</h1>
<ul>
<li><a href="{{ url_for('photo.upload') }}">Upload a Photo</a></li>
{% if photos|length > 0 %}
<li><a href="{{ url_for('photo.edit_album', album=album) }}">Edit Album Settings</a></li>
<li><a href="{{ url_for('photo.bulk_captions', album=album) }}">Edit Image Titles/Descriptions</a></li>
<li><a href="{{ url_for('photo.arrange_photos', album=album) }}">Rearrange Photos</a></li>
<li><a href="{{ url_for('photo.delete_album', album=album) }}">Delete Album</a></li>
{% endif %}
</ul>
{% endif %}

{% endblock %}

+ 20
- 20
rophako/modules/photo/templates/photos/albums.html View File

@@ -5,33 +5,33 @@
<h1>Photo Albums</h1>

{% if albums|length == 0 %}
<em>There are no photo albums yet.</em>
<em>There are no photo albums yet.</em>
{% else %}
<ul class="photo-grid">
<ul class="photo-grid">

{% for album in albums %}
<li class="portrait">
<div class="dummy"></div>
<div class="photo-grid-item">
<a href="{{ url_for('photo.album_index', name=album['name']) }}">
<img src="{{ app['photo_url'] }}/{{ album['cover'] }}" width="100%" height="100%">
<span class="name">{{ album["name"] }}</span>
</a>
</div>
</li>
{% endfor %}
{% for album in albums %}
<li class="portrait">
<div class="dummy"></div>
<div class="photo-grid-item">
<a href="{{ url_for('photo.album_index', name=album['name']) }}">
<img src="{{ app['photo_url'] }}/{{ album['cover'] }}" width="100%" height="100%">
<span class="name">{{ album["name"] }}</span>
</a>
</div>
</li>
{% endfor %}

</ul>
<div class="clear"></div>
</ul>
<div class="clear"></div>
{% endif %}

{% if session["login"] %}
<h1>Administrative Options</h1>
<h1>Administrative Options</h1>

<ul>
<li><a href="{{ url_for('photo.upload') }}">Upload a Photo</a></li>
{% if albums|length > 0 %}<li><a href="{{ url_for('photo.arrange_albums') }}">Rearrange Albums</a></li>{% endif %}
</ul>
<ul>
<li><a href="{{ url_for('photo.upload') }}">Upload a Photo</a></li>
{% if albums|length > 0 %}<li><a href="{{ url_for('photo.arrange_albums') }}">Rearrange Albums</a></li>{% endif %}
</ul>
{% endif %}

{% endblock %}

+ 33
- 33
rophako/modules/photo/templates/photos/arrange_albums.html View File

@@ -7,24 +7,24 @@
Drag and drop your albums in the positions you want them in.<p>

<form name="arrange" id="arrange-form" action="{{ url_for('photo.arrange_albums') }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="order" id="order" value="">
<button type="submit" class="btn btn-primary">Save Changes</button>
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="order" id="order" value="">
<button type="submit" class="btn btn-primary">Save Changes</button>
</form>
<p>

<ul id="arrange-photos" class="photo-grid">

{% for album in albums %}
<li data-name="{{ album['name'] }}" class="portrait">
<div class="dummy"></div>
<div class="photo-grid-item">
<a href="{{ url_for('photo.album_index', name=album['name']) }}">
<img src="{{ app['photo_url'] }}/{{ album['cover'] }}" width="100%" height="100%">
<span class="name">{{ album["name"] }}</span>
</a>
</div>
</li>
<li data-name="{{ album['name'] }}" class="portrait">
<div class="dummy"></div>
<div class="photo-grid-item">
<a href="{{ url_for('photo.album_index', name=album['name']) }}">
<img src="{{ app['photo_url'] }}/{{ album['cover'] }}" width="100%" height="100%">
<span class="name">{{ album["name"] }}</span>
</a>
</div>
</li>
{% endfor %}

</ul>
@@ -35,26 +35,26 @@ Drag and drop your albums in the positions you want them in.<p>
<link rel="stylesheet" type="text/css" media="all" href="/css/ui-lightness/jquery-ui-1.10.4.custom.css">
<script src="/js/jquery-ui-1.10.4.custom.js"></script>
<script>
$(document).ready(function() {
var $photos = $("#arrange-photos"),
$form = $("#arrange-form"),
$order = $("#order");
var doArrangePhotos = function() {
var order = [];
// Get the list of elements.
var list = $photos.children().each(function() {
var name = $(this).data("name");
order.push(name);
});
$order.val(order.join(";"));
return true;
};
$form.submit(doArrangePhotos);
$photos.sortable();
$photos.disableSelection();
});
$(document).ready(function() {
var $photos = $("#arrange-photos"),
$form = $("#arrange-form"),
$order = $("#order");
var doArrangePhotos = function() {
var order = [];
// Get the list of elements.
var list = $photos.children().each(function() {
var name = $(this).data("name");
order.push(name);
});
$order.val(order.join(";"));
return true;
};
$form.submit(doArrangePhotos);
$photos.sortable();
$photos.disableSelection();
});
</script>
{% endblock %}

+ 31
- 31
rophako/modules/photo/templates/photos/arrange_photos.html View File

@@ -7,22 +7,22 @@
Drag and drop your photos in the positions you want them in.<p>

<form name="arrange" id="arrange-form" action="{{ url_for('photo.arrange_photos', album=album) }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="order" id="order" value="">
<button type="submit" class="btn btn-primary">Save Changes</button>
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="order" id="order" value="">
<button type="submit" class="btn btn-primary">Save Changes</button>
</form>
<p>

<ul id="arrange-photos" class="photo-grid">

{% for photo in photos %}
<li data-name="{{ photo['key'] }}" class="portrait">
<div class="dummy"></div>
<div class="photo-grid-item">
<img src="{{ app['photo_url'] }}/{{ photo['data']['thumb'] }}" width="100%" height="100%">
<span class="name">{{ photo['data']['caption'] }}</span>
</div>
</li>
<li data-name="{{ photo['key'] }}" class="portrait">
<div class="dummy"></div>
<div class="photo-grid-item">
<img src="{{ app['photo_url'] }}/{{ photo['data']['thumb'] }}" width="100%" height="100%">
<span class="name">{{ photo['data']['caption'] }}</span>
</div>
</li>
{% endfor %}

</ul>
@@ -33,26 +33,26 @@ Drag and drop your photos in the positions you want them in.<p>
<link rel="stylesheet" type="text/css" media="all" href="/css/ui-lightness/jquery-ui-1.10.4.custom.css">
<script src="/js/jquery-ui-1.10.4.custom.js"></script>
<script>
$(document).ready(function() {
var $photos = $("#arrange-photos"),
$form = $("#arrange-form"),
$order = $("#order");
var doArrangePhotos = function() {
var order = [];
// Get the list of elements.
var list = $photos.children().each(function() {
var name = $(this).data("name");
order.push(name);
});
$order.val(order.join(";"));
return true;
};
$form.submit(doArrangePhotos);
$photos.sortable();
$photos.disableSelection();
});
$(document).ready(function() {
var $photos = $("#arrange-photos"),
$form = $("#arrange-form"),
$order = $("#order");
var doArrangePhotos = function() {
var order = [];
// Get the list of elements.
var list = $photos.children().each(function() {
var name = $(this).data("name");
order.push(name);
});
$order.val(order.join(";"));
return true;
};
$form.submit(doArrangePhotos);
$photos.sortable();
$photos.disableSelection();
});
</script>
{% endblock %}

+ 86
- 86
rophako/modules/photo/templates/photos/crop.html View File

@@ -9,27 +9,27 @@ shape. You can use this page to modify the region of the photo you want to
crop.<p>

<table border="0" cellspacing="4" cellpadding="2">
<tr>
<td align="center" valign="middle">
<img src="{{ app['photo_url'] }}/{{ preview }}" id="cropbox">
</td>
<td align="center" valign="top">
<strong>Preview:</strong><br>
<div style="width: 100px; height: 100px; overflow: hidden">
<img src="{{ app['photo_url'] }}/{{ preview }}" id="preview" style="max-width: none">
</div>
<p>
<form name="crop" action="{{ url_for('photo.crop', photo=photo) }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="x" id="x" value="0">
<input type="hidden" name="y" id="y" value="0">
<input type="hidden" name="length" id="length" value="0">
<button type="submit" class="btn btn-primary">Crop Photo!</button>
</form>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<img src="{{ app['photo_url'] }}/{{ preview }}" id="cropbox">
</td>
<td align="center" valign="top">
<strong>Preview:</strong><br>
<div style="width: 100px; height: 100px; overflow: hidden">
<img src="{{ app['photo_url'] }}/{{ preview }}" id="preview" style="max-width: none">
</div>
<p>
<form name="crop" action="{{ url_for('photo.crop', photo=photo) }}" method="POST">
<input type="hidden" name="token" value="{{ csrf_token() }}">
<input type="hidden" name="x" id="x" value="0">
<input type="hidden" name="y" id="y" value="0">
<input type="hidden" name="length" id="length" value="0">
<button type="submit" class="btn btn-primary">Crop Photo!</button>
</form>
</td>
</tr>
</table>

{% endblock %}
@@ -38,70 +38,70 @@ crop.<p>
<script src="/js/jquery.Jcrop.min.js"></script>
<link rel="stylesheet" type="text/css" href="/css/jquery.Jcrop.css">
<script>
$(document).ready(function() {
var $cropbox = $("#cropbox"),
$preview = $("#preview"),
$x = $("#x"),
$y = $("#y"),
$length = $("#length");
// Find the shortest side.
var len;
if ($cropbox.width() > $cropbox.height()) {
len = $cropbox.height();
}
else {
len = $cropbox.width();
}
// Jcrop handler.
var showPreview = function(coords) {
if (parseInt(coords.w) > 0) {
var rx = 100 / coords.w;
var ry = 100 / coords.h;
var ht = $cropbox.height();
var wt = $cropbox.width();
// Make the coords into percentages, so it works on mobile.
// Get the true dimensions of the image from PIL.
var trueW = {{ true_width }};
var trueH = {{ true_height }};
// The actual (possibly scaled) image shown on the page is hereby called
// the "display image"... turn our "display coords" into percentages
// across the image.
var percentX = coords.x / wt;
var percentY = coords.y / ht;
var percentLen = coords.w / wt;
// Now get our true coords by multiplying those percentages against the
// true dimensions of the image from PIL.
var trueX = trueW * percentX;
var trueY = trueH * percentY;
var trueLen = trueW * percentLen;
// Update the preview.
$preview.css({
width: Math.round(rx * wt) + "px",
height: Math.round(ry * ht) + "px",
marginLeft: "-" + Math.round(rx * coords.x) + "px",
marginTop: "-" + Math.round(ry * coords.y) + "px"
})
// Update the form.
$x.val(parseInt(trueX));
$y.val(parseInt(trueY));
$length.val(parseInt(trueLen));
}
}
$cropbox.Jcrop({
onChange: showPreview,
onSelect: showPreview,
aspectRatio: 1,
setSelect: [ 0, 0, len, len ],
})
});
$(document).ready(function() {
var $cropbox = $("#cropbox"),
$preview = $("#preview"),
$x = $("#x"),
$y = $("#y"),
$length = $("#length");
// Find the shortest side.
var len;
if ($cropbox.width() > $cropbox.height()) {
len = $cropbox.height();
}
else {
len = $cropbox.width();
}
// Jcrop handler.
var showPreview = function(coords) {
if (parseInt(coords.w) > 0) {
var rx = 100 / coords.w;
var ry = 100 / coords.h;
var ht = $cropbox.height();
var wt = $cropbox.width();
// Make the coords into percentages, so it works on mobile.
// Get the true dimensions of the image from PIL.
var trueW = {{ true_width }};
var trueH = {{ true_height }};
// The actual (possibly scaled) image shown on the page is hereby called
// the "display image"... turn our "display coords" into percentages
// across the image.