index: updated meta tags

- Added JavaScript snippet for handling Dark/Light mode switching
- Updated meta tags to include Twitter image and Open Graph image for splash page
- Created sitemap.xml file with URLs for home, setup, and usage pages
This commit is contained in:
Nathan Woodburn 2023-06-16 16:42:00 +10:00
parent f0a40da0fc
commit 2e7f752ae2
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
5 changed files with 261 additions and 9 deletions

BIN
assets/img/splash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html data-bs-theme="light" lang="en"> <html data-bs-theme="auto" lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
@ -7,15 +7,15 @@
<title>Home - FireWallet</title> <title>Home - FireWallet</title>
<link rel="canonical" href="https://firewallet.woodburn.au/"> <link rel="canonical" href="https://firewallet.woodburn.au/">
<meta property="og:url" content="https://firewallet.woodburn.au/"> <meta property="og:url" content="https://firewallet.woodburn.au/">
<meta name="twitter:image" content="https://firewallet.woodburn.au/assets/img/splash.png">
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:title" content="FireWallet"> <meta property="og:title" content="FireWallet">
<meta name="twitter:title" content="FireWallet"> <meta name="twitter:title" content="FireWallet">
<meta name="twitter:image" content="https://firewallet.woodburn.au/assets/img/FW.png">
<meta name="description" content="The Handshake wallet that is just Fire"> <meta name="description" content="The Handshake wallet that is just Fire">
<meta property="og:image" content="https://firewallet.woodburn.au/assets/img/FW.png">
<meta name="twitter:description" content="The Handshake wallet that is just Fire"> <meta name="twitter:description" content="The Handshake wallet that is just Fire">
<meta property="og:description" content="The Handshake wallet that is just Fire"> <meta property="og:description" content="The Handshake wallet that is just Fire">
<meta name="twitter:card" content="summary"> <meta name="twitter:card" content="summary">
<meta property="og:image" content="https://firewallet.woodburn.au/assets/img/splash.png">
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "http://schema.org", "@context": "http://schema.org",
@ -24,6 +24,86 @@
"url": "https://firewallet.woodburn.au" "url": "https://firewallet.woodburn.au"
} }
</script> </script>
<script>
(function() {
// JavaScript snippet handling Dark/Light mode switching
const getStoredTheme = () => localStorage.getItem('theme');
const setStoredTheme = theme => localStorage.setItem('theme', theme);
const forcedTheme = document.documentElement.getAttribute('data-bss-forced-theme');
const getPreferredTheme = () => {
if (forcedTheme) return forcedTheme;
const storedTheme = getStoredTheme();
if (storedTheme) {
return storedTheme;
}
const pageTheme = document.documentElement.getAttribute('data-bs-theme');
if (pageTheme) {
return pageTheme;
}
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}
const setTheme = theme => {
if (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute('data-bs-theme', 'dark');
} else {
document.documentElement.setAttribute('data-bs-theme', theme);
}
}
setTheme(getPreferredTheme());
const showActiveTheme = (theme, focus = false) => {
const themeSwitchers = [].slice.call(document.querySelectorAll('.theme-switcher'));
if (!themeSwitchers.length) return;
for (const themeSwitcher of themeSwitchers) {
const themeSwitcherText = document.querySelector('#theme-text');
const activeThemeIcon = document.querySelector('.theme-icon-active use');
const btnToActive = document.querySelector('[data-bs-theme-value="' + theme + '"]');
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
element.classList.remove('active');
element.setAttribute('aria-pressed', 'false');
});
btnToActive.classList.add('active');
btnToActive.setAttribute('aria-pressed', 'true');
}
}
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
const storedTheme = getStoredTheme();
if (storedTheme !== 'light' && storedTheme !== 'dark') {
setTheme(getPreferredTheme());
}
});
window.addEventListener('DOMContentLoaded', () => {
showActiveTheme(getPreferredTheme());
document.querySelectorAll('[data-bs-theme-value]')
.forEach(toggle => {
toggle.addEventListener('click', () => {
const theme = toggle.getAttribute('data-bs-theme-value');
setStoredTheme(theme);
setTheme(theme);
showActiveTheme(theme);
})
})
});
})();
</script>
<link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png"> <link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png">
<link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png"> <link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png">
<link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png"> <link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png">

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html data-bs-theme="light" lang="en"> <html data-bs-theme="auto" lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
@ -7,15 +7,95 @@
<title>Setup - FireWallet</title> <title>Setup - FireWallet</title>
<link rel="canonical" href="https://firewallet.woodburn.au/setup.html"> <link rel="canonical" href="https://firewallet.woodburn.au/setup.html">
<meta property="og:url" content="https://firewallet.woodburn.au/setup.html"> <meta property="og:url" content="https://firewallet.woodburn.au/setup.html">
<meta name="twitter:image" content="https://firewallet.woodburn.au/assets/img/splash.png">
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:title" content="FireWallet"> <meta property="og:title" content="FireWallet">
<meta name="twitter:title" content="FireWallet"> <meta name="twitter:title" content="FireWallet">
<meta name="twitter:image" content="https://firewallet.woodburn.au/assets/img/FW.png">
<meta name="description" content="The Handshake wallet that is just Fire"> <meta name="description" content="The Handshake wallet that is just Fire">
<meta property="og:image" content="https://firewallet.woodburn.au/assets/img/FW.png">
<meta name="twitter:description" content="The Handshake wallet that is just Fire"> <meta name="twitter:description" content="The Handshake wallet that is just Fire">
<meta property="og:description" content="The Handshake wallet that is just Fire"> <meta property="og:description" content="The Handshake wallet that is just Fire">
<meta name="twitter:card" content="summary"> <meta name="twitter:card" content="summary">
<meta property="og:image" content="https://firewallet.woodburn.au/assets/img/splash.png">
<script>
(function() {
// JavaScript snippet handling Dark/Light mode switching
const getStoredTheme = () => localStorage.getItem('theme');
const setStoredTheme = theme => localStorage.setItem('theme', theme);
const forcedTheme = document.documentElement.getAttribute('data-bss-forced-theme');
const getPreferredTheme = () => {
if (forcedTheme) return forcedTheme;
const storedTheme = getStoredTheme();
if (storedTheme) {
return storedTheme;
}
const pageTheme = document.documentElement.getAttribute('data-bs-theme');
if (pageTheme) {
return pageTheme;
}
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}
const setTheme = theme => {
if (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute('data-bs-theme', 'dark');
} else {
document.documentElement.setAttribute('data-bs-theme', theme);
}
}
setTheme(getPreferredTheme());
const showActiveTheme = (theme, focus = false) => {
const themeSwitchers = [].slice.call(document.querySelectorAll('.theme-switcher'));
if (!themeSwitchers.length) return;
for (const themeSwitcher of themeSwitchers) {
const themeSwitcherText = document.querySelector('#theme-text');
const activeThemeIcon = document.querySelector('.theme-icon-active use');
const btnToActive = document.querySelector('[data-bs-theme-value="' + theme + '"]');
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
element.classList.remove('active');
element.setAttribute('aria-pressed', 'false');
});
btnToActive.classList.add('active');
btnToActive.setAttribute('aria-pressed', 'true');
}
}
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
const storedTheme = getStoredTheme();
if (storedTheme !== 'light' && storedTheme !== 'dark') {
setTheme(getPreferredTheme());
}
});
window.addEventListener('DOMContentLoaded', () => {
showActiveTheme(getPreferredTheme());
document.querySelectorAll('[data-bs-theme-value]')
.forEach(toggle => {
toggle.addEventListener('click', () => {
const theme = toggle.getAttribute('data-bs-theme-value');
setStoredTheme(theme);
setTheme(theme);
showActiveTheme(theme);
})
})
});
})();
</script>
<link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png"> <link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png">
<link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png"> <link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png">
<link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png"> <link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png">

