shared

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

templ: version: v0.3.924

templ: version: v0.3.924

templ: version: v0.3.924

templ: version: v0.3.924

templ: version: v0.3.924

templ: version: v0.3.924

templ: version: v0.3.924

templ: version: v0.3.924

templ: version: v0.3.924

templ: version: v0.3.924

templ: version: v0.3.924

templ: version: v0.3.924

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPageHeader deprecated

func DefaultPageHeader() component.Header

DefaultPageHeader is the default header for all pages.

TODO: rename to NewPageHeader.

Deprecated: not using this.

func NewChampionSprite

func NewChampionSprite(championID int, size component.TextSize) component.Sprite

func NewExtraMenu

func NewExtraMenu() component.Popover

func NewHomePage

func NewHomePage() component.Page

func NewItemSprite

func NewItemSprite(itemID int, size component.TextSize) component.Sprite

Note: size is only for future compatibility, currently not used.

func NewLoadingModal

func NewLoadingModal() component.ModalLayout

NewLoadingModal is a generic modal used when loading data.

func NewPageFooter

func NewPageFooter() component.Component

NewPageFooter is the default footer for all pages.

func NewSummonerSearchBar

func NewSummonerSearchBar() component.Component

func NewSummonerSpellSprite

func NewSummonerSpellSprite(summonerID int, size component.TextSize) component.Sprite

Note: size is only for future compatibility, currently not used.

func NewWardSprite

func NewWardSprite(wardID int, size component.TextSize) component.Sprite

Note: size is only for future compatibility, currently not used.

func PageHeader(ctx context.Context) templ.Component

func RegionPanel

func RegionPanel() component.PanelWindow

Types

type CSWidget

type CSWidget struct {
	CS int

	CSPerMinute float32

	AlignRight bool
}

func NewCSWidget

func NewCSWidget(cs int, cspm float32) CSWidget

func (CSWidget) ToTempl

func (m CSWidget) ToTempl(ctx context.Context) templ.Component

type ChampionWidget

type ChampionWidget struct {
	ChampionSprite component.Sprite

	// ChampionLevel is the level of the champion at the end of a match.
	// Zero values indicate that level is not included in the component.
	ChampionLevel int

	// SummonerD and SummonerF are summoner spells. Nil values indicate
	// that summoner spells is not be included in the component.
	SummonerD, SummonerF *component.Sprite
}

ChampionWidget displays a champion icon and summoner spells. Deprecated: not using

func NewLiveChampionWidget

func NewLiveChampionWidget(championID int, summonerIDs [2]int) ChampionWidget

func NewMatchChampionWidget

func NewMatchChampionWidget(championID int, championLevel int, summonerIDs [2]int) ChampionWidget

func NewSimpleChampionWidget

func NewSimpleChampionWidget(championID int) ChampionWidget

func (ChampionWidget) ToTempl

func (m ChampionWidget) ToTempl(ctx context.Context) templ.Component

type GoldWidget

type GoldWidget struct {
	GoldEarned int

	GoldEarnedPerMinute int

	GoldDeltaCounterpart int

	ShowIcon bool
}

GoldWidget shows stats related to gold earned.

func (GoldWidget) ToTempl

func (m GoldWidget) ToTempl(ctx context.Context) templ.Component

type ItemInventory

type ItemInventory struct {
	Items [6]component.Tooltip

	Ward component.Tooltip

	// VisionScore is the the score at the end of the game.
	VisionScore int

	// ItemHistory shows additional item build order information.
	ItemHistory component.Popover
}

ItemInventory displays an inventory of match items.

TODO: rename to ItemWidget.

func NewItemInventory

func NewItemInventory(items [7]int, visionScore int) ItemInventory

func (ItemInventory) ToTempl

func (m ItemInventory) ToTempl(ctx context.Context) templ.Component

type KDAWidget

type KDAWidget struct {
	Kills, Deaths, Assists int

	KilLDeathRatio float32

	AlignRight bool
}

KDAWidget is a fixed size widget displaying Kills, Deaths, and Assists.

func NewKDAWidget

func NewKDAWidget(k, d, a int) KDAWidget

func (KDAWidget) ToTempl

func (m KDAWidget) ToTempl(ctx context.Context) templ.Component

type MatchDateDurationWidget

type MatchDateDurationWidget struct {
	Date time.Time

	Duration time.Duration
}

func NewMatchDateDurationWidget

func NewMatchDateDurationWidget(date time.Time, duration time.Duration) MatchDateDurationWidget

func (MatchDateDurationWidget) ToTempl

type NameWidget

type NameWidget struct {
	Name, Tag string

	RankWidget RankWidget
}

func NewNameWidget

func NewNameWidget(name, tag string, rank *internal.Rank) NameWidget

func (NameWidget) ToTempl

func (m NameWidget) ToTempl(ctx context.Context) templ.Component

type RankDeltaWidget

type RankDeltaWidget struct {
	// RankWidget is the rank after the match. A nil value means the store
	// did not record a rank after the match.
	RankChange *RankWidget

	// LPChange is the lp change after the match. A nil value indicates the
	// lp change is unknown.
	LPChange *int

	Win bool
}

RankDeltaWidget shows a rank change after a match.

func NewRankDeltaWidget

func NewRankDeltaWidget(before, after *internal.Rank, win bool) RankDeltaWidget

func (RankDeltaWidget) ToTempl

type RankTag

type RankTag internal.Rank

func (RankTag) ToTempl

func (m RankTag) ToTempl(ctx context.Context) templ.Component

type RankWidget

type RankWidget struct {
	// Rank is the summoner's rank at an instance. A nil value indicates
	// summoner is unranked.
	Rank *internal.Rank

	ShowTierName bool

	// Size is the height of the widget, following [TextSize]. [TextSizeXS]
	// and [TextSizeSM] are supported.
	Size component.TextSize
}

RankWidget displays summoner rank.

func NewRankWidget

func NewRankWidget(rank *internal.Rank) RankWidget

func (RankWidget) ToTempl

func (m RankWidget) ToTempl(ctx context.Context) templ.Component

type RegionPickerButton

type RegionPickerButton struct {
	Region riot.Region
}

type RequestProvider

type RequestProvider interface {
	UpdateSummoner(region riot.Region, name, tag string) (path string, json []byte)
}

type RuneExtraInfoContent

type RuneExtraInfoContent struct {
	RuneRow RuneRow
}

func (RuneExtraInfoContent) ToTempl

type RuneImage

type RuneImage struct {
	Src string

	Size int
}

func (RuneImage) ToTempl

func (m RuneImage) ToTempl(ctx context.Context) templ.Component

type RuneRow

type RuneRow struct {
	Keystone component.Tooltip

	Primary [3]component.Tooltip

	Secondary [2]component.Tooltip

	Mini [3]component.Tooltip
}

RuneRow displays all selected match runes as a row.

func NewRuneRow

func NewRuneRow(runes internal.RunePage) RuneRow

func (RuneRow) ToTempl

func (m RuneRow) ToTempl(ctx context.Context) templ.Component

type RuneWidget

type RuneWidget struct {
	Keystone component.Tooltip

	Subtree component.Tooltip

	MoreInfo component.Popover
}

RuneWidget displays match runes.

func NewRuneWidget

func NewRuneWidget(runes internal.RunePage) RuneWidget

func (RuneWidget) ToTempl

func (m RuneWidget) ToTempl(ctx context.Context) templ.Component

Jump to

Keyboard shortcuts

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