templating added

This commit is contained in:
Christian Müller
2017-09-09 20:52:39 +02:00
parent 7afa2fc724
commit 8f12a1a691
8 changed files with 63 additions and 74 deletions
-7
View File
@@ -1,7 +0,0 @@
<footer>
<a href="/">&#8962; notehub</a> &middot;
<a href="%LINK%/stats">statistics</a> &middot;
<a href="%LINK%/edit">edit</a> &middot;
<a href="%LINK%/export">export</a> &middot;
<a href="/TOS.md">terms of service</a>
</footer>
-36
View File
@@ -1,36 +0,0 @@
# Demo Note
## Text Formatting
This is a _short_ note demonstrating the **capabilities** of Markdown. [Markdown](http://en.wikipedia.org/wiki/Markdown) is a _markup language_ with plain text
formatting syntax. But you also can use <u>standard HTML</u> tags.
## Backquotes, Lists & Code
This is a backquote:
> _"Our greatest glory is not in never falling but in rising every time we fall."_
> — Confucius
To create simple lists, just enumerate all items using a dash in the prefix:
- Alpha
- Beta
- Gamma
Also you can either mark some special `words` or write entire `code` blocks:
(defn fact [n]
(if (< n 2) 1
(* n (fact (- n 1)))))
## Tables
Also simple tables is a piece of cake:
Column 1 | Column 2 | Column 3
--- | --- | ---
Text 1 | Text 3 | <s>Text 5</s>
Text 2 | Text 4 | <mark>Text 6</mark>
Take a look at the [source code](/Demo.md/export) of this page, to see how it works.
+1 -1
View File
@@ -18,7 +18,7 @@
<article class="bottom-space">
<h2>Changelog</h2>
<ul>
<li><strong>2017-08</strong>: NoteHub 3.0 released: rewritten in Go; all features but essential dropped.</li>
<li><strong>2017-08</strong>: NoteHub 3.0.</li>
<li><strong>2016-03</strong>: Note deletion feature added.</li>
<li><strong>2015-10</strong>: NoteHub rewritten in Node.js.</li>
<li><strong>2015-10</strong>: NoteHub API and note styling discontinued due to low adoption.</li>
+4 -3
View File
@@ -10,6 +10,7 @@ html, body {
color: #b0b0b0;
background: #353a3a;
font-family: monospace;
font-size: 1.1em;
}
#hero {
@@ -36,7 +37,6 @@ html, body {
}
a {
text-decoration: none;
color: #097;
}
@@ -45,7 +45,7 @@ a:hover {
}
a:visited {
color: #075;
color: #086;
}
.button {
@@ -103,7 +103,8 @@ footer a {
}
h1, h2, h3, h4, h5, h6 {
font-weight: 400;
font-weight: bold;
font-family: "Arial";
}
h1 {
-16
View File
@@ -1,16 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>NoteHub &mdash; %TITLE%</title>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<link href="/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
%HEADER%
<article>
%CONTENT%
</article>
%FOOTER%
</body>
</html>
+21
View File
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>NoteHub &mdash; {{.Title}}</title>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<link href="/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<article>
{{.Content}}
</article>
<footer>
<a href="/">&#8962; notehub</a> &middot;
<a href="{{.ID}}/stats">statistics</a> &middot;
<a href="{{.ID}}/edit">edit</a> &middot;
<a href="{{.ID}}/export">export</a> &middot;
<a href="/TOS.md">terms of service</a>
</footer>
</body>
</html>
+19
View File
@@ -0,0 +1,19 @@
{{define "Page"}}
<!DOCTYPE html>
<html>
<head>
<title>NoteHub &mdash; {{.Title}}</title>
<meta charset="UTF-8" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<link href="/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<article>
{{.Content}}
</article>
<footer>
<a href="/">&#8962; notehub</a>
</footer>
</body>
</html>
{{end}}