-
Notifications
You must be signed in to change notification settings - Fork 23
/
article.go
33 lines (31 loc) · 1.08 KB
/
article.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package html5
const (
articleTmpl = `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ if .Generator }}<meta name="generator" content="{{ .Generator }}">
{{ end }}{{ if .Description }}<meta name="description" content="{{ .Description }}">
{{ end }}{{ if .Authors }}<meta name="author" content="{{ .Authors }}">
{{ end }}{{ range $css := .CSS }}<link type="text/css" rel="stylesheet" href="{{ $css }}">
{{ end }}<title>{{ .Title }}</title>
</head>
<body{{ if .ID }} id="{{ .ID }}"{{ end }} class="{{ .Doctype }}{{ if .Roles }} {{ .Roles }}{{ end }}">
{{ if .IncludeHTMLBodyHeader }}{{ .Header }}{{ end }}<div id="content">
{{ .Content }}</div>
{{ if .IncludeHTMLBodyFooter }}<div id="footer">
<div id="footer-text">
{{ if .RevNumber }}Version {{ .RevNumber }}<br>
{{ end }}Last updated {{ .LastUpdated }}
</div>
</div>
{{ end }}</body>
</html>
`
articleHeaderTmpl = `<div id="header">
<h1>{{ .Header }}</h1>
{{ if.Details }}{{ .Details }}{{ end }}</div>
`
)