diff options
| author | altaf-creator <dev@altafcreator.com> | 2026-05-01 12:27:42 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2026-05-01 12:27:42 +0800 |
| commit | cdfdd3a2d6bdd2ac37e2bd237b6e760864e41db1 (patch) | |
| tree | 5d692d9c28b01b4d508f94edd7a3b5e21cdee453 /www | |
| parent | db1c6676a13798ee57dbac429a1d5045b60356fb (diff) | |
new backend + turnstile
Diffstat (limited to 'www')
| -rw-r--r-- | www/index.html | 8 | ||||
| -rw-r--r-- | www/projects/index.html | 9 | ||||
| -rw-r--r-- | www/scripts/captcha.js | 17 | ||||
| -rw-r--r-- | www/style.css | 6 |
4 files changed, 38 insertions, 2 deletions
diff --git a/www/index.html b/www/index.html index 1e79d20..7a9c263 100644 --- a/www/index.html +++ b/www/index.html @@ -11,6 +11,13 @@ <link rel="me" href="https://mastodon.gamedev.place/@altaf"> <title>This is altaf-creator</title> <link rel="stylesheet" href="/packages/fontawesome-free-6.5.2-web/css/all.css"> + <link rel="preconnect" href="https://challenges.cloudflare.com" /> + <!-- Cloudflare Turnstile --> + <script + src="https://challenges.cloudflare.com/turnstile/v0/api.js" + async + defer + ></script> </head> <body onload="index();"> @@ -148,6 +155,7 @@ <li><a class="link" href="https://git.altafcreator.com/"><i class="fa-brands fa-git-alt"></i> altaf-git<span class="desktop">: source code repositories for all my projects</span></a></li> </ul> <h1>Contact Me!</h1> + <div class="cf-turnstile" data-sitekey="0x4AAAAAAC1yqhk5tXbXfvXw" data-callback="onTurnstileSuccess"></div> <ul> <li>For <b>business<span class="desktop"> inquiries</span></b>: <a href="mailto:@.com" class="link"><i class="fa-solid fa-envelope"></i> hidden for now, too many spam</a></li> <li>For <span class="desktop">contacting me </span><b>personal<span class="desktop">ly</span></b>: <a href="mailto:@.com" class="link"><i class="fa-solid fa-envelope"></i> hidden for now, too many spam</a></li> diff --git a/www/projects/index.html b/www/projects/index.html index cd4c311..3b975a5 100644 --- a/www/projects/index.html +++ b/www/projects/index.html @@ -40,8 +40,13 @@ <div class="center-grid">
<div class="div-sizing" style="max-width: none;">
<div class="flex-container flex-container-column">
- <span class="heading">Projects</span>
- <a class="button center" href="//git.altafcreator.com" style="margin-left: auto; margin-right: auto;"><i class="fa-brands fa-git-alt"></i> Source Code to My Projects</a>
+ <p>
+ <span class="heading" style="display: inline;">Projects</span>
+ <br class="mobile">
+ <a class="link item-end" href="https://git.altafcreator.com">
+ <i class="fa-brands fa-git-alt"></i> Source Code for My Projects ↗
+ </a>
+ </p>
<div class="flex-container flex" id="top-project-highlight">
<div class="flex full-img-card highlight-card top-gallery-card"
style="background-image: url(/assets/images/game-hero/simplicity_screenshot.png); ">
diff --git a/www/scripts/captcha.js b/www/scripts/captcha.js new file mode 100644 index 0000000..2a58534 --- /dev/null +++ b/www/scripts/captcha.js @@ -0,0 +1,17 @@ +async function onTurnstileSuccess(token) { + const response = await fetch("https://backend.altafcreator.com", { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({"token": token}), + }); + + const result = await response.json(); + + if (result.status) { + alert(result); + } else { + alert("fail"); + } +} diff --git a/www/style.css b/www/style.css index 26378de..55cc0b8 100644 --- a/www/style.css +++ b/www/style.css @@ -378,6 +378,7 @@ li { color: black;
background-color: transparent;
z-index: 9999;
+ height: fit-content;
}
.link:hover {
@@ -466,6 +467,10 @@ li { place-self: center;
}
+.item-end {
+ place-self: end;
+}
+
.full-img-card {
background-color: var(--accent);
margin: 5px;
@@ -517,6 +522,7 @@ li { gap: 8px;
flex-direction: column;
margin-right: 8px;
+ pointer-events: none;
}
.full-img-card.highlight-card:hover {
|
