Skip to content

Commit

Permalink
Cleanup markup
Browse files Browse the repository at this point in the history
  • Loading branch information
mstewartgallus committed Aug 26, 2023
1 parent 4f2aae2 commit 5c6dcde
Show file tree
Hide file tree
Showing 90 changed files with 208 additions and 153 deletions.
18 changes: 15 additions & 3 deletions IndexApp/src/features/poem/l/index.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
import { useContext } from "react";
import { LgContext, LContext } from "../lg-context.js";
import { l } from "./l.module.css";

const Br = ({index}) => {
const count = useContext(LgContext);
const theIndex = useContext(LContext);
index ??= theIndex;
const last = index + 1 >= count;
return last ? null : <br />;
};

// FIXME rm last break
export const L = ({ children }) =>
export const L = ({ children, index }) =>
<>
<span role="presentation" className={l}>{children}</span>
<br />
<span role="presentation" className={l}>
{children}
</span>
<Br index={index} />
</>;
7 changes: 7 additions & 0 deletions IndexApp/src/features/poem/lg-context.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { createContext } from 'react';

export const LgContext = createContext(0);
LgContext.displayName = 'Lg';

export const LContext = createContext(0);
LContext.displayName = 'L';
19 changes: 17 additions & 2 deletions IndexApp/src/features/poem/lg/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
import { withClass } from "@features/util";
import { Children } from 'react';
import { LgContext, LContext } from "../lg-context.js";
import { lg } from "./lg.module.css";

export const Lg = withClass('p', lg);
const LgProvider = LgContext.Provider;
const LProvider = LContext.Provider;

export const Lg = ({
children,
count = Children.count(children)
}) =>
<p className={lg}>
<LgProvider value={count}>
{Children.map(children, (child, ix) => <LProvider value={ix}>
{child}
</LProvider>
)}
</LgProvider>
</p>;
6 changes: 3 additions & 3 deletions IndexApp/src/features/post/poem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const Line = ({ line }) =>
</>);

