added site button
This commit is contained in:
parent
1ca89931c8
commit
bd6fbb2bce
|
@ -45,6 +45,7 @@ type Options struct {
|
|||
ImagePath string
|
||||
RunManager bool
|
||||
UploadSize int64
|
||||
SiteURL string
|
||||
}
|
||||
|
||||
type Comic struct {
|
||||
|
@ -72,6 +73,7 @@ type Context struct {
|
|||
Last int
|
||||
Title string
|
||||
UserName string
|
||||
SiteURL string
|
||||
}
|
||||
|
||||
type Err struct {
|
||||
|
@ -89,6 +91,7 @@ func (o * Options) Parse() error {
|
|||
flag.StringVar(&o.ImagePath, "i", "", "Image path for new comic")
|
||||
flag.BoolVar(&o.RunManager, "r", false, "Runs the content manager instead of the site")
|
||||
flag.Int64Var(&o.UploadSize, "z", 10, "Max upload size for posts")
|
||||
flag.StringVar(&o.SiteURL, "0", "https://comics.blackram.works", "URL of the site once deployed")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
|
|
|
@ -73,6 +73,8 @@ func managerIndexView(w http.ResponseWriter, r * http.Request) {
|
|||
})
|
||||
}
|
||||
|
||||
context.SiteURL = options.SiteURL
|
||||
|
||||
err = executeTemplate(w, "manager", context)
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
<h1>{{ .UserName }} <Logout></h1>
|
||||
</a>
|
||||
</div>
|
||||
<div class="site-button">
|
||||
<a href="{{ .SiteURL }}">
|
||||
<h1><Site></h1>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
background-color: #282828;
|
||||
}
|
||||
|
||||
.publish-button {
|
||||
.site-button {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue