adds help pages, changes homepage fully over to ttcmd

This commit is contained in:
Emmaline Autumn 2024-03-10 04:56:44 -06:00
parent 7f63d38424
commit ed4497b991
12 changed files with 405 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -25,6 +25,13 @@
@apply dark:text-primary-500 text-primary-100 uppercase font-bold mb-2 text-lg @apply dark:text-primary-500 text-primary-100 uppercase font-bold mb-2 text-lg
} }
.heading {
@apply pb-8 border-b border-b-primary-500 dark:border-b-dark-500 min-w-full;
}
.heading h1 {
@apply text-5xl font-bold
}
.card { .card {
@apply dark:bg-mixed-200 bg-primary-500 rounded-3xl p-6 shadow-2xl @apply dark:bg-mixed-200 bg-primary-500 rounded-3xl p-6 shadow-2xl
/* mix-blend-luminosity */ /* mix-blend-luminosity */

View File

@ -0,0 +1,31 @@
"use client";
export default function Error({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
return (
<div className="w-1/3 mx-auto mt-96">
<div className="card error">
<h1 className="text-4xl mb-8">Uh oh!</h1>
<p>
Seems like you found an article that doesn&apos;t exist. If you
clicked on a link from another help article, it&apos;s likely that
either the article has been renamed or hasn&apos;t been written yet.
</p>
<p>
You can let Emma know about the missing article in
[#help-articles](insert discord link here) on the official
CyborgGrizzly Discord server. Be sure to include the below error and
the page that you came from in case the link is broken.
</p>
<pre className="whitespace-pre-wrap rounded-md bg-black/20 p-4">
{`${error.name}\n${error.message}\n${error.digest}`}
</pre>
</div>
</div>
);
}

View File

@ -0,0 +1,26 @@
import { TTCMD } from "@/components/ttcmd";
import { readFile } from "fs/promises";
import Error from "next/error";
import { Suspense } from "react";
export default async function Help({
params,
}: {
params: { article: string };
}) {
const body = readFile(
"./md/help articles/" + decodeURIComponent(params.article),
"utf-8",
);
return (
<>
<section className="heading">
<h2 className="strapline">Help</h2>
<h1>How to use TTCMD</h1>
</section>
<Suspense>
<TTCMD body={body} />
</Suspense>
</>
);
}

32
app/help/page.tsx Normal file
View File

@ -0,0 +1,32 @@
import { QuestionMarkCircleIcon } from "@heroicons/react/24/solid";
import { readdir } from "fs/promises";
import Link from "next/link";
export default async function HelpHome() {
const articles = await readdir("./md/help articles");
return (
<>
<section className="heading">
<h2 className="strapline">Help</h2>
<h1>Table of Contents</h1>
</section>
<section className="my-6">
<ul className="grid md:grid-cols-5 gap-x-8 gap-y-6">
{articles.map((a) => (
<li key={a} className="card flex gap-4 items-center">
<QuestionMarkCircleIcon className="w-8 h-8" />
<Link
className="font-bold text-xl hover:text-primary-300 transition-colors"
href={"/help/" + encodeURI(a)}
>
{a.replace(".md", "")}
&nbsp;
</Link>
</li>
))}
</ul>
</section>
</>
);
}

View File

@ -6,6 +6,7 @@ import {
CircleStackIcon, CircleStackIcon,
Cog8ToothIcon, Cog8ToothIcon,
PuzzlePieceIcon, PuzzlePieceIcon,
QuestionMarkCircleIcon,
} from "@heroicons/react/24/solid"; } from "@heroicons/react/24/solid";
import Link from "next/link"; import Link from "next/link";
@ -42,6 +43,11 @@ export default function RootLayout({
icon: Cog8ToothIcon, icon: Cog8ToothIcon,
text: "Settings", text: "Settings",
}, },
{
to: "/help",
icon: QuestionMarkCircleIcon,
text: "How do?",
},
]; ];
return ( return (
@ -49,7 +55,7 @@ export default function RootLayout({
<body className={inter.className + " flex min-h-[100vh]"}> <body className={inter.className + " flex min-h-[100vh]"}>
<nav className="h-[100vh] fixed top-0 left-0 bottom-0 p-8 rounded-r-3xl dark:bg-mixed-300 bg-primary-400 w-max shadow-2xl"> <nav className="h-[100vh] fixed top-0 left-0 bottom-0 p-8 rounded-r-3xl dark:bg-mixed-300 bg-primary-400 w-max shadow-2xl">
<h1 className="text-lg font-bold pb-6 border-b dark:border-dark-500 border-primary-600"> <h1 className="text-lg font-bold pb-6 border-b dark:border-dark-500 border-primary-600">
Tabletop Commander <Link href="/">Tabletop Commander</Link>
</h1> </h1>
<ul className="my-6 flex flex-col gap-6"> <ul className="my-6 flex flex-col gap-6">
{navItems.map((n) => ( {navItems.map((n) => (

View File

@ -1,21 +1,14 @@
import { readMD } from "@/actions/temp"; import { TTCMD } from "@/components/ttcmd";
import { TCMD } from "@/components/tcmd";
import {
BookOpenIcon,
CircleStackIcon,
PuzzlePieceIcon,
} from "@heroicons/react/24/solid";
import { readFileSync } from "fs";
import { readFile } from "fs/promises"; import { readFile } from "fs/promises";
import Image from "next/image";
import { Suspense } from "react"; import { Suspense } from "react";
export default function Home() { export default function Home() {
const body = readFile("./md/home.md", "utf-8");
return ( return (
<> <>
<section className="pb-8 border-b border-b-primary-500 dark:border-b-dark-500 min-w-full"> <section className="heading">
<h2 className="strapline">Tabletop Commander</h2> <h2 className="strapline">Tabletop Commander</h2>
<h1 className="text-5xl font-bold">How does it work?</h1> <h1>How does it work?</h1>
</section> </section>
{ {
/* <section className="w-full my-6"> /* <section className="w-full my-6">
@ -140,8 +133,8 @@ export default function Home() {
</section> */ </section> */
} }
<Suspense> <Suspense>
<TCMD <TTCMD
body={readMD()} body={body}
/> />
</Suspense> </Suspense>
</> </>

49
app/publications/page.tsx Normal file
View File

@ -0,0 +1,49 @@
import Link from "next/link";
export default function Publications() {
return (
<>
<section className="heading">
<h2 className="strapline">Publications</h2>
<h1>Publication Editor</h1>
</section>
<section className="grid grid-cols-3 gap-8 gap-y-6 mt-8">
<div className="col-span-2">
<div className="card">
</div>
</div>
<div>
<div className="card">
<h3>How does it work?</h3>
<p>
Use this page to create publications for a game system using a
schema, either from scratch or by extending another publication.
You can also create an updated version of a previous publication
and label it with a new release tag.
</p>
<p>
Each schema field that can hold a value has an input for you to
edit - if there are any questions about what a field is, those
questions should be directed to the schema author using the
contact feature on their profile.
</p>
<p>
Some fields are marked as &quot;visible.&quot; These fields are
the ones you can actually see when you view the publication. Some
of these fields will already be filled in by the schema itself so
that they can include specific formatting. Every schema has at
least one visible field - called the &quot;parent&quot; field -
that are shown by default when viewing the publication. Visible
fields appear as an option in a menu when viewing a publication.
</p>
<p>
Visible fields use ttcMD to create neat and tidy layouts. If you
don&apos;t know how to use ttcMD or ttcQuery, pleas see{" "}
<Link href="/help/ttcmd">this</Link> help article.
</p>
</div>
</div>
</section>
</>
);
}

155
app/ttc icon.svg Normal file
View File

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="36.50486mm" height="36.50486mm"
viewBox="0 0 36.50486 36.50486" version="1.1" id="svg8" sodipodi:docname="battlelog icon.svg"
inkscape:export-filename="C:\Users\ironi\Pictures\battlelog.png" inkscape:export-xdpi="138.39"
inkscape:export-ydpi="138.39" inkscape:version="1.0 (4035a4fb49, 2020-05-01)">
<defs id="defs2">
<marker inkscape:isstock="true" style="overflow:visible" id="Arrow1Sstart" refX="0" refY="0" orient="auto"
inkscape:stockid="Arrow1Sstart">
<path transform="matrix(0.2,0,0,0.2,1.2,0)"
style="fill:#36005c;fill-opacity:1;fill-rule:evenodd;stroke:#36005c;stroke-width:1pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z" id="path993" />
</marker>
<marker inkscape:isstock="true" style="overflow:visible" id="marker1259" refX="0" refY="0" orient="auto"
inkscape:stockid="Arrow1Lstart">
<path transform="matrix(0.8,0,0,0.8,10,0)"
style="fill:#36005c;fill-opacity:1;fill-rule:evenodd;stroke:#36005c;stroke-width:1pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z" id="path1257" />
</marker>
<marker inkscape:isstock="true" style="overflow:visible" id="Arrow1Lstart" refX="0" refY="0" orient="auto"
inkscape:stockid="Arrow1Lstart">
<path transform="matrix(0.8,0,0,0.8,10,0)"
style="fill:#36005c;fill-opacity:1;fill-rule:evenodd;stroke:#36005c;stroke-width:1pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 Z" id="path981" />
</marker>
<inkscape:path-effect effect="mirror_symmetry" start_point="24.197977,13.799948" end_point="24.197977,15.24464"
center_point="24.197977,14.522294" id="path-effect933" is_visible="true" lpeversion="1" mode="free"
discard_orig_path="false" fuse_paths="false" oposite_fuse="false" split_items="false" />
<inkscape:path-effect split_items="false" oposite_fuse="false" fuse_paths="false" discard_orig_path="false"
mode="free" lpeversion="1" is_visible="true" id="path-effect898" center_point="24.087931,14.05635"
end_point="24.087931,17.323464" start_point="24.087931,10.789236" effect="mirror_symmetry" />
<inkscape:path-effect hide_knots="false" only_selected="false" apply_with_radius="true" apply_no_radius="true"
use_knot_distance="true" flexible="false" chamfer_steps="1" radius="0" mode="F" method="auto" unit="px"
satellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,1.9337788,0,1 @ F,0,0,1,0,0.70814436,0,1 @ F,0,0,1,0,0,0,1"
lpeversion="1" is_visible="true" id="path-effect896" effect="fillet_chamfer" />
<inkscape:path-effect effect="fillet_chamfer" id="path-effect875" is_visible="true" lpeversion="1"
satellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,1.9337788,0,1 @ F,0,0,1,0,0.70814436,0,1 @ F,0,0,1,0,0,0,1"
unit="px" method="auto" mode="F" radius="0" chamfer_steps="1" flexible="false" use_knot_distance="true"
apply_no_radius="true" apply_with_radius="true" only_selected="false" hide_knots="false" />
<inkscape:path-effect effect="mirror_symmetry" start_point="24.087931,10.789236" end_point="24.087931,17.323464"
center_point="24.087931,14.05635" id="path-effect873" is_visible="true" lpeversion="1" mode="free"
discard_orig_path="false" fuse_paths="false" oposite_fuse="false" split_items="false" />
<inkscape:path-effect effect="mirror_symmetry" start_point="15.2,12.19" end_point="0,18.82"
center_point="7.6,15.505" id="path-effect869" is_visible="true" lpeversion="1" mode="free"
discard_orig_path="false" fuse_paths="false" oposite_fuse="false" split_items="false" />
<inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : -108.11874 : 1"
inkscape:vp_y="0 : 999.99993 : 0" inkscape:vp_z="210 : -108.11874 : 1"
inkscape:persp3d-origin="105 : -157.61873 : 1" id="perspective841" />
</defs>
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0"
inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="8" inkscape:cx="74.035737"
inkscape:cy="76.334249" inkscape:document-units="mm" inkscape:current-layer="layer1"
inkscape:document-rotation="0" showgrid="false" inkscape:window-width="3440" inkscape:window-height="1369"
inkscape:window-x="-8" inkscape:window-y="1432" inkscape:window-maximized="1" inkscape:object-paths="true"
inkscape:snap-intersection-paths="true" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0"
fit-margin-bottom="0" />
<metadata id="metadata5">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(-10.381405,6.5569707)">
<path sodipodi:open="true"
d="M 45.469057,11.723468 A 16.835245,16.835245 0 0 1 28.637202,28.530704 16.835245,16.835245 0 0 1 11.798626,11.730202 16.835245,16.835245 0 0 1 28.567716,-5.1396559 16.835245,16.835245 0 0 1 45.468798,11.597965"
sodipodi:arc-type="arc" sodipodi:end="6.2773942" sodipodi:start="0.0016637066" sodipodi:ry="16.835245"
sodipodi:rx="16.835245" sodipodi:cy="11.695459" sodipodi:cx="28.633835" sodipodi:type="arc" id="path979"
style="font-variation-settings:'wght' 700;mix-blend-mode:normal;fill:#8f6ea2;fill-opacity:1;stroke:#36005c;stroke-width:2.834;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;paint-order:stroke fill markers" />
<path
style="fill:#36005c;fill-opacity:0;stroke:#36005c;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 24.087931,10.789236 h -10.41137 c -0.859457,0 -1.396618,0.93039 -0.966889,1.674701 l 2.451577,4.246256 c 0.2191,0.379493 0.624015,0.613271 1.062216,0.613271 h 7.864466 m 0,-6.534228 h 10.41137 c 0.859457,0 1.396618,0.93039 0.966889,1.674701 l -2.451577,4.246256 c -0.2191,0.379493 -0.624015,0.613271 -1.062216,0.613271 h -7.864466"
id="path863" sodipodi:nodetypes="cccc"
inkscape:original-d="M 24.087931,10.789236 H 11.742782 l 3.772539,6.534228 h 8.57261"
inkscape:path-effect="#path-effect875;#path-effect873" transform="matrix(1,0,0,0.68612415,0,3.7150793)"
inkscape:export-xdpi="73.4646" inkscape:export-ydpi="73.4646" />
<path inkscape:path-effect="#path-effect896;#path-effect898"
inkscape:original-d="M 24.087931,10.789236 H 11.742782 l 3.772539,6.534228 h 8.57261" sodipodi:nodetypes="cccc"
id="path863-8"
d="m 24.087931,10.789236 h -10.41137 c -0.859457,0 -1.396618,0.93039 -0.966889,1.674701 l 2.451577,4.246256 c 0.2191,0.379493 0.624015,0.613271 1.062216,0.613271 h 7.864466 m 0,-6.534228 h 10.41137 c 0.859457,0 1.396618,0.93039 0.966889,1.674701 l -2.451577,4.246256 c -0.2191,0.379493 -0.624015,0.613271 -1.062216,0.613271 h -7.864466"
style="fill:none;fill-opacity:1;stroke:#36005c;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="matrix(-0.67499607,0,0,-0.40562746,40.347189,15.060924)" inkscape:export-xdpi="73.4646"
inkscape:export-ydpi="73.4646" />
<g id="g931" inkscape:path-effect="#path-effect933"
transform="matrix(0.98544691,0,0,0.98544691,0.21734233,0.22302668)" inkscape:export-xdpi="73.4646"
inkscape:export-ydpi="73.4646">
<path
d="m 17.89465,13.809577 c 0,0.516139 -0.275356,0.99307 -0.722345,1.25114 -0.44699,0.258069 -0.997703,0.258069 -1.444692,0 -0.446989,-0.25807 -0.722346,-0.735001 -0.722346,-1.25114 h 1.444692 z m 12.606654,0 c 0,0.516139 0.275356,0.99307 0.722345,1.25114 0.44699,0.258069 0.997703,0.258069 1.444692,0 0.446989,-0.25807 0.722346,-0.735001 0.722346,-1.25114 h -1.444692 z"
sodipodi:arc-type="slice" sodipodi:end="3.1415927" sodipodi:start="0" sodipodi:ry="1.4446917"
sodipodi:rx="1.4446917" sodipodi:cy="13.809577" sodipodi:cx="16.449959" sodipodi:type="arc" id="path906"
style="fill:none;fill-opacity:1;stroke:#36005c;stroke-width:0.141635;stroke-linecap:round;stroke-opacity:1" />
<path
style="fill:none;fill-opacity:1;stroke:#36005c;stroke-width:0.141635;stroke-linecap:round;stroke-opacity:1"
id="path908" sodipodi:type="arc" sodipodi:cx="19.547373" sodipodi:cy="13.809577" sodipodi:rx="1.4446917"
sodipodi:ry="1.4446917" sodipodi:start="0" sodipodi:end="3.1415927" sodipodi:arc-type="slice"
d="m 20.992064,13.809577 c 0,0.516139 -0.275356,0.99307 -0.722345,1.25114 -0.44699,0.258069 -0.997703,0.258069 -1.444692,0 -0.446989,-0.25807 -0.722346,-0.735001 -0.722346,-1.25114 h 1.444692 z m 6.411826,0 c 0,0.516139 0.275356,0.99307 0.722345,1.25114 0.44699,0.258069 0.997703,0.258069 1.444692,0 0.446989,-0.25807 0.722346,-0.735001 0.722346,-1.25114 h -1.444692 z" />
<path
style="fill:none;fill-opacity:1;stroke:#36005c;stroke-width:0.141635;stroke-linecap:round;stroke-opacity:1"
id="path906-6" sodipodi:type="arc" sodipodi:cx="22.64736" sodipodi:cy="13.809577" sodipodi:rx="1.4446917"
sodipodi:ry="1.4446917" sodipodi:start="0" sodipodi:end="3.1415927" sodipodi:arc-type="slice"
d="m 24.092052,13.809577 c 0,0.516139 -0.275357,0.99307 -0.722346,1.25114 -0.44699,0.258069 -0.997703,0.258069 -1.444692,0 -0.446989,-0.25807 -0.722346,-0.735001 -0.722346,-1.25114 h 1.444692 z m 0.21185,0 c 0,0.516139 0.275357,0.99307 0.722346,1.25114 0.44699,0.258069 0.997703,0.258069 1.444692,0 0.446989,-0.25807 0.722346,-0.735001 0.722346,-1.25114 h -1.444692 z" />
</g>
<path style="fill:#36005c;fill-opacity:0;stroke:none;stroke-width:0.0194533;stroke-linecap:round;stroke-opacity:1"
d="m 60.839149,58.589236 c -1.142597,-0.09331 -2.207846,-0.524549 -2.865794,-1.160143 -0.164868,-0.159266 -9.292094,-10.983964 -9.574525,-11.355184 -0.303686,-0.399159 -0.429649,-0.784273 -0.407842,-1.24693 0.02282,-0.484087 0.202576,-0.868101 0.604522,-1.291417 0.519984,-0.547631 1.227896,-0.90187 2.168345,-1.085038 l 0.295953,-0.05764 39.786475,-0.0083 c 28.413597,-0.0059 39.871077,-3.06e-4 40.082427,0.0196 1.59021,0.149734 2.88448,1.030138 3.1288,2.128311 0.064,0.287534 0.041,0.70402 -0.053,0.959883 -0.0807,0.21978 -0.20788,0.448223 -0.34436,0.618695 -0.37269,0.465523 -9.39015,11.162257 -9.51235,11.283792 -0.59012,0.586881 -1.43643,0.971191 -2.5609,1.162906 -0.25853,0.04408 -1.57262,0.04621 -30.380295,0.04927 -16.560541,0.0018 -30.225883,-0.0063 -30.367426,-0.01782 z m 1.892205,-0.693177 c 1.008145,-0.122025 1.965943,-0.505487 2.769287,-1.108705 1.398597,-1.050184 2.247639,-2.766897 2.248296,-4.545924 l 8.8e-5,-0.23805 h -5.66568 -5.665681 l 0.01764,0.391024 c 0.05254,1.164265 0.348408,2.10567 0.943301,3.001412 0.450649,0.678551 0.957482,1.181334 1.641025,1.627914 0.656227,0.428733 1.524566,0.751701 2.307597,0.858282 0.312297,0.04251 1.103588,0.05042 1.404122,0.01405 z m 11.631318,-0.01425 c 2.380346,-0.308828 4.328704,-2.122817 4.797814,-4.466928 0.08253,-0.412383 0.117867,-0.746555 0.117867,-1.114535 V 52.00338 h -5.652464 -5.652464 l 0.01436,0.482533 c 0.0252,0.846558 0.204316,1.562125 0.577733,2.308009 0.733555,1.465242 2.038375,2.529854 3.609942,2.945379 0.269923,0.07137 0.646012,0.142633 0.874994,0.165803 0.26769,0.02709 1.027925,0.01359 1.312215,-0.02329 z m 11.453072,0.01425 c 0.815059,-0.09865 1.673408,-0.397143 2.328353,-0.809679 0.936578,-0.58993 1.627766,-1.35301 2.09824,-2.316476 0.372578,-0.762994 0.545448,-1.465359 0.582666,-2.36737 l 0.01647,-0.399154 H 85.171691 79.50191 l 0.01647,0.399154 c 0.03559,0.862436 0.206056,1.581879 0.542645,2.290165 0.453782,0.954897 1.113697,1.712994 2.008267,2.307058 0.697991,0.46352 1.575372,0.787429 2.420418,0.893562 0.256726,0.03224 1.068429,0.03392 1.326032,0.0027 z m 11.555063,-5.61e-4 c 2.146627,-0.265348 3.915343,-1.660422 4.664213,-3.678899 0.19636,-0.529259 0.31295,-1.1475 0.34336,-1.820758 l 0.0177,-0.392461 h -5.66946 -5.669465 l 0.01568,0.431063 c 0.05273,1.449779 0.594152,2.738041 1.584253,3.769587 0.876777,0.913477 2.040853,1.501682 3.323321,1.679267 0.300867,0.04166 1.095621,0.04864 1.39037,0.0122 z m 11.623843,-0.0124 c 1.01975,-0.132136 1.99984,-0.549097 2.81288,-1.196683 0.27722,-0.220806 0.76521,-0.721231 0.96908,-0.993779 0.71924,-0.961501 1.09835,-2.041839 1.13433,-3.232462 l 0.0138,-0.456798 h -5.65597 -5.65597 l 0.0144,0.469666 c 0.008,0.258316 0.0329,0.573893 0.0556,0.701281 0.22055,1.240496 0.75206,2.267533 1.61433,3.119355 0.47106,0.465362 0.90861,0.775375 1.50126,1.063687 0.56005,0.27245 1.12606,0.445669 1.71139,0.523747 0.37176,0.04959 1.10988,0.05058 1.48488,0.002 z m 11.78156,-0.03469 c 0.61118,-0.116373 1.06271,-0.268848 1.5953,-0.538703 1.30497,-0.661211 2.30356,-1.808851 2.77725,-3.191771 0.19454,-0.567968 0.28436,-1.08441 0.30844,-1.773565 l 0.0119,-0.34099 h -5.66362 -5.66362 l 0.0153,0.431063 c 0.0315,0.887454 0.20855,1.597065 0.58916,2.361018 0.84016,1.686402 2.41501,2.813001 4.3185,3.089342 0.37416,0.05432 1.34319,0.03371 1.71138,-0.03639 z"
id="path969" inkscape:export-xdpi="73.4646" inkscape:export-ydpi="73.4646" transform="scale(0.26458333)" />
<path
style="fill:#36005c;fill-opacity:1;stroke:#36005c;stroke-width:0.0334066;stroke-linecap:round;stroke-opacity:1"
d="m 100.5298,41.981141 c -15.624906,0.01072 -31.249865,-0.0041 -46.87473,0.03578 -1.039624,0.02394 -2.085658,-0.02858 -3.121051,0.07082 -1.128071,0.253419 -2.271734,0.891143 -2.765762,1.983041 -0.350827,0.789345 -0.149624,1.741198 0.426068,2.370074 3.094249,3.685534 6.1823,7.376726 9.294838,11.046656 1.013733,1.089552 2.555503,1.567043 4.016404,1.485543 18.562036,0.0075 37.124099,0.01 55.686123,-0.01317 1.57941,-0.0197 3.16164,0.02202 4.73914,-0.06135 0.77035,-0.173856 1.56199,-0.439035 2.16646,-0.965367 1.1499,-1.142589 2.14504,-2.429187 3.20549,-3.653012 2.27089,-2.708381 4.56936,-5.394841 6.80216,-8.134489 0.47225,-0.673634 0.53862,-1.616338 0.0802,-2.315101 -0.45116,-0.73531 -1.17253,-1.285495 -1.99473,-1.544267 -1.06727,-0.405663 -2.22377,-0.248963 -3.33774,-0.288028 -9.44091,-0.02587 -18.88192,-0.01553 -28.32286,-0.01713 z M 62.094507,52.408549 c 1.752373,0 3.504747,0 5.257121,0 -0.05169,1.287348 -0.547297,2.55812 -1.456941,3.486161 -0.945084,1.003235 -2.336883,1.658468 -3.74105,1.616894 -2.346997,0.118464 -4.598872,-1.63866 -5.146726,-3.908776 -0.09935,-0.390635 -0.15444,-0.791875 -0.173669,-1.194279 1.753755,0 3.50751,0 5.261265,0 z m 11.533298,0 c 1.753053,0.0063 3.531929,-0.01256 5.268861,0.0094 -0.07169,1.339475 -0.605662,2.683303 -1.604948,3.600743 -0.768085,0.80005 -1.827263,1.310518 -2.921807,1.458995 -0.919685,0.0846 -1.87546,0.05785 -2.729118,-0.334846 -1.530359,-0.617907 -2.751312,-2.008172 -3.113531,-3.609593 -0.08871,-0.367145 -0.13874,-0.754103 -0.154076,-1.124708 1.75154,0 3.503079,0 5.254619,0 z m 11.550648,0 c 1.751942,0 3.503884,0 5.255826,0 -0.05498,1.880385 -1.165573,3.705954 -2.861963,4.545159 -0.768407,0.399974 -1.634067,0.597168 -2.500464,0.559873 -1.256844,0.02309 -2.49985,-0.501542 -3.429106,-1.334716 -0.788675,-0.748594 -1.401404,-1.708488 -1.605405,-2.797094 -0.06751,-0.319956 -0.113137,-0.645786 -0.115406,-0.973222 1.752173,0 3.504345,0 5.256518,0 z m 11.534162,0 c 1.750876,0 3.501755,0 5.252635,0 -6.7e-4,1.940214 -1.21507,3.791409 -2.967571,4.607675 -0.941185,0.48259 -2.026519,0.564517 -3.063642,0.463952 -1.847899,-0.284921 -3.516587,-1.59356 -4.136978,-3.371687 -0.199979,-0.544441 -0.306335,-1.121052 -0.331295,-1.69994 1.748949,0 3.497902,0 5.246851,0 z m 11.552715,0 c 1.75353,0 3.50706,0 5.26058,0 -0.0483,1.339478 -0.57179,2.630046 -1.5304,3.568162 -0.9346,0.944584 -2.2401,1.549748 -3.57986,1.53086 -0.84134,0.08077 -1.67576,-0.162821 -2.44134,-0.492728 -1.03601,-0.51283 -1.89442,-1.383754 -2.42386,-2.409705 -0.34363,-0.687548 -0.49716,-1.446492 -0.54224,-2.196589 1.75238,0 3.50475,0 5.25712,0 z m 11.54081,0 c 1.75278,0 3.50556,0 5.25833,0 -0.0488,1.261424 -0.51726,2.518415 -1.40834,3.427293 -0.92781,1.019206 -2.27089,1.683834 -3.66164,1.66997 -0.82227,0.08494 -1.63768,-0.139202 -2.39253,-0.448502 -1.02375,-0.469995 -1.84373,-1.289497 -2.40833,-2.252781 -0.41537,-0.738415 -0.60178,-1.559916 -0.64703,-2.39598 1.75318,0 3.50636,0 5.25954,0 z"
id="path975" inkscape:export-xdpi="73.4646" inkscape:export-ydpi="73.4646" transform="scale(0.26458333)" />
<rect
style="fill:none;fill-opacity:1;stroke:#36005c;stroke-width:0.05;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect977" width="2.5958393" height="0.17676066" x="21.741636" y="8.6375818" rx="0.1586249" ry="0.074778207"
inkscape:export-xdpi="73.4646" inkscape:export-ydpi="73.4646" />
<rect ry="0.074778207" rx="0.1586249" y="8.9901352" x="22.051559" height="0.17676066" width="2.5958395"
id="rect977-5"
style="fill:none;fill-opacity:1;stroke:#36005c;stroke-width:0.0499999;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
inkscape:export-xdpi="73.4646" inkscape:export-ydpi="73.4646" />
<rect ry="0.074778207" rx="0.1586249" y="9.3622065" x="22.423628" height="0.17676066" width="2.5958395"
id="rect977-2"
style="fill:none;fill-opacity:1;stroke:#36005c;stroke-width:0.0499999;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
inkscape:export-xdpi="73.4646" inkscape:export-ydpi="73.4646" />
<path
style="fill:#36005c;fill-opacity:1;stroke:#36005c;stroke-width:0.00590551;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
d="m 84.501308,30.491633 c -4.578124,0.0075 -9.156441,-0.01371 -13.734429,0.02525 -0.693567,-0.01774 -1.390723,0.195106 -1.967292,0.578202 -1.340862,1.306989 -2.618146,2.678056 -3.921631,4.022187 -0.928179,0.979151 -1.884243,1.932938 -2.787903,2.934783 -0.296924,0.387827 -0.253972,0.964169 0.073,1.321595 0.453039,0.536154 1.165881,0.790805 1.846924,0.862427 9.088796,0.02919 18.177699,0.01801 27.266541,0.02098 8.971612,-0.0035 17.943722,9.79e-4 26.915032,-0.0075 0.67701,-0.159585 1.4309,-0.390888 1.83118,-1.006164 0.27401,-0.42712 0.20268,-1.042849 -0.1938,-1.371596 -2.08805,-2.215504 -4.20148,-4.40741 -6.33794,-6.57628 -0.41935,-0.445875 -1.03719,-0.630893 -1.61981,-0.752075 -1.12915,-0.06287 -2.26223,-0.02992 -3.39294,-0.0446 -7.9923,-0.01217 -15.984625,-0.0056 -23.97693,-0.0072 z m 0.931336,2.152832 c 1.991263,0.01019 3.993432,-0.0229 5.978121,0.02435 0.20274,0.01796 0.49119,-0.01541 0.573759,0.224553 0.06009,0.217689 -0.148816,0.405783 -0.358582,0.38678 -1.989608,0.04777 -3.991315,0.02099 -5.985535,0.03298 -1.043119,-0.01138 -2.088546,0.0277 -3.130249,-0.03035 -0.205687,-0.01898 -0.475698,-0.243439 -0.294983,-0.450256 0.130309,-0.212203 0.428219,-0.133687 0.627544,-0.167934 0.862957,-0.02591 1.726689,-0.01689 2.589925,-0.02012 z m 4.653564,1.317505 c 0.887729,0.01056 1.777847,-0.01728 2.664124,0.03168 0.208257,0.02208 0.514584,0.173208 0.392761,0.426697 -0.08105,0.133587 -0.264999,0.197053 -0.405884,0.227421 -3.009715,-0.0043 -6.019854,0.02491 -9.029297,-0.01581 -0.190892,-0.02956 -0.429268,-0.16786 -0.359863,-0.396119 0.06704,-0.205168 0.332926,-0.248012 0.524142,-0.24539 2.070841,-0.03742 4.142853,-0.02119 6.214017,-0.02847 z m 1.40625,1.40625 c 0.887729,0.01056 1.777848,-0.01728 2.664123,0.03168 0.208257,0.02208 0.514585,0.173208 0.392763,0.426697 -0.08105,0.133587 -0.265,0.197053 -0.405885,0.227421 -3.009715,-0.0043 -6.019854,0.02491 -9.029297,-0.01581 -0.190892,-0.02956 -0.429268,-0.16786 -0.359863,-0.396119 0.06704,-0.205168 0.332926,-0.248012 0.524142,-0.24539 2.070841,-0.03742 4.142853,-0.02119 6.214017,-0.02847 z"
id="path1004" inkscape:export-xdpi="73.4646" inkscape:export-ydpi="73.4646" transform="scale(0.26458333)" />
<rect
style="fill:#36005c;fill-opacity:1;stroke:#36005c;stroke-width:0.044635;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1014" width="14.53014" height="0.8528896" x="30.362129" y="8.6211557" rx="0.14023046" ry="0.14540984"
inkscape:export-xdpi="73.4646" inkscape:export-ydpi="73.4646" />
<rect
style="fill:#36005c;fill-opacity:1;stroke:#36005c;stroke-width:0.0506043;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1016" width="2.0594873" height="1.0700072" x="42.406349" y="8.506938" rx="0.15056987" ry="0.12785782"
inkscape:export-xdpi="73.4646" inkscape:export-ydpi="73.4646" />
<rect
style="fill:#36005c;fill-opacity:1;stroke:#36005c;stroke-width:0.0396433;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="rect1018" width="2.9120724" height="1.4533808" x="29.59572" y="8.3237476" rx="0.13227929" ry="0.12945224"
inkscape:export-xdpi="73.4646" inkscape:export-ydpi="73.4646" />
<path
style="font-variation-settings:'wght' 700;fill:#36005c;fill-opacity:1;stroke:#36005c;stroke-width:0.057007;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
id="path1028" sodipodi:type="arc" sodipodi:cx="-21.117058" sodipodi:cy="-8.0305481" sodipodi:rx="2.0635529"
sodipodi:ry="0.47371906" sodipodi:start="0" sodipodi:end="3.1415927" sodipodi:arc-type="slice"
d="m -19.053505,-8.0305481 a 2.0635529,0.47371906 0 0 1 -1.031776,0.4102527 2.0635529,0.47371906 0 0 1 -2.063553,0 2.0635529,0.47371906 0 0 1 -1.031777,-0.4102527 h 2.063553 z"
transform="scale(-1)" inkscape:export-xdpi="73.4646" inkscape:export-ydpi="73.4646" />
<path transform="scale(-1)"
d="m -23.800879,-8.067503 a 2.0635529,0.47371906 0 0 1 -1.031776,0.4102528 2.0635529,0.47371906 0 0 1 -2.063553,0 2.0635529,0.47371906 0 0 1 -1.031776,-0.4102528 h 2.063553 z"
sodipodi:arc-type="slice" sodipodi:end="3.1415927" sodipodi:start="0" sodipodi:ry="0.47371906"
sodipodi:rx="2.0635529" sodipodi:cy="-8.067503" sodipodi:cx="-25.864431" sodipodi:type="arc" id="path1030"
style="font-variation-settings:'wght' 700;fill:#36005c;fill-opacity:1;stroke:#36005c;stroke-width:0.057007;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke fill markers"
inkscape:export-xdpi="73.4646" inkscape:export-ydpi="73.4646" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -8,14 +8,14 @@ import React, { FC, Fragment, ReactNode, use, useMemo } from "react";
import { sanitize } from "isomorphic-dompurify"; import { sanitize } from "isomorphic-dompurify";
export const TCMD: FC<{ body: Promise<string> }> = ({ body }) => { export const TTCMD: FC<{ body: Promise<string> }> = ({ body }) => {
const text = use(body); const text = use(body);
const elements = useMemo(() => createElements(text), [text]); const elements = useMemo(() => createElements(text), [text]);
return ( return (
// <div className="grid grid-cols-2"> // <div className="grid grid-cols-2">
// <pre>{JSON.stringify(elements,null,2)}</pre> // <pre>{JSON.stringify(elements,null,2)}</pre>
// </div> // </div>
<div> <div className="flex flex-col gap-6 my-6">
{elements.map((e, i) => <Fragment key={e.uuid}>{renderBlock(e)} {elements.map((e, i) => <Fragment key={e.uuid}>{renderBlock(e)}
</Fragment>)} </Fragment>)}
</div> </div>

View File

@ -0,0 +1 @@
# Henlo, am help

89
md/home.md Normal file
View File

@ -0,0 +1,89 @@
[[
Tabletop Commander (TC) is a rules-and-tools app for tabletop games - board, card, war, role-playing, you name it! It is the spiritual successor of Chapter Master by Emmaline Autumn, a Warhammer 40,000 9th Edition rules reference and game helper.
Emma decided to move on from Chapter Master as her interest in 40k was supplanted by the greater wargaming hobby after the release of 10th edition made clear that Chapter Master was too inflexible and tedious to work on.
See, Emma had a vision that anyone could contribute to making rules corrections so that anyone could have all of the rules as they currently exist. This ballooned into the idea that you could have all the rules as they existed at *any time*
]]
[][][]
[[
### Game Systems
The basis of TC is called a Game System Package. This package
includes everything needed for a game system, including schemas,
publications, and tools. Players can follow a Game System to get
consistently updated content publications, or fork it to
maintain it themselves.
**But who owns a Game System?**
The neat part is that no one does! You can contribute to any
Game System with updates to publications and schemas through a
community review system. Those with the high enough scores
contribute more towards a total approval score which is used to
determine whether the Game System. The more your contributions
are approved, the higher your score becomes, the more weight
your approval and contributions carry.
If your score is high enough, and a contribution request has
enough approvals, you can even be the one to merge it in!
[```cta Learn More](/help/Game%20Systems.md)
]]
[[
### Schemas
Those who have studied English or databases, you would know that
a schema is a structural pattern. TC aims to provide a simple,
user-edited and maintained schema system for *any* game.
If that flew over your head, don&apos;t worry. Others can share
the schemas they&apos;ve made with everyone, which come as part
of a Game System package that you can fork or follow to get both
content and schemas ready to use.
**For the techies:**
The schema system makes use of a powerful custom query language
(tcQuery) I designed. By writing queries directly into the
schema, we can reduce the amount of re-written content, while
maintaining the presence of data anywhere we need it.
[```cta Learn More](/help/Schemas.md)
]]
[[
### Publications
Publications are the actual content of the rules. They
don&apos;t just contain the content, but also the style in which
the content is shown.
Content can include text, images, and even video (through
YouTube links or external embeds). Content can link to other
parts of the publication through context based pop-overs.
**For the techies (again):**
Publications use an enhanced markdown syntax (tcMD) that
implements tcQuery, and adds a bit of custom syntax for things
like pop-overs and styling hints for rendering.
The styling aspect is similar to a very trimmed down CSS, but
can accomplish quite a lot. For example, this page is actually
built using tcMD!
[```cta Learn More](/help/Publications.md)
]]
/[]