New webpage style.

This commit is contained in:
2010-03-09 23:47:21 +00:00
parent 0881634127
commit 1b74e8f272
7 changed files with 144 additions and 23 deletions

102
media/css/style.css Normal file
View File

@@ -0,0 +1,102 @@
body
{
margin: 20px;
padding: 0;
font: 80%/1.2 helvetica, arial, sans-serif;
color: #444;
background: #fff;
}
#container
{
margin: 0 auto;
width: 800px;
background:#fff;
}
#header
{
background:#ccc;
padding: 20px;
}
#header h1 { margin: 0; }
#navigation
{
float: left;
width: 800px;
background:#333;
}
#navigation ul
{
margin: 0;
padding: 0;
}
#navigation ul li
{
list-style-type: none;
display: inline;
}
#navigation li a
{
display: block;
float: left;
padding: 5px 10px;
color:#fff;
text-decoration: none;
border-right: 1px solid#fff;
}
#navigation li a:hover { background:#383; }
#content
{
clear: left;
padding: 20px;
}
#content h2
{
color:#000;
font-size: 160%;
margin: 0 0 .5em;
}
#footer
{
background:#ccc;
text-align: right;
padding: 20px;
height: 1%;
}
table
{text-align: center;
font-weight: normal;
font-size: 11px;
color: #fff;
width: 280px;
background-color: #666;
border: 0px;
border-collapse: collapse;
border-spacing: 0px;}
table td
{background-color: #CCC;
color: #000;
padding: 4px;
text-align: left;
border: 1px #fff solid;}
table th
{background-color: #333;
color: #fff;
padding: 4px;
text-align: left;
border-bottom: 2px #fff solid;
font-size: 12px;
font-weight: bold;}

View File

@@ -7,7 +7,7 @@ from reddit.models import RedditAccount
class EveAPIForm(forms.Form):
user_id = forms.IntegerField(label = u'User ID')
api_key = forms.CharField(label = u'API Key', max_length=64)
description = forms.CharField(max_length=100)
description = forms.CharField(max_length=100, required=False)
def clean(self):
if not len(self.cleaned_data['api_key']) == 64:

View File

@@ -1,16 +1,30 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<title>dredd.it - {% block title %}{% endblock %}</title>
<style type="text/css">
BODY, TH, TD, P {
font-size: 0.9em;
font-family: Verdana;
}
</style>
<link rel="stylesheet" href="/static/css/tables.css" type="text/css" media="screen">
<title></title>
<link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen">
</head>
<body>
<div id="container">
<div id="header">
<h1>
Dreddit Auth Gateway - {% block title %}{% endblock %}
</h1>
</div>
<div id="navigation">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/profile">Profile</a></li>
</ul>
</div>
<div id="content">
{% block content %}{% endblock %}
</div>
<div id="footer">
&nbsp;
</div>
</div>
</body>
</html>

View File

@@ -6,9 +6,10 @@
<h1>Your Profile</h1>
<ul>
<li><b>Username:</b> {{ user.username }}</li>
</ul>
<p>
<b>Username:</b> {{ user.username }}<br/>
<b>Email:</b> {{ user.email }}<br/>
</p>
{% if eveaccounts %}
<h2>Service Accounts</h2>
@@ -33,7 +34,6 @@ a new service click the Add Service link</p>
</tr>
{% endfor %}
</tbody>
<tfoot><tr><td colspan="5">&nbsp;</td></tr></tfoot>
</table>
{% endif %}
@@ -65,13 +65,13 @@ setup.</p>
</tr>
</tbody>
{% endfor %}
<tfoot><tr><td colspan="5">&nbsp;</td></tr></tfoot>
</table>
{% endif %}
<p>
<a href="/profile/add/eveapi">Add a Eve API key</a>
</p>
<br/>
<h2>Reddit Accounts</h2>
<p>This is a list of all your current linked Reddit accounts</p>
@@ -87,7 +87,6 @@ setup.</p>
</tr>
{% endfor %}
</tbody>
<tfoot><tr><td colspan="5">&nbsp;</td></tr></tfoot>
</table>
{% endif %}
<p>

View File

@@ -5,10 +5,12 @@
{% block content %}
<p>Please fill in your API key as provided on the <a
href="http://eve-online.com/api">EVE Online API
page</a></p>
page</a> and a optional description.</p>
<form action="/profile/add/eveapi" method="post">
{{ form.as_p }}
<input type="submit" value="Submit" />
<table>
{{ form.as_table }}
</table>
<input type="submit" value="Add Key" />
</form>
{% endblock %}

View File

@@ -8,7 +8,9 @@ corporation</p>
<p>Please note, you will be forever tied to this account and posts and comments made on this account will be checked
on from time to time</p>
<form action="/profile/add/reddit" method="post">
{{ form.as_p }}
<input type="submit" value="Submit" />
<table>
{{ form.as_table }}
</table>
<input type="submit" value="Add Account" />
</form>
{% endblock %}

View File

@@ -9,7 +9,9 @@ then provide a username and password you wish to use to connect.<br/>
For details on how to connect to each service, please consult the <a
href="http://wiki.dredd.it">wiki</a></p>
<form action="/profile/add/service" method="post">
{{ form.as_p }}
<input type="submit" value="Submit" />
<table>
{{ form.as_table }}
<table>
<input type="submit" value="Create Account" />
</form>
{% endblock %}