added site button

This commit is contained in:
TheLastBilly 2023-05-22 12:25:33 -04:00
parent 1ca89931c8
commit bd6fbb2bce
4 changed files with 11 additions and 1 deletions

View File

@ -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()

View File

@ -73,6 +73,8 @@ func managerIndexView(w http.ResponseWriter, r * http.Request) {
})
}
context.SiteURL = options.SiteURL
err = executeTemplate(w, "manager", context)
}

View File

@ -5,6 +5,11 @@
<h1>{{ .UserName }} &ltLogout&gt</h1>
</a>
</div>
<div class="site-button">
<a href="{{ .SiteURL }}">
<h1>&ltSite&gt</h1>
</a>
</div>
</div>
{{ end }}

View File

@ -24,7 +24,7 @@
background-color: #282828;
}
.publish-button {
.site-button {
margin-left: auto;
}