web

package
v0.0.0-...-f732412 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

templ: version: v0.3.924

templ: version: v0.3.924

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseHead

func BaseHead() templ.Component

func CurrencyTabs

func CurrencyTabs(activeTab string) templ.Component

func EmptyState

func EmptyState() templ.Component

func IndexPage

func IndexPage(activeTab string, initialTimestamp string) templ.Component

Общий layout главной страницы

func IndexScripts

func IndexScripts(activeTab string) templ.Component

func LastUpdatedFooter

func LastUpdatedFooter(initialTimestamp string) templ.Component
func PageHeader() templ.Component

func RateWithIndicator

func RateWithIndicator(rate float64, change float64) templ.Component

func RefreshButton

func RefreshButton() templ.Component

func RenderHTML

func RenderHTML(w http.ResponseWriter, r *http.Request, c templ.Component)

Helper to render templ components consistently.

func TabButton

func TabButton(tab, fullName, shortName string, isActive bool) templ.Component

func TabContent

func TabContent(banks []Bank, lastUpdated time.Time, currency string) templ.Component

Содержимое таба с универсальным отображением

func TabsPanel

func TabsPanel(activeTab string) templ.Component

func UniversalRatesView

func UniversalRatesView(banks []Bank, currency string) templ.Component

Универсальный компонент для отображения курсов (таблица на десктопе, карточки на мобильном)

Types

type Bank

type Bank struct {
	Name  string
	Rates Rates
}

type CurrencyRate

type CurrencyRate struct {
	Buy        float64
	Sell       float64
	BuyChange  float64
	SellChange float64
}

type Rates

type Rates struct {
	USD CurrencyRate
	EUR CurrencyRate
	RUB CurrencyRate
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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