i heard you like css, so i put some css in your project

* login dialog
* notifications
* main nav
This commit is contained in:
Konrad Mohrfeldt 2010-11-09 05:30:07 +01:00
parent 37c8beae9e
commit b43c1df865
8 changed files with 255 additions and 40 deletions

Binary file not shown.

View File

@ -1,20 +1,23 @@
<!-- Please Intert Doctype. Or Don't. I don't care. -->
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/style.css" />
<title>Cashboxes are forever...</title>
<link rel="stylesheet" media="screen" type="text/css"
href="{{ MEDIA_URL }}css/style.css" />
<title>Freitagsrundenkasse</title>
</head>
<body>
<div class="title">
Its Alive - and here could be a logo. Wouldn't that be nice?
{% if user.is_authenticated %}
Logged in as {{ user }}, balance {{ user.get_profile.balance }} EUR
{% endif %}
</div>
<div class="navigation">
<div class="left">
<div id="header">
<div class="search">
<form method="post" action="/what/do/i/know">
<input type="search" name="search_term" />
<input type="submit" value="Suchen" />
</form>
</div>
<div class="base_nav">
<h1>Kasse</h1>
{% if user.is_authenticated %}
{% include "main/navigation-login.html" %}
<span class="balance">Kontostand: {{ user.get_profile.balance }} €</span>
{% else %}
{% include "main/navigation.html" %}
{% endif %}

View File

@ -1,9 +1,8 @@
<b>Main</b><br />
<a href="/">Startseite (Main)</a><br />
<a href="/store/">Buy</a><br />
<a href="/transaction/">Konto</a><br />
<a href="/store/history/">History</a><br />
{% if user.is_staff %}
<br /><b>Admin foo</b><br />
<a href="/admin/">Admin Interface</a><br /><br />{% endif %}
<a href="/user/logout/">Logout</a><br /><br />
<ul>
<li><a href="/">Home</a></li>
<li><a href="/store/">Einkaufen</a></li>
<li><a href="/transaction/">Konto</a></li>
<li><a href="/store/history/">Frühere Einkäufe</a></li>
{% if user.is_staff %}<li><a href="/admin/">Administration</a></li>{% endif %}
<li><a href="/user/logout/">Abmelden</a></li>
</ul>

View File

@ -1,2 +1,4 @@
<a href="/user/login/">Login</a><br /><br />
<a href="/user/register/">Registrieren</a><br /><br />
<ul>
<li><a href="/user/login/">Anmelden</a></li>
<li><a href="/user/register/">Registrieren</a></li>
</ul>

View File

