aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/DiscordActivity.astro
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/DiscordActivity.astro')
-rw-r--r--src/components/DiscordActivity.astro87
1 files changed, 0 insertions, 87 deletions
diff --git a/src/components/DiscordActivity.astro b/src/components/DiscordActivity.astro
deleted file mode 100644
index a07d660..0000000
--- a/src/components/DiscordActivity.astro
+++ /dev/null
@@ -1,87 +0,0 @@
-<script>
- async function fetchData() {
- const API_URL = "https://api.lanyard.rest/v1/users/246787839570739211";
-
- try {
- const response = await fetch(API_URL);
- const data = await response.json();
-
- if (data && data.success) {
- const activities = data.data.activities;
- let activityHTML = "";
- if (activities.length === 0) {
- activityHTML = "<p>Not doing anything at the moment :(</p>";
- } else {
- for (const activity of activities) {
- const imageUrl =
- activity.assets && activity.assets.large_image
- ? activity.assets.large_image
- : "";
-
- activityHTML += `
- <div class="activity-card">
- <h3>${activity.name}</h3>
- <p>${activity.details ? activity.details : ""}</p>
- <p>${activity.state ? activity.state : ""}</p>
- </div>
- `;
- }
- }
-
- document.querySelector("#activities").innerHTML = activityHTML;
- } else {
- console.error("Failed fetching user data:", data.message);
- }
- } catch (error) {
- console.error("Network error:", error);
- }
- }
-
- window.addEventListener("DOMContentLoaded", fetchData);
-</script>
-
-<section>
- <div>
- <div id="activities"></div>
- </div>
-</section>
-<style>
-section {
- max-width: 800px;
- margin: 40px auto;
- padding: 24px;
- border-radius: 12px;
- background-color: #1a1a1a;
- font-family: 'Courier New', Courier, monospace;
- color: #c0c0c0;
-}
-
-
-.activity-card {
- background-color: #1a1a1a;
- padding: 20px;
- margin-bottom: 16px;
- border: 1px solid #c0c0c0;
- display: flex;
- flex-direction: column;
-}
-
-.activity-card h3 {
- margin-top: 0;
- margin-bottom: 8px;
-}
-
-.activity-card p {
- margin: 0;
- font-size: 0.5em;
- line-height: 1.5;
- padding: 4px 0;
-}
-
-.activity-card p + p {
- margin-top: 6px;
- border-top: 1px dashed #c0c0c0;
- padding-top: 8px;
-}
-
-</style> \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage