github.com/segakazzz/buffalo@v0.16.22-0.20210119082501-1f52048d3feb/error_templates.go (about)

     1  package buffalo
     2  
     3  var devErrorTmpl = `
     4  <html>
     5  <head>
     6    <title><%= status %> - ERROR!</title>
     7    <style>html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}header{display:block}a{background-color:transparent}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}img{border:0}pre{overflow:auto}code,pre{font-family:monospace,monospace;font-size:1em}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{*{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h3{orphans:3;widows:3}h3{page-break-after:avoid}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}h1,h3{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1,h3{margin-top:20px;margin-bottom:10px}h1{font-size:36px}h3{font-size:24px}code,pre{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-right:-15px;margin-left:-15px}.col-md-1,.col-md-10,.col-md-12,.col-sm-2,.col-sm-6,.col-xs-3,.col-xs-7{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-3,.col-xs-7{float:left}.col-xs-7{width:58.33333333%}.col-xs-3{width:25%}@media (min-width:768px){.col-sm-2,.col-sm-6{float:left}.col-sm-6{width:50%}.col-sm-2{width:16.66666667%}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-12{float:left}.col-md-12{width:100%}.col-md-10{width:83.33333333%}.col-md-1{width:8.33333333%}}table{background-color:transparent}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>thead:first-child>tr:first-child>th{border-top:0}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.container:after,.container:before,.row:after,.row:before{display:table;content:" "}.container:after,.row:after{clear:both}@-ms-viewport{width:device-width}
     8  	h1{margin-top:20px}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff;margin:0}h1{margin-bottom:10px;font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.table{margin-bottom:20px}h1{font-size:36px}a{color:#337ab7;text-decoration:none}a:hover{color:#23527c}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.table{width:100%;max-width:100%;background-color:transparent;border-spacing:0;border-collapse:collapse}.table-striped>tbody{background-color:#f9f9f9}.table>tbody>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{border-top:0;vertical-align:bottom;border-bottom:2px solid #ddd;text-align:left}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace}.row{margin-right:-15px;margin-left:-15px}.col-md-10{float:left;position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-md-10{width:83.33333333%}img{vertical-align:middle;border:0}.container{min-width:320px}body{font-family:helvetica}table{font-size:14px}table.table tbody tr td{border-top:0;padding:10px}pre{white-space:pre-line;margin-bottom:10px;max-height:275px;overflow:scroll}header{background-color:#ed605e;padding:10px 20px;box-sizing:border-box}.logo img{width:80px}.titles h1{font-size:30px;font-weight:300;color:#fff;margin:24px 0}.content h3{color:gray;margin:25px 0}.foot{padding:5px 0 20px;text-align:right;color:#c5c5c5;font-weight:300}.foot a{color:#8b8b8b;text-decoration:underline}.centered{text-align:center}@media all and (max-width:500px){.titles h1{font-size:25px;margin:26px 0}}@media all and (max-width:530px){.titles h1{font-size:20px;margin:24px 0}.logo{padding:0}.logo img{width:100%;max-width:80px}}
     9    </style>
    10  </head>
    11  
    12  <body>
    13    <header>
    14      <div class="container">
    15        <div class="row">
    16          <div class="col-md-1 col-sm-2 col-xs-3 logo">
    17            <a href="/"><img src="https://gobuffalo.io/assets/images/logo_med.png" alt=""></a>
    18          </div>
    19          <div class="col-md-10 col-sm-6 col-xs-7 titles">
    20            <h1>
    21              <%= status %> - ERROR!
    22            </h1>
    23          </div>
    24        </div>
    25      </div>
    26    </header>
    27  
    28    <div class="container content">
    29      <div class="row">
    30        <div class="col-md-12">
    31          <h3>Error Trace</h3>
    32          <pre><%= error %></pre>
    33  
    34          <h3>Context</h3>
    35          <pre><%= inspect(context) %></pre>
    36  
    37          <h3>Parameters</h3>
    38          <pre><%= inspect(params) %></pre>
    39  
    40          <h3>Headers</h3>
    41          <pre><%= inspect(headers) %></pre>
    42  
    43          <h3>Form</h3>
    44          <pre><%= inspect(posted_form) %></pre>
    45  
    46          <h3>Routes</h3>
    47          <table class="table table-striped">
    48            <thead>
    49              <tr text-align="left">
    50                <th class="centered">METHOD</th>
    51                <th>PATH</th>
    52                <th>NAME</th>
    53                <th>HANDLER</th>
    54              </tr>
    55            </thead>
    56            <tbody>
    57  
    58              <%= for (r) in routes { %>
    59                <tr>
    60                  <td class="centered">
    61                    <%= r.Method %>
    62                  </td>
    63                  <td>
    64                    <%= if (r.Method != "GET" || r.Path ~= "{") { %>
    65                      <%= r.Path %>
    66                    <% } else { %>
    67                      <a href="<%= r.Path %>"><%= r.Path %></a>
    68                    <% } %>
    69                  </td>
    70                  <td>
    71                    <%= r.PathName %>
    72                  </td>
    73                  <td><code><%= r.HandlerName %></code></td>
    74                </tr>
    75              <% } %>
    76  
    77            </tbody>
    78          </table>
    79        </div>
    80      </div>
    81      <div class="foot"> <span> Powered by <a href="http://gobuffalo.io/">gobuffalo.io</a></span></div>
    82    </div>
    83  </body>
    84  </html>
    85  `
    86  var prodErrorTmpl = `
    87  <!DOCTYPE html>
    88  <html>
    89  <head>
    90  <style>h1,p.powered{text-align:center}body{background:#ECECEC;padding-top:25px;font-family:helvetica neue,helvetica,sans-serif;color:#333}.card{box-sizing:border-box;width:440px;min-width:270px;margin:0 auto;padding:10px 25px 35px 10px;background:#FFF;box-shadow:0 2px 4px 0 rgba(185,185,185,.28);border-radius:5px}.card p{max-width:320px;margin:15px auto}h1{font-size:22px}hr{border:.5px solid #D72727;width:180px}p.powered{font-family:HelveticaNeue-Light;font-size:12px;color:#333}@media (max-width:600px){.card{width:100%;display:block}}</style>
    91  </head>
    92  <body>
    93  <div class="container">
    94  	<div class="card">
    95  		<h1>We're Sorry!</h1>
    96  		<hr>
    97  		<p>It looks like something went wrong! Don't worry, we are aware of the problem and are looking into it.</p>
    98  		<p>Sorry if this has caused you any problems. Please check back again later.</p>
    99  	</div>
   100  
   101  	<p class="powered">powered by <a href="https://gobuffalo.io">gobuffalo.io</a></p>
   102  </div>
   103  </body>
   104  </html>
   105  `
   106  
   107  var prodNotFoundTmpl = `
   108  <!DOCTYPE html>
   109  <html>
   110  <head>
   111  <style>h1,p.powered{text-align:center}body{background:#ECECEC;padding-top:25px;font-family:helvetica neue,helvetica,sans-serif;color:#333}.card{box-sizing:border-box;width:440px;min-width:270px;margin:0 auto;padding:10px 25px 35px 10px;background:#FFF;box-shadow:0 2px 4px 0 rgba(185,185,185,.28);border-radius:5px}.card p{max-width:320px;margin:15px auto}h1{font-size:22px}hr{border:.5px solid #1272E2;width:180px}p.powered{font-family:HelveticaNeue-Light;font-size:12px;color:#333}@media (max-width:600px){.card{width:100%;display:block}}</style>
   112  </head>
   113  <body>
   114  <div class="container">
   115  	<div class="card">
   116  		<h1>Not Found</h1>
   117  		<hr>
   118  		<p>The page you're looking for does not exist, you may have mistyped the address or the page may have been moved.</p>
   119  	</div>
   120  
   121  	<p class="powered">powered by <a href="https://gobuffalo.io">gobuffalo.io</a></p>
   122  </div>
   123  </body>
   124  </html>
   125  `