Add the ability to include a CSS sheet link.
The output page no states Package Set rather than just Package.
This commit is contained in:
parent
012d464128
commit
2e5c296a7c
@ -5,6 +5,7 @@ import "golang.captainalm.com/GOPackageHeaderServer/outputMeta"
|
||||
type ZoneYaml struct {
|
||||
Name string `yaml:"name"`
|
||||
Domains []string `yaml:"domains"`
|
||||
CssURL string `yaml:"cssURL"`
|
||||
HavePageContents bool `yaml:"havePageContents"`
|
||||
BasePath string `yaml:"basePath"`
|
||||
UsernameProvided bool `yaml:"usernameProvided"`
|
||||
|
@ -8,6 +8,7 @@ listen: #HTTP server settings
|
||||
zones: #An array of zones
|
||||
- name: test #The name of the package set
|
||||
domains: ["localhost:8080"] #An array of domains this package set use (Each domain can only be registered with one zone)
|
||||
cssURL: "http://localhost/sheet.css" #A URL to the CSS file to use for outputted pages (If blank or not provided, no CSS is included)
|
||||
havePageContents: true #Output a header and link to the target repo
|
||||
basePath: "localhost" #The base-path, also known as, package name
|
||||
basePrefixURL: "http://localhost" #The base git URL
|
||||
|
@ -1,8 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{{ if .PageHandler.OutputPage }}
|
||||
{{ if isNotEmpty .PageHandler.Name }}
|
||||
<title>Go Package: {{ .PageHandler.Name }}</title>
|
||||
<title>Go Package Set: {{ .PageHandler.Name }}</title>
|
||||
{{ end }}
|
||||
{{ if isNotEmpty .PageHandler.CSS }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ .PageHandler.CSS }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<meta name="go-import" content="{{ .GetGoImportMetaContent }}">
|
||||
<meta name="go-source" content="{{ .GetGoSourceMetaContent }}">
|
||||
@ -10,7 +15,7 @@
|
||||
<body>
|
||||
{{ if .PageHandler.OutputPage }}
|
||||
{{ if isNotEmpty .PageHandler.Name }}
|
||||
<h1>Go Package: {{ .PageHandler.Name }}</h1>
|
||||
<h1>Go Package Set: {{ .PageHandler.Name }}</h1>
|
||||
{{ end }}
|
||||
<a href="{{ .GetLink }}">{{ .GetLink }}</a>
|
||||
{{ end }}
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
|
||||
type PageHandler struct {
|
||||
Name string
|
||||
CSS string
|
||||
OutputPage bool
|
||||
MetaOutput *outputMeta.PackageMetaTagOutputter
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ func New(yaml conf.ConfigYaml) (*http.Server, map[string]*PageHandler) {
|
||||
for _, zc := range yaml.Zones {
|
||||
currentPage := &PageHandler{
|
||||
Name: zc.Name,
|
||||
CSS: zc.CssURL,
|
||||
OutputPage: zc.HavePageContents,
|
||||
MetaOutput: zc.GetPackageMetaTagOutputter(),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user