Improve error page styling

This commit is contained in:
Paulo Gustavo Veiga 2022-01-10 19:12:58 -08:00
parent 618ea57d17
commit b1b8dde547
11 changed files with 71 additions and 160 deletions

View File

@ -13,15 +13,9 @@
<definition name="mindmapList" template="/jsp/reactInclude.jsp"/>
<!-- Template Declaration -->
<definition name="pageTemplate" template="/jsp/template.jsp">
<definition name="errorTemplate" template="/jsp/errorTemplate.jsp">
<put-attribute name="title" value="" type="string"/>
<put-attribute name="details" value="" type="string"/>
<put-attribute name="body" value="/jsp/error.jsp" type="page"/>
</definition>
<definition name="errorTemplate" extends="pageTemplate">
<put-attribute name="body" value="/jsp/errorTemplate.jsp"/>
</definition>
<!-- Error Pages -->

View File

@ -0,0 +1,27 @@
@import "compatibility.less";
div#errorContainer {
padding: 200px;
height: 100vh;
background-color: rgb(252, 235, 192);
text-align:center
}
div#errorContainer > h1 {
padding-top: 200px;
color: rgb(241, 163, 39);
font-size: 40px;
}
div#errorContainer > p {
font-size: 25px;
}
div#bottom-logo {
position: fixed;
right: 20px;
bottom: 10px;
background: url(../../images/editor/logo-text-black.svg) no-repeat;
width: 90px;
height: 40px;
}

View File

@ -1,32 +0,0 @@
<%@ page import="java.util.Locale" %>
<%@ page import="org.springframework.context.i18n.LocaleContextHolder" %>
<%@page pageEncoding="UTF-8" %>
<%@include file="/jsp/init.jsp" %>
<%
final Locale locale = LocaleContextHolder.getLocale();
request.setAttribute("locale", locale.getLanguage());
%>
<!DOCTYPE HTML>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<tiles:importAttribute name="title" scope="page"/>
<tiles:importAttribute name="details" scope="page"/>
<html>
<head>
<base href="${requestScope['site.baseurl']}/">
<!--[if lt IE 9]>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<![endif]-->
<script type="text/javascript" language="javascript" src="js/jquery.timeago.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery.timeago.${locale}.js"></script>
<body>
<div style="padding:10px">
<tiles:insertAttribute name="body"/>
</div>
</body>
</html>

View File

@ -1,17 +0,0 @@
<%@page pageEncoding="UTF-8" %>
<%@include file="/jsp/init.jsp" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE HTML>
<tiles:importAttribute name="title" scope="page"/>
<tiles:importAttribute name="details" scope="page"/>
<html>
<head>
</head>
<body>
<div>
<tiles:insertAttribute name="body"/>
</div>
</body>
</html>

View File

@ -1,13 +1,45 @@
<%@page pageEncoding="UTF-8" %>
<%@include file="/jsp/init.jsp" %>
<!DOCTYPE HTML>
<%@ page autoFlush="true" buffer="none" %>
<%@ include file="/jsp/init.jsp" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<tiles:importAttribute name="title" scope="request"/>
<tiles:importAttribute name="details" scope="request"/>
<h2>
<spring:message code="${requestScope.title}"/>
</h2>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<base href="${requestScope['site.baseurl']}/">
<title>
<spring:message code="SITE.TITLE"/>-
<c:choose>
<c:when test="${requestScope.viewTitle!=null}">
${requestScope.viewTitle}
</c:when>
<c:otherwise>
<spring:message code="${requestScope.title}"/>
</c:otherwise>
</c:choose>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<base href="${requestScope['site.baseurl']}/static/mindplot/">
<title><spring:message code="SITE.TITLE"/> - <c:out value="${mindmap.title}"/></title>
<link rel="stylesheet/less" type="text/css" href="../../css/error.less"/>
<script type='text/javascript' src="../../js/less.js"/></script>
<%@ include file="/jsp/pageHeaders.jsf" %>
<strong>
<spring:message code="${requestScope.details}"/>
</strong>
</head>
<body>
<div id="errorContainer">
<h1>
<spring:message code="${requestScope.title}"/>
</h2>
<p>
<spring:message code="${requestScope.details}"/>
</p>
</div>
<div id="bottom-logo"></div>
</body>
</html>

View File

