Skip to content
Browse files

Make the style better

  • Loading branch information...
1 parent 43b3bb1 commit 632f9010319b0843a24b48ec8a03bb022be90194 Sina Samavati committed Apr 25, 2012
Showing with 18 additions and 8 deletions.
  1. +6 −6 pudoku.py
  2. +12 −2 static/style.css
View
12 pudoku.py
@@ -15,28 +15,28 @@
def pudo(difficulty=0):
pu = sudoku.Sudoku(difficulty=difficulty)
do = [str(e) for e in pu.masked_grid]
- ku = ['<center><form action="result" method="POST">\n']
+ ku = ['<div class="pudoku"><form action="result" method="POST">\n']
l = [i*27 for i in xrange(4)]
c = 0
for n in do:
if c in l:
- ku.append('%s\n<br /> %s <br />\n' % ('|' if c != 0 else '', '-' * 90))
+ ku.append('%s\n<br /> +%s+ <br />\n' % ('|' if c != 0 else '', '-' * 80))
if c % 9 == 0 and c not in l:
ku.append('|\n<br />\n')
-
+
if c % 3 == 0:
ku.append('|')
- ku.append('<input align="top" type="text" %s value="%s" name="%s" maxlength="1" style="width:25px" />\n' \
+ ku.append('<input align="top" type="text" %s value="%s" name="%s" maxlength="1" />\n' \
% ('readonly="readonly"' if n else '', n, str(c)))
c += 1
- ku.append('|\n<br /> %s <br />' % ('-' * 90))
- ku.append('\n<br /><br />\n<input class="btn primary" type="submit" value="Submit" name="submit" /></form></center>')
+ ku.append('|\n<br /> +%s+ <br />' % ('-' * 80))
+ ku.append('\n<br /><br />\n<input class="btn primary" type="submit" value="Submit" name="submit" /></form></div>')
pudoku = ' '.join(ku)
global solution
solution = pu.solution
View
14 static/style.css
@@ -16,14 +16,14 @@ footer {
background-color: #222;
color: #DDD;
height: 120px;
- position: absolute;
+ position: fixed;
bottom: 0;
right: 0;
left: 0;
}
footer p, footer p iframe {
- text-align: center;
+ text-align: center;
}
footer p iframe {
@@ -33,6 +33,7 @@ footer p iframe {
.container {
width: 670px;
+ height: 630px;
}
.container .content {
@@ -46,3 +47,12 @@ footer p iframe {
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
+
+.pudoku {
+ text-align: center;
+}
+
+.pudoku input[type=text] {
+ width: 20px;
+ text-align: center;
+}

0 comments on commit 632f901

Please sign in to comment.
Something went wrong with that request. Please try again.