From 13a3c1e29473aa9f563e8db4ad94cb3eee9bdfe6 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Tue, 5 Jun 2018 16:07:35 +0100 Subject: Move from CSS to SCSS (#86) * Rewrite existing style.css with sass * Add "uses-rst" class for pages that use rendered RST This replaces the previous method of just listing every page in the sass * Remove old debug print * Mixins and error pages * Newly built CSS * Add SASS cache to .gitignore * New error SASS * Slight changes to error template * Add UIKit SCSS to repo This includes the LICENSE and our customizations, which makes life way easier for contributors * Reorganize sass folder; your watchers can avoid uikit now * Sass folder should be called scss * Change variable names * [SCSS] Linting * Fix scss_lint gem name [ci skip] * [SCSS] Now you can compile with just Python! * Temporary hack to make the wiki editor taller * [SCSS] @jchristgit * [SCSS.py] Require specification of include dir to simplify the SCSS imports * [SCSS] All inline styles have been removed * [SCSS] Update UIKit theme to import from our variables * [SCSS] Remove extra newlines in errors/_common.scss --- templates/errors/error.html | 22 ++++++++-------------- templates/main/about/privacy.html | 18 +++++++++--------- templates/main/base.html | 10 ++++++---- templates/main/index.html | 2 +- templates/main/info/resources.html | 11 ++++++----- templates/main/jams/index.html | 5 +++-- templates/main/jams/join.html | 23 ++++++++++++----------- templates/main/jams/profile.html | 2 +- templates/main/navigation.html | 4 ++-- templates/staff/jams/edit_basics.html | 2 ++ templates/staff/jams/edit_ending.html | 5 ++++- templates/staff/jams/edit_info.html | 7 +++++-- templates/staff/jams/forms/preamble_edit.html | 5 ++++- templates/staff/jams/forms/questions_view.html | 8 ++++---- templates/staff/jams/forms/view.html | 4 ++-- templates/staff/jams/index.html | 2 +- templates/staff/jams/infractions/view.html | 4 ++-- templates/staff/tables/edit.html | 4 ++-- templates/staff/tables/table.html | 6 +++--- templates/wiki/base.html | 23 +++++++++++++---------- templates/wiki/page_edit.html | 9 ++++++--- templates/wiki/page_move.html | 2 +- templates/wiki/page_view.html | 2 ++ templates/wiki/search.html | 2 +- templates/wiki/search_results.html | 2 +- templates/wiki/special_all.html | 2 +- 26 files changed, 102 insertions(+), 84 deletions(-) (limited to 'templates') diff --git a/templates/errors/error.html b/templates/errors/error.html index 366bd49e..6132aea1 100644 --- a/templates/errors/error.html +++ b/templates/errors/error.html @@ -2,11 +2,8 @@ {% block title %}Error {{ code }}{% endblock %} {% block og_title %}Error {{ code }}{% endblock %} {% block og_description %}{{ error_message | safe }}{% endblock %} -{% block beta_error %}{% endblock %} {% block extra_head %} - - {% endblock %} + {% block content %}

Code Jam: Edit (Ending Comments)

@@ -16,7 +19,7 @@
-
{{ jam.end_rst }}
+
{{ jam.end_rst }}
diff --git a/templates/staff/jams/edit_info.html b/templates/staff/jams/edit_info.html index 81a0a9ac..7fdc3c22 100644 --- a/templates/staff/jams/edit_info.html +++ b/templates/staff/jams/edit_info.html @@ -2,9 +2,12 @@ {% block title %}Staff | Jams | Edit (Info){% endblock %} {% block og_title %}Staff | Jams | Edit (Info){% endblock %} {% block og_description %}Edit the basic info for a code jam{% endblock %} + +{% block page_classes %}uses-rst{% endblock %} {% block extra_head %} {% endblock %} + {% block content %}

Code Jam: Edit (Info)

@@ -44,7 +47,7 @@
-
{{ jam.info_rst }}
+
{{ jam.info_rst }}
@@ -65,7 +68,7 @@
-
{{ jam.task_rst }}
+
{{ jam.task_rst }}
diff --git a/templates/staff/jams/forms/preamble_edit.html b/templates/staff/jams/forms/preamble_edit.html index 6e3fec0d..4108481b 100644 --- a/templates/staff/jams/forms/preamble_edit.html +++ b/templates/staff/jams/forms/preamble_edit.html @@ -1,9 +1,12 @@ {% extends "main/base.html" %} {% block title %}Staff | Forms | Edit Preamble{% endblock %} {% block og_title %}Staff | Forms | Edit Preamble{% endblock %} + +{% block page_classes %}uses-rst{% endblock %} {% block extra_head %} {% endblock %} + {% block content %}

Form: Edit Preamble

@@ -15,7 +18,7 @@
-
{{ form.preamble_rst }}
+
{{ form.preamble_rst }}
diff --git a/templates/staff/jams/forms/questions_view.html b/templates/staff/jams/forms/questions_view.html index c9d5098c..bebdde40 100644 --- a/templates/staff/jams/forms/questions_view.html +++ b/templates/staff/jams/forms/questions_view.html @@ -49,8 +49,8 @@ {% for question in questions %} - - + + {{ question.id }} @@ -579,8 +579,8 @@ const row = ` - - + + ${question.id} ${optional} diff --git a/templates/staff/jams/forms/view.html b/templates/staff/jams/forms/view.html index 46474ae9..83ff1ae4 100644 --- a/templates/staff/jams/forms/view.html +++ b/templates/staff/jams/forms/view.html @@ -50,7 +50,7 @@ {% for question in questions %} - + {{ question.id }} @@ -742,7 +742,7 @@ const row = ` - + ${question.id} ${optional} diff --git a/templates/staff/jams/index.html b/templates/staff/jams/index.html index b5734b51..c38883c2 100644 --- a/templates/staff/jams/index.html +++ b/templates/staff/jams/index.html @@ -26,7 +26,7 @@ {% if jam.state == "planning" %} {% else %} - + {% endif %} {% if jam.state == "announced" %} diff --git a/templates/staff/jams/infractions/view.html b/templates/staff/jams/infractions/view.html index bb3cf0ce..00374632 100644 --- a/templates/staff/jams/infractions/view.html +++ b/templates/staff/jams/infractions/view.html @@ -46,7 +46,7 @@ {% for infraction in infractions %} - + {{ infraction.id }} @@ -316,7 +316,7 @@ } const row = ` - + ${infraction.id} ${participant} diff --git a/templates/staff/tables/edit.html b/templates/staff/tables/edit.html index 7b027884..0c6492e5 100644 --- a/templates/staff/tables/edit.html +++ b/templates/staff/tables/edit.html @@ -14,14 +14,14 @@ {% endif %}
-

Primary key: "{{ primary_key }}"

+

Primary key: "{{ primary_key }}"

-
{{ document }}
+
{{ document }}
diff --git a/templates/staff/tables/table.html b/templates/staff/tables/table.html index aa26818f..87d981a0 100644 --- a/templates/staff/tables/table.html +++ b/templates/staff/tables/table.html @@ -17,7 +17,7 @@ {% endif %}

- + {{ table }} {% if table_obj.locked %} @@ -36,7 +36,7 @@
+ {% else %} - + {% endif %}
- @@ -188,11 +191,11 @@
-
+
-
+
{% block content %}{% endblock %}
diff --git a/templates/wiki/page_edit.html b/templates/wiki/page_edit.html index 34b59dca..69726d93 100644 --- a/templates/wiki/page_edit.html +++ b/templates/wiki/page_edit.html @@ -2,9 +2,12 @@ {% block title %}Wiki | Edit: {{ page }}{% endblock %} {% block og_title %}Wiki | Edit: {{ page }}{% endblock %} {% block og_description %}{% endblock %} + +{% block page_classes %}uses-rst{% endblock %} {% block extra_head %} - + {% endblock %} + {% block content %}
@@ -17,14 +20,14 @@
-
{{ rst }}
+
{{ rst }}
-
+

{{ title }}

diff --git a/templates/wiki/page_move.html b/templates/wiki/page_move.html index 409c02e7..2bd772e9 100644 --- a/templates/wiki/page_move.html +++ b/templates/wiki/page_move.html @@ -12,7 +12,7 @@

Move Page: {{ page }}

- + diff --git a/templates/wiki/page_view.html b/templates/wiki/page_view.html index 5ce22784..c660ed6d 100644 --- a/templates/wiki/page_view.html +++ b/templates/wiki/page_view.html @@ -2,6 +2,8 @@ {% block title %}Wiki | {{ data["title"] }}{% endblock %} {% block og_title %}Wiki | {{ data["title"] }}{% endblock %} {% block og_description %}{% endblock %} +{% block page_classes %}uses-rst{% endblock %} + {% block content %}

diff --git a/templates/wiki/search.html b/templates/wiki/search.html index 6b15522e..8a337192 100644 --- a/templates/wiki/search.html +++ b/templates/wiki/search.html @@ -9,7 +9,7 @@

- +
 
diff --git a/templates/wiki/search_results.html b/templates/wiki/search_results.html index 08c303e2..9b9ad946 100644 --- a/templates/wiki/search_results.html +++ b/templates/wiki/search_results.html @@ -21,7 +21,7 @@ {% for page in pages %}

{{ page.title }} - ({{ page.slug }}) + ({{ page.slug }})

{% for snippet in page["matches"] %} diff --git a/templates/wiki/special_all.html b/templates/wiki/special_all.html index 92aa12a4..45a641a6 100644 --- a/templates/wiki/special_all.html +++ b/templates/wiki/special_all.html @@ -17,7 +17,7 @@ -- cgit v1.2.3