@ -1,49 +0,0 @@
<%@page pageEncoding="UTF-8" %>
<%@include file="/jsp/init.jsp" %>
<!DOCTYPE HTML>
<div>
<iframe src='${url}' style="border: 0;width: 100%;height:100%;min-height:400px;overflow-y: auto;"
id="dialogContentIframe"></iframe>
<div style="float: right;margin-right: 25px">
<input type="button" class="btn-primary" value="<spring:message code="ACCEPT"/>" id="submitBtn"/>
<input type="button" class="btn-secondary" value="<spring:message code="CANCEL"/>" id="cancelBtn"/>
</div>
</div>
<script type="text/javascript">
$('submitBtn').addEvent('click', function () {
var iframeWindow = $('dialogContentIframe').contentWindow;
if (iframeWindow && (typeof iframeWindow.submitDialogForm == 'function')) {
var context = iframeWindow.submitDialogForm(true);
if (context) {
// This is a hack for the export function. If this is not done, the dialog is closed and the export fails.
var iframeForm = $('iframeExportForm');
iframeForm.setAttribute('method', context.method);
iframeForm.setAttribute('action', context.action);
var svgXml = context.method == "POST" ? window.document.getElementById('workspaceContainer').innerHTML : "";
$('svgXml').setAttribute('value', svgXml);
$('download').setAttribute('value', context.formatType);
$('version').setAttribute('value', context.version);
iframeForm.submit();
}
if (MooDialog.Request.active) {
MooDialog.Request.active.close();
}
}
});
$('cancelBtn').addEvent('click', function () {
if (MooDialog.Request.active) {
MooDialog.Request.active.close();
}
});
</script>
<form method="GET" class="form-horizontal" action="c/restful/maps/${mindmap.id}"
enctype="application/x-www-form-urlencoded" id="iframeExportForm">
<input name="svgXml" id="svgXml" value="" type="hidden"/>
<input name="download" id="download" type="hidden" value="mm"/>
<input name="version" id="version" type="hidden" value=""/>
</form>

View File

@ -17,7 +17,7 @@
<link rel="stylesheet/less" type="text/css" href="../../css/bootstrap.min.css"/>
<link rel="stylesheet/less" type="text/css" href="../../css/editor.less"/>
<script type='text/javascript' src="../../js/less.js"/></script>
<%@ include file="/jsp/commonPageHeader.jsf" %>
<%@ include file="/jsp/pageHeaders.jsf" %>
<script type="text/javascript">
var mapId = '${mindmap.id}';

View File

@ -12,7 +12,7 @@
<title><spring:message code="SITE.TITLE"/> | ${mindmap.title} </title>
<link rel="stylesheet/less" type="text/css" href="../../css/viewonly.less"/>
<script type='text/javascript' src="../../js/less.js"/></script>
<%@ include file="/jsp/commonPageHeader.jsf" %>
<%@ include file="/jsp/pageHeaders.jsf" %>
<script type="text/javascript">
var mapId = '${mindmap.id}';
var memoryPersistence = true;

View File

@ -9,7 +9,7 @@
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;600&display=swap" rel="stylesheet" />
<%@ include file="/jsp/commonPageHeader.jsf" %>
<%@ include file="/jsp/pageHeaders.jsf" %>
<title>Loading | WiseMapping</title>

View File

@ -1,44 +0,0 @@
<%@page pageEncoding="UTF-8" %>
<%@include file="/jsp/init.jsp" %>
<!DOCTYPE HTML>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<tiles:importAttribute name="title" scope="request"/>
<tiles:importAttribute name="details" scope="request"/>
<tiles:importAttribute name="removeSignin" scope="request" ignore="true"/>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<base href="${requestScope['site.baseurl']}/">
<title>
<spring:message code="SITE.TITLE"/>-
<c:choose>
<c:when test="${requestScope.viewTitle!=null}">
${requestScope.viewTitle}
</c:when>
<c:otherwise>
<spring:message code="${requestScope.title}"/>
</c:otherwise>
</c:choose>
</title>
<%@ include file="/jsp/commonPageHeader.jsf" %>
<link rel="stylesheet" type="text/css" href="css/pageTemplate.css"/>
</head>
<body>
<div id="pageContainer">
<div class="container">
<div class="row">
<div class="col-md-offset-1 col-md-10">
<div class="jumbotron" style="margin:40px 0 15px 0;padding: 10px 60px;">
<tiles:insertAttribute name="body"/>
</div>
</div>
</div>
</div>
</div>
</body>
</html>