dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit d0bcbac439d17f9664e276f625913fe45fc1c6a8
parent f0645c92239d74ab1ed75ff24d94bde04dced756
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu, 26 Jan 2023 00:40:10 -0800

cleanup templates

Diffstat:
Mpkg/template/templates.go | 8++++++--
Mpkg/web/public/views/pages/standalone/chat-password.gohtml | 65+++--------------------------------------------------------------
Mpkg/web/public/views/pages/standalone/chat-whitelist.gohtml | 65+++--------------------------------------------------------------
Mpkg/web/public/views/pages/standalone/first-use.gohtml | 62+++-----------------------------------------------------------
Mpkg/web/public/views/pages/standalone/forgot-password.gohtml | 64+++++-----------------------------------------------------------
Mpkg/web/public/views/pages/standalone/index.gohtml | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpkg/web/public/views/pages/standalone/login.gohtml | 67+++----------------------------------------------------------------
Mpkg/web/public/views/pages/standalone/signup-invite.gohtml | 63+++------------------------------------------------------------
Mpkg/web/public/views/pages/standalone/signup.gohtml | 66++++++------------------------------------------------------------
Mpkg/web/public/views/pages/standalone/wait.gohtml | 83++++++++++++++++---------------------------------------------------------------
10 files changed, 112 insertions(+), 495 deletions(-)

