diff options
| author | 2018-06-05 16:07:35 +0100 | |
|---|---|---|
| committer | 2018-06-05 16:07:35 +0100 | |
| commit | 13a3c1e29473aa9f563e8db4ad94cb3eee9bdfe6 (patch) | |
| tree | 290c6d668ec9161a39065456a33ec634215907cc /templates/wiki | |
| parent | documentation metadata API (#57) (diff) | |
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
Diffstat (limited to 'templates/wiki')
| -rw-r--r-- | templates/wiki/base.html | 23 | ||||
| -rw-r--r-- | templates/wiki/page_edit.html | 9 | ||||
| -rw-r--r-- | templates/wiki/page_move.html | 2 | ||||
| -rw-r--r-- | templates/wiki/page_view.html | 2 | ||||
| -rw-r--r-- | templates/wiki/search.html | 2 | ||||
| -rw-r--r-- | templates/wiki/search_results.html | 2 | ||||
| -rw-r--r-- | templates/wiki/special_all.html | 2 | 
7 files changed, 25 insertions, 17 deletions
| diff --git a/templates/wiki/base.html b/templates/wiki/base.html index 73b0f47c..2a29d139 100644 --- a/templates/wiki/base.html +++ b/templates/wiki/base.html @@ -10,13 +10,14 @@              <script src="{{ static_file('js/fouc.js') }}"></script>              <!-- Other JS loads --> -            <script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.39/js/uikit.min.js"></script> +            <script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-rc.4/js/uikit.min.js"></script>              <!-- Static stuff -->              <link rel="shortcut icon" href="{{ static_file('favicon.ico') }}"> -            <link rel="stylesheet" href="{{ static_file('uikit_blurple.css') }}"/> -            <link rel="stylesheet" href="{{ static_file('style.css') }}"/> -            <link rel="stylesheet" href="{{ static_file('css/pygments-monokai.css') }}"/> +            <link rel="stylesheet" href="{{ static_file('css/uikit_blurple.css') }}"/> +            <link rel="stylesheet" href="{{ static_file('css/style.css') }}"/> +            <link rel="stylesheet" href="{{ static_file('css/bundled/pygments-monokai.css') }}"/> +            <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">              <!-- OpenGraph metadata -->              <meta property="og:title" content="Python Discord | {% block og_title %}{% endblock %}"> @@ -27,7 +28,9 @@          {% endblock %}      </head> -    <body class="page-{{ current_page.replace(".", "-") }}"> +    <body class="{% block page_classes %}{% endblock page_classes %} +                 page-{{ current_page.replace(".", "-") }} +                 blueprint-{{ blueprint.replace(".", "-") }}">          <div class="uk-offcanvas-content uk-flex uk-flex-column" id="wiki-page">              {% include "main/navigation.html" %}              <div class="uk-flex uk-flex-row uk-flex-1"> @@ -174,12 +177,12 @@                          <li>                              <form action="{{ url_for("wiki.search") }}" method="post">                                  {% if query is undefined %} -                                <input type="text" class="uk-input" placeholder="Search (BETA)" id="query" name="query" style="padding-right: 0; margin-top: 5px; border-left: 0; border-right: 0;" required> +                                <input type="text" class="uk-input sidebar-search-input" placeholder="Search (BETA)" id="query" name="query" required>                                  {% else %} -                                <input type="text" class="uk-input" placeholder="Search (BETA)" id="query" name="query" value="{{ query }}" style="padding-right: 0; margin-top: 5px; border-left: 0; border-right: 0;" required> +                                <input type="text" class="uk-input sidebar-search-input" placeholder="Search (BETA)" id="query" name="query" value="{{ query }}" required>                                  {% endif %}                                  <br /> -                                <button class="uk-button uk-button-darkish uk-button-small" type="submit" id="search" title="Search" style="width: 100%; border: 0;"> +                                <button class="uk-button uk-button-darkish uk-button-small search-button" type="submit" id="search" title="Search">                                      <i class="uk-icon fas fa-fw fa-search"></i>                                  </button> @@ -188,11 +191,11 @@                          </li>                      </ul>                  </div> -                <div style="width: 100%;"> +                <div class="uk-width-expand full-width">                      <a class="uk-flex-left uk-flex uk-flex-column uk-background-primary uk-hidden@s uk-hidden@m uk-hidden@l uk-hidden@xl" id="wiki-sidebar-button">                          <div class="uk-flex-center"><i class="uk-icon fa-fw far fa-bars"></i></div>                      </a> -                    <div class="uk-section uk-flex uk-flex-column" style="flex-grow: 1; margin: 0 1rem 1rem;"> +                    <div class="uk-section uk-flex uk-flex-column content">                          {% block content %}{% endblock %}                      </div>                  </div> 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 %} -<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.3.3/ace.js" type="application/javascript"></script> +    <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.3.3/ace.js" type="application/javascript"></script>  {% endblock %} +  {% block content %}      <form uk-grid class="uk-grid-small" action="{{ url_for("wiki.edit", page=page) }}" method="post">          <div class="uk-width-expand"> @@ -17,14 +20,14 @@              <input class="uk-button uk-button-primary" type="submit" id="submit" value="Save" disabled />          </div>          <div class="uk-width-1-1"> -            <div id="editor" class="uk-textarea" style="resize: vertical; min-height: 15rem;">{{ rst }}</div> +            <div id="editor" class="uk-textarea">{{ rst }}</div>              <input type="hidden" name="rst" id="rst" />          </div>          <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>      </form> -    <div class="uk-container uk-container-small" style="padding: 1rem 1rem 0.1rem;"> +    <div class="uk-container uk-container-small preview-title">          <h2 id="preview-title">{{ title }}</h2>          <div id="preview-div"> 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 @@          <h3>Move Page: {{ page }}</h3>          <form uk-grid class="uk-grid-small" action="{{ url_for("wiki.move", page=page) }}" method="post"> -            <input type="text" class="uk-width-1-1 uk-input" placeholder="{{ page }}" id="location" name="location" style="margin-left: 15px;" required> +            <input type="text" class="uk-width-1-1 uk-input location-input" placeholder="{{ page }}" id="location" name="location" required>              <div class="uk-width-1-2">                  <a href="{{ url_for("wiki.page", page=page) }}" class="uk-button uk-button-secondary uk-width-1-1" type="button" id="cancel">Cancel</a>              </div> 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 %}      <div class="uk-container uk-container-small" id="doc-view">          <h2 class="uk-title"> 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 @@          </h2>          <form uk-grid class="uk-grid-small" action="{{ url_for("wiki.search") }}" method="post"> -            <input type="text" class="uk-width-1-1 uk-input" placeholder="Search Query" id="query" name="query" style="margin-left: 15px;" required> +            <input type="text" class="uk-width-1-1 uk-input location-input" placeholder="Search Query" id="query" name="query" required>              <div class="uk-width-1-4">                                 </div> 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 %}                  <h4>                      <a href="{{ url_for("wiki.page", page=page["slug"]) }}">{{ page.title }}</a> -                    (<span style="font-family: monospace;">{{ page.slug }}</span>) +                    (<span class="fira-code">{{ page.slug }}</span>)                  </h4>                  {% 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 @@              <ul>              {% for page in pages %}                  <li><a href="{{ url_for("wiki.page", page=page.slug) }}"> -                    {{ page.title }} (<span style="font-family: monospace;">{{ page.slug }}</span>) +                    {{ page.title }} (<span class="fira-code">{{ page.slug }}</span>)                  </a></li>              {% endfor %}              </ul> | 
