package put import "github.com/tigorlazuardi/redmage/views" import "github.com/tigorlazuardi/redmage/views/components" type Data struct { PageTitle string PostAction string EditMode bool NameInput NameInputData SlugInput SlugInputData ResolutionX ResolutionData ResolutionY ResolutionData AspectRatioTolerance AspectRatioToleranceData NSFWCheckbox NSFWCheckboxData WindowsWallpaperCheckbox WindowsWallpaperCheckboxData MinImageResolutionXInput ResolutionData MinImageResolutionYInput ResolutionData MaxImageResolutionXInput ResolutionData MaxImageResolutionYInput ResolutionData } templ View(c *views.Context, data Data) { @components.Doctype() { @components.Head(c, components.HeadTitle(data.PageTitle)) @components.Body(c) { @Content(c, data) } } } templ Content(c *views.Context, data Data) {
@components.Container() {

{ data.PageTitle }

@NameInput(data.NameInput) if !data.EditMode { @SlugInput(data.SlugInput) } @ResolutionXInput(data.ResolutionX) @ResolutionYInput(data.ResolutionY)

Filter

@AspectRatioToleranceInput(data.AspectRatioTolerance) @NSFWCheckbox(data.NSFWCheckbox) if !data.EditMode { @WindowsWallpaperCheckbox(data.WindowsWallpaperCheckbox) } @MinImageResolutionXInput(data.MinImageResolutionXInput) @MinImageResolutionYInput(data.MinImageResolutionYInput) @MaxImageResolutionXInput(data.MaxImageResolutionXInput) @MaxImageResolutionYInput(data.MaxImageResolutionYInput)
}
@components.NotificationContainer() }