Skip to content

Commit

Permalink
Error page styles (#40)
Browse files Browse the repository at this point in the history
* Update error page styles

* Update header font size
  • Loading branch information
rainboyan authored Mar 10, 2022
1 parent 58481ff commit 2cb2c22
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 38 deletions.
25 changes: 7 additions & 18 deletions skeleton/grails-app/assets/stylesheets/errors.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
h1, h2 {
margin: 10px 25px 5px;
h1 {
font-size: 2rem;
}

h2 {
font-size: 1.1em;
font-size: 1.25rem;
}

.filename {
Expand All @@ -19,32 +19,21 @@ h2 {

.stack,
.snippet {
margin: 0 25px 10px;
margin: 10px 0;
}

.stack,
.snippet {
border: 1px solid #ccc;
-mox-box-shadow: 0 0 2px rgba(0,0,0,0.2);
-webkit-box-shadow: 0 0 2px rgba(0,0,0,0.2);
box-shadow: 0 0 2px rgba(0,0,0,0.2);
}

/* error details */
.error-details {
border-top: 1px solid #FFAAAA;
-mox-box-shadow: 0 0 2px rgba(0,0,0,0.2);
-webkit-box-shadow: 0 0 2px rgba(0,0,0,0.2);
box-shadow: 0 0 2px rgba(0,0,0,0.2);
border-bottom: 1px solid #FFAAAA;
-mox-box-shadow: 0 0 2px rgba(0,0,0,0.2);
-webkit-box-shadow: 0 0 2px rgba(0,0,0,0.2);
box-shadow: 0 0 2px rgba(0,0,0,0.2);
border: 1px solid #FFAAAA;
background-color:#FFF3F3;
line-height: 1.5;
overflow: hidden;
padding: 5px;
padding-left:25px;
padding: 10px 0 5px 25px;
}

.error-details dt {
Expand All @@ -66,7 +55,7 @@ h2 {
.stack {
padding: 5px;
overflow: auto;
height: 150px;
height: 300px;
}

/* code snippet */
Expand Down
6 changes: 2 additions & 4 deletions skeleton/grails-app/assets/stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,8 @@ fieldset.embedded legend {

.errors,
.message {
font-size: 0.8em;
line-height: 2;
margin: 1em 2em;
padding: 0.25em;
margin: 1em 0;
padding: 0.5em;
}

.message {
Expand Down
34 changes: 18 additions & 16 deletions skeleton/grails-app/views/error.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,29 @@
<div id="content" role="main">
<div class="container">
<section class="row">
<g:if env="development">
<g:if test="${Throwable.isInstance(exception)}">
<g:renderException exception="${exception}" />
<div class="col-12">
<g:if env="development">
<g:if test="${Throwable.isInstance(exception)}">
<g:renderException exception="${exception}" />
</g:if>
<g:elseif test="${request.getAttribute('javax.servlet.error.exception')}">
<g:renderException exception="${request.getAttribute('javax.servlet.error.exception')}" />
</g:elseif>
<g:else>
<ul class="errors">
<li>An error has occurred</li>
<li>Exception: ${exception}</li>
<li>Message: ${message}</li>
<li>Path: ${path}</li>
</ul>
</g:else>
</g:if>
<g:elseif test="${request.getAttribute('javax.servlet.error.exception')}">
<g:renderException exception="${request.getAttribute('javax.servlet.error.exception')}" />
</g:elseif>
<g:else>
<ul class="col-12 errors">
<ul class="errors">
<li>An error has occurred</li>
<li>Exception: ${exception}</li>
<li>Message: ${message}</li>
<li>Path: ${path}</li>
</ul>
</g:else>
</g:if>
<g:else>
<ul class="col-12 errors">
<li>An error has occurred</li>
</ul>
</g:else>
</div>
</section>
</div>
</div>
Expand Down

0 comments on commit 2cb2c22

Please sign in to comment.