nicer oauth forms
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 11 Oct 2011 11:27:11 +0000 (13:27 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Tue, 11 Oct 2011 11:27:11 +0000 (13:27 +0200)
wolnelektury/settings.py
wolnelektury/static/css/simple.css [new file with mode: 0755]
wolnelektury/templates/piston/authorize_token.html
wolnelektury/templates/registration/login.html
wolnelektury/templates/simple_base.html [new file with mode: 0755]

index 5cb556b..fb78ce4 100644 (file)
@@ -162,7 +162,11 @@ COMPRESS_CSS = {
     'book': {
         'source_filenames': ('css/master.book.css',),
         'output_filename': 'css/book.min?.css',
-    }
+    },
+    'simple': {
+        'source_filenames': ('css/simple.css',),
+        'output_filename': 'css/simple.min?.css',
+    },
 }
 
 COMPRESS_JS = {
diff --git a/wolnelektury/static/css/simple.css b/wolnelektury/static/css/simple.css
new file mode 100755 (executable)
index 0000000..6b8a54c
--- /dev/null
@@ -0,0 +1,73 @@
+html {
+    margin: 0;
+}
+
+body {
+    margin: 0;
+    padding: 1em;
+    color: #2F4110;
+    background: #FFF url(/static/img/bg.png) repeat-x;
+    font-size: .75em;
+    font-family: Verdana,Arial,Helvetica,sans-serif;
+}
+
+
+
+#body {
+    margin-top: 2em;
+/*
+    max-width: 900px;
+    margin:auto;
+*/
+    margin-left: 400px;
+}
+
+#logo {
+    float: left;
+    margin-left: 100px;
+    margin-top: 4em;
+}
+
+h1 {
+    font: bold 2.2em Arial,sans-serif;
+    padding-top: .7em;
+    margin-bottom: .2em;
+}
+
+
+h2 {
+    font-size: 1.1em;
+    margin:0;
+}
+
+a {
+    color: #295158;
+    text-decoration: none;
+}
+
+
+.plain li {
+    list-style: none;
+}
+
+li {
+    margin: 1em;
+}
+
+.clr {
+    clear: both;
+}
+
+
+.more {
+    text-align: right;
+}
+
+table {
+    margin-top: 1em;
+}
+
+th {
+    font-weight: normal;
+    text-align: left;
+}
index ba28adc..e2444de 100755 (executable)
@@ -1,15 +1,15 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-  <head>
-    <title>Authorize Token</title>
-  </head>
-  <body>
-    <h1>Authorize Token</h1>
+{% extends "simple_base.html" %}
+{% load i18n %}
+
+{% block "title" %}{% trans "Authorize access to Wolne Lektury" %}{% endblock %}
+
+{% block "body" %}
+    <h1>{% trans "Authorize access to Wolne Lektury" %}</h1>
+
+    <p>{% blocktrans %}Confirm to authorize access to Wolne Lektury as user <strong>{{ user}}</strong>.{% endblocktrans %}</p>
 
     <form action="{% url piston.authentication.oauth_user_auth %}" method="POST">
-      {{ form.as_table }}
+      {{ form.as_p }}
       <button type="submit">Confirm</button>
     </form>
-
-  </body>
-</html>
+{% endblock %}
index b88d4e1..5fbe3af 100755 (executable)
@@ -1,5 +1,19 @@
-<form method="POST" action="">
+{% extends "simple_base.html" %}
+{% load i18n %}
+
+{% block "title" %}{% trans "Login to Wolne Lektury" %}{% endblock %}
+
+{% block "body" %}
+    <h1>{% trans "Login to Wolne Lektury" %}</h1>
+
+    <form method="POST">
     {% csrf_token %}
-    {{ form }}
-<input type="submit" />
-</form>
+    <table>
+        {{ form.as_table }}
+        <tr><td></td><td>
+            <input type="submit" value='{% trans "Login" %}' />
+        </td></tr>
+    </table>
+    </form>
+
+{% endblock %}
diff --git a/wolnelektury/templates/simple_base.html b/wolnelektury/templates/simple_base.html
new file mode 100755 (executable)
index 0000000..17814ad
--- /dev/null
@@ -0,0 +1,24 @@
+<!doctype html>
+{% load compressed %}
+<html>
+<head>
+    <title>{% block "title" %}{% endblock %}</title>
+    <meta charset="utf-8" />
+
+    <link rel="icon" href="{{ STATIC_URL }}img/favicon.png" type="image/png" />
+    <link rel="shortcut icon" href="/favicon.ico" />
+    {% compressed_css "simple" %}
+</head>
+
+<body>
+
+
+<img id="logo" src="{{ STATIC_URL }}img/logo-bez.png" alt="WolneLektury.pl" />
+<div id="body">
+
+{% block "body" %}{% endblock %}
+
+</div>
+
+</body>
+</html>