diff options
Diffstat (limited to 'pydis_site/templates')
-rw-r--r-- | pydis_site/templates/wiki/accounts/account_settings.html | 14 | ||||
-rw-r--r-- | pydis_site/templates/wiki/accounts/login.html | 38 | ||||
-rw-r--r-- | pydis_site/templates/wiki/accounts/signup.html | 27 | ||||
-rw-r--r-- | pydis_site/templates/wiki/base.html | 3 | ||||
-rw-r--r-- | pydis_site/templates/wiki/includes/article_menu.html | 125 | ||||
-rw-r--r-- | pydis_site/templates/wiki/includes/breadcrumbs.html | 4 |
6 files changed, 67 insertions, 144 deletions
diff --git a/pydis_site/templates/wiki/accounts/account_settings.html b/pydis_site/templates/wiki/accounts/account_settings.html deleted file mode 100644 index ecff4376..00000000 --- a/pydis_site/templates/wiki/accounts/account_settings.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "wiki/base.html" %} -{% load i18n wiki_tags sekizai_tags %} - -{% block wiki_pagetitle %}{% trans "Account Settings" %}{% endblock %} - -{% block wiki_contents %} -<h1 class="page-header">{% trans "Account Settings" %}</h1> -<form class="form-horizontal" action="" method="post">{% csrf_token %} - {% wiki_form form %} - <button type="submit" name="save_changes" class="btn btn-primary btn-lg"> - {% trans "Update" %} - </button> -</form> -{% endblock %} diff --git a/pydis_site/templates/wiki/accounts/login.html b/pydis_site/templates/wiki/accounts/login.html deleted file mode 100644 index 082d47bd..00000000 --- a/pydis_site/templates/wiki/accounts/login.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends "wiki/base.html" %} -{% load i18n wiki_tags sekizai_tags %} - -{% block wiki_pagetitle %}{% trans "Log in" %}{% endblock %} - -{% block wiki_contents %} -<div class="row"> - <div class="col-lg-3"></div> - <div class="col-lg-6"> - <h1 class="page-header">{% trans "Please log in" %}</h1> - <form method="POST" class="form-horizontal"> - {% wiki_form form %} - <div class="form-group form-actions"> - <div class="col-lg-2"></div> - <div class="col-lg-10"> - <button type="submit" name="save_changes" class="btn btn-primary btn-lg"> - <span class="fa fa-lock"></span> - {% trans "Log me in..." %} - </button> - </div> - </div> - </form> - - <p> - {% trans "Don't have an account?" %} <a href="{% url 'wiki:signup' %}">{% trans "Sign up" %} »</a> - </p> - - </div> - <div class="col-lg-3"></div> -</div> - -{% addtoblock "js" %} -<script type="text/javascript"> - $('#id_username').focus(); -</script> -{% endaddtoblock %} - -{% endblock %} diff --git a/pydis_site/templates/wiki/accounts/signup.html b/pydis_site/templates/wiki/accounts/signup.html deleted file mode 100644 index 6db65d3d..00000000 --- a/pydis_site/templates/wiki/accounts/signup.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "wiki/base.html" %} -{% load i18n wiki_tags sekizai_tags %} -{% block wiki_pagetitle %}{% trans "Sign up" %}{% endblock %} - -{% block wiki_contents %} -<h1 class="page-header">{% trans "Sign up" %}</h1> -<form method="POST" class="form-horizontal"> -{% wiki_form form %} -<div class="form-group form-actions"> - <div class="col-lg-2"></div> - <div class="col-lg-10"> - <button type="submit" name="save_changes" class="btn btn-primary btn-lg"> - <span class="fa fa-plus"></span> - {% trans "Sign me up..." %} - </button> - </div> -</div> -</form> -{% addtoblock "js" %} -<script type="text/javascript"> - function {{ honeypot_jsfunction }}() { - $('.{{ honeypot_class }}').parent().parent().hide(); - } - $(document).ready({{ honeypot_jsfunction }}); -</script> -{% endaddtoblock %} -{% endblock %} diff --git a/pydis_site/templates/wiki/base.html b/pydis_site/templates/wiki/base.html index e1742657..112523cd 100644 --- a/pydis_site/templates/wiki/base.html +++ b/pydis_site/templates/wiki/base.html @@ -10,10 +10,11 @@ <script src="{% static "wiki/js/jquery-3.3.1.min.js" %}" type="text/javascript"></script> <script src="{% static "wiki/js/core.js" %}" type="text/javascript"></script> + <script src="{% static "js/wiki/simplemde.min.js" %}" type="text/javascript"></script> <link rel="stylesheet" href="{% static "css/wiki/simplemde.min.css" %}"> <link rel="stylesheet" href="{% static "css/wiki/simplemde-fixes.css" %}"> - <script src="{% static "js/wiki/simplemde.min.js" %}" type="text/javascript"></script> + <link rel="stylesheet" href="{% static "css/wiki/style.css" %}"> {% endblock %} {% block content %} diff --git a/pydis_site/templates/wiki/includes/article_menu.html b/pydis_site/templates/wiki/includes/article_menu.html index 56762420..c6cb6bf0 100644 --- a/pydis_site/templates/wiki/includes/article_menu.html +++ b/pydis_site/templates/wiki/includes/article_menu.html @@ -1,83 +1,84 @@ {% load i18n wiki_tags %} -{% with selected_tab as selected %} - <nav class="navbar is-light" role="navigation" aria-label="wiki navigation"> - <div class="container"> - <div class="navbar-brand"> - {% if not user.is_anonymous %} - <a class="navbar-item{% if selected == "settings" %} is-active{% endif %}" - href="{% url 'wiki:settings' article_id=article.id path=urlpath.path %}" - > - <span class="icon"> - <i class="fas fa-wrench"></i> - </span> +{% if not user.is_anonymous %} + {% with selected_tab as selected %} + <nav class="navbar is-light" role="navigation" aria-label="wiki navigation"> + <div class="container"> + <div class="navbar-brand"> + {% if not user.is_anonymous %} + <a class="navbar-item{% if selected == "settings" %} is-active{% endif %}" + href="{% url 'wiki:settings' article_id=article.id path=urlpath.path %}" + > + <span class="icon"> + <i class="fas fa-wrench"></i> + </span> - <span class="is-hidden-mobile"> Settings</span> - </a> - {% endif %} + <span class="is-hidden-mobile"> Settings</span> + </a> + {% endif %} - {% for plugin in article_tabs %} - <a class="navbar-item{% if selected == plugin.slug %} is-active{% endif %}" - href="{% url 'wiki:plugin' slug=plugin.slug article_id=article.id path=urlpath.path %}" + {% for plugin in article_tabs %} + <a class="navbar-item{% if selected == plugin.slug %} is-active{% endif %}" + href="{% url 'wiki:plugin' slug=plugin.slug article_id=article.id path=urlpath.path %}" + > + <span class="icon"> + <i class="{{ plugin.article_tab.1 }}"></i> + </span> + + <span class="is-hidden-mobile"> {{ plugin.article_tab.0 }}</span> + </a> + {% endfor %} + + <a class="navbar-item{% if selected == "history" %} is-active{% endif %}" + href="{% url 'wiki:history' article_id=article.id path=urlpath.path %}" > <span class="icon"> - <i class="{{ plugin.article_tab.1 }}"></i> + <i class="fas fa-clock"></i> </span> - <span class="is-hidden-mobile"> {{ plugin.article_tab.0 }}</span> + <span class="is-hidden-mobile"> Changes</span> </a> - {% endfor %} - <a class="navbar-item{% if selected == "history" %} is-active{% endif %}" - href="{% url 'wiki:history' article_id=article.id path=urlpath.path %}" - > - <span class="icon"> - <i class="fas fa-clock"></i> - </span> + {% if article|can_write:user and not article.current_revision.locked %} + <a class="navbar-item{% if selected == "edit" %} is-active{% endif %}" + href="{% url 'wiki:edit' article_id=article.id path=urlpath.path %}" + > + <span class="icon"> + <i class="fas fa-edit"></i> + </span> - <span class="is-hidden-mobile"> Changes</span> - </a> + <span class="is-hidden-mobile"> Edit</span> + </a> + {% else %} + <a class="navbar-item{% if selected == "source" %} is-active{% endif %}" + href="{% url 'wiki:source' article_id=article.id path=urlpath.path %}" + > + <span class="icon"> + <i class="fas fa-book-spells"></i> + </span> - {% if article|can_write:user and not article.current_revision.locked %} - <a class="navbar-item{% if selected == "edit" %} is-active{% endif %}" - href="{% url 'wiki:edit' article_id=article.id path=urlpath.path %}" - > - <span class="icon"> - <i class="fas fa-edit"></i> - </span> + <span class="is-hidden-mobile"> View Source</span> + </a> + {% endif %} - <span class="is-hidden-mobile"> Edit</span> - </a> - {% else %} - <a class="navbar-item{% if selected == "source" %} is-active{% endif %}" - href="{% url 'wiki:source' article_id=article.id path=urlpath.path %}" + <a class="navbar-item{% if selected == "view" %} is-active{% endif %}" + href="{% url 'wiki:get' article_id=article.id path=urlpath.path %}" > <span class="icon"> - <i class="fas fa-book-spells"></i> + <i class="fas fa-book-open"></i> </span> - <span class="is-hidden-mobile"> View Source</span> + <span class="is-hidden-mobile"> View</span> </a> - {% endif %} - - <a class="navbar-item{% if selected == "view" %} is-active{% endif %}" - href="{% url 'wiki:get' article_id=article.id path=urlpath.path %}" - > - <span class="icon"> - <i class="fas fa-book-open"></i> - </span> - <span class="is-hidden-mobile"> View</span> - </a> + <a role="button" class="navbar-burger" data-target="wiki-menu" aria-label="menu" aria-expanded="false"> + <span aria-hidden="true"></span> + <span aria-hidden="true"></span> + <span aria-hidden="true"></span> + </a> + </div> - <a role="button" class="navbar-burger" data-target="wiki-menu" aria-label="menu" aria-expanded="false"> - <span aria-hidden="true"></span> - <span aria-hidden="true"></span> - <span aria-hidden="true"></span> - </a> </div> - - </div> - </nav> - -{% endwith %} + </nav> + {% endwith %} +{% endif %} diff --git a/pydis_site/templates/wiki/includes/breadcrumbs.html b/pydis_site/templates/wiki/includes/breadcrumbs.html index 708edb19..a2359f39 100644 --- a/pydis_site/templates/wiki/includes/breadcrumbs.html +++ b/pydis_site/templates/wiki/includes/breadcrumbs.html @@ -1,5 +1,5 @@ -{% if urlpath and article %} - <section class="section"> +{% if urlpath and article and not user.is_anonymous %} + <section class="breadcrumb-section section"> <div class="container"> <nav class="breadcrumb is-pulled-left" aria-label="breadcrumbs"> <ul> |