Compare commits

..

No commits in common. "5964ef496354a9b9309603e46dd8dc29aaf1d592" and "8aa2675240ef1844b3c4f77e31da4c1edb956b8b" have entirely different histories.

6 changed files with 60 additions and 274 deletions

View File

@ -1,26 +1,14 @@
# Task Manager # taskmanager
Interactive TODO list web application Interactive TODO list web application
# Development Setup # Use
Install python and pip on local machine python3 ./run.py
```bash # Install
pip install virtualenv
python -m venv venv #/path/to/new/virtual/environment
source venv/bin/activate #activate virtual env
pip install -r requirements.txt
python3 ./init_db.py #initialize database
python3 ./run.py #run project
```
# Build app
```bash
cd build-deb/ cd build-deb/
sudo apt install ./flaskapp.deb
make make
``` sudo apt install ./flaskapp.deb

View File

@ -1,27 +1,17 @@
:root { :root {
--border-radus: 1rem; --border-radus: 1rem;
--background: #383840; --background: #000000;
--header-background: #212121; --header-background: #FFFFFF;
--header-height: 3rem; --header-height: 3rem;
--input-bar-height: 3rem; --input-bar-height: 3rem;
--white: #FFF;
--primary: #d2d2d2;
--font-primary: #d2d2d2;
color: #FFF; color: #FFF;
} }
* { body{
margin: 0;
padding: 0;
}
a, a:visited {
color: var(--font-primary);
}
body {
background: var(--background); background: var(--background);
font-family: sans-serif; font-family: sans-serif;
margin: 0;
padding: 0;
} }
main { main {
@ -30,7 +20,6 @@ main {
align-self: flex-start; align-self: flex-start;
gap: 1rem; gap: 1rem;
margin: 0 auto; margin: 0 auto;
padding: 30px 0;
height: calc(100vh - var(--header-height) - var(--input-bar-height)); height: calc(100vh - var(--header-height) - var(--input-bar-height));
box-sizing: border-box; box-sizing: border-box;
} }
@ -47,12 +36,6 @@ header {
box-sizing: border-box; box-sizing: border-box;
} }
header ul {
display: flex;
list-style-type: none;
gap:15px
}
footer { footer {
width: 100vw; width: 100vw;
height: var(--input-bar-height); height: var(--input-bar-height);
@ -64,120 +47,3 @@ footer {
box-sizing: border-box; box-sizing: border-box;
gap: 1rem; gap: 1rem;
} }
/* global classes */
.container {
width: 100%;
max-width: 960px;
margin: 0 auto;
padding: 20px 30px;
}
.page h1 {
margin-bottom: 15px;
}
.btn-wrap {
display: flex;
align-items: center;
justify-content: center;
padding: 15px 12px;
}
.btn {
display: inline-block;
padding: 5px 20px;
border: 1px solid var(--primary);
color: var(--primary);
background-color: transparent;
border-radius: 5px;
}
.btn:hover {
background-color: rgba(0,0,0,0.3);
cursor: pointer;
}
.btn a {
text-decoration: none;
}
.label {
text-transform: uppercase;
letter-spacing: 2px;
font-size: 14px;
font-weight: 600;
margin-bottom: 11px;
display: inline-block;
user-select: none;
}
.underline {
border-bottom: 1px solid var(--font-primary);
padding-bottom: 2px;
margin-top:20px;
}
.section-tasks > ul {
margin-left: 30px;
}
/* page index*/
.page-index .btn{
margin-bottom: 20px;
}
.task-wrap {
border: 1px solid var(--primary);
padding: 20px 40px 40px 40px;
border-radius: 5px;
box-shadow: inset 0 0 9px 4px rgba(255,255,255, 0.1);
}
.task {
display: flex;
border-bottom: 1px solid white;
}
.task a:hover {
background-color: rgba(255,255,255,0.1);
}
.task a {
display: flex;
gap: 15px;
width: 100%;
padding: 20px;
text-decoration: none;
}
/* Page projects */
.page-project h1 {
text-transform: uppercase;
}
.user-info-wrap{
margin-bottom: 10px;
}
/* form */
.form-wrap {
max-width: 400px;
}
.form-input {
display: flex;
flex-direction: column;
padding: 10px 0;
}
.form-input input {
height: 25px;
border-radius: 5px;
outline: none;
}

View File

@ -1,36 +1,19 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/style.css" />
<title>Add new task</title> <title>Add new task</title>
<link rel="stylesheet" href="/static/style.css">
</head> </head>
<body> <body>
<header> <main>
<nav class="container">
<ul>
<li class="current"><a href="/">Home</a></li>
<li><a href="/register">Register</a></li>
</ul>
</nav>
</header>
<main class="container page page-addtask">
<h1>Create new task</h1>
<div class="form-wrap">
<form action="/addtask" method="POST"> <form action="/addtask" method="POST">
<div class="form-input"> <label for="taskname">taskname</label>
<label for="taskname" class="label">Task name:</label> <input type="text" name="taskname" id="taskname" required>
<input type="text" name="taskname" id="taskname" required /> <label for="taskdesc">taskdesc</label>
</div> <input type="text" name="taskdesc" id="taskdesc" required>
<div class="form-input"> <button> Submit </button>
<label for="taskdesc" class="label">Description:</label>
<input type="text" name="taskdesc" id="taskdesc" required />
</div>
<div class="btn-wrap">
<button class="btn">Submit</button>
</div>
</div>
</form> </form>
</main> </main>
</body> </body>

View File

@ -1,37 +1,21 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/style.css" />
<title>Task manager</title> <title>Task manager</title>
<link rel="stylesheet" href="/static/style.css">
</head> </head>
<body> <body>
<header> <header>
<nav class="container">
<ul>
<li class="current"><a href="/">Home</a></li>
<li><a href="/register">Register</a></li>
</ul>
</nav>
</header> </header>
<main class="container page page-index"> <main>
<section> <section>
<div class="btn">
<a href="/addtask">Add new task</a>
</div>
<div class="tasks-wrap">
<h1>Tasks</h1>
{% for task in tasks %} {% for task in tasks %}
<div class="task"> <li><a href="/projects/{{task.id}}"> {{task.name}} </a></li>
<a href="/projects/{{task.id}}">
<div>{{task.id}}.</div>
<div>{{task.name}}</div>
</a>
</div>
{% endfor %} {% endfor %}
</div>
</section> </section>
<p> <a href="/addtask">Add</a> new task <p>
</main> </main>
<footer> <footer>
</footer> </footer>

View File

@ -1,51 +1,32 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/style.css" />
<title>{{task.name}}</title> <title>{{task.name}}</title>
<link rel="stylesheet" href="/static/style.css">
</head> </head>
<body> <body>
<header> <header>
<nav class="container">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/register">Register</a></li>
</ul>
</nav>
</header> </header>
<main class="container page page-project"> <main>
<section > <section>
<h1>{{task.name}}</h1> <li>{{task.name}}</li>
<label class="label underline">Description</label> <li>{{task.desc}}</li>
<p>{{task.desc}}</p>
</section> </section>
<section class="section-task"> <h1> Users added to this task </h1>
<div>
<label class="label underline">Users added to this task</label>
{% for user in users %} {% for user in users %}
<div class="user-info-wrap"> <li>{{user.username}}, {{user.contact}}</li>
<div><b>Username:</b> {{user.username}}</div>
<div><b>Contact info:</b> {{user.contact}}</div>
</div>
{% endfor %} {% endfor %}
</div>
<div> <h1> Add yourself to task </h1>
<label class="label underline"> Add person to task</label>
<div class="form-wrap">
<form action="/projects/{{task.id}}" method="POST"> <form action="/projects/{{task.id}}" method="POST">
<div class="form-input"> <label for="username">username</label>
<label for="username" class="label">Username:</label> <input type="text" name="username" id="username" required>
<input type="text" name="username" id="username" required /> <button> Submit </button>
</div>
<div class="btn-wrap">
<button class="btn">Submit</button>
</div>
</form> </form>
</div>
</div>
</section>
</main> </main>
<footer> <footer>
</footer> </footer>

View File

@ -1,36 +1,20 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/style.css" />
<title>Register</title> <title>Register</title>
<link rel="stylesheet" href="/static/style.css">
</head> </head>
<body> <body>
<header> <main>
<nav class="container">
<ul>
<li><a href="/">Home</a></li>
<li class="current"><a href="/register">Register</a></li>
</ul>
</nav>
</header>
<main class="container page page-register">
<div class="form-wrap">
<form action="/register" method="POST"> <form action="/register" method="POST">
<div class="form-input"> <label for="username">username</label>
<label for="username">Username:</label> <input type="text" name="username" id="username" required>
<input type="text" name="username" id="username" required /> <label for="contact">contact</label>
</div> <input type="text" name="contact" id="contact" required>
<div class="form-input"> <button> Submit </button>
<label for="contact">Contact:</label>
<input type="text" name="contact" id="contact" required />
</div>
<div class="btn-wrap">
<button class="btn">Submit</button>
</div>
</form> </form>
</div>
</main> </main>
</body> </body>
</html> </html>