From c3e64686145b5b2c31e72a182b3f8ff6c3ae3ef9 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 26 Dec 2017 13:04:18 +0100 Subject: Switch to bootstrap --- template/article.tmpl | 12 ++---- template/doc.tmpl | 16 +++++--- template/home.tmpl | 4 +- template/index.tmpl | 23 +++++++---- template/root.tmpl | 107 +++++++++++++++++++++++++------------------------- 5 files changed, 85 insertions(+), 77 deletions(-) (limited to 'template') diff --git a/template/article.tmpl b/template/article.tmpl index 7d38dda..e461ce2 100644 --- a/template/article.tmpl +++ b/template/article.tmpl @@ -5,15 +5,11 @@ {{define "content"}} {{with .Doc}} {{template "doc" .}} - {{with .Related}} -
-

Related articles

+ {{with .Related}} +
Related articles
-
- {{end}} + {{end}} {{end}} {{end}} diff --git a/template/doc.tmpl b/template/doc.tmpl index 26b9624..f82bec4 100644 --- a/template/doc.tmpl +++ b/template/doc.tmpl @@ -24,7 +24,9 @@ {{end}} -{{define "newline"}}{{end}} +{{define "newline"}} +{{/* newline */}} +{{end}} {{define "section"}}

{{.Title}}

@@ -51,21 +53,25 @@ {{end}} {{define "code"}} - {{.Text}} +
{{.Text}}
{{end}} {{define "image"}} - image + image {{end}} {{define "caption"}} -
{{style .Text}}
+
{{style .Text}}
{{end}} {{define "iframe"}} +
+
{{end}} -{{define "link"}}

{{style .Label}}

{{end}} +{{define "link"}} + +{{end}} {{define "html"}}{{.HTML}}{{end}} diff --git a/template/home.tmpl b/template/home.tmpl index ca16bb0..2c622b5 100644 --- a/template/home.tmpl +++ b/template/home.tmpl @@ -4,9 +4,7 @@ {{define "content"}} {{range .Data}} - {{template "doc" .}} + {{template "doc" .}} {{end}} - {{end}} diff --git a/template/index.tmpl b/template/index.tmpl index 843a791..1803dd5 100644 --- a/template/index.tmpl +++ b/template/index.tmpl @@ -3,15 +3,22 @@ {{define "title"}}Article index{{end}} {{define "content"}} -
+

{{template "title"}}

-
+
    {{range .Data}} -
    {{.Title}}
    -
    {{template "time" .Time}} - {{with .Tags}}
    {{range .}}{{.}} {{end}}
    {{end}} -
    +
  • +
    + {{.Title}} + {{with .Tags}} + + {{range .}}{{.}} {{end}} + + {{end}} +
    +
    {{template "time" .Time}}
    +
  • {{end}} -
-
+ +
{{end}} diff --git a/template/root.tmpl b/template/root.tmpl index 831ac72..817662a 100644 --- a/template/root.tmpl +++ b/template/root.tmpl @@ -1,62 +1,65 @@ {{/* This template is combined with other templates to render blog pages. */}} -{{define "ga"}} - -{{end}} - -{{define "aside"}} - -{{end}} - {{define "root" -}} - + {{template "title" .}} - + + - - - + + + + + + + -{{template "ga"}} -{{template "aside" .}} -{{template "content" .}} + + +
+ {{template "content" .}} +
+ + {{with .Doc}} + + {{end}} + + {{end}} @@ -65,14 +68,12 @@

{{.Title}}

-

{{template "time" .Time}}

+ {{template "time" .Time}}
{{.HTML}} - {{with .Authors}} - {{end}}
{{end}} -- cgit v1.2.3