mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-20 01:40:21 -05:00
Refactor template system to use go:embed for external assets and CSS classes for styling instead of inline styles: - general.go: Add go:embed directives for style.css and headscale.svg, replace inline styles with CSS classes (H1, H2, H3, P, etc.), add mdTypesetBody wrapper with Material for MkDocs styling - apple.go, oidc_callback.go, register_web.go, windows.go: Update to use new CSS-based helper functions (H1, H2, P, etc.) and mdTypesetBody for consistent layout This separates content from presentation, making templates easier to maintain and update. All styling is now centralized in style.css with Material for MkDocs design system.
22 lines
591 B
Go
22 lines
591 B
Go
package templates
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/chasefleming/elem-go"
|
|
"github.com/juanfont/headscale/hscontrol/types"
|
|
)
|
|
|
|
func RegisterWeb(registrationID types.RegistrationID) *elem.Element {
|
|
return HtmlStructure(
|
|
elem.Title(nil, elem.Text("Registration - Headscale")),
|
|
mdTypesetBody(
|
|
headscaleLogo(),
|
|
H1(elem.Text("Machine registration")),
|
|
P(elem.Text("Run the command below in the headscale server to add this machine to your network:")),
|
|
Pre(PreCode(fmt.Sprintf("headscale nodes register --key %s --user USERNAME", registrationID.String()))),
|
|
pageFooter(),
|
|
),
|
|
)
|
|
}
|