From ad5f0159dbdfcc17803148f8756f9b7eea413c15 Mon Sep 17 00:00:00 2001
From: ditatompel
Date: Wed, 8 May 2024 18:43:09 +0700
Subject: [PATCH] Use local static image for qr image donation
---
frontend/src/routes/(front)/+page.js | 42 +++---
frontend/src/routes/(front)/+page.svelte | 156 ++++-------------------
frontend/static/img/monerotip.png | Bin 0 -> 7547 bytes
3 files changed, 55 insertions(+), 143 deletions(-)
create mode 100644 frontend/static/img/monerotip.png
diff --git a/frontend/src/routes/(front)/+page.js b/frontend/src/routes/(front)/+page.js
index 959c7dd..6525fa4 100644
--- a/frontend/src/routes/(front)/+page.js
+++ b/frontend/src/routes/(front)/+page.js
@@ -1,22 +1,34 @@
/** @type {import('./$types').PageLoad} */
export async function load({ data }) {
- /* prettier-ignore */
- const metaDefaults = {
- title: 'Monero (XMR)',
- description: 'Monero is private, decentralized cryptocurrency that keeps your finances confidential and secure.',
- keywords: 'monero,xmr,monero node,xmrnode,cryptocurrency'
- };
-
return {
meta: {
- title: metaDefaults.title,
- description: metaDefaults.description,
- keywords: metaDefaults.keywords,
- // Twitter
- twitter: {
- title: metaDefaults.title,
- description: metaDefaults.description
- }
+ title: 'Monero (XMR)',
+ description:
+ 'Monero is private, decentralized cryptocurrency that keeps your finances confidential and secure.',
+ keywords: 'monero,xmr,monero node,xmrnode,cryptocurrency'
+ },
+ links: [
+ { text: 'moneroworld.com', uri: 'https://moneroworld.com' },
+ { text: 'monero.how', uri: 'https://www.monero.how' },
+ { text: 'monero.observer', uri: 'https://www.monero.observer' },
+ { text: 'sethforprivacy.com', uri: 'https://sethforprivacy.com' },
+ { text: 'localmonero.co', uri: 'https://localmonero.co/knowledge' },
+ { text: 'revuo-xmr.com', uri: 'https://revuo-xmr.com/' }
+ ],
+ stagenet: [
+ { label: 'P2P', value: 'testnet.xmr.ditatompel.com:28080', key: 'tnetP2P' },
+ { label: 'RPC', value: 'testnet.xmr.ditatompel.com:28089', key: 'tnetRPC' },
+ { label: 'RPC SSL', value: 'testnet.xmr.ditatompel.com:443', key: 'tnetSSL' }
+ ],
+ testnet: [
+ { label: 'P2P', value: 'testnet.xmr.ditatompel.com:28080', key: 'tnetP2P' },
+ { label: 'RPC', value: 'testnet.xmr.ditatompel.com:28089', key: 'tnetRPC' },
+ { label: 'RPC SSL', value: 'testnet.xmr.ditatompel.com:443', key: 'tnetSSL' }
+ ],
+ donation: {
+ address:
+ '8BWYe6GzbNKbxe3D8mPkfFMQA2rViaZJFhWShhZTjJCNG6EZHkXRZCKHiuKmwwe4DXDYF8KKcbGkvNYaiRG3sNt7JhnVp7D',
+ qr: '/img/monerotip.png'
}
};
}
diff --git a/frontend/src/routes/(front)/+page.svelte b/frontend/src/routes/(front)/+page.svelte
index 7d9964d..270f390 100644
--- a/frontend/src/routes/(front)/+page.svelte
+++ b/frontend/src/routes/(front)/+page.svelte
@@ -11,7 +11,6 @@
/** @type {import('./$types').PageData} */
export let data;
- let currentVariant = 'bg-initial';
let donationCopied = false;
/** @param {Event & { target: HTMLInputElement }} e */
@@ -30,18 +29,6 @@
donationCopied = false;
}, 2500);
}
-
- let snetProtos = [
- { label: 'P2P', value: 'stagenet.xmr.ditatompel.com:38080', key: 'snetP2P' },
- { label: 'RPC', value: 'stagenet.xmr.ditatompel.com:38089', key: 'snetRPC' },
- { label: 'RPC SSL', value: 'stagenet.xmr.ditatompel.com:443', key: 'snetSSL' }
- ];
-
- let tnetProtos = [
- { label: 'P2P', value: 'testnet.xmr.ditatompel.com:28080', key: 'tnetP2P' },
- { label: 'RPC', value: 'testnet.xmr.ditatompel.com:28089', key: 'tnetRPC' },
- { label: 'RPC SSL', value: 'testnet.xmr.ditatompel.com:443', key: 'tnetSSL' }
- ];
@@ -49,58 +36,29 @@
{data.meta.description}
+
-
+
GetMonero.org
-
+
monero-project
-
+
r/Monero
-
+
@monero
-
+
monerocurrency
-
+
monero
@@ -116,75 +74,32 @@
If you're new to Monero, the official links above is a perfect place to start.
Of course, there are lots of personal and community sites which generally discusses a lot
- about Monero, such as moneroworld.com,
- monero.how,
- monero.observer,
- sethforprivacy.com,
- localmonero.co,
- revuo-xmr.com, etc, can be an other good reference for you.
+ about Monero, such as
+ {#each data.links as link}
+ {link.text},
+ {/each} etc; can be an other good reference for you.
You can find few resources I provide related to Monero below:
+
@@ -198,7 +113,7 @@
Stagenet is what you need to learn Monero safely. Stagenet is technically equivalent to
mainnet, both in terms of features and consensus rules.
- {#each snetProtos as { label, value, key }}
+ {#each data.stagenet as { label, value, key }}