comments-engine/Pages/IndexPage.cs

34 lines
854 B
C#
Raw Permalink Normal View History

2024-10-27 16:35:33 +01:00
// SPDX-FileCopyrightText: Copyright 2024 Fabio Iotti
// SPDX-License-Identifier: AGPL-3.0-only
using CommentsEngine.Data;
namespace CommentsEngine;
class IndexPage : PageSlim<IndexPage>
{
public static IndexPage Instance { get; } = new();
IndexPage() { }
protected override ReadOnlySpan<byte> ContentTemplate => """
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document |{0}| |{0:000.000##}|</title>
</head>
<body>
</body>
</html>
"""u8;
protected override ValueTask HandleAsync(HttpContext context, Memory<object?> templateArgs)
{
templateArgs.Span[0] = 12.34;
return ValueTask.CompletedTask;
}
}