Add basic styling

master
Tait Hoyem 4 years ago
parent 64c8a4afd9
commit 2e3a38db9d

@ -0,0 +1,8 @@
table {
border-collapse: collapse;
}
td, th {
padding: 20px;
border: 1px solid black;
margin: 0px;
}

@ -0,0 +1,41 @@
body {
background-color: #f2f2f2;
}
h1, h2, h3, h4, h5, h6 {
text-transform: capitalize;
line-height: initial;
}
#wrapper {
width: 80%;
margin: auto;
color: #333;
font-size: 1.1em;
line-height: 1.5em;
}
.two-col-grid {
display: grid;
width: 100%;
grid-template-columns: 50% 50%;
}
.two-col-grid > * {
text-align: center;
}
nav {
background-color: lightgrey;
}
a {
color: #47a;
padding: 12px;
display: block;
}
a:visited {
color: #941452;
}
nav > a {
display: inline-block;
}
input {
font-size: 32px;
}

@ -1,8 +1,31 @@
{% extends 'common/master.html' %} {% extends 'common/master.html' %}
{% block body %} {% block body %}
{% if user.is_authenticated %} <div class="two-col-grid">
<a href="{% url 'upload' %}">Upload</a> <div>
<a href="{% url 'requests_view' %}">View Downloads</a> <h1>Download a quote</h1>
{% endif %} <p>Download a quote from {{ company }}. Have it sent right to your inbox.</p>
<a href="{% url 'download' %}">Download</a> <a href="{% url 'download' %}">Download a quote</a>
</div>
{% if user.is_authenticated %}
<div>
<h1>Upload quotes</h1>
<p>Upload quotes for {{ company }}. </p>
<a href="{% url 'upload' %}">Upload</a>
</div>
<div>
<h1>View Download Attempts</h1>
<p>View all download attempts, what IP the request originated from, what quote was requested, if the email was sent correctly and more!</p>
<a href="{% url 'requests_view' %}">View Downloads</a>
</div>
{% endif %}
<div>
{% if user.is_authenticated %}
<h1>Logout</h1>
<a href="{% url 'logout' %}">Logout</a>
{% else %}
<h1>Login</h1>
<a href="{% url 'login' %}">Login</a>
{% endif %}
</div>
</div>
{% endblock %} {% endblock %}

@ -1,5 +1,11 @@
from django import forms from django import forms
class CodeForm(forms.Form): class CodeForm(forms.Form):
code = forms.CharField(label='Code', max_length=8, required=True) code = forms.CharField(label='Code', max_length=8, required=True,
email = forms.EmailField(label='Email', max_length=32, required=True) widget=forms.TextInput(
attrs={'placeholder': '123A56'}
))
email = forms.EmailField(label='Email', max_length=32, required=True,
widget=forms.TextInput(
attrs={'placeholder': 'jane@joe.com'}
))

@ -1,19 +1,19 @@
{% load static %}
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>{% block title %}{% endblock %}</title> <title>{% block title %}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<style> <link href="{% static 'core/css/style.css' %}" rel="stylesheet">
nav { {% if user.is_authenticated %}
background-color: lightgrey; <link href="{% static 'core/css/logged-in.css' %}" rel="stylesheet">
} {% endif %}
a { padding: 12px; display: block; border: 1px solid black; }
nav > a { display: inline-block; }
</style>
</head> </head>
<body> <body>
{% include 'common/navbar.html' %} <div id="wrapper">
{% block body %} {% include 'common/navbar.html' %}
{% endblock %} {% block body %}
{% endblock %}
</div>
</body> </body>
</html> </html>

@ -1,3 +1,4 @@
{% extends 'common/master.html' %}
{% block body %} {% block body %}
<h1>Type In Your Code</h1> <h1>Type In Your Code</h1>
<form action="{% url 'download_f' id %}" method="POST"> <form action="{% url 'download_f' id %}" method="POST">

@ -1,8 +1,8 @@
{% extends 'common/master.html' %} {% extends 'common/master.html' %}
{% block body %} {% block body %}
<h1>Download Your Quote</h1> <h1>Download Your Quote</h1>
<label for="addr">Address</label> <label for="addr" hidden>Search</label>
<input id="addr" type="text"> <input id="addr" type="text" placeholder="123 Main St.">
<ul id="addrlist"></ul> <ul id="addrlist"></ul>
<script> <script>
const ADDR_BOX = document.getElementById('addr'); const ADDR_BOX = document.getElementById('addr');

@ -1,15 +1,5 @@
{% extends 'common/master.html' %} {% extends 'common/master.html' %}
{% block body %} {% block body %}
<style>
table {
border-collapse: collapse;
}
td {
padding: 20px;
border: 1px solid black;
margin: 0px;
}
</style>
<h1>View Download Attempts</h1> <h1>View Download Attempts</h1>
<table> <table>
<tr> <tr>

Loading…
Cancel
Save