From 055756dab1c0645ea16d5124e624702cc45c476b Mon Sep 17 00:00:00 2001
From: phear
Date: Sun, 9 Oct 2005 21:43:20 +0000
Subject: [PATCH] css: changed all id tags into class tags.
---
createaccount.py | 10 +++---
default.css | 80 +++---------------------------------------------
gamecreation.py | 4 +--
goban.py | 24 +++++++--------
login.py | 22 ++++++-------
5 files changed, 34 insertions(+), 106 deletions(-)
diff --git a/createaccount.py b/createaccount.py
index 2ed9f1a..dff17c7 100644
--- a/createaccount.py
+++ b/createaccount.py
@@ -10,14 +10,14 @@ def display_create_form(req,form):
data = """
Your Password:
-
+
Please retype your Password:
-
+
-
+
""" % helper.generate_session_id()
req.write(data)
@@ -49,7 +49,7 @@ def process_form(req,form):
-
+
""" % (username,password1,helper.generate_session_id())
req.write(data)
diff --git a/default.css b/default.css
index feb3d19..139e86d 100644
--- a/default.css
+++ b/default.css
@@ -174,58 +174,7 @@ td {
}
-/* -------=-=-=- warnings, errors and success messages-=-=-=-------- */
-#words div.warning,div.error,div.success {
- margin-top: 20px;
- margin-bottom: 20px;
- padding-top: 10px;
- padding-bottom: 15px;
- color: #707070;
- }
-
-#words .warning,.error,.success {
- border: 1px dashed #808080;
- text-align: center;
- color: #5e5e5e;
- text-decoration: none;
- font-weight: bold;
- font-size: 0.9em;
- padding-left: 40px;
- padding-right: 40px;
- }
-
-#words .warning {
- background-color: #f5f5f5;
- }
-
-#words .error {
- background-color: #f5f5f5;
- }
-
-#words .success {
-/* background-color: #90EE90; */
- }
-
-#words div.warning,div.error,div.success h1,h2 {
- color: #808080;
- }
-
-#words .warning,.error,.success a {
-// TODO: WHY line-height???
-// line-height: 5em;
- color: #5e5e5e;
- text-decoration: none;
- font-weight: bold;
- font-size: 0.9em;
-}
-
-#words .note {
- text-align: center;
- color: #F48659;
- font-style: italic;
- }
-
/* ----------------------=-=-=- Forms -=-=-=--------------------- */
/* pretty forms and buttons */
input {
@@ -234,7 +183,7 @@ input {
border: 0px;
}
-input#text {
+input.text {
border: 1px solid #333333;
color: #333333;
background: #fff;
@@ -242,15 +191,15 @@ input#text {
font-size: 1em;
}
-input#text:hover {
+input.text:hover {
background: #fff;
border: 1px solid #ACE149;
color: #7DA721;
font-size: 1em;
}
-/* the submit buttons have to have id="submit" for the following style: ------------------------------------- */
-input#submit {
+/* the submit buttons have to have class="submit" for the following style: ------------------------------------- */
+input.submit {
background-color: #ACE149;
border: 1px solid #222222;
color: #222;
@@ -259,7 +208,7 @@ input#submit {
cursor: pointer;
}
-input#submit:hover {
+input.submit:hover {
background-color: #fff;
border: 1px solid #222;
color: #222;
@@ -267,22 +216,3 @@ input#submit:hover {
font-weight: bold;
cursor: pointer;
}
-
-
-
-
-/*input#goban:hover {
- padding: 0px;
- border: 0px;
- margin: 0px;
- }
-*/
-
-
-#words form label {
- min-width: 20em;
- }
-
-#words form p {
- text-align: center;
- }
diff --git a/gamecreation.py b/gamecreation.py
index 0e34aab..7a0da63 100644
--- a/gamecreation.py
+++ b/gamecreation.py
@@ -20,10 +20,10 @@ def display_game_creation_form(req,sessionid,username):
Player One (Black): %s
Player Two (White): %s
Goban Size: %s fields
- Optional name for game:
+ Optional name for game:
-
+
""" % (p1data,p2data,gobansize,sessionid,username)
diff --git a/goban.py b/goban.py
index 887326b..cf2973e 100755
--- a/goban.py
+++ b/goban.py
@@ -53,30 +53,30 @@ def display_goban(goban,req,form):
sy = str(y)
# check position:
if (x == 1) and (y == 1): # upper left
- data += ''
+ data += ''
elif (x == 1) and (y == size): # upper right
- data += '
'
+ data += '
'
elif (x == size) and (y == size): # lower right
- data += '
\n'
+ data += '
\n'
elif (x == size) and (y == 1): # lower left
- data += ''
+ data += ''
elif (y == 1): #left line
- data += ''
+ data += ''
elif (x == 1): # top line
- data += ''
+ data += ''
elif (y == size): # right line
- data += '
'
+ data += '
'
elif (x == size): #bottom line
- data += ''
+ data += ''
else: # hoshi or empty inner field
- defaultfield = ''
+ defaultfield = ''
#too lazy to make special images for hoshi fields with stones:
if gobandict[(x,y)] == 1:
- hoshifield = ''
+ hoshifield = ''
elif gobandict[(x,y)] == 2:
- hoshifield = ''
+ hoshifield = ''
else: #empty hoshi
- hoshifield = ''
+ hoshifield = ''
if size == 19: # 9 hoshis
if (x,y) in hoshis19x19:
data += hoshifield
diff --git a/login.py b/login.py
index 4a29c36..26a2817 100755
--- a/login.py
+++ b/login.py
@@ -64,7 +64,7 @@ def game_overview_form(req,form):
tmp += '\n' % sessionid
tmp += '\n' % username
tmp += '\n' % item
- tmp += ' | \n'
+ tmp += ' | \n'
description = psql.get_description(item)
if (description == None) or (description == "None") or (description == ""):
description = item
@@ -74,7 +74,7 @@ def game_overview_form(req,form):
tmp += '%s | \n' % players[1]
tmp += '%s | \n' % helper.format_time(psql.get_time(item,"created"))
tmp += '%s | \n' % helper.format_time(psql.get_time(item,"lastmove"))
- tmp += ' | \n'
+ tmp += ' | \n'
tmp += '\n'
if helper.clean_list(gamelist) != []:
tmp += ''
@@ -92,13 +92,11 @@ def game_overview_form(req,form):
""" % (sessionid, username)
else:
data+= "Sorry, all your game slots are in use."
- #display "You have ... free game slots" + Button "create game"
- #bei "create game neue funktion zum Erstellen + Mitspieler aus Liste auswählen.
data+=helper.footer()
req.write(data)
@@ -110,15 +108,15 @@ def login_form():
data = helper.header() + """
""" % helper.generate_session_id()
data += helper.footer()
@@ -141,9 +139,9 @@ def navigation_bar(req,form):
-
-
-
+
+
+
""" % (username,sessionid,game)
return(data)