2024-10-04 04:39:24 -07:00
|
|
|
package templates
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
|
|
"github.com/chasefleming/elem-go"
|
2025-01-26 22:20:11 +01:00
|
|
|
"github.com/juanfont/headscale/hscontrol/types"
|
2024-10-04 04:39:24 -07:00
|
|
|
)
|
|
|
|
|
|
2026-02-24 18:48:57 +00:00
|
|
|
func RegisterWeb(registrationID types.AuthID) *elem.Element {
|
2024-10-04 04:39:24 -07:00
|
|
|
return HtmlStructure(
|
|
|
|
|
elem.Title(nil, elem.Text("Registration - Headscale")),
|
hscontrol/templates: refactor to use CSS classes and embedded files
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.
2025-10-28 16:29:00 +01:00
|
|
|
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(),
|
2024-10-04 04:39:24 -07:00
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
}
|