aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/static/microawesome.woffbin0 -> 2412 bytes
-rw-r--r--data/static/style.css181
-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
6 files changed, 251 insertions, 0 deletions
diff --git a/data/static/microawesome.woff b/data/static/microawesome.woff
new file mode 100644
index 0000000..50e8fcc
--- /dev/null
+++ b/data/static/microawesome.woff
Binary files differ
diff --git a/data/static/style.css b/data/static/style.css
new file mode 100644
index 0000000..aaf6dd1
--- /dev/null
+++ b/data/static/style.css
@@ -0,0 +1,181 @@
+@font-face {
+ font-family: "microawesome";
+ src: url("microawesome.woff") format("woff");
+}
+
+html {
+ margin: 0;
+ padding: 0;
+ background: #3a3a3a;
+ color: #f8f8f8;
+ font-family: sans-serif;
+ font-size: 14pt;
+}
+body {
+ margin: 20px auto 10px;
+ width: 85ch;
+ max-width: 95%;
+}
+a {
+ text-decoration: none;
+}
+a:link {
+ color: #7cafc2;
+}
+a:link:hover {
+ color: #9abecb;
+}
+a:visited {
+ color: #ba8baf;
+}
+a:visited:hover {
+ color: #c7a9c0;
+}
+
+pre {
+ background: #2d2d2d;
+ color: #d3d0c8;
+ padding: 10px;
+ border-radius: 4px;
+ overflow-x: auto;
+}
+code {
+ background: #2d2d2d;
+ color: #d3d0c8;
+ border-radius: 4px;
+ padding: 2px 3px 2px;
+ font-size: 85%
+}
+pre code {
+ padding: 0;
+ font-size: 100%;
+}
+
+header {
+ border-bottom: 1px solid #515151;
+ margin: 0 0 5mm;
+ padding-bottom: 3mm;
+}
+
+header h1 {
+ font-family: monospace;
+ margin: 0;
+ font-size: 1.2rem;
+}
+
+header h1 a {
+ text-decoration: none;
+}
+
+footer {
+ text-align: center;
+ font-size: 0.75rem;
+ margin: 10mm 0 15mm;
+ border-top: 1px solid #515151;
+ padding-top: 5mm;
+}
+
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0,0,0,0);
+ border: 0;
+}
+
+/* Tag list */
+.tags {
+ list-style: none;
+ padding: 0;
+}
+.tags li {
+ margin-right: 5mm;
+ display: inline-block;
+}
+.tags li:last-child {
+ margin-right: 0;
+}
+
+.tags li a {
+ text-decoration: none;
+}
+
+.tags li a:before {
+ font: "tag";
+ content: "\f02b";
+ margin-right: 2mm;
+ font-size: 80%
+}
+
+.description {
+ font-style: italic;
+ font-family: serif;
+ padding-left: 5mm;
+}
+
+.shortdesc {
+ font-style: italic;
+ color: #d3d0c8;
+}
+.linkicon {
+ margin-right: 1.5mm;
+}
+.links {
+ list-style: none;
+ padding: 0;
+}
+.links li {
+ display: inline-block;
+ margin-right: 8mm;
+}
+.links li:last-child {
+ margin-right: 0;
+}
+.links li a:before {
+ font-family: "microawesome";
+ margin-right: 2mm;
+ font-size: 80%;
+ content: "\f08e";
+}
+.links li.github a:before{content:"\f09b"}
+.links li.rss a:before{content:"\f09e"}
+.links li.code a:before{content:"\f121"}
+.links li.fork a:before{content:"\f126"}
+.links li.mail a:before{content:"\f2b6"}
+
+#readme {
+ border: 1px dotted #2a2a2a;
+ padding: 2mm;
+}
+.tagcloud {
+ list-style: none;
+ padding: 0;
+}
+.tagcloud li {
+ display: inline;
+}
+.tagcloud-5 {font-size: 130%}
+.tagcloud-4 {font-size: 110%}
+.tagcloud-3 {font-size: 95%}
+.tagcloud-2 {font-size: 80%}
+.tagcloud-1 {font-size: 70%}
+
+h1 {font-size: 150%}
+h2 {font-size: 140%}
+h3 {font-size: 130%}
+h4 {font-size: 120%}
+h5 {font-size: 110%}
+h6 {font-size: 105%}
+section h1 {font-size: 120%}
+section h2 {font-size: 112%}
+section h3 {font-size: 104%}
+section h4 {font-size: 96%}
+section h5 {font-size: 88%}
+section h6 {font-size: 84%}
+
+@media screen and (max-width: 640px) {
+ html {font-size: 12pt}
+}
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}}