diff --git a/pkg/template/templates.go b/pkg/template/templates.go @@ -117,11 +117,15 @@ func (t *Templates) BuildTemplates() { var err error tmpl := New("_", bindata.Asset).Funcs(t.funcMap) - tmpl, err = tmpl.Parse("views/pages/first-use.gohtml") + tmpl, err = tmpl.Parse("views/pages/standalone/index.gohtml") if err != nil { logrus.Error(err) } - t.Templates["first-use"] = tmpl.Tmpl + tmpl, err = tmpl.Parse("views/pages/standalone/first-use.gohtml") + if err != nil { + logrus.Error(err) + } + t.Templates["standalone.first-use"] = tmpl.Tmpl } func buildTemplatesHelper(root string, tmpls map[string]*template.Template, prefix string, bases []string, fnsMap FuncMap) { diff --git a/pkg/web/public/views/pages/standalone/chat-password.gohtml b/pkg/web/public/views/pages/standalone/chat-password.gohtml @@ -1,61 +1,4 @@ -{{ define "base" }}<!DOCTYPE html><html lang="en"><head> - {{ .LogoASCII }} - {{ .VersionHTML }} - {{ .ShaHTML }} - <link href="/public/img/favicon.ico" rel="icon" type="image/x-icon" /> - <meta charset="UTF-8" /> - <meta name="author" content="n0tr1v"> - <meta name="keywords" content="{{ block "keywords" . }}{{ .BaseKeywords }}{{ end }}"/> - <meta name="subject" content=""> - <meta name="description" content="{{ block "meta-description" . }}{{ end }}" /> - <meta name="classification" content=""> - <meta name="distribution" content=""> - <meta name="robots" content="all" /> - <meta name="language" content="English"> - <meta name="revisit-after" content="1 days"> - <meta http-equiv="expires" content="0"> - <meta http-equiv="pragma" content="no-cache"> - <title>{{ block "title" . }}DarkForest{{ end }}</title> - {{ block "canonical-link" . }}{{ end }} - <link rel="stylesheet" type="text/css" href="/public/css/bootstrap.min.css?v={{ .VERSION }}" /> - <link rel="stylesheet" type="text/css" href="/public/css/style.css?v={{ .VERSION }}" /> - - <style> - body, html { - height: 100%; - display:table; - width:100%; - } - body { - display:table-cell; - vertical-align:middle; - } - .bg { - /* The image used */ - background-image: url({{ .WallpaperImg }}); - - /* Full height */ - height: 100%; - - /* Center and scale the image nicely */ - background-position: center; - background-repeat: no-repeat; - background-size: cover; - } - #parent { - display: table; - width: 100%; - } - #form_login { - display:table;/* shrinks to fit content */ - margin:auto; - } - .captcha-img { transition: transform .2s; } - .captcha-img:hover { transform: scale(2.5); } - </style> -</head> -<body class="bg"> - +{{ define "content" }} <div id="parent"> <div class="container" id="form_login"> <div class="row"> @@ -102,6 +45,4 @@ </div> </div> </div> - -</body> -</html>{{ end }} -\ No newline at end of file +{{ end }} +\ No newline at end of file diff --git a/pkg/web/public/views/pages/standalone/chat-whitelist.gohtml b/pkg/web/public/views/pages/standalone/chat-whitelist.gohtml @@ -1,61 +1,4 @@ -{{ define "base" }}<!DOCTYPE html><html lang="en"><head> - {{ .LogoASCII }} - {{ .VersionHTML }} - {{ .ShaHTML }} - <link href="/public/img/favicon.ico" rel="icon" type="image/x-icon" /> - <meta charset="UTF-8" /> - <meta name="author" content="n0tr1v"> - <meta name="keywords" content="{{ block "keywords" . }}{{ .BaseKeywords }}{{ end }}"/> - <meta name="subject" content=""> - <meta name="description" content="{{ block "meta-description" . }}{{ end }}" /> - <meta name="classification" content=""> - <meta name="distribution" content=""> - <meta name="robots" content="all" /> - <meta name="language" content="English"> - <meta name="revisit-after" content="1 days"> - <meta http-equiv="expires" content="0"> - <meta http-equiv="pragma" content="no-cache"> - <title>{{ block "title" . }}DarkForest{{ end }}</title> - {{ block "canonical-link" . }}{{ end }} - <link rel="stylesheet" type="text/css" href="/public/css/bootstrap.min.css?v={{ .VERSION }}" /> - <link rel="stylesheet" type="text/css" href="/public/css/style.css?v={{ .VERSION }}" /> - - <style> - body, html { - height: 100%; - display:table; - width:100%; - } - body { - display:table-cell; - vertical-align:middle; - } - .bg { - /* The image used */ - background-image: url({{ .WallpaperImg }}); - - /* Full height */ - height: 100%; - - /* Center and scale the image nicely */ - background-position: center; - background-repeat: no-repeat; - background-size: cover; - } - #parent { - display: table; - width: 100%; - } - #form_login { - display:table;/* shrinks to fit content */ - margin:auto; - } - .captcha-img { transition: transform .2s; } - .captcha-img:hover { transform: scale(2.5); } - </style> -</head> -<body class="bg"> - +{{ define "content" }} <div id="parent"> <div class="container" id="form_login"> <div class="row"> @@ -71,6 +14,4 @@ </div> </div> </div> - -</body> -</html>{{ end }} -\ No newline at end of file +{{ end }} +\ No newline at end of file diff --git a/pkg/web/public/views/pages/standalone/first-use.gohtml b/pkg/web/public/views/pages/standalone/first-use.gohtml @@ -1,58 +1,4 @@ -{{ define "base" }}<!DOCTYPE html><html lang="en"><head> - {{ .LogoASCII }} - {{ .VersionHTML }} - {{ .ShaHTML }} - <link href="/public/img/favicon.ico" rel="icon" type="image/x-icon" /> - <meta charset="UTF-8" /> - <meta name="author" content="n0tr1v"> - <meta name="keywords" content="{{ block "keywords" . }}{{ .BaseKeywords }}{{ end }}"/> - <meta name="subject" content="n0tr1v"> - <meta name="description" content="{{ block "meta-description" . }}{{ end }}" /> - <meta name="classification" content=""> - <meta name="distribution" content=""> - <meta name="robots" content="all" /> - <meta name="language" content="English"> - <meta name="revisit-after" content="1 days"> - <meta http-equiv="expires" content="0"> - <meta http-equiv="pragma" content="no-cache"> - <title>{{ block "title" . }}DarkForest{{ end }}</title> - {{ block "canonical-link" . }}{{ end }} - <link rel="stylesheet" type="text/css" href="/public/css/bootstrap.min.css" /> - <link rel="stylesheet" type="text/css" href="/public/css/style.css?v={{ .VERSION }}" /> - <style> - body, html { - height: 100%; - display:table; - width:100%; - } - body { - display:table-cell; - vertical-align:middle; - } - .bg { - /* The image used */ - background-image: url({{ .WallpaperImg }}); - - /* Full height */ - height: 100%; - - /* Center and scale the image nicely */ - background-position: center; - background-repeat: no-repeat; - background-size: cover; - } - #parent { - display: table; - width: 100%; - } - #form_login { - display:table;/* shrinks to fit content */ - margin:auto; - } - </style> -</head> -<body class="bg"> - +{{ define "content" }} <div id="parent"> <div class="container" id="form_login"> <div class="row"> @@ -90,6 +36,4 @@ </div> </div> </div> - -</body> -</html>{{ end }} -\ No newline at end of file +{{ end }} +\ No newline at end of file diff --git a/pkg/web/public/views/pages/standalone/forgot-password.gohtml b/pkg/web/public/views/pages/standalone/forgot-password.gohtml @@ -1,55 +1,5 @@ -{{ define "base" }}<!DOCTYPE html><html lang="en"><head> - {{ .LogoASCII }} - {{ .VersionHTML }} - {{ .ShaHTML }} - <link href="/public/img/favicon.ico" rel="icon" type="image/x-icon" /> - <meta charset="UTF-8" /> - <meta name="author" content="n0tr1v"> - <meta name="keywords" content="{{ block "keywords" . }}{{ .BaseKeywords }}{{ end }}"/> - <meta name="subject" content=""> - <meta name="description" content="{{ block "meta-description" . }}{{ end }}" /> - <meta name="classification" content=""> - <meta name="distribution" content=""> - <meta name="robots" content="all" /> - <meta name="language" content="English"> - <meta name="revisit-after" content="1 days"> - <meta http-equiv="expires" content="0"> - <meta http-equiv="pragma" content="no-cache"> - <title>{{ block "title" . }}DarkForest{{ end }}</title> - {{ block "canonical-link" . }}{{ end }} - <link rel="stylesheet" type="text/css" href="/public/css/bootstrap.min.css?v={{ .VERSION }}" /> - <link rel="stylesheet" type="text/css" href="/public/css/style.css?v={{ .VERSION }}" /> - +{{ define "extra-head" }} <style> - body, html { - height: 100%; - display:table; - width:100%; - } - body { - display:table-cell; - vertical-align:middle; - } - .bg { - /* The image used */ - background-image: url({{ .WallpaperImg }}); - - /* Full height */ - height: 100%; - - /* Center and scale the image nicely */ - background-position: center; - background-repeat: no-repeat; - background-size: cover; - } - #parent { - display: table; - width: 100%; - } - #form_login { - display:table;/* shrinks to fit content */ - margin:auto; - } #timer_countdown:before { content: "{{ .Data.CaptchaSec }}"; animation: {{ .Data.CaptchaSec }}s 1s forwards timer_countdown_frames; @@ -57,12 +7,10 @@ @keyframes timer_countdown_frames { {{ range .Data.Frames -}}{{ . | css }}{{ end -}} } - .captcha-img { transition: transform .2s; } - .captcha-img:hover { transform: scale(2.5); } </style> -</head> -<body class="bg"> +{{ end }} +{{ define "content" }} <div id="parent"> <div class="container" id="form_login"> <div class="row"> @@ -198,6 +146,4 @@ </div> </div> </div> - -</body> -</html>{{ end }} -\ No newline at end of file +{{ end }} +\ No newline at end of file diff --git a/pkg/web/public/views/pages/standalone/index.gohtml b/pkg/web/public/views/pages/standalone/index.gohtml @@ -0,0 +1,63 @@ +{{ define "base" }}<!DOCTYPE html><html lang="en"><head> + {{ .LogoASCII }} + {{ .VersionHTML }} + {{ .ShaHTML }} + <link href="/public/img/favicon.ico" rel="icon" type="image/x-icon" /> + <meta charset="UTF-8" /> + <meta name="author" content="n0tr1v"> + <meta name="keywords" content="{{ block "keywords" . }}{{ .BaseKeywords }}{{ end }}"/> + <meta name="subject" content=""> + <meta name="description" content="{{ block "meta-description" . }}{{ end }}" /> + <meta name="classification" content=""> + <meta name="distribution" content=""> + <meta name="robots" content="all" /> + <meta name="language" content="English"> + <meta name="revisit-after" content="1 days"> + <meta http-equiv="expires" content="0"> + <meta http-equiv="pragma" content="no-cache"> + <title>{{ block "title" . }}DarkForest{{ end }}</title> + {{ block "canonical-link" . }}{{ end }} + <link rel="stylesheet" type="text/css" href="/public/css/bootstrap.min.css?v={{ .VERSION }}" /> + <link rel="stylesheet" type="text/css" href="/public/css/style.css?v={{ .VERSION }}" /> + + <style> + body, html { + height: 100%; + display:table; + width:100%; + } + body { + display:table-cell; + vertical-align:middle; + } + .bg { + /* The image used */ + background-image: url({{ .WallpaperImg }}); + + /* Full height */ + height: 100%; + + /* Center and scale the image nicely */ + background-position: center; + background-repeat: no-repeat; + background-size: cover; + } + #parent { + display: table; + width: 100%; + } + #form_login { + display:table;/* shrinks to fit content */ + margin:auto; + } + .captcha-img { transition: transform .2s; } + .captcha-img:hover { transform: scale(2.5); } + </style> + {{ block "extra-head" . }}{{ end }} +</head> +<body class="bg"> + +{{ block "content" . }}{{ end }} + +</body> +</html>{{ end }} +\ No newline at end of file diff --git a/pkg/web/public/views/pages/standalone/login.gohtml b/pkg/web/public/views/pages/standalone/login.gohtml @@ -1,64 +1,4 @@ -{{ define "base" }}<!DOCTYPE html><html lang="en"><head> - {{ .LogoASCII }} - {{ .VersionHTML }} - {{ .ShaHTML }} - <link href="/public/img/favicon.ico" rel="icon" type="image/x-icon" /> - <meta charset="UTF-8" /> - <meta name="author" content="n0tr1v"> - <meta name="keywords" content="{{ block "keywords" . }}{{ .BaseKeywords }}{{ end }}"/> - <meta name="subject" content=""> - <meta name="description" content="{{ block "meta-description" . }}{{ end }}" /> - <meta name="classification" content=""> - <meta name="distribution" content=""> - <meta name="robots" content="all" /> - <meta name="language" content="English"> - <meta name="revisit-after" content="1 days"> - <meta http-equiv="expires" content="0"> - <meta http-equiv="pragma" content="no-cache"> - <title>{{ block "title" . }}DarkForest{{ end }}</title> - {{ block "canonical-link" . }}{{ end }} - <link rel="stylesheet" type="text/css" href="/public/css/bootstrap.min.css?v={{ .VERSION }}" /> - <link rel="stylesheet" type="text/css" href="/public/css/style.css?v={{ .VERSION }}" /> - - <style> - body, html { - height: 100%; - display:table; - width:100%; - } - body { - display:table-cell; - vertical-align:middle; - } - .bg { - /* The image used */ - background-image: url({{ .WallpaperImg }}); - - /* Full height */ - height: 100%; - - /* Center and scale the image nicely */ - background-position: center; - background-repeat: no-repeat; - background-size: cover; - } - #parent { - display: table; - width: 100%; - } - #form_login { - display:table;/* shrinks to fit content */ - margin:auto; - } - .captcha-img { - transition: transform .2s; /* Animation */ - } - .captcha-img:hover { - transform: scale(2.5); - } - </style> -</head> -<body class="bg"> +{{ define "content" }} <div id="parent"> <div class="container" id="form_login"> @@ -124,5 +64,4 @@ </div> </div> -</body> -</html>{{ end }} -\ No newline at end of file +{{ end }} +\ No newline at end of file diff --git a/pkg/web/public/views/pages/standalone/signup-invite.gohtml b/pkg/web/public/views/pages/standalone/signup-invite.gohtml @@ -1,59 +1,4 @@ -{{ define "base" }}<!DOCTYPE html><html lang="en"><head> - {{ .LogoASCII }} - {{ .VersionHTML }} - {{ .ShaHTML }} - <link href="/public/img/favicon.ico" rel="icon" type="image/x-icon" /> - <meta charset="UTF-8" /> - <meta name="author" content="n0tr1v"> - <meta name="keywords" content="{{ block "keywords" . }}{{ .BaseKeywords }}{{ end }}"/> - <meta name="subject" content=""> - <meta name="description" content="{{ block "meta-description" . }}{{ end }}" /> - <meta name="classification" content=""> - <meta name="distribution" content=""> - <meta name="robots" content="all" /> - <meta name="language" content="English"> - <meta name="revisit-after" content="1 days"> - <meta http-equiv="expires" content="0"> - <meta http-equiv="pragma" content="no-cache"> - <title>{{ block "title" . }}DarkForest{{ end }}</title> - {{ block "canonical-link" . }}{{ end }} - <link rel="stylesheet" type="text/css" href="/public/css/bootstrap.min.css?v={{ .VERSION }}" /> - <link rel="stylesheet" type="text/css" href="/public/css/style.css?v={{ .VERSION }}" /> - - <style> - body, html { - height: 100%; - display:table; - width:100%; - } - body { - display:table-cell; - vertical-align:middle; - } - .bg { - /* The image used */ - background-image: url({{ .WallpaperImg }}); - - /* Full height */ - height: 100%; - - /* Center and scale the image nicely */ - background-position: center; - background-repeat: no-repeat; - background-size: cover; - } - #parent { - display: table; - width: 100%; - } - #form_login { - display:table;/* shrinks to fit content */ - margin:auto; - } - </style> -</head> -<body class="bg"> - +{{ define "content" }} <div id="parent"> <div class="container" id="form_login"> <div class="row"> @@ -74,6 +19,4 @@ </div> </div> </div> - -</body> -</html>{{ end }} -\ No newline at end of file +{{ end }} +\ No newline at end of file diff --git a/pkg/web/public/views/pages/standalone/signup.gohtml b/pkg/web/public/views/pages/standalone/signup.gohtml @@ -1,68 +1,16 @@ -{{ define "base" }}<!DOCTYPE html><html lang="en"><head> - {{ .LogoASCII }} - {{ .VersionHTML }} - {{ .ShaHTML }} - <link href="/public/img/favicon.ico" rel="icon" type="image/x-icon" /> - <meta charset="UTF-8" /> - <meta name="author" content="n0tr1v"> - <meta name="keywords" content="{{ block "keywords" . }}{{ .BaseKeywords }}{{ end }}"/> - <meta name="subject" content=""> - <meta name="description" content="{{ block "meta-description" . }}{{ end }}" /> - <meta name="classification" content=""> - <meta name="distribution" content=""> - <meta name="robots" content="all" /> - <meta name="language" content="English"> - <meta name="revisit-after" content="1 days"> - <meta http-equiv="expires" content="0"> - <meta http-equiv="pragma" content="no-cache"> - <title>{{ block "title" . }}DarkForest{{ end }}</title> - {{ block "canonical-link" . }}{{ end }} - <link rel="stylesheet" type="text/css" href="/public/css/bootstrap.min.css?v={{ .VERSION }}" /> - <link rel="stylesheet" type="text/css" href="/public/css/style.css?v={{ .VERSION }}" /> - +{{ define "extra-head" }} <style> - body, html { - height: 100%; - display:table; - width:100%; - } - body { - display:table-cell; - vertical-align:middle; - } - .bg { - /* The image used */ - background-image: url({{ .WallpaperImg }}); - - /* Full height */ - height: 100%; - - /* Center and scale the image nicely */ - background-position: center; - background-repeat: no-repeat; - background-size: cover; - } - #parent { - display: table; - width: 100%; - } - #form_login { - display:table;/* shrinks to fit content */ - margin:auto; - } #timer_countdown:before { content: "{{ .Data.CaptchaSec }}"; animation: {{ .Data.CaptchaSec }}s 1s forwards timer_countdown_frames; } @keyframes timer_countdown_frames { - {{ range .Data.Frames -}}{{ . | css }}{{ end -}} + {{ range .Data.Frames -}}{{ . | css }}{{ end -}} } - .captcha-img { transition: transform .2s; } - .captcha-img:hover { transform: scale(2.5); } </style> -</head> -<body class="bg"> +{{ end }} +{{ define "content" }} <div id="parent"> <div class="container" id="form_login"> <div class="row"> @@ -121,6 +69,4 @@ </div> </div> </div> - -</body> -</html>{{ end }} -\ No newline at end of file +{{ end }} +\ No newline at end of file diff --git a/pkg/web/public/views/pages/standalone/wait.gohtml b/pkg/web/public/views/pages/standalone/wait.gohtml @@ -1,68 +1,18 @@ -{{ define "base" }}<!DOCTYPE html><html lang="en"><head> - {{ .LogoASCII }} - {{ .VersionHTML }} - {{ .ShaHTML }} - <link href="/public/img/favicon.ico" rel="icon" type="image/x-icon" /> - <meta charset="UTF-8" /> - <meta name="author" content="n0tr1v"> - <meta name="keywords" content="{{ block "keywords" . }}{{ .BaseKeywords }}{{ end }}"/> - <meta name="subject" content=""> - <meta name="description" content="{{ block "meta-description" . }}{{ end }}" /> - <meta name="classification" content=""> - <meta name="distribution" content=""> - <meta name="robots" content="all" /> - <meta name="language" content="English"> - <meta name="revisit-after" content="1 days"> - <meta http-equiv="expires" content="0"> - <meta http-equiv="pragma" content="no-cache"> - <title>{{ block "title" . }}DarkForest{{ end }}</title> - {{ block "canonical-link" . }}{{ end }} - <link rel="stylesheet" type="text/css" href="/public/css/bootstrap.min.css?v={{ .VERSION }}" /> - <link rel="stylesheet" type="text/css" href="/public/css/style.css?v={{ .VERSION }}" /> - <link rel="stylesheet" type="text/css" href="/public/css/{{ .Data.WaitToken }}/signup.css?v={{ .VERSION }}" /> - <meta http-equiv="refresh" content="{{ .Data.WaitTime }}"> - - <style> - body, html { - height: 100%; - display:table; - width:100%; - } - body { - display:table-cell; - vertical-align:middle; - } - .bg { - /* The image used */ - background-image: url({{ .WallpaperImg }}); - - /* Full height */ - height: 100%; - - /* Center and scale the image nicely */ - background-position: center; - background-repeat: no-repeat; - background-size: cover; - } - #parent { - display: table; - width: 100%; - } - #form_login { - display:table;/* shrinks to fit content */ - margin:auto; - } - #timer_countdown:before { - content: "{{ .Data.WaitTime }}"; - animation: {{ .Data.WaitTime }}s 1s forwards timer_countdown_frames; - } - @keyframes timer_countdown_frames { - {{ range .Data.Frames -}}{{ . | css }}{{ end -}} - } - </style> -</head> -<body class="bg"> +{{ define "extra-head" }} +<link rel="stylesheet" type="text/css" href="/public/css/{{ .Data.WaitToken }}/signup.css?v={{ .VERSION }}" /> +<meta http-equiv="refresh" content="{{ .Data.WaitTime }}"> +<style> + #timer_countdown:before { + content: "{{ .Data.WaitTime }}"; + animation: {{ .Data.WaitTime }}s 1s forwards timer_countdown_frames; + } + @keyframes timer_countdown_frames { + {{ range .Data.Frames -}}{{ . | css }}{{ end -}} + } +</style> +{{ end }} +{{ define "content" }} <div id="parent"> <div class="container" id="form_login"> <div class="row"> @@ -75,5 +25,4 @@ <div class="div_1"></div> <div class="div_2"></div> <div class="div_f0">a</div> -</body> -</html>{{ end }} -\ No newline at end of file +{{ end }} +\ No newline at end of file