From 026674bc2c4eb5f53bcb38e7efce2fe2dfebe974 Mon Sep 17 00:00:00 2001 From: f0x52 Date: Mon, 13 Sep 2021 14:45:33 +0200 Subject: Thread views on the web (#207) * Webviews for status threads * fix up templates * add ForkAwesome and gotosocial-styling into repo * clean up gotosocial-styling, old styling * update CONTRIBUTING with new css building, and nodemon recommendation * update Dockerfile with new css bundling * those weren't supposed to make it in * upgrade gotosocial-styling deps * update authorize template with main wrapper * update css pipeline * abstract status from thread to avoid copy-pasting * basic CW implementation * fix PR review suggestions * fix no-image-desc icon alignment * remove template loading println * remove println * remove changes to testmodels * reset changes to testmodels --- internal/web/base.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'internal/web/base.go') diff --git a/internal/web/base.go b/internal/web/base.go index eabde676c..2759c3f9e 100644 --- a/internal/web/base.go +++ b/internal/web/base.go @@ -57,13 +57,8 @@ func (m *Module) baseHandler(c *gin.Context) { return } - // FIXME: fill in more variables? c.HTML(http.StatusOK, "index.tmpl", gin.H{ - "instance": instance, - "countUsers": 3, - "countStatuses": 42069, - "version": "1.0.0", - "adminUsername": "@admin", + "instance": instance, }) } @@ -101,6 +96,9 @@ func (m *Module) Route(s router.Router) error { // serve front-page s.AttachHandler(http.MethodGet, "/", m.baseHandler) + // serve statuses + s.AttachHandler(http.MethodGet, "/:user/statuses/:id", m.threadTemplateHandler) + // 404 handler s.AttachNoRouteHandler(m.NotFoundHandler) -- cgit v1.2.3