diff options
author | 2019-04-18 11:02:50 +0100 | |
---|---|---|
committer | 2019-04-18 11:02:50 +0100 | |
commit | aac6c77323bdfecf71d48ba336c4488760e88c59 (patch) | |
tree | d03906985e41a1fc5f2d142fe12a6de53ffc2f00 | |
parent | All config of PARENT_HOST with env var (diff) |
Images plugin is complete.
4 files changed, 38 insertions, 28 deletions
diff --git a/pydis_site/templates/wiki/plugins/images/index.html b/pydis_site/templates/wiki/plugins/images/index.html index a3474273..4973ea6f 100644 --- a/pydis_site/templates/wiki/plugins/images/index.html +++ b/pydis_site/templates/wiki/plugins/images/index.html @@ -1,6 +1,7 @@ {% extends "wiki/article.html" %} {% load wiki_tags i18n humanize wiki_thumbnails %} +{# TODO: This page needs re-styling, but it's functional for now so we're not touching it until after wiki completion #} {% block wiki_pagetitle %}{% trans "Images" %}: {{ article.current_revision.title }}{% endblock %} @@ -63,7 +64,7 @@ </a> {% endif %} {% if article|can_moderate:user %} - <a class="button is-danger tooltip" href="{% url 'wiki:images_purge' path=urlpath.path article_id=article.id image_id=image.id %}"> + <a class="button is-danger" href="{% url 'wiki:images_purge' path=urlpath.path article_id=article.id image_id=image.id %}"> <span class="icon"> <i class="fas fa-trash"></i> </span> @@ -129,7 +130,7 @@ <span>Restore</span> </a> {% else %} - <a class="button is-static has-text-black"> + <a class="button is-static has-text-grey"> <span class="icon"> <i class="fas fa-times"></i> </span> diff --git a/pydis_site/templates/wiki/plugins/images/purge.html b/pydis_site/templates/wiki/plugins/images/purge.html index 28b8b476..2789f536 100644 --- a/pydis_site/templates/wiki/plugins/images/purge.html +++ b/pydis_site/templates/wiki/plugins/images/purge.html @@ -5,29 +5,38 @@ {% block wiki_pagetitle %}{% trans "Purge deletion" %}: {{ image }}{% endblock %} {% block wiki_contents_tab %} - {% thumbnail image.current_revision.imagerevision.image "250x250" as thumb %} - <p class="thumbnail pull-right"> - <img src="{{ thumb.url }}" alt="{{ revision.get_filename }}" /> - </p> - {% endthumbnail %} - <p class="lead"> - {% trans "Purge image: Completely remove image file and all revisions." %} - </p> - <form method="POST" class="form-horizontal" enctype="multipart/form-data"> - {% wiki_form form %} - <div class="form-group form-actions"> - <div class="col-lg-2"></div> - <div class="col-lg-10"> - <a href="{% url 'wiki:images_index' path=urlpath.path article_id=article.id %}" class="btn btn-default"> - <span class="fa fa-arrow-left"></span> - {% trans "Go back" %} + <div class="columns"> + <div class="column is-two-thirds"> + <p> + Purge image: Completely remove image file and all revisions + </p> + <form method="POST" class="form-horizontal" enctype="multipart/form-data"> + {% wiki_form form %} + + <a href="{% url 'wiki:images_index' path=urlpath.path article_id=article.id %}" class="button is-white"> + <span class="icon"> + <i class="fas fa-arrow-left"></i> + </span> + <span>Go Back</span> </a> - <button class="btn btn-primary"> - <span class="fa fa-trash"></span> - {% trans "Remove it completely!" %} + + <button class="button is-danger" type="submit"> + <span class="icon"> + <i class="fas fa-trash"></i> + </span> + <span>Permanently remove</span> </button> - </div> + </form> </div> - </form> + <div class="column is-one-third"> + {% thumbnail image.current_revision.imagerevision.image "250x250" as thumb %} + <figure class="image"> + <a href="{{ image.current_revision.imagerevision.image.url }}"> + <img src="{{ thumb.url }}" alt="{{ revision.get_filename }}" title="{{ revision.get_filename }}" /> + </a> + </figure> + {% endthumbnail %} + </div> + </div> {% endblock %} diff --git a/pydis_site/templates/wiki/plugins/images/render.html b/pydis_site/templates/wiki/plugins/images/render.html index df09f48f..c34616cb 100644 --- a/pydis_site/templates/wiki/plugins/images/render.html +++ b/pydis_site/templates/wiki/plugins/images/render.html @@ -4,8 +4,8 @@ NB! Watch out for line breaks, markdown might add <br />s and <p>s. {% endcomment %}{% with image.current_revision.imagerevision as revision %}{% spaceless %} <figure - class="image{% if align %} is-pulled-{{ align }}{% endif %}" {% if width %} - style="width: {{ width }}px;" {% endif %} + class="image{% if align %} is-pulled-{{ align }}{% endif %}" + {% if width %}style="width: {{ width }}px;" {% endif %} > <a href="{{ revision.image.url }}"> {% if size %} @@ -13,7 +13,7 @@ <img src="{{ thumb.url }}" alt="{{ revision.get_filename }}" /> {% empty %} <figcaption> - <em>"Image not found"</em> + <em>Image not found</em> </figcaption> {% endthumbnail %} {% else %} diff --git a/pydis_site/templates/wiki/plugins/images/revision_add.html b/pydis_site/templates/wiki/plugins/images/revision_add.html index 60c91c6a..6b17587a 100644 --- a/pydis_site/templates/wiki/plugins/images/revision_add.html +++ b/pydis_site/templates/wiki/plugins/images/revision_add.html @@ -6,13 +6,13 @@ {% block wiki_contents_tab %} <div class="columns"> <div class="column is-two-thirds"> - <p class="lead"> + <p> Upload an image to replace the current one. </p> <form method="POST" class="form-horizontal" enctype="multipart/form-data"> {% wiki_form form %} - <a href="{% url 'wiki:images_index' path=urlpath.path article_id=article.id %}" class="button is-light"> + <a href="{% url 'wiki:images_index' path=urlpath.path article_id=article.id %}" class="button is-white"> <span class="icon"> <i class="fas fa-arrow-left"></i> </span> |