Browse Source

Admin error templates.#342

Rafał Pitoń 11 years ago
parent
commit
5da8f830b6

+ 28 - 11
misago/static/misago/admin/css/misago/errorpages.less

@@ -7,9 +7,7 @@
   text-align: center;
   text-align: center;
 
 
   .error-icon {
   .error-icon {
-    margin: (@line-height-computed * -0.5) 0px;
-    .opacity(0.5);
-
+    color: @brand-warning;
     font-size: @font-size-large * 4;
     font-size: @font-size-large * 4;
   }
   }
 
 
@@ -28,17 +26,10 @@
 /* Big displays */
 /* Big displays */
 @media (min-width: @screen-sm-min) {
 @media (min-width: @screen-sm-min) {
   .error-message {
   .error-message {
-    background: @error-panel-bg;
-    border: 1px solid @error-panel-border;
-    border-radius: @border-radius-large;
-    box-shadow: 0px 0px 0px 3px @error-panel-shadow;
-    margin: (@line-height-computed * 2) auto;
-    padding: @line-height-computed;
-    width: @screen-sm-min * 0.8;
+    margin: (@line-height-computed * 3) 0px;
 
 
     .error-icon {
     .error-icon {
       margin: @line-height-computed 0px;
       margin: @line-height-computed 0px;
-      .opacity(0.5);
 
 
       font-size: @font-size-large * 6;
       font-size: @font-size-large * 6;
     }
     }
@@ -48,3 +39,29 @@
     }
     }
   }
   }
 }
 }
+
+
+/* Outside ACP */
+.login-form {
+  .error-message {
+    h1 {
+      font-size: @font-size-large * 1.2;
+    }
+
+    p {
+      margin: 0px;
+
+      font-size: @font-size-base;
+    }
+  }
+}
+
+
+/* Big displays */
+@media (min-width: @screen-sm-min) {
+  .login-form {
+    .error-message {
+      margin: @line-height-computed;
+    }
+  }
+}

+ 15 - 12
misago/static/misago/admin/css/style.css