@ -1,29 +1,26 @@
{% extends "base.html" %}
{% block "content" %}
{% if form.errors %}
<!-- Thaddaeus - du bist einfach mal der krasseste Troll, den ich ueberhaupt kenne!! *grml* -->
<!-- <marquee behavior="ALTERNATE"><p>Your username and password didn't match. Please try again.</p></marquee> -->
<p><b>Dein Benutzername oder Passwort oder beides ist falsch.</b> <br />
Versuch es nochmal, aber achte auf CAPSLOCK und tippe nicht so schnell..</p>
<p><i> Falls du dein Passwort vergessen haben solltest (oder es nicht geht..), dann <br />
melde dich bei einem Admin deiner Wahl. </i></p>
<div class="error">
<h2>Deine Logindaten sind fehlerhaft</h2>
<p>Versuch es nochmal, aber achte auf CAPSLOCK und tippe nicht so schnell.</p>
<p>Falls du dein Passwort vergessen haben solltest (oder es nicht geht..),
dann melde dich bei deiner <a href="http://www.antifa.de/cms/">Local Antifa</a>
oder einem Admin <a href="http://superfluousandsparse.blogspot.com/">
unserer Wahl</a>.</p>
</div>
{% endif %}
<form method="post" action="/user/login/">
<form class="login" method="post" action="/user/login/">
{% csrf_token %}
<table>
<tr>
<td>{{ form.username.label_tag }}</td>
<td>{{ form.username }}</td>
</tr>
<tr>
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
</table>
<fieldset>
<p>{{ form.username.label_tag }} {{ form.username }}</p>
<p>{{ form.password.label_tag }} {{ form.password }}</p>
</fieldset>
<input type="submit" value="login" />
<input type="submit" value="Anmelden" />
<input type="hidden" name="next" value="{{ next }}" />
</form>

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,214 @@
/* THOSE ARE JUST TEMPORARY, I CHANGE THEM LATER INTO LOCAL RESOURCES */
@import url(http://fonts.googleapis.com/css?family=Droid+Serif:regular,italic,bold,bolditalic&subset=latin);
@import url(http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold&subset=latin);
/* =Reset default browser CSS. Based on work by Eric Meyer: http://meyerweb.com/eric/tools/css/reset/index.html
-------------------------------------------------------------- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
background: transparent;
border: 0;
margin: 0;
padding: 0;
vertical-align: baseline;
}
body {
line-height: 1;
}
h1, h2, h3, h4, h5, h6 {
clear: both;
font-weight: normal;
}
ol, ul, li {
list-style: none;
}
blockquote {
quotes: none;
}
blockquote:before, blockquote:after {
content: '';
content: none;
}
del {
text-decoration: line-through;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: collapse;
border-spacing: 0;
}
a img {
border: none;
}
/* GENERAL SETTINGS */
body {
font-family: 'Droid Sans', arial, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Droid Serif', Garamond, serif;
}
p { margin-bottom: 7px; }
input {
padding: 2px 5px;
border: 1px solid #E5E5E5;
background: none repeat scroll 0 0 #FBFBFB;
}
input[type=text]:focus, input[type=search]:focus, input[type=password]:focus {
background: #FAFFBD;
}
/* HEADER */
#header {
margin-bottom: 20px;
}
#header > div {
padding: 5px 10px;
}
#header .search {
background: url("img/logo.png") 10px center no-repeat #323232;
height: 40px;
}
#header .search form {
float: right;
line-height: 40px;
}
#header .base_nav {
background: url("img/base_nav_bg.gif") repeat-x #339DD1;
text-transform: uppercase;
height: 50px;
color: white;
}
#header .base_nav h1 {
color: white;
float: left;
margin-right: 20px;
line-height: 50px;
}
#header .base_nav ul {
float: left;
}
#header .base_nav ul li {
display: inline-block;
text-transform: uppercase;
line-height: 36px;
}
#header .base_nav a {
display: block;
margin-top: 7px;
padding: 0 10px;
text-decoration: none;
color: white;
}
#header .base_nav a:hover {
background: white;
color: #339DD1;
}
span.balance {
float: right;
line-height: 50px;
}
/* LOGIN FORM */
form.login {
width: 300px;
margin: 60px auto;
-moz-box-shadow: 3px 3px 6px #333;
-webkit-box-shadow: 3px 3px 6px #333;
box-shadow: 3px 3px 6px #333;
border: 1px solid #E5E5E5;
padding: 20px;
}
form.login label {
display: block;
margin-top: 10px;
margin-bottom: 3px;
}
form.login input {
font-size: 24px;
width: 97%;
}
form.login input[type=submit] {
width: auto;
padding: 3px 20px;
margin-top: 15px;
background: #339DD1;
color: white;
font-size: 18px;
border: 1px solid #323232;
}
/* NOTIFICATIONS */
.error, .notice, .success {
border-top: 1px solid #DDD;
margin-bottom: 1em;
padding: 0.6em 0.8em;
position: fixed;
bottom: 0;
width: 100%;
}
.error h2, .notice h2, .success h2 {
font-size: 100%;
font-weight: bold;
margin-bottom: 10px;
}
.error {
background: #FBE3E4;
color: #8A1F11;
border-color: #FBC2C4;
}
.error a { color:#8A1F11; }
.notice {
background: #FFF6BF;
color: #514721;
border-color: #FFD324;
}
.notice a { color:#514721; }
.success{
background: #E6EFC2;
color: #264409;
border-color: #C6D880;
}
.success a { color:#264409; }