12
sitemap.xml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>https://firewallet.woodburn.au/</loc>
</url>
<url>
<loc>https://firewallet.woodburn.au/setup.html</loc>
</url>
<url>
<loc>https://firewallet.woodburn.au/usage.html</loc>
</url>
</urlset>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html data-bs-theme="light" lang="en"> <html data-bs-theme="auto" lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
@ -7,15 +7,95 @@
<title>Usage - FireWallet</title> <title>Usage - FireWallet</title>
<link rel="canonical" href="https://firewallet.woodburn.au/usage.html"> <link rel="canonical" href="https://firewallet.woodburn.au/usage.html">
<meta property="og:url" content="https://firewallet.woodburn.au/usage.html"> <meta property="og:url" content="https://firewallet.woodburn.au/usage.html">
<meta name="twitter:image" content="https://firewallet.woodburn.au/assets/img/splash.png">
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta property="og:title" content="FireWallet"> <meta property="og:title" content="FireWallet">
<meta name="twitter:title" content="FireWallet"> <meta name="twitter:title" content="FireWallet">
<meta name="twitter:image" content="https://firewallet.woodburn.au/assets/img/FW.png">
<meta name="description" content="The Handshake wallet that is just Fire"> <meta name="description" content="The Handshake wallet that is just Fire">
<meta property="og:image" content="https://firewallet.woodburn.au/assets/img/FW.png">
<meta name="twitter:description" content="The Handshake wallet that is just Fire"> <meta name="twitter:description" content="The Handshake wallet that is just Fire">
<meta property="og:description" content="The Handshake wallet that is just Fire"> <meta property="og:description" content="The Handshake wallet that is just Fire">
<meta name="twitter:card" content="summary"> <meta name="twitter:card" content="summary">
<meta property="og:image" content="https://firewallet.woodburn.au/assets/img/splash.png">
<script>
(function() {
// JavaScript snippet handling Dark/Light mode switching
const getStoredTheme = () => localStorage.getItem('theme');
const setStoredTheme = theme => localStorage.setItem('theme', theme);
const forcedTheme = document.documentElement.getAttribute('data-bss-forced-theme');
const getPreferredTheme = () => {
if (forcedTheme) return forcedTheme;
const storedTheme = getStoredTheme();
if (storedTheme) {
return storedTheme;
}
const pageTheme = document.documentElement.getAttribute('data-bs-theme');
if (pageTheme) {
return pageTheme;
}
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}
const setTheme = theme => {
if (theme === 'auto' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute('data-bs-theme', 'dark');
} else {
document.documentElement.setAttribute('data-bs-theme', theme);
}
}
setTheme(getPreferredTheme());
const showActiveTheme = (theme, focus = false) => {
const themeSwitchers = [].slice.call(document.querySelectorAll('.theme-switcher'));
if (!themeSwitchers.length) return;
for (const themeSwitcher of themeSwitchers) {
const themeSwitcherText = document.querySelector('#theme-text');
const activeThemeIcon = document.querySelector('.theme-icon-active use');
const btnToActive = document.querySelector('[data-bs-theme-value="' + theme + '"]');
document.querySelectorAll('[data-bs-theme-value]').forEach(element => {
element.classList.remove('active');
element.setAttribute('aria-pressed', 'false');
});
btnToActive.classList.add('active');
btnToActive.setAttribute('aria-pressed', 'true');
}
}
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
const storedTheme = getStoredTheme();
if (storedTheme !== 'light' && storedTheme !== 'dark') {
setTheme(getPreferredTheme());
}
});
window.addEventListener('DOMContentLoaded', () => {
showActiveTheme(getPreferredTheme());
document.querySelectorAll('[data-bs-theme-value]')
.forEach(toggle => {
toggle.addEventListener('click', () => {
const theme = toggle.getAttribute('data-bs-theme-value');
setStoredTheme(theme);
setTheme(theme);
showActiveTheme(theme);
})
})
});
})();
</script>
<link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png"> <link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png">
<link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png"> <link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png">
<link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png"> <link rel="icon" type="image/png" sizes="900x768" href="assets/img/FW.png">