99 lines
4.6 KiB
HTML
99 lines
4.6 KiB
HTML
<link rel="stylesheet" href="/assets/css/main.css">
|
|
<footer>
|
|
<script> // --- 4. Load Footer and QR Code Toggle Logic ----------------------------
|
|
fetch('/parts/footer.html')
|
|
.then(response => response.text())
|
|
.then(data => {
|
|
const footer = document.getElementById('footer');
|
|
if (!footer) return;
|
|
|
|
footer.innerHTML = data;
|
|
|
|
const onChainButton = document.getElementById('onChainButton');
|
|
const lightningButton = document.getElementById('lightningButton');
|
|
const qrCodes = document.getElementById('qrCodes');
|
|
const onChainQRCode = document.getElementById('onChainQRCode');
|
|
const lightningQRCode = document.getElementById('lightningQRCode');
|
|
|
|
if (qrCodes) qrCodes.style.display = 'none';
|
|
|
|
if (onChainButton && lightningButton && qrCodes && onChainQRCode && lightningQRCode) {
|
|
onChainButton.addEventListener('click', function () {
|
|
const isOnChainVisible = onChainQRCode.style.display === 'block';
|
|
qrCodes.style.display = 'block';
|
|
onChainQRCode.style.display = isOnChainVisible ? 'none' : 'block';
|
|
lightningQRCode.style.display = 'none';
|
|
});
|
|
|
|
lightningButton.addEventListener('click', function () {
|
|
const isLightningVisible = lightningQRCode.style.display === 'block';
|
|
qrCodes.style.display = 'block';
|
|
lightningQRCode.style.display = isLightningVisible ? 'none' : 'block';
|
|
onChainQRCode.style.display = 'none';
|
|
});
|
|
}
|
|
})
|
|
.catch(error => console.error('Error loading footer:', error));
|
|
|
|
// --- 5. Fetch and Display Last Update from GitHub -----------------------
|
|
fetch('https://api.github.com/repos/btcforplebs/BTCforPlebs.com/commits/main')
|
|
.then(response => response.json())
|
|
.then(data => {
|
|
const lastUpdate = new Date(data.commit.author.date);
|
|
const formattedDate = lastUpdate.toLocaleDateString();
|
|
const formattedTime = lastUpdate.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
|
|
|
const updateText = document.getElementById('last-updated-text');
|
|
if (updateText) {
|
|
updateText.textContent = `Website last updated: ${formattedDate} ${formattedTime}`;
|
|
}
|
|
})
|
|
.catch(error => {
|
|
console.error('Error fetching last update:', error);
|
|
const updateText = document.getElementById('last-updated-text');
|
|
if (updateText) {
|
|
updateText.textContent = 'Last update: Error fetching data.';
|
|
}
|
|
});
|
|
</script>
|
|
<h3>We operate on solely on Bitcoin donations; from a pleb just like you!</h3>
|
|
|
|
<!-- Button Section -->
|
|
<button class="qr-button" id="onChainButton">Donate with On-Chain</button>
|
|
<button class="qr-button" id="lightningButton">Donate Via Lightning</button>
|
|
<div id="qrCodes" style="display: none;">
|
|
<div id="onChainQRCode" style="display: none;">
|
|
<img src="/images/on-chain-donate.png" alt="On-Chain QR Code">
|
|
<h3>bc1qcx7zwjgjzqm32yd4lhu2upnm06jqutl6w8yruq</h3>
|
|
</div>
|
|
<div id="lightningQRCode" style="display: none;">
|
|
<img src="/images/lightning-donate.png" alt="Lightning QR Code"><br>
|
|
<h3>btcforplebs@ln.pl3bs.co</h3>
|
|
</div>
|
|
</div>
|
|
<!-- Social Links Section -->
|
|
<div class="social-icons">
|
|
<a href="https://nostrudel.ninja/#/u/npub1w4rz7n0vunaau499xh86p84s6v5mmgys48p0nmttt7w36takc9dsf4382j" target="_blank" title="Nostr" class="prefetch">
|
|
<i class="fa-solid fa-link"></i>
|
|
</a>
|
|
<a href="https://youtube.com/@btcforplebs" target="_blank" title="YouTube" class="prefetch">
|
|
<i class="fa-brands fa-youtube"></i>
|
|
</a>
|
|
<a href="https://x.com/btcforplebs" target="_blank" title="X" class="prefetch">
|
|
<i class="fa-brands fa-twitter"></i>
|
|
</a>
|
|
<a href="btcforplebs@gmail.com" target="_blank" title="Email" class="prefetch">
|
|
<i class="fa-solid fa-envelope"></i>
|
|
<a href="https://github.com/btcforplebs/BTCforPlebs.com" target="_blank" title="GitHub" class="prefetch">
|
|
<i class="fa-solid fa-github"></i>
|
|
</a>
|
|
</div>
|
|
<!-- Last Update Section -->
|
|
<div class="last-update">
|
|
<small id="last-updated-text"></small>
|
|
</div>
|
|
|
|
<br></br>
|
|
<small>This website is a work in progress and always under development. None of the content on this website is Financial Advice. <br>Do Your Own Research (DYOR) before converting your worthless Fiat Money into the Hardest Money ever known to mankind.<br> - Stack Sats <br> - HODL your keys<br> - It's not that complicated</small>
|
|
</footer>
|