aboutsummaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/main.html40
-rw-r--r--data/templates/notfound.html3
-rw-r--r--data/templates/project.html22
-rw-r--r--data/templates/tag.html5
4 files changed, 70 insertions, 0 deletions
diff --git a/data/templates/main.html b/data/templates/main.html
new file mode 100644
index 0000000..73da434
--- /dev/null
+++ b/data/templates/main.html
@@ -0,0 +1,40 @@
+{{define "Projectlist"}}
+ <ul>{{range .}}
+ <li class="projectlist">
+ <a href="/{{.Name}}">{{.Title}}</a>
+ {{if .Shortdesc}}
+ <span class="shortdesc"> — {{.Shortdesc}}</span>
+ {{end}}
+ </li>
+ {{end}}</ul>
+{{end}}
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>{{ if .Title }}{{ .Title }} — {{ end }}code.laria.me</title>
+ {{ if .Description }}<meta name="description" content="{{ .Description }}">{{ end }}
+ {{ if .Tags }}<meta name="keywords" content="{{join .Tags " " }}">{{ end }}
+ <meta name="referrer" content="no-referrer">
+ <link rel="stylesheet" type="text/css" href="/static/style.css">
+</head>
+<body>
+ <header>
+ <h1><a href="/" class="rootlink">code.laria.me</a></h1>
+ </header>
+ {{block "content" .}}
+ <h2>List of projects</h2>
+ {{template "Projectlist" .Projects}}
+
+ <h2>Tags</h2>
+ <ul class="tagcloud">{{range .Tagcloud}}
+ <li class="tagcloud-{{.Size}}"><a href="/tags/{{.Tag}}">{{.Tag}}</a></li>
+ {{end}}</ul>
+ {{end}}
+ <footer>
+ <a href="//hi-im.laria.me/impressum/">Impressum</a>
+ </footer>
+</body>
+</html>
diff --git a/data/templates/notfound.html b/data/templates/notfound.html
new file mode 100644
index 0000000..6099512
--- /dev/null
+++ b/data/templates/notfound.html
@@ -0,0 +1,3 @@
+{{define "content"}}
+404 Not found
+{{end}}
diff --git a/data/templates/project.html b/data/templates/project.html
new file mode 100644
index 0000000..cb5ad5d
--- /dev/null
+++ b/data/templates/project.html
@@ -0,0 +1,22 @@
+{{define "content"}}
+ <h2>{{.Title}}</h2>
+ <p class="description">{{.Description}}</p>
+ <h3 class="sr-only">Links</h3>
+ <ul class="links">
+ {{range .Links}}
+ <li class="{{.Class}}"><a href="{{.Href}}">{{.Title}}</a></li>
+ {{end}}
+ </ul>
+ <h3 class="sr-only">Tags</h3>
+ <ul class="tags">{{range .Tags}}<li class=""><a href="/tags/{{.}}" rel="tag">{{.}}</a></li>{{end}}</ul>
+ {{if .GoGet}}
+ <p class="goget">
+ This project is <code>go get</code>-able: <code>go get code.laria.me/{{.Name}}</code>
+ </p>
+ {{end}}
+ {{if .License}}<p class="license">License: {{.License}}</p>{{end}}
+ {{if .FormattedReadme}}
+ <h3>Readme</h3>
+ <section id="readme">{{.FormattedReadme}}</section>
+ {{end}}
+{{end}}
diff --git a/data/templates/tag.html b/data/templates/tag.html
new file mode 100644
index 0000000..b2736b9
--- /dev/null
+++ b/data/templates/tag.html
@@ -0,0 +1,5 @@
+{{define "content"}}
+ <h2>Tag: {{.Tag}}</h2>
+
+ {{template "Projectlist" .Projects}}
+{{end}}