Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dvho committed Jul 27, 2024
1 parent 10a1ea8 commit 0c93ac6
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 40 deletions.
65 changes: 34 additions & 31 deletions 404.html
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
<!--
Because this site is deployed to GitHub Pages, which doesn't support client-side routing, this file is used to handle the anticipated 404 errors thrown when a user tries to access any page that's not the root. This file forces a redirect to the root path so as to allow react-router-dom to handle routing on the client side...
-->

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Redirecting...</title>
<script type="text/javascript">
//Function to load the index.html content
function loadIndex() {
var xhr = new XMLHttpRequest();
xhr.open('GET', '/index.html', true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
document.open();
document.write(xhr.responseText);
document.close();
fixRelativePaths();
<meta charset="UTF-8">
<title>Redirecting...</title>
<script type="text/javascript">
const loadIndex = () => { //...define a function to load the index.html content which...
const xhr = new XMLHttpRequest() //...creates a new XMLHttpRequest object...
xhr.open('GET', '/index.html', true) //...opens a new GET request to the index.html file...
xhr.onreadystatechange = () => { //...defines the onreadystatechange event handler wherein...
if (xhr.readyState === 4 && xhr.status === 200) { //...if the request is complete and successful...
document.open() //...opens the document...
document.write(xhr.responseText) //...writes the response text to the document...
document.close() //...closes the document...
fixRelativePaths() //...and calls the fixRelativePaths function to fix relative paths for assets...
}
}
xhr.send() //...and sends the request...
}
};
xhr.send();
}

// Function to fix relative paths for assets
function fixRelativePaths() {
var base = document.createElement('base');
base.href = '/';
document.head.appendChild(base);
}
const fixRelativePaths = () => { //...define a function to fix relative paths for assets which...
const base = document.createElement('base') //...creates a new base element...
base.href = '/' //...sets the href attribute to the root path...
document.head.appendChild(base) //...and appends the base element to the head of the document...
}

// Preserve the original path, query string, and hash
var path = window.location.pathname;
var query = window.location.search;
var hash = window.location.hash;
//...get the current path, query, and hash...
const path = window.location.pathname
const query = window.location.search
const hash = window.location.hash

// Load the index.html content
loadIndex();
loadIndex() //...call the loadIndex function to load the index.html content...

// Update the browser's address bar to the original path
history.replaceState(null, '', path + query + hash);
</script>
history.replaceState(null, '', path + query + hash) //...and replace the current history state with the root path, query, and hash
</script>
</head>
<body>
<!--
...The body is intentionally left empty as the user will be redirected immediately
-->
</body>
</html>
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

6 changes: 3 additions & 3 deletions asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "./static/css/main.d1a28e66.css",
"main.js": "./static/js/main.709ce480.js",
"main.js": "./static/js/main.ce91e151.js",
"reactPlayerYouTube.js": "./static/js/reactPlayerYouTube.65d9b216.chunk.js",
"reactPlayerSoundCloud.js": "./static/js/reactPlayerSoundCloud.28c48595.chunk.js",
"reactPlayerVimeo.js": "./static/js/reactPlayerVimeo.27572711.chunk.js",
Expand Down Expand Up @@ -32,7 +32,7 @@
"static/media/veil.png": "./static/media/veil.f66a7a476165cbf24abc.png",
"index.html": "./index.html",
"main.d1a28e66.css.map": "./static/css/main.d1a28e66.css.map",
"main.709ce480.js.map": "./static/js/main.709ce480.js.map",
"main.ce91e151.js.map": "./static/js/main.ce91e151.js.map",
"reactPlayerYouTube.65d9b216.chunk.js.map": "./static/js/reactPlayerYouTube.65d9b216.chunk.js.map",
"reactPlayerSoundCloud.28c48595.chunk.js.map": "./static/js/reactPlayerSoundCloud.28c48595.chunk.js.map",
"reactPlayerVimeo.27572711.chunk.js.map": "./static/js/reactPlayerVimeo.27572711.chunk.js.map",
Expand All @@ -50,6 +50,6 @@
},
"entrypoints": [
"static/css/main.d1a28e66.css",
"static/js/main.709ce480.js"
"static/js/main.ce91e151.js"
]
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="description" content="David Homyk | Music | React.js | Projects | Resume | GitHub | NPM | Contact"><meta name="keywords" content="David Homyk, Music, React.js, Projects, Resume, GitHub, NPM, Contact"><meta name="author" content="David Homyk"><link rel="icon" href="./favicon.ico"/><link rel="apple-touch-icon" href="logo192.png"/><link rel="stylesheet" href="/styles.css"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/><meta name="theme-color" content="rgb(1, 1, 20)"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"/><link rel="stylesheet" href="https://unpkg.com/ionicons@4.5.10-0/dist/css/ionicons.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fontisto@v3.0.4/css/fontisto/fontisto.min.css"><link href="https://fonts.googleapis.com/css?family=Cormorant+Garamond|Nothing+You+Could+Do&display=swap" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/@mediapipe/camera_utils/camera_utils.js" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/@mediapipe/control_utils/control_utils.js" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/@mediapipe/drawing_utils/drawing_utils.js" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/@mediapipe/hands/hands.js" crossorigin="anonymous"></script><link rel="manifest" href="./manifest.json"/><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/emailjs-com@2.3.2/dist/email.min.js"></script><script type="text/javascript">emailjs.init("user_cqWwBjugzaX0BXZjXbz8a")</script><title>David Homyk | Music | React.js | Projects | Resume | GitHub | NPM | Contact</title><script defer="defer" src="./static/js/main.709ce480.js"></script><link href="./static/css/main.d1a28e66.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="description" content="David Homyk | Music | React.js | Projects | Resume | GitHub | NPM | Contact"><meta name="keywords" content="David Homyk, Music, React.js, Projects, Resume, GitHub, NPM, Contact"><meta name="author" content="David Homyk"><link rel="icon" href="./favicon.ico"/><link rel="apple-touch-icon" href="logo192.png"/><link rel="stylesheet" href="/styles.css"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/><meta name="theme-color" content="rgb(1, 1, 20)"/><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"/><link rel="stylesheet" href="https://unpkg.com/ionicons@4.5.10-0/dist/css/ionicons.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fontisto@v3.0.4/css/fontisto/fontisto.min.css"><link href="https://fonts.googleapis.com/css?family=Cormorant+Garamond|Nothing+You+Could+Do&display=swap" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/@mediapipe/camera_utils/camera_utils.js" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/@mediapipe/control_utils/control_utils.js" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/@mediapipe/drawing_utils/drawing_utils.js" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/@mediapipe/hands/hands.js" crossorigin="anonymous"></script><link rel="manifest" href="./manifest.json"/><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/emailjs-com@2.3.2/dist/email.min.js"></script><script type="text/javascript">emailjs.init("user_cqWwBjugzaX0BXZjXbz8a")</script><title>David Homyk | Music | React.js | Projects | Resume | GitHub | NPM | Contact</title><script defer="defer" src="./static/js/main.ce91e151.js"></script><link href="./static/css/main.d1a28e66.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1 change: 0 additions & 1 deletion static/js/main.709ce480.js.map

This file was deleted.

6 changes: 3 additions & 3 deletions static/js/main.709ce480.js → static/js/main.ce91e151.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions static/js/main.ce91e151.js.map

Large diffs are not rendered by default.

0 comments on commit 0c93ac6

Please sign in to comment.