diff --git a/templates/base.html b/templates/base.html index 3a9b3c1..9ba628e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -36,57 +36,55 @@ onload="renderMathInElement(document.body);"> - -
- {% block header %} - - {% endblock %} + + {% block header %} + + {% endblock %} -
+
-
- {% block content %}{% endblock %} -
+
+ {% block content %}{% endblock %} +
-
+
- {% block footer %} -
-
- BMT Logo + {% block footer %} +
+
+ BMT Logo -
- - - -
+
+ + +
+
-
- - Hosted by the OCF - +
+ + Hosted by the OCF + -

- We are a student group acting independently of the University of California. We take full responsibility for - our organization and this web site. -

-
+

+ We are a student group acting independently of the University of California. We take full responsibility for + our organization and this web site. +

- {% endblock %}
+ {% endblock %} diff --git a/templates/index.html b/templates/index.html index 49292fb..93faae1 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,27 +1,38 @@ {% extends "base.html" %} -{% block content %} +{# Macro for news post notifications #} + +{% macro news_post(title, href) %} + +
+

+ + News +

+

{{ title }}

+
+ + +
+{% endmacro %} -{% set news_section = get_section(path="news/_index.md") %} -{% set new_news_post = news_section.pages | first %} -{% if new_news_post %} - -

- - News -

+{# =============================== #} +{# = STARTING THE ACTUAL CONTENT = #} +{# =============================== #} - - - +{% block content %} -

- {{ new_news_post.title }} -

-
+{# News post notification, if there is one #} + +{% set news_section = get_section(path="news/_index.md") %} +{% set news_post = news_section.pages | first %} +{% if news_post %} +{{ self::news_post(title=news_post.title, href=news_post.permalink) }} {% endif %} +{# Main banner & description #} +