GitRoot
Craft your forge, Build your project, Grow your community freely
1// SPDX-FileCopyrightText: 2026 Romain Maneschi <romain@gitroot.dev>
2//
3// SPDX-License-Identifier: EUPL-1.2
4
5package main
6
7import (
8 _ "embed"
9 "fmt"
10)
11
12//go:embed resources/styles/slide.css
13var slideStyle string
14
15const layoutSimpleName = "simple"
16const layoutIssueName = "issue"
17const simple = `<!doctype html>
18<html>
19<head>
20<meta charset="UTF-8">
21<meta name="viewport" content="width=device-width, initial-scale=1.0">
22<link rel="icon" type="{{repo.faviconType}}" href="{{repo.favicon}}">
23<base href="{{repo.url}}" />
24{{meta}}
25<title>{{page.title}}</title>
26<link rel="stylesheet" href="{{repo.css}}">
27</head>
28<body>
29<header>
30 {{repo.header}}
31 <nav>
32 {{repo.menu}}
33 </nav>
34</header>
35{{content}}
36<footer>
37 {{repo.footer}}
38</footer>
39</body>
40</html>
41`
42
43const layoutSlideName = "slide"
44
45var slide = fmt.Sprintf(`<!doctype html>
46<html>
47<head>
48<meta charset="UTF-8">
49<meta name="viewport" content="width=device-width, initial-scale=1.0">
50<link rel="icon" type="{{repo.faviconType}}" href="{{repo.favicon}}">
51<base href="{{repo.url}}" />
52{{meta}}
53<title>{{page.title}}</title>
54<meta name="color-scheme" content="light dark" />
55<style>
56%s
57</style>
58</head>
59<body>
60<article>{{content}}</article>
61</body>
62</html>
63`, slideStyle)