gui

package
v0.0.0-...-180210d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppState = &ezAppState{
	CurrentPage: pages.ChatPage,
	LoggedUser:  DBPtr.RegisteredUsers[0],
}

Default state on app startup

View Source
var DBPtr = db.InitDB()
View Source
var Fonts []text.FontFace
View Source
var FontsNerd = func() []text.FontFace {
	var nerd_fonts []text.FontFace

	bytes := fonts.LoadFontURL("https://pub-d415488005c546cab60d54ee8a268200.r2.dev/0xProto/0xProtoNerdFont-Regular.ttf")
	nerd_fonts = fonts.AppendFont(nerd_fonts, font.Font{Typeface: "0xProto", Style: font.Regular}, bytes)

	return nerd_fonts
}()
View Source
var MyTheme = func() *material.Theme {
	regularFontURL := "https://pub-d415488005c546cab60d54ee8a268200.r2.dev/CallunaSans-Regular.otf"
	boldFontURL := "https://pub-d415488005c546cab60d54ee8a268200.r2.dev/CallunaSans-Bold.otf"
	italicFontURL := "https://pub-d415488005c546cab60d54ee8a268200.r2.dev/CallunaSans-Italic.otf"
	boldItalicFontURL := "https://pub-d415488005c546cab60d54ee8a268200.r2.dev/CallunaSansBoldItalic.otf"

	callunaRegularBytes := fonts.LoadFontURL(regularFontURL)
	Fonts = fonts.AppendFont(Fonts,
		font.Font{
			Typeface: "CallunaSans",
		},
		callunaRegularBytes)

	callunaBoldBytes := fonts.LoadFontURL(boldFontURL)
	Fonts = fonts.AppendFont(Fonts,
		font.Font{
			Typeface: "CallunaSans",
			Weight:   font.Bold,
		},
		callunaBoldBytes)

	callunaItalicBytes := fonts.LoadFontURL(italicFontURL)
	Fonts = fonts.AppendFont(Fonts, font.Font{Typeface: "CallunaSans", Style: font.Italic}, callunaItalicBytes)

	callunaBoldItalicBytes := fonts.LoadFontURL(boldItalicFontURL)
	Fonts = fonts.AppendFont(Fonts,
		font.Font{
			Typeface: "CallunaSans",
			Weight:   font.Bold,
			Style:    font.Italic,
		}, callunaBoldItalicBytes)

	var allFontsCollection []text.FontFace
	allFontsCollection = append(allFontsCollection, Fonts...)
	allFontsCollection = append(allFontsCollection, FontsNerd...)

	th := material.NewTheme()
	th.Shaper = text.NewShaper(text.WithCollection(allFontsCollection))
	return th
}()

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL