Permalink
Browse files

front end redesign as a single commit

  • Loading branch information...
1 parent 1ff9fb5 commit a84f3f5d0745923e376ba5241fac6a5e8d886459 @fangeugene fangeugene committed Jul 15, 2012
Showing with 9,047 additions and 1,308 deletions.
  1. +6 −2 .gitignore
  2. +6 −0 README.textile
  3. +0 −8 admin_main.py
  4. +0 −8 api_main.py
  5. +11 −2 app.yaml
  6. +3 −3 controllers/admin/admin_event_controller.py
  7. +1 −1 controllers/admin/admin_main_controller.py
  8. +7 −7 controllers/admin/admin_match_controller.py
  9. +2 −2 controllers/admin/admin_memcache_controller.py
  10. +2 −2 controllers/admin/admin_team_controller.py
  11. +11 −3 controllers/event_controller.py
  12. +2 −2 controllers/main_controller.py
  13. +2 −2 controllers/match_controller.py
  14. +12 −4 controllers/team_controller.py
  15. +0 −8 cron_main.py
  16. +0 −9 main.py
  17. +1 −1 models.py
  18. BIN static/apple-touch-icon.png
  19. +33 −0 static/css/accordion.less
  20. +1 −1 static/css/admin.css
  21. +58 −0 static/css/alerts.less
  22. +24 −0 static/css/breadcrumbs.less
  23. +191 −0 static/css/button-groups.less
  24. +191 −0 static/css/buttons.less
  25. +121 −0 static/css/carousel.less
  26. +29 −0 static/css/close.less
  27. +57 −0 static/css/code.less
  28. +20 −0 static/css/component-animations.less
  29. +143 −0 static/css/dropdowns.less
  30. +583 −0 static/css/forms.less
  31. +5 −0 static/css/grid.less
  32. +22 −0 static/css/hero-unit.less
  33. +578 −0 static/css/jquery-ui-1.8.13.custom.css
  34. +234 −0 static/css/jquery.fancybox.css
  35. +55 −0 static/css/labels-badges.less
  36. +17 −0 static/css/layouts.less
  37. +646 −0 static/css/mixins.less
  38. +90 −0 static/css/modals.less
  39. +361 −0 static/css/navbar.less
  40. +365 −0 static/css/navs.less
  41. +36 −0 static/css/pager.less
  42. +56 −0 static/css/pagination.less
  43. +49 −0 static/css/popovers.less
  44. +117 −0 static/css/progress-bars.less
  45. +131 −0 static/css/reset.less
  46. +26 −0 static/css/responsive-1200px-min.less
  47. +149 −0 static/css/responsive-767px-max.less
  48. +17 −0 static/css/responsive-768px-979px.less
  49. +153 −0 static/css/responsive-navbar.less
  50. +55 −0 static/css/responsive-utilities.less
  51. +31 −0 static/css/scaffolding.less
  52. +191 −0 static/css/sprites.less
  53. +21 −341 static/css/style.css
  54. +118 −0 static/css/style.less
  55. +176 −0 static/css/tables.less
  56. +126 −0 static/css/tba_base.less
  57. +52 −0 static/css/tba_bracket_table.less
  58. +50 −0 static/css/tba_event_list.less
  59. +37 −0 static/css/tba_event_page.less
  60. +31 −0 static/css/tba_landing.less
  61. +84 −0 static/css/tba_match_table.less
  62. +2 −0 static/css/tba_team_page.css
  63. +13 −0 static/css/tba_team_page.less
  64. +2 −0 static/css/tba_team_table.css
  65. +8 −0 static/css/tba_team_table.less
  66. +47 −0 static/css/thumbnails.less
  67. +35 −0 static/css/tooltip.less
  68. +232 −0 static/css/type.less
  69. +23 −0 static/css/utilities.less
  70. +212 −0 static/css/variables.less
  71. +27 −0 static/css/wells.less
  72. BIN static/images/appengine.gif
  73. BIN static/images/{header_logo.png → appengine.png}
  74. BIN static/images/dotblock.gif
  75. BIN static/images/dotblock.png
  76. BIN static/images/icons/blank.gif
  77. BIN static/images/icons/fancybox_loading.gif
  78. BIN static/images/icons/fancybox_sprite.png
  79. BIN static/images/icons/glyphicons-halflings-white.png
  80. BIN static/images/icons/glyphicons-halflings.png
  81. BIN static/images/icons/video.png
  82. BIN static/images/no_robot_image.png
  83. BIN static/images/tba_blue_lamp_navbar.png
  84. +1,825 −0 static/javascript/bootstrap.js
  85. +35 −0 static/javascript/jquery.fancybox.pack.js
  86. +4 −0 static/javascript/jquery.min.js
  87. +5 −1 static/javascript/tba.js
  88. +0 −2 stub.py
  89. +14 −19 templates/404.html
  90. +1 −1 templates/admin/{events/details.html → event_details.html}
  91. +1 −1 templates/admin/{events/edit.html → event_edit.html}
  92. +1 −1 templates/admin/{events/list.html → event_list.html}
  93. +1 −1 templates/admin/{matches/dashboard.html → match_dashboard.html}
  94. +1 −1 templates/admin/{matches/details.html → match_details.html}
  95. +1 −1 templates/admin/{matches/edit.html → match_edit.html}
  96. +1 −1 templates/admin/{matches/videosadd.html → match_videosadd.html}
  97. +1 −1 templates/admin/{matches/cleanup.html → matches_cleanup.html}
  98. +1 −1 templates/admin/{memcache/flush.html → memcache_flush.html}
  99. +1 −1 templates/admin/{memcache/index.html → memcache_index.html}
  100. +1 −1 templates/admin/{teams/details.html → team_details.html}
  101. +1 −1 templates/admin/{teams/list.html → team_list.html}
  102. +88 −74 templates/base.html
  103. +0 −7 templates/base_partials/left_col.html
  104. +0 −8 templates/base_partials/right_col.html
  105. +39 −0 templates/contact.html
  106. +67 −0 templates/debug.html
  107. +163 −0 templates/event_details.html
  108. +84 −0 templates/event_list.html
  109. +0 −167 templates/events/details.html
  110. +0 −51 templates/events/list.html
  111. +52 −0 templates/index.html
  112. +0 −48 templates/main/contact.html
  113. +0 −83 templates/main/debug.html
  114. +0 −31 templates/main/index.html
  115. +0 −31 templates/main/opr.html
  116. +0 −38 templates/main/search.html
  117. +0 −43 templates/main/thanks.html
  118. +59 −0 templates/match_details.html
  119. 0 templates/{matches/list.html → match_list.html}
  120. +48 −0 templates/match_partials/elim_match_table.html
  121. +55 −0 templates/match_partials/full_match_table.html
  122. +28 −0 templates/match_partials/match_row.html
  123. +29 −0 templates/match_partials/qual_match_table.html
  124. +0 −100 templates/matches/details.html
  125. +0 −13 templates/matches/partials/match_row.html
  126. 0 templates/{matches → maybe_unused}/flush.html
  127. +17 −0 templates/opr.html
  128. +24 −0 templates/search.html
  129. +121 −0 templates/team_details.html
  130. +49 −0 templates/team_list.html
  131. +0 −132 templates/teams/details.html
  132. +0 −39 templates/teams/list.html
  133. +29 −0 templates/thanks.html
  134. +2 −2 templates/{videos/partials → video_partials}/tbavideo_player.html
  135. +1 −0 templates/video_partials/youtube_video_player.html
  136. +0 −1 templates/videos/partials/youtube_video_player.html
