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 --- static/style.css | 70 ++++++++--------------- template/article.tmpl | 12 ++-- template/doc.tmpl | 16 ++++-- template/home.tmpl | 4 +- template/index.tmpl | 23 +++++--- template/root.tmpl | 107 ++++++++++++++++++------------------ vendor/golang.org/x/tools/README.md | 27 +++++++++ 7 files changed, 136 insertions(+), 123 deletions(-) create mode 100644 vendor/golang.org/x/tools/README.md diff --git a/static/style.css b/static/style.css index 9774886..d0031dd 100644 --- a/static/style.css +++ b/static/style.css @@ -1,69 +1,47 @@ body { - margin: 5% 10%; color: #222; - padding: 1ex 1em; font-family: 'Abel', sans-serif; } -h1, h2, h3, h4, header, footer { +h1, h2, h3, h4, h5, h6, header, footer, .navbar-brand { font-family: 'Raleway', sans-serif; - margin: 2em 0 1em 0; } -h1, h2 { +h1, h2, .navbar-brand { text-shadow: 1px 1px #CCC; } pre, code, kbd { font-family: 'Anonymous Pro', monospace; } +a { + color: #F50; +} +a:hover { + color: #05A; +} pre { line-height: 120%; - font-size: smaller; - border: thin solid #CDE; overflow: auto; + border: thin solid #CDE; padding: 1ex 2ex; } -img, pre { - border-radius: 1ex; -} -time, address, .tags { - font-size: smaller; - color: #999; -} -dd { - padding-bottom: 1em; -} -article a { - color: #05A; -} -a, header a { - color: #F50; - text-decoration: none; -} -aside { - float: right; - padding-left: 1em; - margin: 0 0 1em 2em; - width: 10em; - border-left: thin solid #999; - color: #555; - -} -aside ul { - padding: 0pt; +article, section { + margin-top: 3em; + margin-bottom: 2em; } -aside p, aside ul { - margin: 1em 1ex; +article header { + margin-bottom: 1em; } -aside li { - list-style-type: none; - margin-bottom: 0.5ex; +article footer { + margin-top: 1em; } -article { - margin-bottom: 3em; +time, address { + color: #999; + font-size: small; } -.figcaption { +figcaption { font-style: italic; - margin-bottom: 2em; + margin-bottom: 2ex; } -address { - font-style: italic; +img { + margin-right: 1ex; + margin-bottom: 1ex; } 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}} diff --git a/vendor/golang.org/x/tools/README.md b/vendor/golang.org/x/tools/README.md new file mode 100644 index 0000000..20be9e1 --- /dev/null +++ b/vendor/golang.org/x/tools/README.md @@ -0,0 +1,27 @@ +# Go Tools + +This subrepository holds the source for various packages and tools that support +the Go programming language. + +Some of the tools, `godoc` and `vet` for example, are included in binary Go +distributions. + +Others, including the Go `guru` and the test coverage tool, can be fetched with +`go get`. + +Packages include a type-checker for Go and an implementation of the +Static Single Assignment form (SSA) representation for Go programs. + +## Download/Install + +The easiest way to install is to run `go get -u golang.org/x/tools/...`. You can +also manually git clone the repository to `$GOPATH/src/golang.org/x/tools`. + +## Report Issues / Send Patches + +This repository uses Gerrit for code changes. To learn how to submit changes to +this repository, see https://golang.org/doc/contribute.html. + +The main issue tracker for the tools repository is located at +https://github.com/golang/go/issues. Prefix your issue with "x/tools/(your +subdir):" in the subject line, so it is easy to find. -- cgit v1.2.3