Add project files.

This commit is contained in:
2025-04-19 20:47:58 +03:00
parent 9e14d137ae
commit bfdcdb1f3b
66 changed files with 2394 additions and 0 deletions
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Beam.Temporary.Cli.Templates.Classic {
internal class ClassicTemplates {
public static void Register(SharedDataDictionary sdd) {
sdd.Files.TryAdd(
new("aeqw89:files:templates:classic:content_page"),
new("C:\\Users\\qwsdc\\source\\repos\\Beam\\Beam.Temporary.Cli\\Templates\\Classic\\Content.template.html", "htmlpage", "templates"));
sdd.Files.TryAdd(
new("aeqw89:files:templates:classic:title_page"),
new("C:\\Users\\qwsdc\\source\\repos\\Beam\\Beam.Temporary.Cli\\Templates\\Classic\\Title.template.html", "htmlpage", "templates"));
sdd.Files.TryAdd(
new("aeqw89:files:templates:classic:styles_page"),
new("C:\\Users\\qwsdc\\source\\repos\\Beam\\Beam.Temporary.Cli\\Templates\\Classic\\Styles.template.css", "styles", "templates"));
sdd.Files.TryAdd(
new("aeqw89:files:templates:classic:no_content_page"),
new("C:\\Users\\qwsdc\\source\\repos\\Beam\\Beam.Temporary.Cli\\Templates\\Classic\\NoContent.template.html", "htmlpage", "templates"));
}
}
internal static class DictionaryOfFileExtensions {
public static string ReadToString<T>(this Dictionary<T, File> dict, T key) where T: notnull {
return System.IO.File.ReadAllText(dict[key].Path);
}
}
}
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{Name}</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>{Name}</h1>
<p><em>{Description}</em></p>
<div>
<span><strong>Authors:</strong> {Authors}</span> |
<span><strong>Language:</strong> {Language}</span> |
<span><strong>Categories:</strong> {Categories}</span> |
<span><strong>Version:</strong> {Version}</span>
</div>
</header>
<article>
{Content}
</article>
<div class="navigation">
<button id="prev">Previous</button>
<button id="next">Next</button>
</div>
</body>
</html>
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>404 - Not Found</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="error-container">
<h1>404 - Content Not Found</h1>
<p>The file <strong>{Filename}</strong> was not found.</p>
<p>{Content}</p>
</div>
</body>
</html>
@@ -0,0 +1,60 @@
/* styles.css */
/* Placeholders:
{PrimaryColor}, {SecondaryColor}, {TertiaryColor}, {ButtonColor},
{ForegroundColor}, {ContentFont}, {ContentFontSize}, {TitleFont}, {TitleFontSize}
*/
body {
font-family: {ContentFont};
font-size: {ContentFontSize};
background-color: {PrimaryColor};
color: {ForegroundColor};
margin: 0;
padding: 20px;
}
header {
background-color: {SecondaryColor};
padding: 20px;
text-align: center;
}
header h1 {
font-family: {TitleFont};
font-size: {TitleFontSize};
margin: 0;
}
header p {
font-style: italic;
margin: 5px 0;
}
section, article, nav {
background: {TertiaryColor};
padding: 15px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
margin: 20px auto;
max-width: 800px;
}
.navigation {
display: flex;
justify-content: space-between;
max-width: 800px;
margin: 20px auto;
}
button {
background-color: {ButtonColor};
color: {ForegroundColor};
border: none;
padding: 10px 20px;
cursor: pointer;
font-size: {ContentFontSize};
border-radius: 4px;
}
nav h2 {
margin-top: 0;
}
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{Name}</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>{Name}</h1>
<p><em>{Description}</em></p>
</header>
<section>
<div><strong>Authors:</strong> {Authors}</div>
<div><strong>Language:</strong> {Language}</div>
<div><strong>Categories:</strong> {Categories}</div>
<div><strong>Version:</strong> {Version}</div>
</section>
<nav>
<h2>Table of Contents</h2>
<ul>
{TOC} <!-- Expected to be a list of items (e.g. <li>Chapter 1</li>, etc.) -->
</ul>
</nav>
</body>
</html>