diff options
author | citrons <citrons@mondecitronne.com> | 2025-06-14 01:03:33 -0500 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2025-06-14 10:17:34 +0100 |
commit | a62beb7a48044686e50a27a53d112a99f8607461 (patch) | |
tree | f05b91f15e299cbc8bd696f41664994aa8f45cd9 /apioforum/templates | |
parent | 53f8b3fd8adf27ad8a4df5036a7776ff8f6d17cc (diff) |
convert spaces to tabs
Diffstat (limited to 'apioforum/templates')
-rw-r--r-- | apioforum/templates/admin/admin_page.html | 6 | ||||
-rw-r--r-- | apioforum/templates/auth/login.html | 22 | ||||
-rw-r--r-- | apioforum/templates/auth/register.html | 22 | ||||
-rw-r--r-- | apioforum/templates/base.html | 48 | ||||
-rw-r--r-- | apioforum/templates/common.html | 50 | ||||
-rw-r--r-- | apioforum/templates/config_thread.html | 22 | ||||
-rw-r--r-- | apioforum/templates/create_thread.html | 12 | ||||
-rw-r--r-- | apioforum/templates/edit_forum.html | 6 | ||||
-rw-r--r-- | apioforum/templates/search_results.html | 34 | ||||
-rw-r--r-- | apioforum/templates/view_forum.html | 4 | ||||
-rw-r--r-- | apioforum/templates/view_thread.html | 116 |
11 files changed, 171 insertions, 171 deletions
diff --git a/apioforum/templates/admin/admin_page.html b/apioforum/templates/admin/admin_page.html index f48c6c0..fb558bf 100644 --- a/apioforum/templates/admin/admin_page.html +++ b/apioforum/templates/admin/admin_page.html @@ -6,9 +6,9 @@ {% block content %} <h2>admins</h2> <ul> - {% for admin in admins %} - <li>{{admin.username}}</li> - {% endfor %} + {% for admin in admins %} + <li>{{admin.username}}</li> + {% endfor %} </ul> <p>this page will have more things on it later, probably</p> {% endblock %} diff --git a/apioforum/templates/auth/login.html b/apioforum/templates/auth/login.html index 89f490f..361650f 100644 --- a/apioforum/templates/auth/login.html +++ b/apioforum/templates/auth/login.html @@ -1,20 +1,20 @@ {% extends "base.html" %} {% block header %} - <h1>{% block title %}login{% endblock %}</h1> + <h1>{% block title %}login{% endblock %}</h1> {% endblock %} {% block content %} <p>log in using an existing account here. if you don't already have an account, <a href="{{url_for('auth.register')}}">register</a> first instead.</p> <form method="post"> - <label for="username">username</label> - <input name="username" id="username" required> - <br> - <label for="password">password</label> - <input type="password" name="password" id="password" required> - <br> - <input type="checkbox" name="keep_logged_in" id="keep_logged_in"> - <label for="keep_logged_in">keep me logged in</label> - <br> - <input type="submit" value="login"> + <label for="username">username</label> + <input name="username" id="username" required> + <br> + <label for="password">password</label> + <input type="password" name="password" id="password" required> + <br> + <input type="checkbox" name="keep_logged_in" id="keep_logged_in"> + <label for="keep_logged_in">keep me logged in</label> + <br> + <input type="submit" value="login"> </form> {% endblock %} diff --git a/apioforum/templates/auth/register.html b/apioforum/templates/auth/register.html index 082a95b..ed09c56 100644 --- a/apioforum/templates/auth/register.html +++ b/apioforum/templates/auth/register.html @@ -1,20 +1,20 @@ {% extends "base.html" %} {% block header %} - <h1>{% block title %}register{% endblock %}</h1> + <h1>{% block title %}register{% endblock %}</h1> {% endblock %} {% block content %} <p>create a new account here. if you already have an account, <a href="{{url_for('auth.login')}}">login</a> instead.</p> <form method="post"> - <label for="username">username</label> - <input name="username" id="username" maxlength="20" required> - <br> - <label for="password">password</label> - <input type="password" name="password" id="password" required> - <br> - <input type="checkbox" name="keep_logged_in" id="keep_logged_in"> - <label for="keep_logged_in">keep me logged in</label> - <br> - <input type="submit" value="register"> + <label for="username">username</label> + <input name="username" id="username" maxlength="20" required> + <br> + <label for="password">password</label> + <input type="password" name="password" id="password" required> + <br> + <input type="checkbox" name="keep_logged_in" id="keep_logged_in"> + <label for="keep_logged_in">keep me logged in</label> + <br> + <input type="submit" value="register"> </form> {% endblock %} diff --git a/apioforum/templates/base.html b/apioforum/templates/base.html index a202300..ed0a195 100644 --- a/apioforum/templates/base.html +++ b/apioforum/templates/base.html @@ -2,15 +2,15 @@ {% from 'common.html' import disp_user with context %} <!DOCTYPE html> <html> - <head> - <title>{%block title %}{% endblock %}</title> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="/static/style.css"> - <link rel="stylesheet" href="/static/md-colors.css"> - <link rel="icon" href="//gh0.pw/i/a.ico"> - </head> - <body> - <nav aria-label="main" id="navbar"> + <head> + <title>{%block title %}{% endblock %}</title> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link rel="stylesheet" href="/static/style.css"> + <link rel="stylesheet" href="/static/md-colors.css"> + <link rel="icon" href="//gh0.pw/i/a.ico"> + </head> + <body> + <nav aria-label="main" id="navbar"> <p style="font-family: monospace;"><b><red>ap</red><orange>i</orange><yellow>o</yellow><green>f</green><blue>o</blue><indigo>r</indigo><violet>um</violet></b>™</p> <form class="inline-form" action="/search"> <input type="search" placeholder="query" name="q"> @@ -27,7 +27,7 @@ {% 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)}}"> logout @@ -47,24 +47,24 @@ {% endif %} </div> - </nav> + </nav> - <div class="header"> - {% block header %}{% endblock %} - </div> + <div class="header"> + {% block header %}{% endblock %} + </div> - {% for msg in get_flashed_messages() %} - <div class="flashmsg">{{ msg }}</div> - {% endfor %} + {% for msg in get_flashed_messages() %} + <div class="flashmsg">{{ msg }}</div> + {% endfor %} - {% block nmcontent %} - <main> - {%block content %}{% endblock %} - </main> - {% endblock %} - <script>/* bees */</script> + {% block nmcontent %} + <main> + {%block content %}{% endblock %} + </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> + </body> </html> diff --git a/apioforum/templates/common.html b/apioforum/templates/common.html index fae4b7c..a24272b 100644 --- a/apioforum/templates/common.html +++ b/apioforum/templates/common.html @@ -4,8 +4,8 @@ {% macro disp_post(post, buttons=False, forum=None, footer=None) %} <div class="post {% if post.deleted %}deleted-post{% endif %}" id="post_{{post.id}}"> - <div class="post-heading"> - <span class="post-heading-a"> + <div class="post-heading"> + <span class="post-heading-a"> {% if not post.deleted %} {{disp_user(post.author)}} {% else %} @@ -27,12 +27,12 @@ {{ts(post.created)}} - {% if post.edited %} - (edited {{ts(post.updated)}}) - {% endif %} - </span> - <span class="post-heading-b"> - {% if buttons and not post.deleted %} + {% if post.edited %} + (edited {{ts(post.updated)}}) + {% endif %} + </span> + <span class="post-heading-b"> + {% if buttons and not post.deleted %} {% if post.author == g.user %} <a class="actionbutton" href="{{url_for('thread.edit_post',post_id=post.id)}}">edit</a> @@ -41,25 +41,25 @@ <a class="actionbutton" href="{{url_for('thread.delete_post',post_id=post.id)}}">delete</a> {% endif %} - <a class="actionbutton" - href="{{url_for('thread.view_post',post_id=post.id)}}">src</a> - {% endif %} - + <a class="actionbutton" + href="{{url_for('thread.view_post',post_id=post.id)}}">src</a> + {% endif %} + <a class="post-anchor-link" href="{{post_jump(post.id)}}">#{{post.id}}</a> - </span> - </div> - <div class="post-content md"> + </span> + </div> + <div class="post-content md"> {% if not post.deleted %} {{ post.content|md|safe }} {% else %} this post never existed. {% endif %} - </div> - {% if footer %} - <div class="post-footer"> - {{ footer }} - </div> - {% endif %} + </div> + {% if footer %} + <div class="post-footer"> + {{ footer }} + </div> + {% endif %} </div> {% endmacro %} @@ -79,7 +79,7 @@ {% if href is not none -%} href="{{href}}" {%- endif -%}> - {{-the_tag.name-}} + {{-the_tag.name-}} </{{el}}> {%- endmacro %} @@ -123,9 +123,9 @@ <text text-anchor="middle" dominant-baseline="middle" x="11%" y="55%" fill="black" style="font-size:15px">no votes</text> {% else %} {% for opt in poll.options %} - {% set opt_count = opt.num or 0 %} - {% set colour = (loop.index|string + opt.text)|gen_colour %} - {% if opt_count != 0 %} + {% set opt_count = opt.num or 0 %} + {% set colour = (loop.index|string + opt.text)|gen_colour %} + {% if opt_count != 0 %} {% set percentage = 100*(opt_count/total_votes) %} {# todo: do this in css somehow #} {% if opt.text|length > 10 %} diff --git a/apioforum/templates/config_thread.html b/apioforum/templates/config_thread.html index 0795ccc..1debe76 100644 --- a/apioforum/templates/config_thread.html +++ b/apioforum/templates/config_thread.html @@ -33,22 +33,22 @@ {% if thread.poll is none %} <h2>create poll</h2> <form method="post" action="{{url_for('thread.create_poll',thread_id=thread.id)}}"> - <fieldset> - <legend>create poll</legend> - <label for="polltitle">question title</label> - <input type="title" id="polltitle" name="polltitle"> - <br> - <label for="polloptions">options (one per line)</label> - <textarea name="polloptions" id="polloptions"></textarea> - </fieldset> - <p>important: once a poll is created, you will not be able to modify it except to delete it entirely</p> - <input type="submit" value="create"> + <fieldset> + <legend>create poll</legend> + <label for="polltitle">question title</label> + <input type="title" id="polltitle" name="polltitle"> + <br> + <label for="polloptions">options (one per line)</label> + <textarea name="polloptions" id="polloptions"></textarea> + </fieldset> + <p>important: once a poll is created, you will not be able to modify it except to delete it entirely</p> + <input type="submit" value="create"> </form> {% else %} <h2>delete poll</h2> <p>there is already a poll attached to this thread. you can delete it, which will allow you to create a new one, but this will erase all existing votes and data for the current poll.</p> <form action="{{url_for('thread.delete_poll',thread_id=thread.id)}}" method="post"> - <input type="submit" value="confirm: delete poll"> + <input type="submit" value="confirm: delete poll"> </form> {% endif %} {% endif %} diff --git a/apioforum/templates/create_thread.html b/apioforum/templates/create_thread.html index 04b4f42..90d1410 100644 --- a/apioforum/templates/create_thread.html +++ b/apioforum/templates/create_thread.html @@ -5,11 +5,11 @@ {% block content %} <form method="POST"> - <label for="title">thread title</label> - <input name="title" id="title"> - <br> - <label for="content">thread content</label> - <textarea name="content" id="content" class="new-post-box" placeholder="thread content here"></textarea> - <input type="submit" value="create"> + <label for="title">thread title</label> + <input name="title" id="title"> + <br> + <label for="content">thread content</label> + <textarea name="content" id="content" class="new-post-box" placeholder="thread content here"></textarea> + <input type="submit" value="create"> </form> {% endblock %} diff --git a/apioforum/templates/edit_forum.html b/apioforum/templates/edit_forum.html index f165676..3c07d1a 100644 --- a/apioforum/templates/edit_forum.html +++ b/apioforum/templates/edit_forum.html @@ -5,10 +5,10 @@ {% block content %} <form method="POST"> - <label for="name">forum name</label> + <label for="name">forum name</label> <input name="name" id="name" value="{{name}}" placeholder="apioforum" required maxlength="100"/> - <br> - <label for="description">forum description (markdown enabled)</label> + <br> + <label for="description">forum description (markdown enabled)</label> <textarea name="description" id="description" diff --git a/apioforum/templates/search_results.html b/apioforum/templates/search_results.html index fe016ab..a55dc8a 100644 --- a/apioforum/templates/search_results.html +++ b/apioforum/templates/search_results.html @@ -6,23 +6,23 @@ {%block content%} <div class="results"> - {% for result in results %} - {% if display_thread_id[loop.index0] %} - {% if loop.index0 != 0 %} - </div> - {% endif %} - <h3><a href="{{url_for('thread.view_thread', thread_id=result.thread)}}"> - {{result.thread_title}} - </a></h3> - <div class="posts"> - {% endif %} - {{ disp_post(result, False) }} - {% endfor %} + {% for result in results %} + {% if display_thread_id[loop.index0] %} + {% if loop.index0 != 0 %} + </div> + {% endif %} + <h3><a href="{{url_for('thread.view_thread', thread_id=result.thread)}}"> + {{result.thread_title}} + </a></h3> + <div class="posts"> + {% endif %} + {{ disp_post(result, False) }} + {% endfor %} - {% if results|length > 0 %} - </div> - {% else %} - <p>no results were found for '{{query}}'.</p> - {% endif %} + {% if results|length > 0 %} + </div> + {% else %} + <p>no results were found for '{{query}}'.</p> + {% endif %} </div> {% endblock %} diff --git a/apioforum/templates/view_forum.html b/apioforum/templates/view_forum.html index d37a018..7732b21 100644 --- a/apioforum/templates/view_forum.html +++ b/apioforum/templates/view_forum.html @@ -110,8 +110,8 @@ you do not have permission to create threads in this forum {% for the_tag in avail_tags %} <input type="radio" id="tagfilter-{{the_tag.id}}" - name="tagfilter" value="{{the_tag.id}}" - {% if tagfilter_tag.id == the_tag.id %}checked{% endif %}> + name="tagfilter" value="{{the_tag.id}}" + {% if tagfilter_tag.id == the_tag.id %}checked{% endif %}> <label for="tagfilter-{{the_tag.id}}"> {{tag(the_tag)}} </label> diff --git a/apioforum/templates/view_thread.html b/apioforum/templates/view_thread.html index 6e881cb..fa707a6 100644 --- a/apioforum/templates/view_thread.html +++ b/apioforum/templates/view_thread.html @@ -9,93 +9,93 @@ {% if poll %} <p>{{poll.title}}</p> <ol> - {%for opt in poll.options%} - <li value="{{opt.option_idx}}"><i>{{opt.text}}</i>: {{opt.num or 0}} votes</li> - {%endfor%} + {%for opt in poll.options%} + <li value="{{opt.option_idx}}"><i>{{opt.text}}</i>: {{opt.num or 0}} votes</li> + {%endfor%} </ol> {{ vote_meter(poll) }} {% endif %} <div class="thread-top-bar"> - <span class="thread-top-bar-a"> - {% if g.user == thread.creator or has_permission(thread.forum, g.user, "p_manage_threads") %} - <a class="actionbutton" href="{{url_for('thread.config_thread',thread_id=thread.id)}}">configure thread</a> - {% endif %} + <span class="thread-top-bar-a"> + {% if g.user == thread.creator or has_permission(thread.forum, g.user, "p_manage_threads") %} + <a class="actionbutton" href="{{url_for('thread.config_thread',thread_id=thread.id)}}">configure thread</a> + {% endif %} {% if has_permission(thread.forum, g.user, "p_delete_posts") %} - <a class="actionbutton" href="{{url_for('thread.delete_thread',thread_id=thread.id)}}">delete thread</a> + <a class="actionbutton" href="{{url_for('thread.delete_thread',thread_id=thread.id)}}">delete thread</a> {% endif %} - </span> - - <span class="thread-top-bar-b"> - {% for the_tag in tags %} - {{ tag(the_tag) }} - {% endfor %} - </span> + </span> + + <span class="thread-top-bar-b"> + {% for the_tag in tags %} + {{ tag(the_tag) }} + {% endfor %} + </span> </div> {{ pagination_nav(page,max_pageno,'thread.view_thread',thread_id=thread.id) }} <div class="posts"> - {% for post in posts %} - {% if votes[post.id] %} + {% for post in posts %} + {% if votes[post.id] %} - {% set vote = votes[post.id] %} - {% set option_idx = vote.option_idx %} - - {# this is bad but it's going to get refactored anyway #} - {% set footer %} - {% if vote.is_retraction %} + {% set vote = votes[post.id] %} + {% set option_idx = vote.option_idx %} + + {# this is bad but it's going to get refactored anyway #} + {% set footer %} + {% if vote.is_retraction %} {% if not post.deleted %} {{post.author}} retracted their vote {% else %} this post retracted a vote {% endif %} - {% else %} - {% set option = poll.options[option_idx-1] %} - {% if vote.current %} - {{post.author}} votes for {{option_idx}}: {{option.text}} - {% else %} + {% else %} + {% set option = poll.options[option_idx-1] %} + {% if vote.current %} + {{post.author}} votes for {{option_idx}}: {{option.text}} + {% else %} {% if not post.deleted %} {{post.author}} voted for {{option_idx}}: {{option.text}}, but later changed their vote {% else %} this post presented a vote that was later changed {% endif %} - {% endif %} - {% endif %} + {% endif %} + {% endif %} - {% endset %} + {% endset %} - {{ disp_post(post, forum=thread.forum, buttons=True, footer=footer) }} - - {% else %} - {{ disp_post(post, forum=thread.forum, buttons=True) }} - {% endif %} - {% endfor %} + {{ disp_post(post, forum=thread.forum, buttons=True, footer=footer) }} + + {% else %} + {{ disp_post(post, forum=thread.forum, buttons=True) }} + {% endif %} + {% endfor %} </div> {% if g.user and has_permission(thread.forum, g.user, "p_reply_threads") %} <form class="new-post" action="{{url_for('thread.create_post',thread_id=thread.id)}}" method="POST"> - <textarea class="new-post-box" placeholder="your post here..." name="content"></textarea> - {% if poll and has_permission(thread.forum, g.user, "p_vote") %} - <fieldset> - <legend>poll: {{poll.title}}</legend> - <p>if you want, you can submit a vote along with this post. if you have previously voted - on this poll, your previous vote will be changed</p> + <textarea class="new-post-box" placeholder="your post here..." name="content"></textarea> + {% if poll and has_permission(thread.forum, g.user, "p_vote") %} + <fieldset> + <legend>poll: {{poll.title}}</legend> + <p>if you want, you can submit a vote along with this post. if you have previously voted + on this poll, your previous vote will be changed</p> - <input type="radio" id="dontvote" name="poll" value="dontvote" checked> - <label for="dontvote">do not submit any vote at the moment</label> + <input type="radio" id="dontvote" name="poll" value="dontvote" checked> + <label for="dontvote">do not submit any vote at the moment</label> - {% if has_voted %} - <br> - <input type="radio" id="retractvote" name="poll" value="retractvote"> - <label for="retractvote">clear current vote</label> - {% endif %} + {% if has_voted %} + <br> + <input type="radio" id="retractvote" name="poll" value="retractvote"> + <label for="retractvote">clear current vote</label> + {% endif %} - {% for opt in poll.options %} - <br> - <input type="radio" id="option_{{opt.option_idx}}" name="poll" value="{{opt.option_idx}}"> - <label for="option_{{opt.option_idx}}">#{{opt.option_idx}} - {{opt.text}}</label> - {% endfor %} - </fieldset> - {% endif %} - <input type="submit" value="yes"> + {% for opt in poll.options %} + <br> + <input type="radio" id="option_{{opt.option_idx}}" name="poll" value="{{opt.option_idx}}"> + <label for="option_{{opt.option_idx}}">#{{opt.option_idx}} - {{opt.text}}</label> + {% endfor %} + </fieldset> + {% endif %} + <input type="submit" value="yes"> </form> {% elif g.user %} <p>you do not have permission to reply to this thread</p> |