@@ -6322,9 +6322,7 @@ body {
   text-align: center;
   text-align: center;
 }
 }
 .error-message .error-icon {
 .error-message .error-icon {
-  margin: -10px 0px;
-  opacity: 0.5;
-  filter: alpha(opacity=50);
+  color: #f0ad4e;
   font-size: 72px;
   font-size: 72px;
 }
 }
 .error-message h1 {
 .error-message h1 {
@@ -6337,24 +6335,29 @@ body {
 /* Big displays */
 /* Big displays */
 @media (min-width: 768px) {
 @media (min-width: 768px) {
   .error-message {
   .error-message {
-    background: #f7f7f7;
-    border: 1px solid #d4d4d4;
-    border-radius: 6px;
-    box-shadow: 0px 0px 0px 3px #ededed;
-    margin: 40px auto;
-    padding: 20px;
-    width: 614.4px;
+    margin: 60px 0px;
   }
   }
   .error-message .error-icon {
   .error-message .error-icon {
     margin: 20px 0px;
     margin: 20px 0px;
-    opacity: 0.5;
-    filter: alpha(opacity=50);
     font-size: 108px;
     font-size: 108px;
   }
   }
   .error-message h1 {
   .error-message h1 {
     margin-top: 0px;
     margin-top: 0px;
   }
   }
 }
 }
+/* Outside ACP */
+.login-form .error-message h1 {
+  font-size: 21.6px;
+}
+.login-form .error-message p {
+  margin: 0px;
+  font-size: 14px;
+}
+@media (min-width: 768px) {
+  .login-form .error-message {
+    margin: 20px;
+  }
+}
 .form-panel {
 .form-panel {
   background: #ffffff;
   background: #ffffff;
   border: 1px solid #d4d4d4;
   border: 1px solid #d4d4d4;

+ 27 - 0
misago/templates/misago/admin/errorpages/403.html

@@ -0,0 +1,27 @@
+{% extends "misago/admin/base.html" %}
+{% load i18n %}
+
+
+{% block title %}{% trans "Page not available" %} | {{ block.super }}{% endblock %}
+
+
+{% block content %}
+<div class="container">
+
+  <div class="error-message">
+
+    <div class="error-icon">
+      <span class="fa fa-ban"></span>
+    </div>
+
+    <h1>{% trans "Requested page is not available." %}</h1>
+    {% if message %}
+    <p>{{ message }}</p>
+    {% else %}
+    <p>{% trans "You don't have permission to access this page." %}</p>
+    {% endif %}
+
+  </div>
+
+</div>
+{% endblock content %}

+ 23 - 1
misago/templates/misago/admin/errorpages/404.html

@@ -1 +1,23 @@
-Admin 404 placeholder
+{% extends "misago/admin/base.html" %}
+{% load i18n %}
+
+
+{% block title %}{% trans "Page not found" %} | {{ block.super }}{% endblock %}
+
+
+{% block content %}
+<div class="container">
+
+  <div class="error-message">
+
+    <div class="error-icon">
+      <span class="fa fa-compass"></span>
+    </div>
+
+    <h1>{% trans "Requested page could not be found." %}</h1>
+    <p>{% trans "The link you clicked was incorrect or the page has been moved or deleted." %}</p>
+
+  </div>
+
+</div>
+{% endblock content %}

+ 28 - 0
misago/templates/misago/admin/errorpages/csrf_failure.html

@@ -0,0 +1,28 @@
+{% extends "misago/admin/base_thin.html" %}
+{% load i18n %}
+
+
+{% block title %}{% trans "Request blocked" %} | {{ block.super }}{% endblock %}
+
+
+{% block body %}
+<div class="login-form">
+
+  <div class="form-panel">
+    <div class="form-body no-fieldsets">
+
+      <div class="error-message">
+        <div class="error-icon">
+          <span class="fa fa-exclamation-triangle"></span>
+        </div>
+
+        <h1>{% trans "Suspicious request blocked." %}</h1>
+        <p>{% trans "This is usually caused by your browser not accepting or using outdated cookies." %}</p>
+        <p>{% trans "Check your browser configuration and try again." %}</p>
+      </div>
+
+    </div>
+  </div>
+
+</div>
+{% endblock body %}

+ 24 - 0
misago/templates/misago/admin/errorpages/csrf_failure_authenticated.html

@@ -0,0 +1,24 @@
+{% extends "misago/admin/base.html" %}
+{% load i18n %}
+
+
+{% block title %}{% trans "Request blocked" %} | {{ block.super }}{% endblock %}
+
+
+{% block content %}
+<div class="container">
+
+  <div class="error-message">
+
+    <div class="error-icon">
+      <span class="fa fa-exclamation-triangle"></span>
+    </div>
+
+    <h1>{% trans "Suspicious request blocked." %}</h1>
+    <p>{% trans "This is usually caused by your browser not accepting or using outdated cookies." %}</p>
+    <p>{% trans "Check your browser configuration and try again." %}</p>
+
+  </div>
+
+</div>
+{% endblock content %}

+ 24 - 0
misago/templates/misago/errorpages/csrf_failure_authenticated.html

@@ -0,0 +1,24 @@
+{% extends "misago/base.html" %}
+{% load i18n %}
+
+
+{% block title %}{% trans "Request blocked" %} | {{ block.super }}{% endblock %}
+
+
+{% block content %}
+<div class="container">
+
+  <div class="error-message">
+
+    <div class="error-icon">
+      <span class="fa fa-exclamation-triangle"></span>
+    </div>
+
+    <h1>{% trans "Suspicious request blocked." %}</h1>
+    <p>{% trans "This is usually caused by your browser not accepting or using outdated cookies." %}</p>
+    <p>{% trans "Check your browser configuration and try again." %}</p>
+
+  </div>
+
+</div>
+{% endblock content %}

+ 28 - 11
uiframework/misago/admin/css/misago/errorpages.less

@@ -7,9 +7,7 @@
   text-align: center;
   text-align: center;
 
 
   .error-icon {
   .error-icon {
-    margin: (@line-height-computed * -0.5) 0px;
-    .opacity(0.5);
-
+    color: @brand-warning;
     font-size: @font-size-large * 4;
     font-size: @font-size-large * 4;
   }
   }
 
 
@@ -28,17 +26,10 @@
 /* Big displays */
 /* Big displays */
 @media (min-width: @screen-sm-min) {
 @media (min-width: @screen-sm-min) {
   .error-message {
   .error-message {
-    background: @error-panel-bg;
-    border: 1px solid @error-panel-border;
-    border-radius: @border-radius-large;
-    box-shadow: 0px 0px 0px 3px @error-panel-shadow;
-    margin: (@line-height-computed * 2) auto;
-    padding: @line-height-computed;
-    width: @screen-sm-min * 0.8;
+    margin: (@line-height-computed * 3) 0px;
 
 
     .error-icon {
     .error-icon {
       margin: @line-height-computed 0px;
       margin: @line-height-computed 0px;
-      .opacity(0.5);
 
 
       font-size: @font-size-large * 6;
       font-size: @font-size-large * 6;
     }
     }
@@ -48,3 +39,29 @@
     }
     }
   }
   }
 }
 }
+
+
+/* Outside ACP */
+.login-form {
+  .error-message {
+    h1 {
+      font-size: @font-size-large * 1.2;
+    }
+
+    p {
+      margin: 0px;
+
+      font-size: @font-size-base;
+    }
+  }
+}
+
+
+/* Big displays */
+@media (min-width: @screen-sm-min) {
+  .login-form {
+    .error-message {
+      margin: @line-height-computed;
+    }
+  }
+}