summaryrefslogtreecommitdiff
path: root/posts.html~
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-06-22 21:04:35 -0400
committermattkae <mattkae@protonmail.com>2022-06-22 21:04:35 -0400
commitada7e2de99de2b87f5a1ca3ba7f1896c8a664d21 (patch)
tree56a7d79df5d3929db33288c5a94a5403d6efc045 /posts.html~
parent29059f552223d70bdab287b0d121567cec0ed6c7 (diff)
Remove leftover files
Diffstat (limited to 'posts.html~')
-rw-r--r--posts.html~87
1 files changed, 0 insertions, 87 deletions
diff --git a/posts.html~ b/posts.html~
deleted file mode 100644
index 2d9ea0e..0000000
--- a/posts.html~
+++ /dev/null
@@ -1,87 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta charset="utf-8">
- <link rel="stylesheet" href="/index.css">
- <link rel="stylesheet" href="/posts.css">
- <title>Matthew Kosarek</title>
- <link rel="shortcut icon" href="/favicon/favicon.ico" type="image/x-icon">
- </head>
- <body>
- <header>
- <h1>Matthew Kosarek</h1>
- <nav>
- <ul>
- <li><a href='/'>&#127969; Home</a></li>
- <li><a href='/resume.html'>&#128216; CV</a></li>
- <li><a href='/posts.html'>&#128221; Posts</a></li>
- </ul>
- </nav>
- </header>
-
- <section id='post_section'>
- </section>
-
- <script>
- function fetchHtml(fileName) {
- return fetch(fileName).then((response) => {
- return response.text();
- });
- }
-
- function nodeScriptReplace(node) {
- if ( nodeScriptIs(node) === true ) {
- node.parentNode.replaceChild( nodeScriptClone(node) , node );
- }
- else {
- var i = -1, children = node.childNodes;
- while ( ++i < children.length ) {
- nodeScriptReplace( children[i] );
- }
- }
-
- return node;
- }
- function nodeScriptClone(node){
- var script = document.createElement("script");
- script.text = node.innerHTML;
-
- var i = -1, attrs = node.attributes, attr;
- while ( ++i < attrs.length ) {
- script.setAttribute( (attr = attrs[i]).name, attr.value );
- }
- return script;
- }
-
- function nodeScriptIs(node) {
- return node.tagName === 'SCRIPT';
- }
-
- (function() {
- var postList = [
- 'posts/linear_system_solver.html'
- ];
-
- var postContainer = document.getElementById('post_section');
- if (!postContainer) {
- console.error('Could not find post container.');
- return;
- }
-
- postList.forEach(function(postName) {
- fetchHtml(postName).then(function(text) {
- var newSection = document.createElement('article');
- newSection.innerHTML = text;
- nodeScriptReplace(newSection);
- postContainer.appendChild(newSection);
- });
- });
- })();
- </script>
-
- </body>
-
- <script src='/index.js'></script>
- <script src='/mini-jquery.js' type='module'></script>
-</html>