mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 22:02:26 -05:00
new styling for frontpage, update login and authorize templates
This commit is contained in:
parent
82d9f88e42
commit
bcf9fe41c2
18 changed files with 873 additions and 60 deletions
|
|
@ -151,6 +151,22 @@ func New(config *config.Config, logger *logrus.Logger) (Router, error) {
|
|||
logger.Debugf("loading templates from %s", tmPath)
|
||||
engine.LoadHTMLGlob(tmPath)
|
||||
|
||||
// serve static files from /assets
|
||||
// FIXME: why doesn't this config var work??
|
||||
// assetPath := filepath.Join(cwd, config.TemplateConfig.AssetBaseDir);
|
||||
engine.Static("/assets", "./web/assets");
|
||||
|
||||
// FIXME: actual variables
|
||||
engine.GET("/", func(c *gin.Context) {
|
||||
c.HTML(http.StatusOK, "index.tmpl", gin.H{
|
||||
"instancename": "GoToSocial Test Instance",
|
||||
"countUsers": 3,
|
||||
"countStatuses": 42069,
|
||||
"version": "1.0.0",
|
||||
"adminUsername": "@admin",
|
||||
})
|
||||
});
|
||||
|
||||
// create the actual http server here
|
||||
s := &http.Server{
|
||||
Handler: engine,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue