diff --git a/comics.go b/comics.go index 1ee84f7..a704faf 100644 --- a/comics.go +++ b/comics.go @@ -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() diff --git a/manager.go b/manager.go index e4bdfb7..55af5c6 100644 --- a/manager.go +++ b/manager.go @@ -73,6 +73,8 @@ func managerIndexView(w http.ResponseWriter, r * http.Request) { }) } + context.SiteURL = options.SiteURL + err = executeTemplate(w, "manager", context) } diff --git a/templates/manager.html b/templates/manager.html index 689c4ab..cb43f65 100644 --- a/templates/manager.html +++ b/templates/manager.html @@ -5,6 +5,11 @@

{{ .UserName }} <Logout>

+
+ +

<Site>

+
+
{{ end }} diff --git a/templates/static/css/manager.css b/templates/static/css/manager.css index b3928d8..c4d0edc 100644 --- a/templates/static/css/manager.css +++ b/templates/static/css/manager.css @@ -24,7 +24,7 @@ background-color: #282828; } -.publish-button { +.site-button { margin-left: auto; }