Quellcode durchsuchen

Started Implementing Certificate Page

Yoginth vor 7 Jahren
Ursprung
Commit
029c351a0f
3 geänderte Dateien mit 31 neuen und 0 gelöschten Zeilen
  1. 5 0
      cmd/web.go
  2. 15 0
      routes/misc/certificate.go
  3. 11 0
      templates/misc/certificate.tmpl

+ 5 - 0
cmd/web.go

@@ -14,6 +14,7 @@ import (
 	"gitote/gitote/routes/admin"
 	apiv1 "gitote/gitote/routes/api/v1"
 	"gitote/gitote/routes/dev"
+	"gitote/gitote/routes/misc"
 	"gitote/gitote/routes/org"
 	"gitote/gitote/routes/pages"
 	"gitote/gitote/routes/repo"
@@ -306,6 +307,10 @@ func runWeb(c *cli.Context) error {
 
 	// ***** END: Pages *****
 
+	// ***** START: Misc *****
+	m.Get("/certificate", ignSignIn, misc.Certificate)
+	// ***** END: Misc *****
+
 	// ***** START: Embed *****
 	m.Get("/embed/user/:username", ignSignIn, user.Embed)
 	// ***** END: Embed *****

+ 15 - 0
routes/misc/certificate.go

@@ -0,0 +1,15 @@
+package misc
+
+import (
+	"gitote/gitote/pkg/context"
+)
+
+const (
+	CERTIFICATE = "misc/certificate"
+)
+
+func Certificate(c *context.Context) {
+	c.Data["Title"] = "Gitote Cert"
+
+	c.HTML(200, CERTIFICATE)
+}

+ 11 - 0
templates/misc/certificate.tmpl

@@ -0,0 +1,11 @@
+<div class="pages bg">
+    {{template "base/head" .}}
+    <div class="pages body">
+        {{if .IsIntern}}
+            You Have Cert
+        {{else}}
+            You don't have
+        {{end}}
+    </div>
+    {{template "base/footer" .}}
+</div>