diff options
author | 2018-04-14 18:09:30 +0100 | |
---|---|---|
committer | 2018-04-14 19:09:30 +0200 | |
commit | b8b62a2bddfa548a96533900338700155f4b3885 (patch) | |
tree | 34188bf18a651276f669349c2d515eacef8efdc6 /pysite | |
parent | [Wiki] Fix wiki page interpreted text role (diff) |
Added an About category with Partners view (#1pv7h) (#50)
* Added Partners view, and Navbar item
* Moved info/rules to about/rules and fixed references
* Added Partner images, and populated the partners page
* Fixed responsiveness on smaller displays
Added like 2 characters to the column tag, to enable stacking of columns if the display
width is lower than 960 pixels.
* Fixed indentation
* Updated Code Monkeys Banner
Added the shiny new CM Banner, and rearranged the partner cards.
* Fixed newlines at end of HTML files
* Partners page updated to generate from JSON file
• The templates/main/about/partners.html file now uses the
static/partners.json file to generate the Partner cards.
• Flexboxes are nice.
* Rearranged containers on Partners page
I have no idea how flexboxes work :DDD
* Updated Partners page to fix styling issues
* Moved tag styling to the appropriate CSS file
* Changed code style of stylesheet :D
* Addresses Lemon's code style issues
• Partner cards now have id="partner-card", which is selected with a CSS
selector for styling, rather than styling all card objects.
• Removed nonbreaking spaces that PyCharm didn't tell me about
• Indented conditional HTML content to match Jinja conditionals
• Fixed unclosed image tag
* Removed div bloating, and increased specifity of CSS selection
Diffstat (limited to 'pysite')
-rw-r--r-- | pysite/views/main/about/__init__.py | 1 | ||||
-rw-r--r-- | pysite/views/main/about/index.py | 10 | ||||
-rw-r--r-- | pysite/views/main/about/partners.py | 20 | ||||
-rw-r--r-- | pysite/views/main/about/rules.py (renamed from pysite/views/main/info/rules.py) | 6 |
4 files changed, 34 insertions, 3 deletions
diff --git a/pysite/views/main/about/__init__.py b/pysite/views/main/about/__init__.py new file mode 100644 index 00000000..9bad5790 --- /dev/null +++ b/pysite/views/main/about/__init__.py @@ -0,0 +1 @@ +# coding=utf-8 diff --git a/pysite/views/main/about/index.py b/pysite/views/main/about/index.py new file mode 100644 index 00000000..a3fecc31 --- /dev/null +++ b/pysite/views/main/about/index.py @@ -0,0 +1,10 @@ +# coding=utf-8 +from pysite.base_route import RouteView + + +class IndexView(RouteView): + path = "/about/" + name = "about.index" + + def get(self): + return self.render("main/about/index.html") diff --git a/pysite/views/main/about/partners.py b/pysite/views/main/about/partners.py new file mode 100644 index 00000000..b5e7f587 --- /dev/null +++ b/pysite/views/main/about/partners.py @@ -0,0 +1,20 @@ +# coding=utf-8 +import json +from logging import getLogger + +from pysite.base_route import RouteView + +try: + with open("static/partners.json") as fh: + partners = json.load(fh) +except Exception: + getLogger("Partners").exception("Failed to load partners.json") + categories = None + + +class PartnersView(RouteView): + path = "/about/partners" + name = "about.partners" + + def get(self): + return self.render("main/about/partners.html", partners=partners) diff --git a/pysite/views/main/info/rules.py b/pysite/views/main/about/rules.py index 5605ba16..805936a8 100644 --- a/pysite/views/main/info/rules.py +++ b/pysite/views/main/about/rules.py @@ -3,8 +3,8 @@ from pysite.base_route import RouteView class RulesView(RouteView): - path = "/info/rules" - name = "info.rules" + path = "/about/rules" + name = "about.rules" def get(self): - return self.render("main/info/rules.html") + return self.render("main/about/rules.html") |