github.com/hhsnopek/up@v0.1.1/internal/errorpage/template.go (about) 1 package errorpage 2 3 import "html/template" 4 5 // defaultPage is the default error page. 6 var defaultPage = template.Must(template.New("errorpage").Parse(`<!DOCTYPE html> 7 <html> 8 <head> 9 <meta charset="utf-8"> 10 <title>{{.StatusText}} – {{.StatusCode}}</title> 11 <style> 12 html, body { 13 margin: 0; 14 width: 100%; 15 height: 100%; 16 display: flex; 17 justify-content: center; 18 align-items: center; 19 } 20 21 body { 22 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; 23 font-size: 15px; 24 } 25 26 .Error { 27 font-size: 1.35em; 28 {{with .Variables.color}} 29 color: {{.}}; 30 {{else}} 31 color: #6061BE; 32 {{end}} 33 } 34 35 .Error .message { 36 font-weight: 200; 37 letter-spacing: 0.095em; 38 } 39 40 .Error .message a { 41 text-decoration: none; 42 color: inherit; 43 {{with .Variables.color}} 44 border-bottom: 1px dotted {{.}}; 45 {{else}} 46 border-bottom: 1px dotted #6061BE; 47 {{end}} 48 } 49 50 .Error .status { 51 font-weight: 700; 52 } 53 54 .Error .code { 55 display: none; 56 } 57 58 .Error .dot { 59 font-weight: 100; 60 } 61 62 @media screen and (max-width: 800px) { 63 body { 64 font-size: 10px; 65 } 66 67 .Error { 68 display: flex; 69 flex-direction: column; 70 } 71 72 .Error .status { 73 font-size: 1.1em; 74 } 75 76 .Error .dot { 77 display: none 78 } 79 } 80 </style> 81 </head> 82 <body> 83 <div class="Error"> 84 <span class="status">{{.StatusText}}</span> 85 <span class="code">{{.StatusCode}}</span> 86 <span class="dot">•</span> 87 {{with .Variables.support_email}} 88 <span class="message">Please try your request again or <a href="mailto:{{.}}">contact support</a>.</span> 89 {{else}} 90 <span class="message">Please try your request again or contact support.</span> 91 {{end}} 92 </div> 93 </body> 94 </html>`))