View
@@ -31,5 +31,9 @@
######################
.DS_Store*
ehthumbs.db
-Icon?
-Thumbs.db
+Thumbs.db
+
+# Eclipse #
+###########
+*.project
+*.pydevproject
View
@@ -22,6 +22,12 @@ h3. Simple Commands
* paver clean - Deletes artifacts that the app creates that you don't need.
+h2. LESS
+
+The CSS files are compiled from LESS to ease in development. Use a program such as http://wearekiss.com/simpless that automatically compiles
+the LESS files into CSS. Just drag static/css into SimpLESS, and whenever you edit and save a LESS file, the CSS will be compiled! Make sure
+"minify" is enabled in order to minimize the final CSS file size.
+
h2. Testing
Testing is implemented using a combination of unittest2 and the Google App Engine testbed framework. Test coverage is a work in progress, and focuses on maintaining datafeed integrity in the face of optimizations and changes to FIRST's data formats.
View
@@ -1,14 +1,6 @@
#!/usr/bin/env python
import os
-from google.appengine.dist import use_library
-use_library('django', '1.2')
-from django.conf import settings
-try:
- settings.configure(INSTALLED_APPS=('stub',))
-except Exception, e:
- pass
-
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
View
@@ -1,14 +1,6 @@
#!/usr/bin/env python
import os
-from google.appengine.dist import use_library
-use_library('django', '1.2')
-from django.conf import settings
-try:
- settings.configure(INSTALLED_APPS=('stub',))
-except Exception, e:
- pass
-
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
View
@@ -1,12 +1,17 @@
application: tbatv-dev
version: 1
-runtime: python
+runtime: python27
api_version: 1
+threadsafe: no
builtins:
- appstats: on
- remote_api: on
+libraries:
+- name: django
+ version: "1.2"
+
handlers:
- url: /css
static_dir: static/css
@@ -22,7 +27,9 @@ handlers:
- url: /robots.txt
static_files: static/robots.txt
upload: static/robots.txt
-
+- url: /apple-touch-icon.png
+ static_files: static/apple-touch-icon.png
+ upload: static/apple-touch-icon.png
- url: /tasks/.*
script: cron_main.py
@@ -35,3 +42,5 @@ handlers:
- url: .*
script: main.py
+skip_files:
+- ^(.*/)?.*\.less.*
@@ -19,7 +19,7 @@ def get(self):
"events": events,
}
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/events/list.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/event_list.html')
self.response.out.write(template.render(path, template_values))
class AdminEventDetail(webapp.RequestHandler):
@@ -33,7 +33,7 @@ def get(self, event_key):
"event": event,
}
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/events/details.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/event_details.html')
self.response.out.write(template.render(path, template_values))
class AdminEventEdit(webapp.RequestHandler):
@@ -47,7 +47,7 @@ def get(self, event_key):
"event": event
}
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/events/edit.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/event_edit.html')
self.response.out.write(template.render(path, template_values))
def post(self, event_key):
@@ -19,5 +19,5 @@ def get(self):
class AdminDebugHandler(webapp.RequestHandler):
def get(self):
- path = os.path.join(os.path.dirname(__file__), '../../templates/main/debug.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/debug.html')
self.response.out.write(template.render(path, {}))
@@ -15,7 +15,7 @@ class AdminMatchCleanup(webapp.RequestHandler):
Used to clean up 2011 Matches, where we had dupes of "2011new_qm1" and "2011newton_qm1".
"""
def get(self):
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/matches/cleanup.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/matches_cleanup.html')
self.response.out.write(template.render(path, {}))
def post(self):
@@ -34,7 +34,7 @@ def post(self):
"tried_delete": True
}
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/matches/cleanup.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/matches_cleanup.html')
self.response.out.write(template.render(path, template_values))
class AdminMatchDashboard(webapp.RequestHandler):
@@ -48,7 +48,7 @@ def get(self):
"match_count": match_count
}
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/matches/dashboard.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/match_dashboard.html')
self.response.out.write(template.render(path, template_values))
@@ -63,15 +63,15 @@ def get(self, match_key):
"match": match
}
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/matches/details.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/match_details.html')
self.response.out.write(template.render(path, template_values))
class AdminMatchAddVideos(webapp.RequestHandler):
"""
Add a lot of youtube_videos to Matches at once.
"""
def get(self):
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/matches/videosadd.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/match_videosadd.html')
self.response.out.write(template.render(path, {}))
def post(self):
@@ -99,7 +99,7 @@ def post(self):
"results": results,
}
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/matches/videosadd.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/match_videosadd.html')
self.response.out.write(template.render(path, template_values))
class AdminMatchEdit(webapp.RequestHandler):
@@ -113,7 +113,7 @@ def get(self, match_key):
"match": match
}
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/matches/edit.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/match_edit.html')
self.response.out.write(template.render(path, template_values))
def post(self, match_key):
@@ -14,7 +14,7 @@ def get(self):
"memcache_stats": memcache.get_stats(),
}
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/memcache/index.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/memcache_index.html')
self.response.out.write(template.render(path, template_values))
# Memcache flush result.
@@ -34,6 +34,6 @@ def get(self):
'flushed' : flushed,
}
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/memcache/flush.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/memcache_flush.html')
self.response.out.write(template.render(path, template_values))
@@ -15,7 +15,7 @@ def get(self):
"teams": teams,
}
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/teams/list.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/team_list.html')
self.response.out.write(template.render(path, template_values))
# The view of a single Team.
@@ -28,6 +28,6 @@ def get(self, team_number):
'team' : team,
}
- path = os.path.join(os.path.dirname(__file__), '../../templates/admin/teams/details.html')
+ path = os.path.join(os.path.dirname(__file__), '../../templates/admin/team_details.html')
self.response.out.write(template.render(path, template_values))
@@ -38,7 +38,7 @@ def get(self, year=None):
"events": events,
}
- path = os.path.join(os.path.dirname(__file__), '../templates/events/list.html')
+ path = os.path.join(os.path.dirname(__file__), '../templates/event_list.html')
html = template.render(path, template_values)
memcache.set(memcache_key, html, 3600)
@@ -60,18 +60,26 @@ def get(self, event_key):
team_keys = [EventTeam.team.get_value_for_datastore(event_team).name() for event_team in event.teams.fetch(500)]
teams = Team.get_by_key_name(team_keys)
teams = TeamHelper.sortTeams(teams)
+
+ num_teams = len(teams)
+ middle_value = num_teams/2
+ if num_teams%2 != 0:
+ middle_value += 1
+ teams_a, teams_b = teams[:middle_value], teams[middle_value:]
oprs = sorted(zip(event.oprs,event.opr_teams), reverse=True) # sort by OPR
oprs = oprs[:14] # get the top 15 OPRs
template_values = {
"event": event,
"matches": matches,
- "teams": teams,
+ "teams_a": teams_a,
+ "teams_b": teams_b,
+ "num_teams": num_teams,
"oprs": oprs,
}
- path = os.path.join(os.path.dirname(__file__), '../templates/events/details.html')
+ path = os.path.join(os.path.dirname(__file__), '../templates/event_details.html')
html = template.render(path, template_values)
memcache.set(memcache_key, html, 300)
@@ -13,7 +13,7 @@ def render_static(page):
html = memcache.get(memcache_key)
if html is None:
- path = os.path.join(os.path.dirname(__file__), "../templates/main/%s.html" % page)
+ path = os.path.join(os.path.dirname(__file__), "../templates/%s.html" % page)
html = template.render(path, {})
memcache.set(memcache_key, html, 86400)
@@ -37,7 +37,7 @@ def get(self):
"upcoming_events": upcoming_events,
}
- path = os.path.join(os.path.dirname(__file__), '../templates/main/index.html')
+ path = os.path.join(os.path.dirname(__file__), '../templates/index.html')
html = template.render(path, template_values)
memcache.set(memcache_key, html, 86400)
@@ -39,7 +39,7 @@ def get(self, key_name):
return None
match.unpack_json()
-
+
tbavideo = None
if len(match.tba_videos) > 0:
tbavideo = TBAVideoHelper(match)
@@ -49,7 +49,7 @@ def get(self, key_name):
"tbavideo": tbavideo,
}
- path = os.path.join(os.path.dirname(__file__), '../templates/matches/details.html')
+ path = os.path.join(os.path.dirname(__file__), '../templates/match_details.html')
html = template.render(path, template_values)
memcache.add(memcache_key, html, 600)
@@ -19,12 +19,20 @@ def get(self):
if html is None:
teams = Team.all().order('team_number').fetch(10000)
-
+
+ num_teams = len(teams)
+ middle_value = num_teams/2
+ if num_teams%2 != 0:
+ middle_value += 1
+ teams_a, teams_b = teams[:middle_value], teams[middle_value:]
+
template_values = {
- "teams": teams,
+ "teams_a": teams_a,
+ "teams_b": teams_b,
+ "num_teams": num_teams,
}
- path = os.path.join(os.path.dirname(__file__), '../templates/teams/list.html')
+ path = os.path.join(os.path.dirname(__file__), '../templates/team_list.html')
html = template.render(path, template_values)
memcache.set(memcache_key, html, 3600)
@@ -104,7 +112,7 @@ def get(self, team_number, year=None):
"years": years,
"year_wlt": year_wlt }
- path = os.path.join(os.path.dirname(__file__), '../templates/teams/details.html')
+ path = os.path.join(os.path.dirname(__file__), '../templates/team_details.html')
html = template.render(path, template_values)
memcache.set(memcache_key, html, 300)
View
@@ -2,14 +2,6 @@
import os
-from google.appengine.dist import use_library
-use_library('django', '1.2')
-from django.conf import settings
-try:
- settings.configure(INSTALLED_APPS=('stub',))
-except Exception, e:
- pass
-
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
View
@@ -3,15 +3,6 @@
import os
-from google.appengine.dist import use_library
-use_library('django', '1.2')
-from django.conf import settings
-try:
- settings.configure(INSTALLED_APPS=('stub',))
-except Exception, e:
- pass
-
-
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template, util
View
@@ -105,7 +105,7 @@ class Match(db.Model):
COMP_LEVELS = ["qm", "ef", "qf", "sf", "f"]
COMP_LEVELS_VERBOSE = {
- "qm": "Qualifications",
+ "qm": "Quals",
"ef": "Eighths",
"qf": "Quarters",
"sf": "Semis",
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit a84f3f5

Please sign in to comment.