Tutorial 50
Write some static content.
Example
// Copyright (c) 2025 worldiety GmbH
//
// This file is part of the NAGO Low-Code Platform.
// Licensed under the terms specified in the LICENSE file.
//
// SPDX-License-Identifier: Custom-License
package main
import (
"github.com/worldiety/enum"
"github.com/worldiety/option"
"go.wdy.de/nago/application"
"go.wdy.de/nago/application/settings"
"go.wdy.de/nago/pkg/std"
"go.wdy.de/nago/presentation/core"
heroSolid "go.wdy.de/nago/presentation/icons/hero/solid"
"go.wdy.de/nago/presentation/ui"
"go.wdy.de/nago/web/vuejs"
"time"
)
type TestModulSettings struct {
_ any `title:"Test Modul" description:"Super Test Module als globales Setting."`
Some string
Stuff string
Flag bool
Color ui.Color
}
func (t TestModulSettings) GlobalSettings() bool {
return true
}
var _ = enum.Variant[settings.GlobalSettings, TestModulSettings]()
func main() {
application.Configure(func(cfg *application.Configurator) {
cfg.SetApplicationID("de.worldiety.tutorial_50")
cfg.Serve(vuejs.Dist())
option.MustZero(cfg.StandardSystems())
option.Must(cfg.SettingsManagement())
std.Must(std.Must(cfg.UserManagement()).UseCases.EnableBootstrapAdmin(time.Now().Add(time.Hour), "8fb8724f-e604-444c-9671-58d07dd76164"))
cfg.SetDecorator(cfg.NewScaffold().
Logo(ui.Image().Embed(heroSolid.AcademicCap).Frame(ui.Frame{}.Size(ui.L96, ui.L96))).
Decorator())
cfg.RootView(".", cfg.DecorateRootView(func(wnd core.Window) core.View {
return ui.Text("hello world")
}))
}).Run()
}
Info
More static content.