minor refactoring
| 
		 Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB  | 
| 
		 Before Width: | Height: | Size: 1005 KiB After Width: | Height: | Size: 1005 KiB  | 
| 
		 Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB  | 
| 
		 Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB  | 
| 
		 Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB  | 
| 
		 Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB  | 
							
								
								
									
										20
									
								
								examples/musings/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,20 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
  <head>
 | 
			
		||||
    <title>Tickle</title>
 | 
			
		||||
    <meta charset="UTF-8" />
 | 
			
		||||
    <link href="../../modules/templates/blog.css" rel="stylesheet" />
 | 
			
		||||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
    <section>
 | 
			
		||||
      <button class="burger">≡</button>
 | 
			
		||||
      <nav class="menu"></nav>
 | 
			
		||||
    </section>
 | 
			
		||||
    <main></main>
 | 
			
		||||
    <pre id="Source"></pre>
 | 
			
		||||
    <div id="Loading">
 | 
			
		||||
      <p>❤</p>
 | 
			
		||||
    </div>
 | 
			
		||||
    <script type="module" src="../../modules/templates/blog.mjs"></script>
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB  | 
| 
		 Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 174 KiB  | 
| 
		 Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 154 KiB  | 
| 
		 Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB  | 
| 
		 Before Width: | Height: | Size: 789 KiB After Width: | Height: | Size: 789 KiB  | 
| 
		 Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB  | 
| 
		 Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB  | 
| 
		 Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB  | 
@@ -19,7 +19,7 @@ export const bootstrap = async () => {
 | 
			
		||||
  Burger.addEventListener("click", mode.menuOpen.toggle);
 | 
			
		||||
 | 
			
		||||
  mode.loading.on();
 | 
			
		||||
  const lines = await fetchText("../files.txt");
 | 
			
		||||
  const lines = await fetchText("files.txt");
 | 
			
		||||
  const links = parseFileList(lines);
 | 
			
		||||
  const firstHref = links[0].href;
 | 
			
		||||
  sortFileListLines(links);
 | 
			
		||||
 
 | 
			
		||||
@@ -6,6 +6,8 @@ import { generateDomFromString } from "./generateDomFromString.mjs";
 | 
			
		||||
import {getFirstTitleContent} from "./getFirstTitleContent.mjs";
 | 
			
		||||
// @ts-ignore
 | 
			
		||||
import { micromark } from "https://esm.sh/micromark@3?bundle";
 | 
			
		||||
// @ts-ignore
 | 
			
		||||
import {frontmatter, frontmatterHtml} from 'https://esm.sh/micromark-extension-frontmatter@1?bundle'
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Loads and parses a markdown document. Makes use of micromark.
 | 
			
		||||
@@ -15,7 +17,11 @@ export const fetchMarkdown = (path) =>
 | 
			
		||||
  fetchText(path)
 | 
			
		||||
    .then(waitIfLocalHost())
 | 
			
		||||
    .then((raw) => {
 | 
			
		||||
      const content = generateDomFromString(micromark(raw));
 | 
			
		||||
      const output = micromark(raw, {
 | 
			
		||||
        extensions: [frontmatter()],
 | 
			
		||||
        htmlExtensions: [frontmatterHtml()]
 | 
			
		||||
      })
 | 
			
		||||
      const content = generateDomFromString(output);
 | 
			
		||||
      const title = getFirstTitleContent(content) || path.replace(/\.\w{2, 4}$/, "");
 | 
			
		||||
      return { title, raw, content };
 | 
			
		||||
    });
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +0,0 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
  <head>
 | 
			
		||||
    <title>Sally Emerzian</title>
 | 
			
		||||
    <meta charset="UTF-8" />
 | 
			
		||||
  <body>
 | 
			
		||||
  </body>
 | 
			
		||||
  <script type="module" src="./modules/templateBlog.mjs"></script>
 | 
			
		||||
</html>
 | 
			
		||||