A repo for my personal website

Starting to work on blog post functionality

+30
+19
public/blog/item/index.html
··· 1 + <!DOCTYPE html> 2 + <html> 3 + <head> 4 + <link rel="stylesheet" href="/style.css" /> 5 + <script type="text/javascript" src="/blog-item.js"></script> 6 + </head> 7 + <body> 8 + <div id="nav-links"> 9 + <span class="nav-link"><a href="/#">Home</a></span> 10 + <span class="nav-link"><a href="/#about">About</a></span> 11 + <span class="nav-link"><a href="/#portfolio">Portfolio</a></span> 12 + <span class="nav-link"><a href="/blog">Blog</a></span> 13 + <span class="nav-link"><a href="/#links">Links</a></span> 14 + </div> 15 + <div id="blog-content"> 16 + <h3 id="title"></h3> 17 + </div> 18 + </body> 19 + </html>
+11
src/blog-item.ts
··· 1 + window.onload = () => { 2 + fetch('https://bsky.social/xrpc/com.atproto.repo.getRecord?repo=cass.cityboundforest.com&collection=com.cityboundforest.blog&rkey=' + window.location.hash.replace('#', ''), { 3 + headers: { 4 + 'Content-Type': 'application/json' 5 + } 6 + }).then((res) => { 7 + return res.json(); 8 + }).then((data: { value: { content: string, title: string } }) => { 9 + document.getElementById('title')!.innerText = data.value.title; 10 + }); 11 + };