diff options
author | shivam kohli <kohlishivam5522@gmail.com> | 2018-06-02 17:23:02 +0530 |
---|---|---|
committer | shivam kohli <kohlishivam5522@gmail.com> | 2018-06-02 17:23:02 +0530 |
commit | abafd12b235e4c10c410e0bf3a981d969ab3fd94 (patch) | |
tree | 0153a776ed6080e78c3636104081563e4f037990 /templates | |
parent | 8fd1c575aa146f4c69e458dbdde4df08d9605553 (diff) | |
download | codeless-abafd12b235e4c10c410e0bf3a981d969ab3fd94.tar.gz codeless-abafd12b235e4c10c410e0bf3a981d969ab3fd94.tar.bz2 codeless-abafd12b235e4c10c410e0bf3a981d969ab3fd94.zip |
overview page and add product functinality
Diffstat (limited to 'templates')
-rw-r--r-- | templates/inventory/home.html | 148 | ||||
-rw-r--r-- | templates/inventory/index.html | 9 | ||||
-rw-r--r-- | templates/inventory/login.html | 8 | ||||
-rw-r--r-- | templates/inventory/new_product.html | 145 | ||||
-rw-r--r-- | templates/inventory/product.html | 77 | ||||
-rw-r--r-- | templates/inventory/reset/base.html | 24 | ||||
-rw-r--r-- | templates/inventory/reset/password_reset_complete.html | 12 | ||||
-rw-r--r-- | templates/inventory/reset/password_reset_confirm.html | 21 | ||||
-rw-r--r-- | templates/inventory/reset/password_reset_done.html | 17 | ||||
-rw-r--r-- | templates/inventory/reset/password_reset_email.html | 12 | ||||
-rw-r--r-- | templates/inventory/reset/password_reset_form.html | 14 | ||||
-rw-r--r-- | templates/inventory/reset/password_reset_subject.txt | 1 | ||||
-rw-r--r-- | templates/inventory/signup.html | 6 |
13 files changed, 482 insertions, 12 deletions
diff --git a/templates/inventory/home.html b/templates/inventory/home.html index 424bab3..ea5ddf8 100644 --- a/templates/inventory/home.html +++ b/templates/inventory/home.html @@ -2,10 +2,152 @@ <html> <head> <title>Home</title> + <style type="text/css"> + *, + *::before, + *::after { + box-sizing: border-box; + } + html { + background-color: #f0f0f0; + } + body { + color: #999999; + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-style: normal; + font-weight: 400; + letter-spacing: 0; + padding: 1rem; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -moz-font-feature-settings: "liga" on; + } + .sidenav { + height: 100%; + width: 160px; + position: fixed; + z-index: 1; + top: 0; + left: 0; + background-color: #111; + overflow-x: hidden; + padding-top: 20px; + } + + .sidenav a { + padding: 6px 8px 6px 16px; + text-decoration: none; + font-size: 25px; + color: #818181; + display: block; + } + + .sidenav a:hover { + color: #f1f1f1; + } + .btn { + background-color: white; + border: 1px solid #cccccc; + color: #696969; + padding: 0.5rem; + text-transform: lowercase; + } + .btnblock { + display: block; + width: 100%; + } + .cards { + display: flex; + flex-wrap: wrap; + list-style: none; + margin: 0; + padding: 0; + } + .cards__item { + /*display: flex;*/ + padding: 1rem; + } + @media (min-width: 40rem) { + .cards__item { + width: 50%; + } + } + @media (min-width: 56rem) { + .cards__item { + width: 33.3333%; + } + } + .card { + background-color: white; + border-radius: 0.25rem; + box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.25); + display: flex; + flex-direction: column; + overflow: hidden; + } + .card__content { + display: flex; + flex: 1 1 auto; + flex-direction: column; + padding: 1rem; + } + .card__title { + color: #696969; + font-size: 1.25rem; + font-weight: 300; + letter-spacing: 2px; + text-transform: uppercase; + } + .card__text { + flex: 1 1 auto; + font-size: 0.875rem; + line-height: 1.5; + margin-bottom: 1.25rem; + } + .main { + margin-left: 160px; + font-size: 28px; + padding: 0px 10px; + } + + @media screen and (max-height: 450px) { + .sidenav {padding-top: 15px;} + .sidenav a {font-size: 18px;} + } + </style> </head> <body> -<h1>Welcome!!!!</h1> -<h4>You are successfully loged in</h4> -<a href="/logout">logout</a></li> + +<div class="sidenav"> + <a href="/home">Home</a> + <a href="/logout">Logout</a></li> +</div> + +<div class="main"> + <center> + <h1>INVENTORY</h1> + </center> + + <ul class="cards"> + {% for item in data %} + <li class="cards__item"> + <div class="card"> + <div class="card__content"> + <div class="card__title"><a href="{{ item.url }}">{{ item.name }}</a></div> + <p class="card__text">{{ item.description }}</p><br> + <p class="card__text"><b>Inventory on hand: </b>{{ item.inventory_on_hand }}</p> + <!-- <button class="btn btnblock card__btn">Button</button> --> + </div> + </div> + </li> + {% endfor %} + </ul> + + + <center><a href="/new_product">ADD PRODUCT</a></center> + +</div> + </body> </html>
\ No newline at end of file diff --git a/templates/inventory/index.html b/templates/inventory/index.html index ab79a2b..03764a1 100644 --- a/templates/inventory/index.html +++ b/templates/inventory/index.html @@ -3,17 +3,18 @@ <head> <title>Login</title> </head> -<body> -<div style="background: linear-gradient(0deg, #F6F0E1 20%, rgba(200,200,200,0) 100%); height: 100%"; > +<body style="background: linear-gradient(0deg, #F6F0E1 100%, rgba(200,200,200,0) 100%); height: 100%"; > +<div> <div> <div> - <p>Login</p> + <p>Logis + n</p> </div> <form method="post"> <div> <span>Login</span> - <a href="/login">Log in</a> + <a href="/accounts/login">Log in</a> </div> <div> <span>New User?</span> diff --git a/templates/inventory/login.html b/templates/inventory/login.html index d407b3f..5c13efe 100644 --- a/templates/inventory/login.html +++ b/templates/inventory/login.html @@ -3,8 +3,8 @@ <head> <title>Login</title> </head> -<body> -<div style="background: linear-gradient(0deg, #F6F0E1 20%, rgba(200,200,200,0) 100%); height: 100%"; > +<body style="background: linear-gradient(0deg, #F6F0E1 100%, rgba(200,200,200,0) 100%); height: 100%"; > +<div> <div> <div> <p>Login</p> @@ -36,6 +36,10 @@ <span>New User?</span> <a href="/signup">Create Account</a> </div> + <div> + <span>Forget Password?</span> + <a href="/password_reset">RESET</a> + </div> </div> </fieldset> diff --git a/templates/inventory/new_product.html b/templates/inventory/new_product.html new file mode 100644 index 0000000..a8d4868 --- /dev/null +++ b/templates/inventory/new_product.html @@ -0,0 +1,145 @@ +<!DOCTYPE html> +<html> +<head> + <title>Home</title> + <style type="text/css"> + *, + *::before, + *::after { + box-sizing: border-box; + } + html { + background-color: #f0f0f0; + } + body { + color: #999999; + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-style: normal; + font-weight: 400; + letter-spacing: 0; + padding: 1rem; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -moz-font-feature-settings: "liga" on; + } + .sidenav { + height: 100%; + width: 160px; + position: fixed; + z-index: 1; + top: 0; + left: 0; + background-color: #111; + overflow-x: hidden; + padding-top: 20px; + } + + .sidenav a { + padding: 6px 8px 6px 16px; + text-decoration: none; + font-size: 25px; + color: #818181; + display: block; + } + + .sidenav a:hover { + color: #f1f1f1; + } + .main { + margin-left: 160px; + font-size: 28px; + padding: 0px 10px; + } + @media screen and (max-height: 450px) { + .sidenav {padding-top: 15px;} + .sidenav a {font-size: 18px;} + } + #contact {width:100%; height:100%; margin 0 auto; background: #DDD; } + + .container {width:960px; height:auto; margin: 0 auto; padding: 50px 0;} + + #contact .container form input, + #contact .container form textarea { + width:97.4%; + height:30px; + padding:5px 10px; + font-size: 12px; + color:#999; + letter-spacing:1px; + background: #FFF; + border:2px solid #FFF; + margin-bottom:25px; + -webkit-transition:all .1s ease-in-out; + -moz-transition:all .1s ease-in-out; + -ms-transition:all .1s ease-in-out; + -o-transition:all .1s ease-in-out; + transition:all .1s ease-in-out;} + + #contact .container form input:focus, + #contact .container form textarea:focus { + border:2px solid #dd4545; + color:#999;} + + #contact .container form textarea { + height:150px;} + + #contact .container form .submit { + width:100%; + padding:5px 10px; + font-size: 12px; + letter-spacing:1px; + background:#dd4545; + height:40px; + text-transform:uppercase; + letter-spacing:1px; + color:#FFF; + border:2px solid #b43838; + -webkit-transition:all .1s ease-in-out; + -moz-transition:all .1s ease-in-out; + -ms-transition:all .1s ease-in-out; + -o-transition:all .1s ease-in-out; + transition:all .1s ease-in-out;} + + #contact .container form .submit:hover { + color:#FFF; + border:2px solid #dd4545; + background: #b43838; + cursor:pointer;} + + #contact .container form .required { + color:#b43838;} + </style> +</head> +<body> + +<div class="sidenav"> + <a href="/home">Home</a> + <a href="/logout">Logout</a></li> +</div> + +<div class="main"> + <center> + <h1>ADD A NEW PRODUCT</h1> + </center> + + <section id="contact"> + <div class="container"> + <form name="add_product_form" action="/add_product/" method="post" enctype="multipart/form-data"> + + {% csrf_token %} + <input type="text" name="name" id="name" placeholder="Name" required> + <textarea type="text" name="description" id="description" placeholder="Description" required></textarea> + <input type="text" name="price" id="price" placeholder="Price" required> + <input type="number" name="starting_inventory" id="starting_inventory" placeholder="Starting Inventory" required> + <input type="number" name="minimum_required" id="minimum_required" placeholder="Minimum Quantity Required" required> + <button name="add_product" type="submit" class="submit">Add Product</button> + + </form> + </div> + </section> + +</div> + +</body> +</html>
\ No newline at end of file diff --git a/templates/inventory/product.html b/templates/inventory/product.html new file mode 100644 index 0000000..18fb381 --- /dev/null +++ b/templates/inventory/product.html @@ -0,0 +1,77 @@ +<!DOCTYPE html> +<html> +<head> + <title>Home</title> + <style type="text/css"> + *, + *::before, + *::after { + box-sizing: border-box; + } + html { + background-color: #f0f0f0; + } + body { + color: #999999; + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-style: normal; + font-weight: 400; + letter-spacing: 0; + padding: 1rem; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -moz-font-feature-settings: "liga" on; + } + .sidenav { + height: 100%; + width: 160px; + position: fixed; + z-index: 1; + top: 0; + left: 0; + background-color: #111; + overflow-x: hidden; + padding-top: 20px; + } + .sidenav a { + padding: 6px 8px 6px 16px; + text-decoration: none; + font-size: 25px; + color: #818181; + display: block; + } + .sidenav a:hover { + color: #f1f1f1; + } + .main { + margin-left: 160px; + font-size: 28px; + padding: 0px 10px; + } + @media screen and (max-height: 450px) { + .sidenav {padding-top: 15px;} + .sidenav a {font-size: 18px;} + } + </style> +</head> +<body> + +<div class="sidenav"> + <a href="/home">Home</a> + <a href="/logout">Logout</a></li> +</div> + +<div class="main"> + <center> + <h1 style="text-transform: uppercase;">{{ name }}</h1> + </center> + + <h5 color="black">Description:</h5><h6>{{ description }}</h6><br> + <h5 color="black">Price:</h5><h6>{{ price }}</h6><br> + <h5 color="black">Inventory on Hand:</h5><h6>{{ inventory_on_hand }}</h6><br> + +</div> + +</body> +</html>
\ No newline at end of file diff --git a/templates/inventory/reset/base.html b/templates/inventory/reset/base.html new file mode 100644 index 0000000..21c7fc1 --- /dev/null +++ b/templates/inventory/reset/base.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <title>{% block title %}RESET{% endblock %}</title> +</head> +<body> + <header> + <h1>Django Simple Login</h1> + {% if user.is_authenticated %} + Hi {{ user.username }}! + <a href="{% url 'logout' %}">logout</a> + {% else %} + <a href="{% url 'login' %}">login</a> + {% endif %} + </header> + <hr> + <main> + {% block content %} + {% endblock %} + </main> + <hr> +</body> +</html>
\ No newline at end of file diff --git a/templates/inventory/reset/password_reset_complete.html b/templates/inventory/reset/password_reset_complete.html new file mode 100644 index 0000000..5b4260b --- /dev/null +++ b/templates/inventory/reset/password_reset_complete.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<head> + <title></title> +</head> +<body> + <p> + Your password has been set. You may go ahead and login now.<br><br> + <a href="{% url 'login' %}">login</a> + </p> +</body> +</html>
\ No newline at end of file diff --git a/templates/inventory/reset/password_reset_confirm.html b/templates/inventory/reset/password_reset_confirm.html new file mode 100644 index 0000000..84d1c68 --- /dev/null +++ b/templates/inventory/reset/password_reset_confirm.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head> + <title></title> +</head> +<body> + {% if validlink %} + <h3>Change password</h3> + <form method="post"> + {% csrf_token %} + {{ form.as_p }} + <button type="submit">Change password</button> + </form> + {% else %} + <p> + The password reset link was invalid, possibly because it has already been used. + Please request a new password reset. + </p> + {% endif %} +</body> +</html>
\ No newline at end of file diff --git a/templates/inventory/reset/password_reset_done.html b/templates/inventory/reset/password_reset_done.html new file mode 100644 index 0000000..a679fa9 --- /dev/null +++ b/templates/inventory/reset/password_reset_done.html @@ -0,0 +1,17 @@ + +<!DOCTYPE html> +<html> +<head> + <title></title> +</head> +<body> + <p> + We've emailed you instructions for setting your password, if an account exists with the email you entered. + You should receive them shortly. + </p> + <p> + If you don't receive an email, please make sure you've entered the address you registered with, + and check your spam folder. + </p> +</body> +</html>
\ No newline at end of file diff --git a/templates/inventory/reset/password_reset_email.html b/templates/inventory/reset/password_reset_email.html new file mode 100644 index 0000000..da2c169 --- /dev/null +++ b/templates/inventory/reset/password_reset_email.html @@ -0,0 +1,12 @@ +{% autoescape off %} +To initiate the password reset process for your {{ user.get_username }} TestSite Account, +click the link below: + +{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} + +If clicking the link above doesn't work, please copy and paste the URL in a new browser +window instead. + +Sincerely, +The TestSite Team +{% endautoescape %}
\ No newline at end of file diff --git a/templates/inventory/reset/password_reset_form.html b/templates/inventory/reset/password_reset_form.html new file mode 100644 index 0000000..db929c4 --- /dev/null +++ b/templates/inventory/reset/password_reset_form.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<head> + <title>RESET PASSWORD</title> +</head> +<body> + <h3>Forgot password</h3> + <form method="post"> + {% csrf_token %} + {{ form.as_p }} + <button type="submit">Submit</button> + </form> +</body> +</html>
\ No newline at end of file diff --git a/templates/inventory/reset/password_reset_subject.txt b/templates/inventory/reset/password_reset_subject.txt new file mode 100644 index 0000000..0001c8b --- /dev/null +++ b/templates/inventory/reset/password_reset_subject.txt @@ -0,0 +1 @@ +TestSite password reset diff --git a/templates/inventory/signup.html b/templates/inventory/signup.html index 5a0137f..3bec372 100644 --- a/templates/inventory/signup.html +++ b/templates/inventory/signup.html @@ -3,9 +3,9 @@ <head> <title>Sign Up</title> </head> -<body> -<div <div style="background: linear-gradient(0deg, #F6F0E1 20%, rgba(200,200,200,0) 100%); height: 100%"; > - <h1>Sign up</h1> +<body style="background: linear-gradient(0deg, #F6F0E1 100%, rgba(200,200,200,0) 100%); height: 100%"; > +<div> + <h1>Sign up</h1> {% block content %} <form method="post" enctype="multipart/form-data"> |