|
2 | 2 |
|
3 | 3 | import dev.nipafx.ginevra.css.Css;
|
4 | 4 | import dev.nipafx.ginevra.css.CssStyle;
|
5 |
| -import dev.nipafx.ginevra.css.CssStyled; |
| 5 | +import dev.nipafx.ginevra.html.Classes; |
6 | 6 | import dev.nipafx.ginevra.outline.HtmlPage;
|
7 |
| -import dev.nipafx.ginevra.outline.Query; |
8 |
| -import dev.nipafx.ginevra.outline.Query.RootQuery; |
9 |
| -import dev.nipafx.ginevra.outline.Template; |
10 |
| -import zone.nox.data.Root; |
| 7 | +import dev.nipafx.ginevra.outline.HtmlPage.SlugStyle; |
| 8 | +import dev.nipafx.ginevra.outline.SingleTemplate; |
11 | 9 |
|
12 | 10 | import java.nio.file.Path;
|
13 | 11 |
|
14 |
| -import static dev.nipafx.ginevra.html.HtmlElement.h1; |
15 |
| -import static dev.nipafx.ginevra.html.HtmlElement.p; |
16 | 12 | import static zone.nox.components.Components.layout;
|
17 | 13 | import static zone.nox.components.Components.pageHeader;
|
18 | 14 |
|
19 |
| -public class FourOhFour implements Template<Root>, CssStyled<FourOhFour.Style> { |
| 15 | +public class FourOhFour implements SingleTemplate { |
20 | 16 |
|
21 |
| - public record Style(Css css) implements CssStyle { } |
22 |
| - |
23 |
| - private static final Style STYLE = Css.parse(Style.class, """ |
24 |
| - |
25 |
| - """); |
26 |
| - |
27 |
| - @Override |
28 |
| - public Style style() { |
29 |
| - return STYLE; |
30 |
| - } |
31 |
| - |
32 |
| - @Override |
33 |
| - public Query<Root> query() { |
34 |
| - return new RootQuery<>(Root.class); |
35 |
| - } |
| 17 | + public record Style(Classes red, Css css) implements CssStyle { } |
36 | 18 |
|
37 | 19 | @Override
|
38 |
| - public HtmlPage compose(Root root) { |
| 20 | + public HtmlPage composeSingle() { |
39 | 21 | return new HtmlPage(
|
40 | 22 | Path.of("404"),
|
| 23 | + SlugStyle.FILE, |
41 | 24 | layout
|
42 | 25 | .title("404")
|
43 | 26 | .description("Page not found")
|
44 | 27 | .content(
|
45 | 28 | pageHeader
|
46 | 29 | .title("404 - Page not Found")
|
47 |
| - .summary("Sorry, this page doesn't exist. (Is what they want you to believe.)")) |
| 30 | + .summary("Sorry, this page doesn't exist... is what they want you to believe")) |
48 | 31 | );
|
49 | 32 | }
|
50 | 33 |
|
|
0 commit comments