const Stanza = ({ stanza }) =>
stanza.map(line =>
<L>
stanza.map((line, ix) =>
<L index={ix}>
<Line line={line} />
</L>);

Expand All @@ -18,7 +18,7 @@ export const Poem = ({ poem }) =>
<Body>
{
poem.map(stanza =>
<Lg>
<Lg count={stanza.length}>
<Stanza stanza={stanza} />
</Lg>)
}
Expand Down
6 changes: 3 additions & 3 deletions public/wwwroot/404.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions public/wwwroot/404/index.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions public/wwwroot/README/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/wwwroot/_gatsby/slices/_gatsby-scripts-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<script
id="gatsby-chunk-mapping"
>
window.___chunkMapping="{\"polyfill\":[\"/polyfill-982a2cff01cf838d739c.js\"],\"app\":[\"/app-75724f1ce13db077df81.js\"],\"component---src-pages-404-jsx\":[\"/component---src-pages-404-jsx-374eed1b4b358a5c88c3.js\"],\"component---src-pages-about-jsx\":[\"/component---src-pages-about-jsx-43fabd21bd16e9c81525.js\"],\"component---src-pages-blog-jsx\":[\"/component---src-pages-blog-jsx-6b3c187a3960834ee00c.js\"],\"component---src-pages-index-jsx\":[\"/component---src-pages-index-jsx-3fec9373bcb98d4df6ce.js\"],\"component---src-pages-portfolio-jsx\":[\"/component---src-pages-portfolio-jsx-f784bf5e8a1678f1c788.js\"],\"component---src-pages-post-poem-post-slug-jsx\":[\"/component---src-pages-post-poem-post-slug-jsx-1bd4064febc8c8698063.js\"],\"component---src-pages-readme-jsx\":[\"/component---src-pages-readme-jsx-564b7fb4191f376a9229.js\"],\"component---src-pages-search-jsx\":[\"/component---src-pages-search-jsx-6f472dac53f45b9316b6.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-10-19-the-night-ghost-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-10-19-the-night-ghost-mdx-b458a36cce5c07f8d82c.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-10-22-i-know-a-secret-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-10-22-i-know-a-secret-mdx-2ec1c44609cc135137eb.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-11-11-grounding-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-11-11-grounding-mdx-6784608a9185c0891136.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-12-05-tbh-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-12-05-tbh-mdx-523b99799f25061bd102.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-12-06-little-thing-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-12-06-little-thing-mdx-4de954a86b955f1f0def.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-19-emotion-exercise-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-19-emotion-exercise-mdx-b9e52cd221364ee8f703.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-20-good-boy-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-20-good-boy-mdx-8f34efe2ad0b3fe1ded2.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-21-coffee-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-21-coffee-mdx-ffd5339a821d9a24a950.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-21-night-walk-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-21-night-walk-mdx-b99b2b530f8f154d7d88.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-22-gacc-gock-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-22-gacc-gock-mdx-1eea32998a4b77b3c052.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-28-if-she-breathes-shes-a-thot-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-28-if-she-breathes-shes-a-thot-mdx-0c00841f3f71277ffd11.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-31-the-best-coffee-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-31-the-best-coffee-mdx-b6af5fb8e289bb31b16a.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-11-15-my-owners-lover-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-11-15-my-owners-lover-mdx-46c503a6854d97940c41.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-11-26-dentist-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-11-26-dentist-mdx-d5bc253c1442dd683dba.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-12-17-nevertheless-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-12-17-nevertheless-mdx-30544cb74b9b5edcac49.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-12-27-cleanup-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-12-27-cleanup-mdx-cfe72d5842a42c565ebe.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-web-2022-11-25-marking-up-poetry-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-web-2022-11-25-marking-up-poetry-mdx-f8d0d6c7d07929f35429.js\"]}";
window.___chunkMapping="{\"polyfill\":[\"/polyfill-982a2cff01cf838d739c.js\"],\"app\":[\"/app-75724f1ce13db077df81.js\"],\"component---src-pages-404-jsx\":[\"/component---src-pages-404-jsx-374eed1b4b358a5c88c3.js\"],\"component---src-pages-about-jsx\":[\"/component---src-pages-about-jsx-43fabd21bd16e9c81525.js\"],\"component---src-pages-blog-jsx\":[\"/component---src-pages-blog-jsx-6b3c187a3960834ee00c.js\"],\"component---src-pages-index-jsx\":[\"/component---src-pages-index-jsx-3fec9373bcb98d4df6ce.js\"],\"component---src-pages-portfolio-jsx\":[\"/component---src-pages-portfolio-jsx-f784bf5e8a1678f1c788.js\"],\"component---src-pages-post-poem-post-slug-jsx\":[\"/component---src-pages-post-poem-post-slug-jsx-0b678e69786d54d3baec.js\"],\"component---src-pages-readme-jsx\":[\"/component---src-pages-readme-jsx-564b7fb4191f376a9229.js\"],\"component---src-pages-search-jsx\":[\"/component---src-pages-search-jsx-6f472dac53f45b9316b6.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-10-19-the-night-ghost-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-10-19-the-night-ghost-mdx-8bdc45772c05f5de417d.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-10-22-i-know-a-secret-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-10-22-i-know-a-secret-mdx-f7a22c6c29cf9192f3bc.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-11-11-grounding-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-11-11-grounding-mdx-03a441659fe7ef5f77a5.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-12-05-tbh-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-12-05-tbh-mdx-5e69ddf4d931fd60315e.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-12-06-little-thing-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-poem-2022-12-06-little-thing-mdx-b3bb1555d14166b03d82.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-19-emotion-exercise-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-19-emotion-exercise-mdx-b9e52cd221364ee8f703.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-20-good-boy-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-20-good-boy-mdx-8f34efe2ad0b3fe1ded2.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-21-coffee-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-21-coffee-mdx-ffd5339a821d9a24a950.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-21-night-walk-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-21-night-walk-mdx-b99b2b530f8f154d7d88.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-22-gacc-gock-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-22-gacc-gock-mdx-1eea32998a4b77b3c052.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-28-if-she-breathes-shes-a-thot-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-28-if-she-breathes-shes-a-thot-mdx-0c00841f3f71277ffd11.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-31-the-best-coffee-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-10-31-the-best-coffee-mdx-b6af5fb8e289bb31b16a.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-11-15-my-owners-lover-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-11-15-my-owners-lover-mdx-46c503a6854d97940c41.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-11-26-dentist-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-11-26-dentist-mdx-d5bc253c1442dd683dba.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-12-17-nevertheless-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-12-17-nevertheless-mdx-30544cb74b9b5edcac49.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-12-27-cleanup-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-prose-2022-12-27-cleanup-mdx-cfe72d5842a42c565ebe.js\"],\"component---src-templates-post-mdx-jsx-content-file-path-content-blog-web-2022-11-25-marking-up-poetry-mdx\":[\"/component---src-templates-post-mdx-jsx-content-file-path-content-blog-web-2022-11-25-marking-up-poetry-mdx-f8d0d6c7d07929f35429.js\"]}";
</script>
<script>window.___webpackCompilationHash="652eb7207222fa7dcb30";</script><script src="/webpack-runtime-b1f369ce0b0d519461f0.js" nomodule></script><script src="/polyfill-982a2cff01cf838d739c.js" nomodule></script><script src="/webpack-runtime-b1f369ce0b0d519461f0.js" async></script><script src="/framework-649b7971e6a01163d12a.js" async></script><script src="/app-75724f1ce13db077df81.js" async></script>
<script>window.___webpackCompilationHash="57ee15e06dac6fc641fc";</script><script src="/webpack-runtime-ac76e6582ca68ae6f841.js" nomodule></script><script src="/polyfill-982a2cff01cf838d739c.js" nomodule></script><script src="/webpack-runtime-ac76e6582ca68ae6f841.js" async></script><script src="/framework-649b7971e6a01163d12a.js" async></script><script src="/app-75724f1ce13db077df81.js" async></script>
6 changes: 3 additions & 3 deletions public/wwwroot/about/index.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions public/wwwroot/blog/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit 5c6dcde

Please sign in to comment.