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' %}
{% block body %}
{% if user.is_authenticated %}
<a href="{% url 'upload' %}">Upload</a>
<a href="{% url 'requests_view' %}">View Downloads</a>
{% endif %}
<a href="{% url 'download' %}">Download</a>
<div class="two-col-grid">
<div>
<h1>Download a quote</h1>
<p>Download a quote from {{ company }}. Have it sent right to your inbox.</p>
<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 %}

@ -1,5 +1,11 @@
from django import forms
class CodeForm(forms.Form):
code = forms.CharField(label='Code', max_length=8, required=True)
email = forms.EmailField(label='Email', max_length=32, required=True)
code = forms.CharField(label='Code', max_length=8, 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>
<html>
<head>
<title>{% block title %}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
nav {
background-color: lightgrey;
}
a { padding: 12px; display: block; border: 1px solid black; }
nav > a { display: inline-block; }
</style>
<link href="{% static 'core/css/style.css' %}" rel="stylesheet">
{% if user.is_authenticated %}
<link href="{% static 'core/css/logged-in.css' %}" rel="stylesheet">
{% endif %}
</head>
<body>
{% include 'common/navbar.html' %}
{% block body %}
{% endblock %}
<div id="wrapper">
{% include 'common/navbar.html' %}
{% block body %}
{% endblock %}
</div>
</body>
</html>

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

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

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

Loading…
Cancel
Save