mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-13 11:45:18 +00:00
UI cleanup and changes
This commit is contained in:
9
main.go
9
main.go
@@ -13,6 +13,7 @@ import (
|
||||
"codeberg.org/video-prize-ranch/rimgo/static"
|
||||
"codeberg.org/video-prize-ranch/rimgo/utils"
|
||||
"codeberg.org/video-prize-ranch/rimgo/views"
|
||||
"github.com/aymerick/raymond"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/middleware/filesystem"
|
||||
"github.com/gofiber/fiber/v2/middleware/recover"
|
||||
@@ -41,6 +42,14 @@ func main() {
|
||||
}
|
||||
|
||||
engine := handlebars.NewFileSystem(http.FS(views.GetFiles()), ".hbs")
|
||||
|
||||
engine.AddFunc("noteq", func(a interface{}, b interface{}, options *raymond.Options) interface{} {
|
||||
if raymond.Str(a) != raymond.Str(b) {
|
||||
return options.Fn()
|
||||
}
|
||||
return ""
|
||||
})
|
||||
|
||||
app := fiber.New(fiber.Config{
|
||||
Views: engine,
|
||||
Prefork: utils.Config.FiberPrefork,
|
||||
|
||||
Reference in New Issue
Block a user