diff options
| -rw-r--r-- | apioforum/forum.py | 2 | ||||
| -rw-r--r-- | apioforum/static/style.css | 1 | ||||
| -rw-r--r-- | apioforum/templates/auth/login.html | 5 | ||||
| -rw-r--r-- | apioforum/templates/auth/register.html | 5 | ||||
| -rw-r--r-- | apioforum/templates/create_thread.html | 5 | ||||
| -rw-r--r-- | apioforum/templates/edit_post.html | 6 | ||||
| -rw-r--r-- | apioforum/templates/view_forum.html | 8 | 
7 files changed, 22 insertions, 10 deletions
| diff --git a/apioforum/forum.py b/apioforum/forum.py index 261da15..61babbd 100644 --- a/apioforum/forum.py +++ b/apioforum/forum.py @@ -12,7 +12,7 @@ bp = Blueprint("forum", __name__, url_prefix="/")  @bp.route("/")  def view_forum():      db = get_db() -    threads = db.execute("SELECT * FROM threads ORDER BY updated DESC LIMIT 10;").fetchall() +    threads = db.execute("SELECT * FROM threads ORDER BY updated DESC;").fetchall()      return render_template("view_forum.html",threads=threads)  @bp.route("/create_thread",methods=("GET","POST")) diff --git a/apioforum/static/style.css b/apioforum/static/style.css index d66a639..46d5fdb 100644 --- a/apioforum/static/style.css +++ b/apioforum/static/style.css @@ -78,6 +78,7 @@ nav a { color: blue; text-decoration: none }      content: "]";      color: grey;  } +.actionbutton { color:blue }  .new-post-box {      height:20em; diff --git a/apioforum/templates/auth/login.html b/apioforum/templates/auth/login.html index c0a2eed..3e69134 100644 --- a/apioforum/templates/auth/login.html +++ b/apioforum/templates/auth/login.html @@ -4,11 +4,14 @@  {% 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> -    <input type="submit" value="yes"> +    <br> +    <input type="submit" value="login">  </form>  {% endblock %} diff --git a/apioforum/templates/auth/register.html b/apioforum/templates/auth/register.html index 716fa1d..7d079c2 100644 --- a/apioforum/templates/auth/register.html +++ b/apioforum/templates/auth/register.html @@ -4,11 +4,14 @@  {% 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" required> +    <br>      <label for="password">Password</label>      <input type="password" name="password" id="password" required> -    <input type="submit" value="yes"> +    <br> +    <input type="submit" value="register">  </form>  {% endblock %} diff --git a/apioforum/templates/create_thread.html b/apioforum/templates/create_thread.html index b8d204c..9de7312 100644 --- a/apioforum/templates/create_thread.html +++ b/apioforum/templates/create_thread.html @@ -7,8 +7,9 @@  <form action="{{url_for('forum.create_thread')}}", 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"></textarea> -    <input type="submit" value="yes"> +    <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_post.html b/apioforum/templates/edit_post.html index d8eac58..8e8120d 100644 --- a/apioforum/templates/edit_post.html +++ b/apioforum/templates/edit_post.html @@ -6,7 +6,9 @@  {% block content %}  <form method="post"> -<textarea name="newcontent">{{post.content}}</textarea> -<input type="submit" value="go"> +<textarea class="new-post-box" name="newcontent">{{post.content}}</textarea> +<p>confirm edit?</p> +<input type="submit" value="confirm"> +<a href="{{url_for('thread.view_thread',thread_id=post.thread)}}">cancel</a>  </form>  {% endblock %} diff --git a/apioforum/templates/view_forum.html b/apioforum/templates/view_forum.html index a94b468..7c4b45c 100644 --- a/apioforum/templates/view_forum.html +++ b/apioforum/templates/view_forum.html @@ -1,9 +1,11 @@  {% extends 'base.html' %}  {% from 'common.html' import ts %} -{% block header %}<h1>{% block title %}apio forum george etc{%endblock%}</h1>{%endblock%} +{% block header %}<h1>{% block title %}apioforum{%endblock%}</h1>{%endblock%}  {%block content%} -<p>the</p> -<a href="{{url_for('forum.create_thread')}}">create thread</a> +<p>welcome to the apioforum</p> +<p>forum rules: do not be a bad person. do not do bad things.</p> +<a class="actionbutton" href="{{url_for('forum.create_thread')}}">create new thread</a> +<br><br>  <div class="threadlistings">  <div class="threadlisting">      <div class="threadlisting-part threadlisting-part-title threadlisting-header"> | 
