mirror of
https://github.com/TrentSPalmer/todo_app_flask.git
synced 2025-07-04 11:23:17 -07:00
initial commit
This commit is contained in:
37
app/tasks/templates/edit_task.html
Normal file
37
app/tasks/templates/edit_task.html
Normal file
@ -0,0 +1,37 @@
|
||||
<style>
|
||||
#content {
|
||||
font-size: 1.2rem;
|
||||
width: 100%;
|
||||
}
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
form p {
|
||||
width: 100%;
|
||||
}
|
||||
h1 {
|
||||
align-self: center;
|
||||
margin-top: 50px;
|
||||
}
|
||||
</style>
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="formContainer">
|
||||
<h1>Edit {{ task.content[0:10] }}</h1>
|
||||
<form action="" method="post">
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.content.label }}<br>
|
||||
{{ form.content(rows=20) }}<br>
|
||||
{% for error in form.content.errors %}
|
||||
<span class="formWarning">[{{ error }}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
37
app/tasks/templates/new_task.html
Normal file
37
app/tasks/templates/new_task.html
Normal file
@ -0,0 +1,37 @@
|
||||
<style>
|
||||
#content {
|
||||
font-size: 1.2rem;
|
||||
width: 100%;
|
||||
}
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
form p {
|
||||
width: 100%;
|
||||
}
|
||||
h1 {
|
||||
align-self: center;
|
||||
margin-top: 50px;
|
||||
}
|
||||
</style>
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="formContainer">
|
||||
<h1>New Task For {{ category.name }}</h1>
|
||||
<form action="" method="post">
|
||||
{{ form.hidden_tag() }}
|
||||
<p>
|
||||
{{ form.content.label }}<br>
|
||||
{{ form.content(rows=20) }}<br>
|
||||
{% for error in form.content.errors %}
|
||||
<span class="formWarning">[{{ error }}]</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
<p>{{ form.submit() }}</p>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
70
app/tasks/templates/task_action.html
Normal file
70
app/tasks/templates/task_action.html
Normal file
@ -0,0 +1,70 @@
|
||||
<style>
|
||||
#main {
|
||||
align-items: center;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 40px;
|
||||
}
|
||||
.buttonLink {
|
||||
width: 95%;
|
||||
max-width: 700px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.buttonLink button {
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-left: 20px;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 9px;
|
||||
font-size: 1.3rem;
|
||||
display: flex;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% if task.done == True %}
|
||||
{% set textColor = "color: grey;" %}
|
||||
{% else %}
|
||||
{% set textColor = "color: white;" %}
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="heading">Actions For {{ task.content[0:10] }}...</h1>
|
||||
<a href="{{ url_for('toggletaskdone.toggle_task_done', taskid=task.id) }}" class="buttonLink">
|
||||
<button style="{{ textColor }}">
|
||||
{% if task.done == True %} UnMark Done {% else %} Mark Done {% endif %}
|
||||
</button>
|
||||
</a>
|
||||
<a href="{{ url_for('edittask.edit_task', taskid=task.id) }}" class="buttonLink">
|
||||
<button style="{{ textColor }}">Edit</button>
|
||||
</a>
|
||||
<a href="{{ url_for('deletetask.delete_task', taskid=task.id) }}" class="buttonLink">
|
||||
<button style="{{ textColor }}">Delete</button>
|
||||
</a>
|
||||
<a href="{{ url_for('cats.move_categories', taskid=task.id) }}" class="buttonLink">
|
||||
<button style="{{ textColor }}">Move-Category</button>
|
||||
</a>
|
||||
{% if task.can_move_top == True %}
|
||||
<a href="{{ url_for('reorderp.move_task', taskid=task.id, move='top') }}" class="buttonLink">
|
||||
<button style="{{ textColor }}">Move-Top</button>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if task.can_move_up == True %}
|
||||
<a href="{{ url_for('reorderp.move_task', taskid=task.id, move='up') }}" class="buttonLink">
|
||||
<button style="{{ textColor }}">Move-Up</button>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if task.can_move_down == True %}
|
||||
<a href="{{ url_for('reorderp.move_task', taskid=task.id, move='down') }}" class="buttonLink">
|
||||
<button style="{{ textColor }}">Move-Down</button>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if task.can_move_end == True %}
|
||||
<a href="{{ url_for('reorderp.move_task', taskid=task.id, move='end') }}" class="buttonLink">
|
||||
<button style="{{ textColor }}">Move-End</button>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
58
app/tasks/templates/tasks.html
Normal file
58
app/tasks/templates/tasks.html
Normal file
@ -0,0 +1,58 @@
|
||||
<style>
|
||||
#main {
|
||||
align-items: center;
|
||||
}
|
||||
.heading {
|
||||
margin-top: 40px;
|
||||
font-size: 2.3rem;
|
||||
}
|
||||
.taskContainer {
|
||||
width: 99%;
|
||||
max-width: 600px;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 9px;
|
||||
font-size: 1.3rem;
|
||||
font-weight: bold;
|
||||
border: 1px solid;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.task {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
max-width: calc(100% - 70px);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.taskAction {
|
||||
background-color: black;
|
||||
height: 100%;
|
||||
border-top-right-radius: 9px;
|
||||
border-bottom-right-radius: 9px;
|
||||
width: 30px;
|
||||
}
|
||||
.taskActionLink {
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="heading">{{ heading }}</h1>
|
||||
{% for task in tasks %}
|
||||
{% if task.done == True %}
|
||||
{% set textColor = "color: grey;" %}
|
||||
{% else %}
|
||||
{% set textColor = "color: black;" %}
|
||||
{% endif %}
|
||||
<div class="taskContainer">
|
||||
|
||||
<div class="task" style="{{ textColor }}">
|
||||
<p>{{ task.time }}</p> {{ task.markup|safe }}
|
||||
</div>
|
||||
|
||||
<a href="{{ task.href }}" class="taskActionLink">
|
||||
<button class="taskAction" style="color: white;">{{ task.priority }}</button>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user