summaryrefslogtreecommitdiffstats
path: root/flaskr/templates
diff options
context:
space:
mode:
authorMitsuo Tokumori <[email protected]>2023-10-29 07:41:04 -0500
committerMitsuo Tokumori <[email protected]>2023-10-29 07:41:04 -0500
commit43f9d78f8c00e13732b809519f0529ac293fd5ab (patch)
treed9779a6d4b511dd27cfe80b3f8d0ad2e5ef5d7da /flaskr/templates
parentde8b3d760a37fc54645a2588b062f85963146070 (diff)
downloadustayml-43f9d78f8c00e13732b809519f0529ac293fd5ab.tar.gz
ustayml-43f9d78f8c00e13732b809519f0529ac293fd5ab.tar.bz2
ustayml-43f9d78f8c00e13732b809519f0529ac293fd5ab.zip
Rename to ustayml (u-stayML)
Diffstat (limited to 'flaskr/templates')
-rw-r--r--flaskr/templates/auth/login.html15
-rw-r--r--flaskr/templates/auth/register.html15
-rw-r--r--flaskr/templates/base.html25
-rw-r--r--flaskr/templates/blog/create.html15
-rw-r--r--flaskr/templates/blog/index.html34
-rw-r--r--flaskr/templates/blog/update.html20
6 files changed, 0 insertions, 124 deletions
diff --git a/flaskr/templates/auth/login.html b/flaskr/templates/auth/login.html
deleted file mode 100644
index b7dd5dc..0000000
--- a/flaskr/templates/auth/login.html
+++ /dev/null
@@ -1,15 +0,0 @@
-{% extends 'base.html' %}
-
-{% block header %}
- <h1>{% block title %}Log In{% endblock %}</h1>
-{% endblock %}
-
-{% block content %}
- <form method="post">
- <label for="username">Username</label>
- <input name="username" id="username" required>
- <label for="password">Password</label>
- <input type="password" name="password" id="password" required>
- <input type="submit" value="Log In">
- </form>
-{% endblock %} \ No newline at end of file
diff --git a/flaskr/templates/auth/register.html b/flaskr/templates/auth/register.html
deleted file mode 100644
index a3c73cc..0000000
--- a/flaskr/templates/auth/register.html
+++ /dev/null
@@ -1,15 +0,0 @@
-{% extends 'base.html' %}
-
-{% block header %}
- <h1>{% block title %}Register{% endblock %}</h1>
-{% endblock %}
-
-{% block content %}
- <form method="post">
- <label for="username">Username</label>
- <input name="username" id="username" required>
- <label for="password">Password</label>
- <input type="password" name="password" id="password" required>
- <input type="submit" value="Register">
- </form>
-{% endblock %} \ No newline at end of file
diff --git a/flaskr/templates/base.html b/flaskr/templates/base.html
deleted file mode 100644
index 6ea4864..0000000
--- a/flaskr/templates/base.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!doctype html>
-<title>{% block title %}{% endblock %} - Flaskr</title>
-<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
-<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
-<nav>
- <h1><a href="{{ url_for('index') }}">Flaskr</a></h1>
- <ul>
- {% if g.user %}
- <li><span>{{ g.user['username'] }}</span>
- <li><a href="{{ url_for('auth.logout') }}">Log Out</a>
- {% else %}
- <li><a href="{{ url_for('auth.register') }}">Register</a>
- <li><a href="{{ url_for('auth.login') }}">Log In</a>
- {% endif %}
- </ul>
-</nav>
-<section class="content">
- <header>
- {% block header %}{% endblock %}
- </header>
- {% for message in get_flashed_messages() %}
- <div class="flash">{{ message }}</div>
- {% endfor %}
- {% block content %}{% endblock %}
-</section> \ No newline at end of file
diff --git a/flaskr/templates/blog/create.html b/flaskr/templates/blog/create.html
deleted file mode 100644
index 88e31e4..0000000
--- a/flaskr/templates/blog/create.html
+++ /dev/null
@@ -1,15 +0,0 @@
-{% extends 'base.html' %}
-
-{% block header %}
- <h1>{% block title %}New Post{% endblock %}</h1>
-{% endblock %}
-
-{% block content %}
- <form method="post">
- <label for="title">Title</label>
- <input name="title" id="title" value="{{ request.form['title'] }}" required>
- <label for="body">Body</label>
- <textarea name="body" id="body">{{ request.form['body'] }}</textarea>
- <input type="submit" value="Save">
- </form>
-{% endblock %}
diff --git a/flaskr/templates/blog/index.html b/flaskr/templates/blog/index.html
deleted file mode 100644
index 0fb2e80..0000000
--- a/flaskr/templates/blog/index.html
+++ /dev/null
@@ -1,34 +0,0 @@
-{% extends 'base.html' %}
-
-
-{% block header %}
- <h1>{% block title %}Posts{% endblock %}</h1>
- {% if g.user %}
- <a class="action" href="{{ url_for('blog.create') }}">New</a>
- {% endif %}
-{% endblock %}
-
-{% block content %}
- {% for post in posts %}
- <article class="post">
- <header>
- <div>
- {% if post['title'].__len__() > 80 %}
- <h1><abbr title="{{ post['title'] }}">{{ post['title'][:80] }}</abbr></h1>
- {% else %}
- <h1>{{ post['title'] }}</h1>
- {% endif %}
- <div class="about">by {{ post['username'] }} on {{ post['created'].strftime('%Y-%m-%d') }}</div>
- </div>
- {% if g.user['id'] == post['author_id'] %}
- <a class="action" href="{{ url_for('blog.update', id=post['id']) }}">Edit</a>
- {% endif %}
- </header>
- <p class="body">{{ post['body'] }}</p>
- </article>
- {% if not loop.last %}
- {# Separate posts with a line #}
- <hr>
- {% endif %}
- {% endfor %}
-{% endblock %} \ No newline at end of file
diff --git a/flaskr/templates/blog/update.html b/flaskr/templates/blog/update.html
deleted file mode 100644
index 7420f57..0000000
--- a/flaskr/templates/blog/update.html
+++ /dev/null
@@ -1,20 +0,0 @@
-{% extends 'base.html' %}
-
-{% block header %}
- <h1>{% block title %}Edit "{{ post['title'] }}"{% endblock %}</h1>
-{% endblock %}
-
-{% block content %}
- <form method="post">
- <label for="title">Title</label>
- <input name="title" id="title"
- value="{{ request.form['title'] or post['title'] }}" required>
- <label for="body">Body</label>
- <textarea name="body" id="body">{{ request.form['body'] or post['body'] }}</textarea>
- <input type="submit" value="Save">
- </form>
- <hr>
- <form action="{{ url_for('blog.delete', id=post['id']) }}" method="post">
- <input class="danger" type="submit" value="Delete" onclick="return confirm('Are you sure?');">
- </form>
-{% endblock %} \ No newline at end of file