added some base code for the blog page nothing fancy
Signed-off-by: rodude123 <rodude123@gmail.com>
This commit is contained in:
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^ index.html [QSA,L]
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Test page</title></head><body><a href="#" onclick="return goToURL('post/full-stack-dev-2023-starting-guide');">full-stack-dev-2023-starting-guide</a><p id="url"></p><script src="/blog/index.js"></script></body></html>
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
function goToURL(o){let t=o.split("/"),e="";t.includes("blog")&&(e=o),"post"===t[0]&&(e="/blog/"+o),window.history.pushState(null,null,e),document.querySelector("#url").innerHTML=decodeURI(t[t.length-1])}document.addEventListener("DOMContentLoaded",(()=>{goToURL(window.location.pathname)})),window.addEventListener("popstate",(o=>{goToURL(window.history.state)}));
|
||||
Reference in New Issue
Block a user