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me-color" content="#100d19">
|
| 7 |
+
<meta name="description" content="Support Peymandc and independent AI exploration.">
|
| 8 |
+
<title>Support Peymandc</title>
|
| 9 |
+
<style>
|
| 10 |
+
:root {
|
| 11 |
+
color-scheme: dark;
|
| 12 |
+
--bg: #0b0911;
|
| 13 |
+
--panel: rgba(27, 21, 39, .88);
|
| 14 |
+
--panel-2: rgba(36, 27, 52, .78);
|
| 15 |
+
--line: rgba(190, 158, 255, .16);
|
| 16 |
+
--text: #f7f3ff;
|
| 17 |
+
--muted: #b8aecb;
|
| 18 |
+
--muted-2: #8e829f;
|
| 19 |
+
--purple: #b78aff;
|
| 20 |
+
--purple-2: #8e5ce6;
|
| 21 |
+
--success: #8ee6bb;
|
| 22 |
+
--shadow: 0 24px 80px rgba(0, 0, 0, .38);
|
| 23 |
+
}
|
| 24 |
+
* { box-sizing: border-box; }
|
| 25 |
+
html { scroll-behavior: smooth; }
|
| 26 |
+
body {
|
| 27 |
+
margin: 0;
|
| 28 |
+
min-height: 100vh;
|
| 29 |
+
color: var(--text);
|
| 30 |
+
background:
|
| 31 |
+
radial-gradient(ellipse at 15% 5%, rgba(111, 62, 171, .27), transparent 35rem),
|
| 32 |
+
radial-gradient(ellipse at 90% 30%, rgba(68, 61, 150, .18), transparent 34rem),
|
| 33 |
+
linear-gradient(180deg, #100d19 0%, var(--bg) 70%);
|
| 34 |
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
| 35 |
+
line-height: 1.55;
|
| 36 |
+
}
|
| 37 |
+
a { color: inherit; }
|
| 38 |
+
.page { width: min(100% - 36px, 980px); margin: 0 auto; padding: 34px 0 30px; }
|
| 39 |
+
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 72px; }
|
| 40 |
+
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; letter-spacing: .15em; font-size: .95rem; }
|
| 41 |
+
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(202, 171, 255, .45); border-radius: 11px; background: linear-gradient(145deg, rgba(177, 128, 255, .28), rgba(83, 53, 132, .18)); color: #e7d7ff; box-shadow: 0 0 28px rgba(160, 105, 255, .18); }
|
| 42 |
+
.top-label { color: #d8c7f7; border: 1px solid var(--line); background: rgba(31, 23, 46, .65); border-radius: 999px; padding: 7px 13px; font-size: .72rem; letter-spacing: .16em; font-weight: 750; }
|
| 43 |
+
.hero { max-width: 760px; margin: 0 auto 48px; text-align: center; }
|
| 44 |
+
.eyebrow { color: var(--purple); font-size: .76rem; font-weight: 750; letter-spacing: .22em; text-transform: uppercase; }
|
| 45 |
+
h1 { margin: 15px 0 16px; font-size: clamp(2.5rem, 7vw, 5.2rem); letter-spacing: -.065em; line-height: .99; font-weight: 820; }
|
| 46 |
+
h1 span { background: linear-gradient(100deg, #fff 10%, #d6baff 55%, #9c7be8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
|
| 47 |
+
.intro { max-width: 650px; margin: 0 auto; color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.14rem); }
|
| 48 |
+
.hero-note { margin-top: 22px; color: #d7c6f3; font-size: .9rem; }
|
| 49 |
+
.methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
|
| 50 |
+
.card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; padding: 25px; background: linear-gradient(155deg, rgba(37, 28, 53, .94), rgba(20, 16, 30, .96)); box-shadow: var(--shadow); }
|
| 51 |
+
.card::before { content: ""; position: absolute; width: 190px; height: 190px; right: -100px; top: -115px; border-radius: 50%; background: rgba(158, 107, 240, .12); filter: blur(2px); pointer-events: none; }
|
| 52 |
+
.card-head { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; position: relative; }
|
| 53 |
+
.icon { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; color: #e3d1ff; background: linear-gradient(145deg, rgba(174, 127, 255, .22), rgba(107, 77, 158, .18)); border: 1px solid rgba(193, 158, 255, .22); }
|
| 54 |
+
.icon svg { width: 21px; height: 21px; }
|
| 55 |
+
h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.02em; }
|
| 56 |
+
.sub { margin: 3px 0 0; color: var(--muted-2); font-size: .86rem; }
|
| 57 |
+
.field { margin-top: 17px; }
|
| 58 |
+
.field-label { display: block; margin-bottom: 7px; color: #bfb2d1; font-size: .72rem; text-transform: uppercase; font-weight: 750; letter-spacing: .12em; }
|
| 59 |
+
.value-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 11px 10px 14px; border-radius: 12px; border: 1px solid rgba(192, 166, 233, .13); background: rgba(8, 7, 13, .46); }
|
| 60 |
+
.value { min-width: 0; overflow-wrap: anywhere; color: #f5efff; font-size: .94rem; font-weight: 650; }
|
| 61 |
+
.muted-value { color: #8e829f; font-weight: 500; }
|
| 62 |
+
button, .button-link { border: 0; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; padding: 10px 13px; color: #160f22; background: linear-gradient(120deg, #d9c1ff, #ad82ef); font: inherit; font-size: .82rem; font-weight: 800; white-space: nowrap; transition: transform .18s ease, filter .18s ease; }
|
| 63 |
+
button:hover, .button-link:hover { transform: translateY(-1px); filter: brightness(1.08); }
|
| 64 |
+
button:focus-visible, a:focus-visible { outline: 2px solid #e3d1ff; outline-offset: 3px; }
|
| 65 |
+
.copy-icon { width: 15px; height: 15px; }
|
| 66 |
+
.network-note { margin: 9px 2px 0; color: #a99db9; font-size: .78rem; }
|
| 67 |
+
.crypto-list { display: grid; gap: 18px; }
|
| 68 |
+
.paypal-card { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
|
| 69 |
+
.paypal-card .card-head { margin: 0; }
|
| 70 |
+
.paypal-copy { color: var(--muted); font-size: .88rem; margin: 7px 0 0; }
|
| 71 |
+
.paypal-action { flex: 0 0 auto; }
|
| 72 |
+
.footer { margin: 54px auto 0; text-align: center; max-width: 650px; }
|
| 73 |
+
.heart { color: #d2aaff; }
|
| 74 |
+
.thanks { color: #d8c9ec; font-size: 1rem; }
|
| 75 |
+
.footer-small { color: var(--muted-2); font-size: .78rem; margin-top: 14px; }
|
| 76 |
+
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; padding: 11px 16px; border: 1px solid rgba(142, 230, 187, .28); border-radius: 999px; color: #dfffee; background: #182a25; box-shadow: var(--shadow); font-size: .86rem; transition: opacity .2s ease, transform .2s ease; z-index: 5; }
|
| 77 |
+
.toast.show { opacity: 1; transform: translate(-50%, 0); }
|
| 78 |
+
.hidden { display: none !important; }
|
| 79 |
+
@media (max-width: 700px) {
|
| 80 |
+
.page { width: min(100% - 28px, 560px); padding-top: 22px; }
|
| 81 |
+
.topbar { margin-bottom: 54px; }
|
| 82 |
+
.methods { grid-template-columns: 1fr; }
|
| 83 |
+
.paypal-card { grid-column: auto; align-items: flex-start; flex-direction: column; }
|
| 84 |
+
.paypal-action { width: 100%; }
|
| 85 |
+
.paypal-action .button-link { width: 100%; }
|
| 86 |
+
.card { padding: 22px; }
|
| 87 |
+
.footer { margin-top: 42px; }
|
| 88 |
+
}
|
| 89 |
+
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
|
| 90 |
+
</style>
|
| 91 |
+
</head>
|
| 92 |
+
<body>
|
| 93 |
+
<main class="page">
|
| 94 |
+
<header class="topbar">
|
| 95 |
+
<a class="brand" id="brand-link" href="https://huggingface.co/Peymandc" target="_blank" rel="noopener noreferrer">
|
| 96 |
+
<span class="brand-mark" aria-hidden="true">P</span>
|
| 97 |
+
<span>PEYMANDC</span>
|
| 98 |
+
</a>
|
| 99 |
+
<span class="top-label">SUPPORT</span>
|
| 100 |
+
</header>
|
| 101 |
+
|
| 102 |
+
<section class="hero" aria-labelledby="page-title">
|
| 103 |
+
<div class="eyebrow">Independent AI exploration</div>
|
| 104 |
+
<h1 id="page-title"><span>Support the work.</span></h1>
|
| 105 |
+
<p class="intro" id="intro-text">Your support helps fund experiments with open-weight models, model modifications, research, and future releases.</p>
|
| 106 |
+
<p class="hero-note">Every contribution helps keep independent experimentation moving forward. <span class="heart">♥</span></p>
|
| 107 |
+
</section>
|
| 108 |
+
|
| 109 |
+
<section class="methods" aria-label="Ways to support Peymandc">
|
| 110 |
+
<article class="card" id="bank-card">
|
| 111 |
+
<div class="card-head">
|
| 112 |
+
<div class="icon" aria-hidden="true">
|
| 113 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 10h18M7 15h3"/></svg>
|
| 114 |
+
</div>
|
| 115 |
+
<div><h2>Bank transfer</h2><p class="sub">For supporters in Iran · IRR</p></div>
|
| 116 |
+
</div>
|
| 117 |
+
<div class="field" id="bank-name-field">
|
| 118 |
+
<span class="field-label">Bank</span>
|
| 119 |
+
<div class="value-row"><span class="value" id="bank-name">Your bank name</span></div>
|
| 120 |
+
</div>
|
| 121 |
+
<div class="field" id="account-name-field">
|
| 122 |
+
<span class="field-label">Account holder</span>
|
| 123 |
+
<div class="value-row"><span class="value" id="account-name">Your account name</span></div>
|
| 124 |
+
</div>
|
| 125 |
+
<div class="field" id="card-number-field">
|
| 126 |
+
<span class="field-label">Card number</span>
|
| 127 |
+
<div class="value-row">
|
| 128 |
+
<span class="value" id="card-number" dir="ltr">0000 0000 0000 0000</span>
|
| 129 |
+
<button type="button" class="copy-button" data-copy="card-number" aria-label="Copy bank card number"><svg class="copy-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="8" y="8" width="12" height="12" rx="2"/><path d="M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3"/></svg>Copy</button>
|
| 130 |
+
</div>
|
| 131 |
+
</div>
|
| 132 |
+
<p class="network-note">Please double-check the recipient details before sending.</p>
|
| 133 |
+
</article>
|
| 134 |
+
|
| 135 |
+
<article class="card" id="crypto-card">
|
| 136 |
+
<div class="card-head">
|
| 137 |
+
<div class="icon" aria-hidden="true">
|
| 138 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7H14a3.5 3.5 0 0 1 0 7H6"/><path d="M7 5h10M7 19h10"/></svg>
|
| 139 |
+
</div>
|
| 140 |
+
<div><h2>Cryptocurrency</h2><p class="sub">Please use the exact network shown</p></div>
|
| 141 |
+
</div>
|
| 142 |
+
<div class="crypto-list" id="crypto-list">
|
| 143 |
+
<div class="field crypto-entry">
|
| 144 |
+
<span class="field-label">Asset · Network</span>
|
| 145 |
+
<div class="value-row"><span class="value" id="crypto-label">USDT · TRC20</span></div>
|
| 146 |
+
<div class="field-label" style="margin-top:13px">Wallet address</div>
|
| 147 |
+
<div class="value-row">
|
| 148 |
+
<span class="value muted-value" id="crypto-address" dir="ltr">Add your public wallet address</span>
|
| 149 |
+
<button type="button" class="copy-button" data-copy="crypto-address" aria-label="Copy wallet address"><svg class="copy-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="8" y="8" width="12" height="12" rx="2"/><path d="M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3"/></svg>Copy</button>
|
| 150 |
+
</div>
|
| 151 |
+
</div>
|
| 152 |
+
</div>
|
| 153 |
+
<p class="network-note">Only send the displayed asset using its specified network. Transfers on unsupported networks may be unrecoverable.</p>
|
| 154 |
+
</article>
|
| 155 |
+
|
| 156 |
+
<article class="card paypal-card hidden" id="paypal-card">
|
| 157 |
+
<div class="card-head">
|
| 158 |
+
<div class="icon" aria-hidden="true">
|
| 159 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M7 20H5l2.4-14h7.2a4 4 0 0 1 3.9 4.7l-.2 1.1a5 5 0 0 1-4.9 4H9"/><path d="M9 16h6.5a4 4 0 0 0 3.9-3.2l.2-1.1"/></svg>
|
| 160 |
+
</div>
|
| 161 |
+
<div><h2>PayPal</h2><p class="paypal-copy">Support through PayPal, where available.</p></div>
|
| 162 |
+
</div>
|
| 163 |
+
<div class="paypal-action"><a class="button-link" id="paypal-link" href="#" target="_blank" rel="noopener noreferrer">Continue to PayPal <span aria-hidden="true">↗</span></a></div>
|
| 164 |
+
</article>
|
| 165 |
+
</section>
|
| 166 |
+
|
| 167 |
+
<footer class="footer">
|
| 168 |
+
<p class="thanks">Thank you for supporting independent work. <span class="heart">♥</span></p>
|
| 169 |
+
<p class="footer-small">Peymandc · Open exploration, shared with the community.</p>
|
| 170 |
+
</footer>
|
| 171 |
+
</main>
|
| 172 |
+
<div class="toast" id="toast" role="status" aria-live="polite">Copied</div>
|
| 173 |
+
|
| 174 |
+
<script>
|
| 175 |
+
/* ================================================================
|
| 176 |
+
EDIT YOUR PAYMENT DETAILS HERE.
|
| 177 |
+
Leave paypalUrl empty to hide the PayPal card.
|
| 178 |
+
Never put passwords, PINs, CVV2, private keys, or seed phrases here.
|
| 179 |
+
================================================================ */
|
| 180 |
+
const SUPPORT_CONFIG = {
|
| 181 |
+
bank: {
|
| 182 |
+
enabled: true,
|
| 183 |
+
bankName: "ADD BANK NAME",
|
| 184 |
+
accountName: "ADD ACCOUNT HOLDER NAME",
|
| 185 |
+
cardNumber: "0000 0000 0000 0000"
|
| 186 |
+
},
|
| 187 |
+
crypto: [
|
| 188 |
+
{
|
| 189 |
+
enabled: true,
|
| 190 |
+
asset: "USDT",
|
| 191 |
+
network: "TRC20 (TRON)",
|
| 192 |
+
address: "ADD_PUBLIC_WALLET_ADDRESS"
|
| 193 |
+
}
|
| 194 |
+
// Add another wallet by copying the object above and changing its details.
|
| 195 |
+
],
|
| 196 |
+
// Add a payment URL only if you are legitimately eligible to use that PayPal account.
|
| 197 |
+
paypalUrl: ""
|
| 198 |
+
};
|
| 199 |
+
|
| 200 |
+
const $ = (id) => document.getElementById(id);
|
| 201 |
+
const isPlaceholder = (value) => !value || /^(ADD_|0000|Your )/i.test(String(value).trim());
|
| 202 |
+
|
| 203 |
+
function configureBank() {
|
| 204 |
+
const b = SUPPORT_CONFIG.bank;
|
| 205 |
+
if (!b || !b.enabled) { $("bank-card").classList.add("hidden"); return; }
|
| 206 |
+
$("bank-name").textContent = b.bankName || "";
|
| 207 |
+
$("account-name").textContent = b.accountName || "";
|
| 208 |
+
$("card-number").textContent = b.cardNumber || "";
|
| 209 |
+
if (isPlaceholder(b.cardNumber)) $("card-number").classList.add("muted-value");
|
| 210 |
+
[ ["bank-name-field", b.bankName], ["account-name-field", b.accountName], ["card-number-field", b.cardNumber] ].forEach(([id, value]) => {
|
| 211 |
+
if (!value) $(id).classList.add("hidden");
|
| 212 |
+
});
|
| 213 |
+
if (isPlaceholder(b.cardNumber)) $("card-number-field").querySelector("button").disabled = true;
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
function configureCrypto() {
|
| 217 |
+
const list = (SUPPORT_CONFIG.crypto || []).filter(x => x && x.enabled);
|
| 218 |
+
if (!list.length) { $("crypto-card").classList.add("hidden"); return; }
|
| 219 |
+
const host = $("crypto-list");
|
| 220 |
+
host.innerHTML = "";
|
| 221 |
+
list.forEach((wallet, index) => {
|
| 222 |
+
const entry = document.createElement("div");
|
| 223 |
+
entry.className = "field crypto-entry";
|
| 224 |
+
const label = document.createElement("span");
|
| 225 |
+
label.className = "field-label";
|
| 226 |
+
label.textContent = "Asset · Network";
|
| 227 |
+
const row1 = document.createElement("div");
|
| 228 |
+
row1.className = "value-row";
|
| 229 |
+
const title = document.createElement("span");
|
| 230 |
+
title.className = "value";
|
| 231 |
+
title.textContent = `${wallet.asset || "Crypto"} · ${wallet.network || "Network not specified"}`;
|
| 232 |
+
row1.appendChild(title);
|
| 233 |
+
const addressLabel = document.createElement("div");
|
| 234 |
+
addressLabel.className = "field-label";
|
| 235 |
+
addressLabel.style.marginTop = "13px";
|
| 236 |
+
addressLabel.textContent = "Wallet address";
|
| 237 |
+
const row2 = document.createElement("div");
|
| 238 |
+
row2.className = "value-row";
|
| 239 |
+
const address = document.createElement("span");
|
| 240 |
+
address.className = "value";
|
| 241 |
+
address.dir = "ltr";
|
| 242 |
+
address.textContent = wallet.address || "";
|
| 243 |
+
if (isPlaceholder(wallet.address)) address.classList.add("muted-value");
|
| 244 |
+
const button = document.createElement("button");
|
| 245 |
+
button.type = "button";
|
| 246 |
+
button.className = "copy-button";
|
| 247 |
+
button.textContent = "Copy";
|
| 248 |
+
button.setAttribute("aria-label", `Copy ${wallet.asset || "crypto"} wallet address`);
|
| 249 |
+
button.dataset.copyDynamic = "true";
|
| 250 |
+
if (isPlaceholder(wallet.address)) button.disabled = true;
|
| 251 |
+
button.addEventListener("click", () => copyText(wallet.address));
|
| 252 |
+
row2.append(address, button);
|
| 253 |
+
entry.append(label, row1, addressLabel, row2);
|
| 254 |
+
host.appendChild(entry);
|
| 255 |
+
});
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
function configurePayPal() {
|
| 259 |
+
const url = (SUPPORT_CONFIG.paypalUrl || "").trim();
|
| 260 |
+
if (!url) return;
|
| 261 |
+
try {
|
| 262 |
+
const parsed = new URL(url);
|
| 263 |
+
if (parsed.protocol !== "https:" || !/(^|\.)paypal\.com$/i.test(parsed.hostname)) return;
|
| 264 |
+
$("paypal-link").href = parsed.href;
|
| 265 |
+
$("paypal-card").classList.remove("hidden");
|
| 266 |
+
} catch (_) { /* Keep PayPal hidden if the URL is invalid. */ }
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
let toastTimer;
|
| 270 |
+
function showToast(message) {
|
| 271 |
+
const toast = $("toast");
|
| 272 |
+
toast.textContent = message;
|
| 273 |
+
toast.classList.add("show");
|
| 274 |
+
clearTimeout(toastTimer);
|
| 275 |
+
toastTimer = setTimeout(() => toast.classList.remove("show"), 1800);
|
| 276 |
+
}
|
| 277 |
+
async function copyText(value) {
|
| 278 |
+
try {
|
| 279 |
+
await navigator.clipboard.writeText(String(value));
|
| 280 |
+
showToast("Copied to clipboard");
|
| 281 |
+
} catch (_) {
|
| 282 |
+
showToast("Copy unavailable — please select and copy manually");
|
| 283 |
+
}
|
| 284 |
+
}
|
| 285 |
+
document.querySelectorAll(".copy-button[data-copy]").forEach(button => {
|
| 286 |
+
button.addEventListener("click", () => {
|
| 287 |
+
const element = $(button.dataset.copy);
|
| 288 |
+
if (element) copyText(element.textContent.trim());
|
| 289 |
+
});
|
| 290 |
+
});
|
| 291 |
+
|
| 292 |
+
configureBank();
|
| 293 |
+
configureCrypto();
|
| 294 |
+
configurePayPal();
|
| 295 |
+
</script>
|
| 296 |
+
</body>
|
| 297 |
</html>
|