From 750902c5c395c2ae619974fe5227d8e0bd303385 Mon Sep 17 00:00:00 2001 From: James Polley Date: Fri, 22 Sep 2017 22:17:52 +1000 Subject: [PATCH] Restore messages to site_base template --- pinaxcon/templates/site_base.html | 8 +++ static/src/css/app.css | 106 ++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) diff --git a/pinaxcon/templates/site_base.html b/pinaxcon/templates/site_base.html index 47864613..328cd76a 100644 --- a/pinaxcon/templates/site_base.html +++ b/pinaxcon/templates/site_base.html @@ -29,6 +29,14 @@
{% sitetree_menu from "main" include "trunk" template "sitetree_header.html" %} + {% if messages %} + + {% endif %} +

{% block header_title %}{% endblock %}

{% block header_paragraph %}{% endblock %}

diff --git a/static/src/css/app.css b/static/src/css/app.css index c1125ca1..97289099 100644 --- a/static/src/css/app.css +++ b/static/src/css/app.css @@ -1,3 +1,109 @@ .label-required:after { content: ' *'; } textarea, .monospace-text { font-family: Hack, monospace; } .monospace-text { white-space: pre-wrap; } + +/* MESSAGES & ERRORS */ + +ul.messagelist { + padding: 0; + margin: 0; +} + +ul.messagelist li { + display: block; + font-weight: 400; + font-size: 13px; + padding: 10px 10px 10px 65px; + margin: 0 0 10px 0; + background: #dfd url(../img/icon-yes.svg) 40px 12px no-repeat; + background-size: 16px auto; + color: #333; +} + +ul.messagelist li.warning { + background: #ffc url(../img/icon-alert.svg) 40px 14px no-repeat; + background-size: 14px auto; +} + +ul.messagelist li.error { + background: #ffefef url(../img/icon-no.svg) 40px 12px no-repeat; + background-size: 16px auto; +} + +.errornote { + font-size: 14px; + font-weight: 700; + display: block; + padding: 10px 12px; + margin: 0 0 10px 0; + color: #ba2121; + border: 1px solid #ba2121; + border-radius: 4px; + background-color: #fff; + background-position: 5px 12px; +} + +ul.errorlist { + margin: 0 0 4px; + padding: 0; + color: #ba2121; + background: #fff; +} + +ul.errorlist li { + font-size: 13px; + display: block; + margin-bottom: 4px; +} + +ul.errorlist li:first-child { + margin-top: 0; +} + +ul.errorlist li a { + color: inherit; + text-decoration: underline; +} + +td ul.errorlist { + margin: 0; + padding: 0; +} + +td ul.errorlist li { + margin: 0; +} + +.form-row.errors { + margin: 0; + border: none; + border-bottom: 1px solid #eee; + background: none; +} + +.form-row.errors ul.errorlist li { + padding-left: 0; +} + +.errors input, .errors select, .errors textarea { + border: 1px solid #ba2121; +} + +div.system-message { + background: #ffc; + margin: 10px; + padding: 6px 8px; + font-size: .8em; +} + +div.system-message p.system-message-title { + padding: 4px 5px 4px 25px; + margin: 0; + color: #c11; + background: #ffefef url(../img/icon-no.svg) 5px 5px no-repeat; +} + +.description { + font-size: 12px; + padding: 5px 0 0 12px; +}