diff options
Diffstat (limited to 'src/http')
-rw-r--r-- | src/http/http.go | 4 | ||||
-rw-r--r-- | src/http/posts.go | 2 | ||||
-rw-r--r-- | src/http/tpl/image.html | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/http/http.go b/src/http/http.go index 11b4976..addc685 100644 --- a/src/http/http.go +++ b/src/http/http.go @@ -129,7 +129,7 @@ type api struct { redirectTpl *template.Template auther Auther urlBuilder render.URLBuilder - postPreprocessFuncs postPreprocessFuncs + postPreprocessFuncs post.PreprocessFunctions } // New initializes and returns a new API instance, including setting up all @@ -157,7 +157,7 @@ func New(params Params) (API, error) { ), } - a.postPreprocessFuncs = newPostPreprocessFuncs(a.urlBuilder) + a.postPreprocessFuncs = NewPostPreprocessFuncs(a.urlBuilder) a.redirectTpl = mustParseTpl(template.New(""), "redirect.html") a.srv = &http.Server{Handler: a.handler()} diff --git a/src/http/posts.go b/src/http/posts.go index 5a295a7..30c4012 100644 --- a/src/http/posts.go +++ b/src/http/posts.go @@ -23,7 +23,7 @@ type postPreprocessFuncs struct { imageTpl *template.Template } -func newPostPreprocessFuncs(urlBuilder render.URLBuilder) postPreprocessFuncs { +func NewPostPreprocessFuncs(urlBuilder render.URLBuilder) post.PreprocessFunctions { imageTpl := template.New("image.html") imageTpl = template.Must(imageTpl.Parse(mustReadTplFile("image.html"))) return postPreprocessFuncs{urlBuilder, imageTpl} diff --git a/src/http/tpl/image.html b/src/http/tpl/image.html index 7778625..2484e4c 100644 --- a/src/http/tpl/image.html +++ b/src/http/tpl/image.html @@ -3,6 +3,7 @@ <img src="{{ .RootURL.Asset .ID }}{{ if .Resizable }}?w=800{{ end }}" alt="{{ .Descr }}" + style="width: 800px;" /> </a> </div> |