From 1b74e8f2725f4c00660ede4f1176af839532010e Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Tue, 9 Mar 2010 23:47:21 +0000 Subject: [PATCH] New webpage style. --- media/css/style.css | 102 ++++++++++++++++++++++++++++++ sso/forms.py | 2 +- templates/base.html | 32 +++++++--- templates/profile.html | 11 ++-- templates/sso/eveapi.html | 8 ++- templates/sso/redditaccount.html | 6 +- templates/sso/serviceaccount.html | 6 +- 7 files changed, 144 insertions(+), 23 deletions(-) create mode 100644 media/css/style.css diff --git a/media/css/style.css b/media/css/style.css new file mode 100644 index 0000000..a893157 --- /dev/null +++ b/media/css/style.css @@ -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;} diff --git a/sso/forms.py b/sso/forms.py index c6ef6db..651b61d 100644 --- a/sso/forms.py +++ b/sso/forms.py @@ -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: diff --git a/templates/base.html b/templates/base.html index 29891cc..17dd972 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,16 +1,30 @@ - dredd.it - {% block title %}{% endblock %} - - + + - {% block content %}{% endblock %} +
+ + +
+ {% block content %}{% endblock %} +
+ +
+ + diff --git a/templates/profile.html b/templates/profile.html index 6f54a63..e0ea60e 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -6,9 +6,10 @@

Your Profile

- +

+Username: {{ user.username }}
+Email: {{ user.email }}
+

{% if eveaccounts %}

Service Accounts

@@ -33,7 +34,6 @@ a new service click the Add Service link

{% endfor %} -  {% endif %} @@ -65,13 +65,13 @@ setup.

{% endfor %} -  {% endif %}

Add a Eve API key

+

Reddit Accounts

This is a list of all your current linked Reddit accounts

@@ -87,7 +87,6 @@ setup.

{% endfor %} -  {% endif %}

diff --git a/templates/sso/eveapi.html b/templates/sso/eveapi.html index e1b4f5f..c7c6721 100644 --- a/templates/sso/eveapi.html +++ b/templates/sso/eveapi.html @@ -5,10 +5,12 @@ {% block content %}

Please fill in your API key as provided on the EVE Online API -page

+page and a optional description.

-{{ form.as_p }} - + +{{ form.as_table }} +
+
{% endblock %} diff --git a/templates/sso/redditaccount.html b/templates/sso/redditaccount.html index 6c337b9..d0a193d 100644 --- a/templates/sso/redditaccount.html +++ b/templates/sso/redditaccount.html @@ -8,7 +8,9 @@ corporation

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

-{{ form.as_p }} - + +{{ form.as_table }} +
+
{% endblock %} diff --git a/templates/sso/serviceaccount.html b/templates/sso/serviceaccount.html index a90e424..f74bf0b 100644 --- a/templates/sso/serviceaccount.html +++ b/templates/sso/serviceaccount.html @@ -9,7 +9,9 @@ then provide a username and password you wish to use to connect.
For details on how to connect to each service, please consult the wiki

-{{ form.as_p }} - + +{{ form.as_table }} +
+ {% endblock %}