Commit 7afb5669 authored by Justin Kromlinger's avatar Justin Kromlinger

Merge branch 'dev' into feature/customChartStylesheet

parents e235505c d43c23f4
@import 'configuration';
html { // Required for the footer, see https://stackoverflow.com/a/23442814
min-height: 100%;
position: relative;
}
body {
background-color: $bg-color-lighter;
color: $fg-color-normal;
font-family: sans-serif;
margin-bottom: $footer-height; // Required for the footer, see https://stackoverflow.com/a/23442814
}
a {
......@@ -32,12 +38,10 @@ header {
background-color: $bg-color-header;
box-shadow: 0 5px 5px 0 $shadow-color;
font-size: 1.3em;
left: 0;
min-height: $header-height;
right: 0;
position: relative;
top: 0;
width: 100%;
z-index: 5;
.title,
.menu .entry {
......@@ -89,6 +93,21 @@ header {
}
}
footer {
background-color: $bg-color-header;
bottom: 0;
box-shadow: 0 0 5px 5px $shadow-color;
font-size: .8em;
min-height: $footer-height;
position: absolute;
width: 100%;
div {
opacity: .6;
padding: $footer-height / 4;
}
}
.content {
.page {
height: auto;
......
......@@ -11,5 +11,6 @@ $chart-fill: rgba(255,0,0,0.3);
$small-screen-max-width: 720px;
$header-height: 64px;
$footer-height: $header-height / 2;
$content-spacing: 64px / 2;
......@@ -2,9 +2,9 @@
float: left;
}
//.right {
// float: right;
//}
.right {
float: right;
}
//.bold {
// font-weight: bold;
......
......@@ -6,28 +6,28 @@
}
div {
background: url('/status-1940x1060.svg') no-repeat center top;
background: url('/status-1940x1000.svg') no-repeat center top;
background-size: contain;
height: 1060px;
height: 1000px;
@media screen and (max-width: 2000px) {
background-image: url('/status-1700x700.svg');
height: 700px;
background-image: url('/status-1700x650.svg');
height: 650px;
}
@media screen and (max-width: 1700px) {
background-image: url('/status-1380x520.svg');
height: 520px;
background-image: url('/status-1380x450.svg');
height: 450px;
}
@media screen and (max-width: 1400px) {
background-image: url('/status-1145x385.svg');
height: 388px;
background-image: url('/status-1145x350.svg');
height: 353px;
}
@media screen and (max-width: 1000px) {
background-image: url('/status-780x385.svg');
height: 388px;
background-image: url('/status-780x350.svg');
height: 353px;
}
@media screen and (max-width: 800px) {
......
......@@ -3,11 +3,16 @@ package server
import (
"github.com/gin-gonic/gin"
"net/http"
"time"
)
func (s Server) handlerIndex(c *gin.Context) {
pageStartTime := time.Now()
c.Header("Cache-Control", "max-age=600")
c.HTML(http.StatusOK, "index", gin.H{
"ContactTab": true,
"ContactTab": true,
"Description": "Contact information.",
"PageStartTime": pageStartTime,
})
}
......@@ -15,11 +15,11 @@ import (
)
var svgDimensions = [][]int{
{1940, 1060},
{1700, 700},
{1380, 520},
{1145, 385},
{780, 385},
{1940, 1000},
{1700, 650},
{1380, 450},
{1145, 350},
{780, 350},
{500, 335},
{400, 225},
{200, 115},
......@@ -184,9 +184,13 @@ func messageSVG(c *gin.Context, message string, width int) {
}
func (s *Server) handlerStatus(c *gin.Context) {
pageStartTime := time.Now()
c.Header("Cache-Control", "max-age=600")
c.HTML(http.StatusOK, "status", gin.H{
"Title": "status",
"StatusTab": true,
"Title": "status",
"Description": "Status information.",
"StatusTab": true,
"PageStartTime": pageStartTime,
})
}
package server
import (
"fmt"
"github.com/gin-contrib/multitemplate"
"github.com/hashworks/hashworksNET/server/bindata"
"html/template"
"runtime"
"strings"
"time"
)
func (s Server) templateFunctionMap() template.FuncMap {
......@@ -15,8 +18,11 @@ func (s Server) templateFunctionMap() template.FuncMap {
"version": func() string {
return s.config.Version
},
"buildDate": func() string {
return s.config.BuildDate
"GoVer": func() string {
return strings.Title(runtime.Version())
},
"LoadTimes": func(startTime time.Time) string {
return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e3) + "µs"
},
}
}
......
{{define "footer"}}
</div>
<footer>
<div class="right">{{ if .PageStartTime }}{{LoadTimes .PageStartTime}} | {{ end }}v{{ version }} | {{ GoVer }}</div>
</footer>
</body>
</html>
{{end}}
\ No newline at end of file
......@@ -2,12 +2,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>/home/hashworks{{ if .Title }}/{{ .Title }}{{ end }}</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
{{ if .Description }}<meta name="description" content="{{ .Description }}" />{{ end }}
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta name="description" content="Version: {{ version }} ({{ buildDate }})" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<meta name="application-name" content="hashworksNET">
<meta name="theme-color" content="#151515">
......@@ -41,13 +40,13 @@
</svg>
</a>
<a href="https://steamcommunity.com/id/hashworks" rel="nofollow" target="_blank" class="icon">
<svg viewBox="0 0 512 512" height="21px" width="21px">
<svg viewBox="0 0 512 512" height="21px" width="21px">
<desc>Steam Icon</desc>
<path d="M 151.961,418.005 C 165.533,418.005 178.854,411.437 186.947,399.297 C 199.814,379.996 194.598,353.92 175.298,341.053 L 142.261,319.029 C 147.915,317.489 153.858,316.651 160.00,316.651 C 197.196,316.651 227.348,346.803 227.348,384.00 C 227.348,421.197 197.195,451.349 159.999,451.349 C 123.797,451.349 94.277,422.783 92.725,386.962 L 128.702,410.946 C 135.863,415.72 143.955,418.005 151.961,418.005 ZM 426.67,0.00 C 473.608,0.00 512.00,38.406 512.00,85.344 L 512.00,426.658 C 512.00,473.626 473.608,512.00 426.67,512.00 L 85.344,512.00 C 38.406,512.00 0.00,473.625 0.00,426.659 L 0.00,325.145 L 60.667,365.589 C 54.841,397.176 64.136,431.004 88.566,455.434 C 128.018,494.886 191.981,494.886 231.434,455.434 C 255.668,431.201 265.009,397.719 259.472,366.351 L 384.001,254.858 L 384.00,254.857 C 407.124,251.538 429.408,240.985 447.197,223.196 C 490.935,179.458 490.935,108.543 447.197,64.804 C 403.457,21.065 332.543,21.065 288.804,64.804 C 271.015,82.593 260.462,104.877 257.143,128.00 L 257.143,128.00 L 154.796,283.115 C 138.872,283.931 123.107,288.497 108.933,296.811 L 0.00,224.189 L 0.00,85.344 C 0.00,38.406 38.405,0.00 85.343,0.00 L 426.67,0.00 ZM 448.00,144.00c0.00-44.183-35.817-80.00-80.00-80.00s-80.00,35.817-80.00,80.00s 35.817,80.00, 80.00,80.00S 448.00,188.183, 448.00,144.00z M 320.00,144.00 c0.00-26.51, 21.49-48.00, 48.00-48.00s 48.00,21.49, 48.00,48.00s-21.49,48.00-48.00,48.00S 320.00,170.51, 320.00,144.00z"></path>
</svg>
</a>
<a href="https://www.reddit.com/user/hashworks/posts/" rel="nofollow" target="_blank" class="icon">
<svg viewBox="0 0 512 512" height="24px" width="24px">
<svg viewBox="0 0 512 512" height="24px" width="24px">
<desc>Reddit Icon</desc>
<path d="M480.5,251c0-27.7-22.2-50.2-49.5-50.2c-13,0-24.7,5-33.6,13.3c-32.4-22.8-76.1-37.8-124.9-40.6l21.9-73.2l67.1,13.5 c2.3,22.7,21.2,40.4,44.3,40.4c0.1,0,0.1,0,0.2,0c0.1,0,0.1,0,0.2,0c24.6,0,44.5-20.2,44.5-45.1S430.7,64,406.1,64 c-0.1,0-0.1,0-0.2,0c0,0-0.1,0-0.1,0c-17.2,0-32,9.8-39.5,24.3l-89.7-18l-30.8,103l-2.5,0.1c-50.3,2.2-95.5,17.4-128.7,40.7 c-8.8-8.3-20.6-13.3-33.6-13.3c-27.3,0-49.5,22.5-49.5,50.2c0,19.6,11,36.5,27.1,44.8c-0.8,4.9-1.2,9.8-1.2,14.8 C57.5,386.4,146.4,448,256,448s198.5-61.6,198.5-137.5c0-5-0.4-9.9-1.1-14.8C469.5,287.4,480.5,270.5,480.5,251z M65.8,271.1 c-6.6-4.5-10.9-12.1-10.9-20.8c0-13.8,11.1-25.1,24.7-25.1c5.6,0,10.8,1.9,15,5.1C81.1,242.2,71.1,256,65.8,271.1z M389.3,109.1 c0-9.2,7.4-16.8,16.5-16.8s16.5,7.5,16.5,16.8c0,9.2-7.4,16.8-16.5,16.8S389.3,118.4,389.3,109.1z M158.5,288.4 c0-17.6,14.2-31.8,31.8-31.8s31.8,14.2,31.8,31.8c0,17.6-14.2,31.8-31.8,31.8S158.5,306,158.5,288.4z M256,400 c-47.6-0.2-76-28.5-77.2-29.7l12.6-12.4c0.2,0.2,23.7,24.2,64.6,24.4c40.3-0.2,64.2-24.2,64.5-24.4l12.6,12.4 C331.9,371.5,303.6,399.8,256,400z M322.3,320.2c-17.6,0-31.8-14.2-31.8-31.8c0-17.6,14.2-31.8,31.8-31.8s31.8,14.2,31.8,31.8 C354.1,306,339.8,320.2,322.3,320.2z M446.4,271.5c-5.4-15.3-15.6-29.4-29.3-41.4c4.2-3.3,9.5-5.2,15.2-5.2 c13.9,0,25.1,11.4,25.1,25.5C457.5,259.2,453.1,266.9,446.4,271.5z"></path>
</svg>
......
......@@ -12,5 +12,5 @@
</article>
</section>
</div>
{{template "footer"}}
{{template "footer" . }}
{{end}}
\ No newline at end of file
......@@ -11,5 +11,5 @@
</article>
</section>
</div>
{{template "footer"}}
{{template "footer" . }}
{{end}}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment