diff options
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/index.gohtml | 35 | ||||
-rw-r--r-- | tpl/package.gohtml | 28 |
2 files changed, 63 insertions, 0 deletions
diff --git a/tpl/index.gohtml b/tpl/index.gohtml new file mode 100644 index 0000000..ff17475 --- /dev/null +++ b/tpl/index.gohtml @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> + <head> + <title>{{ .Title }}</title> + <link rel="stylesheet" href="/static/styles.css"> + <script type="application/javascript" src="/static/clipboard.js"></script> + </head> + <body class="Site"> + <header class="Site-header"> + <div class="Header"> + <nav class="Header-nav"> + <a href="/"> + {{ .Title }} + </a> + </nav> + </div> + </header> + <main class="SiteContent SiteContent--default"> + <article> + <h1>Пакеты</h1> + <ul> + {{range .Packages}} + <li> + <p> + <b>{{ .Pkg }}</b> <a href="{{ $.Doc }}{{ $.Host }}/{{ .Pkg }}">[Документация]</a> <a href="{{ .Repo }}">[Репозиторий]</a> + </p> + <code>go get {{ $.Host }}/{{ .Pkg }}</code><a href="#" class="copyToClipboard" data-text="go get {{ $.Host }}/{{ .Pkg }}">[Скопировать]</a> + <p>{{ .Description }}</p> + </li> + {{end}} + </ul> + </article> + </main> + </body> +</html> diff --git a/tpl/package.gohtml b/tpl/package.gohtml new file mode 100644 index 0000000..4ab4e16 --- /dev/null +++ b/tpl/package.gohtml @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html> + <head> + <meta name="go-import" content="{{ .Host }}/{{ .Package.Pkg }} {{ .Package.VCS }} {{ .Package.Repo }}"> + <meta name="go-source" content="{{ .Host }}/{{ .Package.Pkg }} {{ .Package.Repo }} {{ .Package.Repo }}/tree/master{/dir} {{ .Package.Repo }}/tree/master{/dir}/{file}#L{line}"> + <meta http-equiv="refresh" content="0; url={{ .Doc }}{{ .Host }}/{{ .Package.Pkg }}"> + <title>{{ .Title }}</title> + <link rel="stylesheet" href="/static/styles.css"> + </head> + <body class="Site"> + <header class="Site-header"> + <div class="Header"> + <nav class="Header-nav"> + <a href="/"> + {{ .Title }} + </a> + </nav> + </div> + </header> + <main class="SiteContent SiteContent--default"> + <article> + <h1>{{ .Package.Pkg }}</h1> + <p>{{ .Package.Description }}</p> + Переход к <a href="{{ .Doc }}{{ .Host }}/{{ .Package.Pkg }}">документации</a>... + </article> + </main> + </body> +</html> |