]> git.cworth.org Git - turbot-web/commitdiff
Widened the expanded view boxes on the main board. Changed the answers display to...
authorAvram Gottschlich <avram.gottschlich@gmail.com>
Wed, 12 Jan 2022 17:23:22 +0000 (12:23 -0500)
committerAvram Gottschlich <avram.gottschlich@gmail.com>
Wed, 12 Jan 2022 17:23:22 +0000 (12:23 -0500)
html_generator.py
overview.css

index e337f08034dce8d0f0a19909b2c78351f96d1bdd..01cecdea7e521c48fb844db5c52e40865d27f58b 100644 (file)
@@ -198,7 +198,7 @@ def overview(hunt, puzzles, rounds):
             if puzzle['status'] == 'solved':
                 expanding += ['      <tr class=\'solved\';>\n',
                 '        <td>{}</td>\n'.format(link(website + filename_from_name(puzzle['name']) + ".html", puzzle['name']+meta)),
-                '        <td>{}</td>\n'.format(puzzle['solution']),
+                '        <td>{}</td>\n'.format(", ".join(puzzle['solution']).upper()),
                 '      </tr>\n']
             else:
                 expanding += ['      <tr class=\'unsolved\';>\n',
@@ -266,9 +266,9 @@ def round_overview(hunt, rnd, puzzles):
              '                        <td>{}</td>\n'.format(elink(puzzle.get('url',''), 'Puzzle')),
              '                        <td>{}</td>\n'.format(elink(puzzle['sheet_url'], 'Sheet')),
              '                        <td>{}</td>\n'.format(link(website + filename_from_name(puzzle['name']) + '.html', 'Overview')),
-             '                        <td>{}</td>\n'.format(puzzle['solution']),
+             '                        <td>{}</td>\n'.format(", ".join(puzzle['solution']).upper()),
             # '                        <td></td>\n',
-             '                        <td>{}</td>\n'.format("".join(puzzle.get('tags',[]))),
+             '                        <td>{}</td>\n'.format("".join(puzzle.get('tags',[]))),
              '                    </tr>\n']
         else:
             puzzle_list += [ '                    <tr>\n',
@@ -278,7 +278,7 @@ def round_overview(hunt, rnd, puzzles):
              '                        <td>{}</td>\n'.format(link(website + filename_from_name(puzzle['name']) + '.html', 'Overview')),
              '                        <td></td>\n',
             # '                        <td></td>\n',
-             '                        <td>{}</td>\n'.format(" ".join(puzzle.get('tags',[]))),
+             '                        <td>{}</td>\n'.format(", ".join(puzzle.get('tags',[]))),
              '                    </tr>\n']
     end = ['                </tbody>\n',
     '            </table>\n',
@@ -308,7 +308,7 @@ def puzzle_overview(hunt, puzzle):
     else:
         round_url = ''
     if puzzle['status'] == 'solved':
-        solution = puzzle['solution']
+        solution = ", ".join(puzzle['solution']).upper()
         status = 'solved'
     else:
         solution = ""
@@ -337,7 +337,7 @@ def puzzle_overview(hunt, puzzle):
      '        <table class="center">\n',
      '            <tr>\n',
      '                <td>Round(s): {}</td>\n'.format(" ".join(round_url)), #round page on our site
-     '                <td>Tags: {}</td>\n'.format(" ".join(puzzle.get('tags',[]))), #add tags
+     '                <td>Tags: {}</td>\n'.format(", ".join(puzzle.get('tags',[]))), #add tags
      '            </tr>\n',
      '            <tr>\n',
      '                <td>Answer: {}</td>\n'.format(solution),
@@ -410,9 +410,9 @@ def puzzle_lists(hunt, puzzles, filt):
          '                        <td>{}</td>\n'.format(elink(puzzle.get('url',''), 'Puzzle')),
          '                        <td>{}</td>\n'.format(elink(puzzle['sheet_url'], 'Sheet')),
          '                        <td>{}</td>\n'.format(link(website + filename_from_name(puzzle['name']) + '.html', 'Overview')),
-         '                        <td>{}</td>\n'.format(puzzle['solution']),
+         '                        <td>{}</td>\n'.format(", ".join(puzzle['solution']).upper()),
          '                        <td>{}</td>\n'.format(round_url),
-         '                        <td>{}</td>\n'.format("".join(puzzle.get('tags',[]))),
+         '                        <td>{}</td>\n'.format("".join(puzzle.get('tags',[]))),
          '                    </tr>\n']
     for puzzle in unsolved_puzzles:
         if puzzle['type'] == 'meta':
@@ -433,7 +433,7 @@ def puzzle_lists(hunt, puzzles, filt):
          '                        <td>{}</td>\n'.format(link(website + filename_from_name(puzzle['name']) + '.html', 'Overview')),
          '                        <td></td>\n',
          '                        <td>{}</td>\n'.format(round_url),
-         '                        <td>{}</td>\n'.format("".join(puzzle.get('tags',[]))),
+         '                        <td>{}</td>\n'.format("".join(puzzle.get('tags',[]))),
          '                    </tr>\n']
     end = ['                </tbody>\n',
     '            </table>\n',
@@ -479,9 +479,10 @@ def generate_for_hunt_id(table, hunt_id):
         round_overview(hunt, rnd, puzzles)
         for puzzle in puzzles:
             puzzle_overview(hunt, puzzle)
-            puzzle_lists(hunt, puzzles, "All")
-            puzzle_lists(hunt, puzzles, "Solved")
-            puzzle_lists(hunt, puzzles, "Unsolved")
+    puzzle_lists(hunt, puzzles, "All")
+    puzzle_lists(hunt, puzzles, "Solved")
+    puzzle_lists(hunt, puzzles, "Unsolved")
+            
 
 # Initialize AWS resources to talk to the database
 db = boto3.resource('dynamodb')
index 8426fb2046f4749678faced5cf48782366ec3523..d79cc0ac19bbd578a748744643f5e778772efc45 100644 (file)
@@ -1,4 +1,4 @@
-/* The grid: Three equal columns that floats next to each other */
+/* The grid: columns that float next to each other */
 .column {
   float: left;
   width: 15%;
@@ -16,7 +16,7 @@
   color: black;
   border-radius: 25px;
   margin: auto;
-  width: 20%;
+  width: 40%;
 
 
 }