package ui
import (
"github.com/fserg/md-to-html/internal/ui/components/button"
"github.com/fserg/md-to-html/internal/ui/components/card"
)
templ Result(previewID, downloadID string, fullHTML string, filename string) {
@card.Card(card.Props{Class: "section-card border-primary/20 bg-background/90"}) {
@card.Content(card.ContentProps{Class: "space-y-4"}) {
@button.Button(button.Props{
Href: "/preview/" + previewID,
Target: "_blank",
Class: "rounded-2xl bg-primary px-4 py-2.5 text-sm font-semibold text-primary-foreground hover:bg-primary/90",
Variant: button.VariantDefault,
}) {
Открыть превью
}
@button.Button(button.Props{
Href: "/download/" + downloadID,
Class: "rounded-2xl border border-border bg-card px-4 py-2.5 text-sm font-semibold text-foreground hover:bg-muted/60",
Variant: button.VariantOutline,
}) {
Скачать HTML
}
Файл: { filename }
Ссылки одноразовые: после первого успешного открытия соответствующий UUID удаляется из preview-store.
i
Inline-превью в изолированном iframe
}
}
}
templ Error(msg string) {
{ msg }
}