diff options
author | mattkae <mattkae@protonmail.com> | 2022-11-13 19:51:56 -0500 |
---|---|---|
committer | mattkae <mattkae@protonmail.com> | 2022-11-13 19:51:56 -0500 |
commit | f75dfb5d736b644ad2649452c3056ba71be856b8 (patch) | |
tree | 903efbd21aa3872ec695394ae98a33e35ae79d3e /posts.html | |
parent | a17411cbb8e8a67ff9c4815bd96cdd4ddb1a1ddb (diff) |
The dumbest of blogging systems
Diffstat (limited to 'posts.html')
-rw-r--r-- | posts.html | 93 |
1 files changed, 25 insertions, 68 deletions
@@ -1,86 +1,43 @@ + <!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"> + <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"> + <title>Matthew Kosarek</title> + <link rel="shortcut icon" href="/favicon/favicon.ico" type="image/x-icon"> </head> <body> - <header> + <header> <h1>Matthew Kosarek</h1> <nav> <ul> <li><a href='/'>🏡 Home</a></li> <li><a href='/resume.html'>📘 CV</a></li> + <li><a href="https://www.linkedin.com/in/matthew-kosarek/">🏢 LinkedIn</a></li> <li><a href='/posts.html'>📝 Posts</a></li> </ul> </nav> - </header> - - <section id='post_section'> + </header> + + <section> + <h2>Tags</h2> + <div id='tag_list'> + + <button id="personal">Personal 👨</button> + + </div> + </section + + <section> + <h2>Posts</h2> + <ul id='post_list'> + + <li><a href="/posts//hello_world.html">Hello, World!</a></li> + + </ul> </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 = [ - ]; - - 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> |