GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
From: Muhammad Rizki <[email protected]>
To: Ammar Faizi <[email protected]>
Cc: Muhammad Rizki <[email protected]>,
	Alviro Iskandar Setiawan <[email protected]>,
	Irvan Malik Azantha <[email protected]>,
	Memet Zx <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>
Subject: [PATCH v1 13/13] chore: remove unused files
Date: Tue,  3 Oct 2023 09:51:46 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

This commit removes the unused files `build.js`, `index.html`, and
`style.css`, as they are no longer in use.

Signed-off-by: Muhammad Rizki <[email protected]>
---
 build.js   |  37 ---
 index.html | 644 -----------------------------------------------------
 style.css  |  57 -----
 3 files changed, 738 deletions(-)
 delete mode 100644 build.js
 delete mode 100644 index.html
 delete mode 100644 style.css

diff --git a/build.js b/build.js
deleted file mode 100644
index 1c85989..0000000
--- a/build.js
+++ /dev/null
@@ -1,37 +0,0 @@
-const { minify } = require("html-minifier-terser");
-const fs = require("fs");
-const path = require("path");
-
-const htmlMinifierOptions = {
-  caseSensitive: true,
-  collapseBooleanAttributes: true,
-  collapseInlineTagWhitespace: true,
-  collapseWhitespace: true,
-  html5: true,
-  minifyJS: true,
-  minifyCSS: true,
-  removeComments: true,
-};
-
-const htmlMinify = (html) => minify(html, htmlMinifierOptions);
-
-const htmlMinifyFile = (file) => {
-  const filePath = path.join(__dirname, file);
-  const html = fs.readFileSync(filePath, "utf8");
-  const minifiedHtml = htmlMinify(html)
-    .then((minifiedHtml) => {
-      fs.writeFileSync(filePath, minifiedHtml);
-    })
-    .catch((err) => {
-      console.log(`[ERROR] ${err}`);
-    })
-    .finally(() => {
-      console.log(`[INFO] ${filePath} minified.`);
-    });
-
-  return () => minifiedHtml;
-};
-
-htmlMinifyFile("dist/index.html");
-
-console.log("HTML minified.");
diff --git a/index.html b/index.html
deleted file mode 100644
index 5c6eef3..0000000
--- a/index.html
+++ /dev/null
@@ -1,644 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-
-  <head>
-    <meta charset="UTF-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
-    <meta property="og:title" content="GNU/Weeb" />
-    <meta property="og:description" content="We are working to build community through open source technology." />
-    <meta property="og:image" content="./static/og-image.png" />
-    <meta property="og:url" content="https://www.gnuweeb.org/" />
-    <meta property="og:type" content="website" />
-    <meta property="og:site_name" content="GNU/Weeb" />
-    <meta name="twitter:card" content="summary_large_image" />
-    <meta name="description" content="We are working to build community through open source technology.">
-
-    <title>GNU/Weeb Landing</title>
-
-    <link rel="stylesheet" href="dist/style.css" />
-    <link rel="shortcut icon" href="./static/favicon.ico" type="image/x-icon" />
-    <link rel="canonical" href="https://www.gnuweeb.org/" />
-     <link
-      rel="apple-touch-icon"
-      sizes="180x180"
-      href="./static/apple-touch-icon.png"
-    />
-    <link
-      rel="icon"
-      type="image/png"
-      sizes="32x32"
-      href="./static/favicon-32x32.png"
-    />
-    <link
-      rel="icon"
-      type="image/png"
-      sizes="16x16"
-      href="./static/favicon-16x16.png"
-    />
-    <link rel="manifest" href="./static/site.webmanifest" />
-  </head>
-
-  <body class="w-full px-20 bg-neutral-950 text-neutral-200">
-    <main class="flex justify-center w-full min-h-screen space-x-3">
-
-      <!-- RECENT MESSAGES SECTION | RIGHT -->
-      <section class="hidden xl:flex flex-col space-y-3 py-5 max-h-screen">
-        <section class="border border-neutral-800 rounded-xl overflow-hidden w-[20rem]">
-          <div class="flex px-5 py-2 border-b border-neutral-800 justify-between items-center">
-            <h1 class="text-lg font-bold text-center w-full">Recent Group Messages</h1>
-          </div>
-          <div id="recent-messages" class="px-3 py-2 space-y-1 text-sm max-h-[300px] overflow-y-auto">
-          </div>
-          <a href="https://t.me/gnuweeb" draggable="false" target="_blank">
-            <div
-              class="p-3 border-t border-neutral-800 hover:bg-neutral-800
-                    flex justify-center items-center w-full"
-            >
-              <span class="select-none font-semibold text-sky-500 mr-1">Join</span>
-              <svg class="w-3 h-3 text-neutral-500" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
-                <path d="M 40.960938 4.9804688 A 2.0002 2.0002 0 0 0 40.740234 5 L 28 5 A 2.0002 2.0002 0 1 0 28 9 L 36.171875 9 L 22.585938 22.585938 A 2.0002 2.0002 0 1 0 25.414062 25.414062 L 39 11.828125 L 39 20 A 2.0002 2.0002 0 1 0 43 20 L 43 7.2460938 A 2.0002 2.0002 0 0 0 40.960938 4.9804688 z M 12.5 8 C 8.3826878 8 5 11.382688 5 15.5 L 5 35.5 C 5 39.617312 8.3826878 43 12.5 43 L 32.5 43 C 36.617312 43 40 39.617312 40 35.5 L 40 26 A 2.0002 2.0002 0 1 0 36 26 L 36 35.5 C 36 37.446688 34.446688 39 32.5 39 L 12.5 39 C 10.553312 39 9 37.446688 9 35.5 L 9 15.5 C 9 13.553312 10.553312 12 12.5 12 L 22 12 A 2.0002 2.0002 0 1 0 22 8 L 12.5 8 z"></path>
-              </svg>
-            </div>
-          </a>
-        </section>
-      </section>
-
-      <!-- CONTENT PROFILE | CENTER -->
-      <section class="flex flex-col space-y-3">
-
-        <!-- PROFILE SECTION -->
-        <section class="border border-neutral-800 rounded-b-xl overflow-hidden max-w-3xl">
-          <img
-            src="./static/img/profile-cover.jpg"
-            alt=""
-            draggable="false"
-            style="filter: brightness(70%);"
-          >
-          <div class="relative flex flex-col px-5 py-3 space-x-3 space-y-3">
-            <div class="flex space-x-1 md:space-x-2 lg:space-x-3 pb-5 border-b border-neutral-800">
-              <div class="-mt-16">
-                <img
-                  src="https://github.com/GNUWeeb.png"
-                  alt="GNU/Weeb's GitHub Profile Picture"
-                  draggable="false"
-                  class="rounded-full w-44 border-4 border-neutral-950 bg-neutral-950"
-                />
-              </div>
-              <div class="flex justify-between w-full">
-                <div class="text-2xl md:text-3xl font-bold">
-                  GNU/Weeb
-                </div>
-                <div>
-                  <a
-                    href="https://github.com/GNUWeeb"
-                    target="_blank"
-                    title="View GNU/Weeb's Organization on GitHub"
-                    class="relative bottom-1 p-2 rounded-full hover:bg-neutral-800 flex items-center
-                          justify-center transition-colors duration-300 ease-in-out"
-                    draggable="false"
-                  >
-                    <svg
-                      xmlns="http://www.w3.org/2000/svg"
-                      viewBox="0 0 24 24"
-                      fill="none"
-                      stroke="currentColor"
-                      stroke-width="2"
-                      stroke-linecap="round"
-                      stroke-linejoin="round"
-                      class="w-5 h-5 md:w-6 md:h-6 lg:w-7 lg:h-7"
-                    >
-                      <path
-                        d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"
-                      />
-                      <path d="M9 18c-4.51 2-5-2-7-2" />
-                    </svg>
-                    <span class="sr-only">GitHub</span>
-                  </a>
-                </div>
-              </div>
-            </div>
-            <div class="py-1 space-y-1">
-              <h2 class="font-bold text-2xl select-none">About</h2>
-              <p class="w-full opacity-70">
-                We are working to build community through open source technology.
-              </p>
-              <blockquote
-                class="w-max px-3 border-l-4 pl-3 !my-7 text-sm border-neutral-200"
-              >
-                <span class="not-italic font-bold select-none">Note:</span><br />
-                <span class="opacity-80">Members on GitHub must have two-factor auth.</span>
-              </blockquote>
-            </div>
-          </div>
-        </section>
-
-        <!-- MAILING LIST SECTION -->
-        <section class="border border-neutral-800 rounded-xl overflow-hidden max-w-3xl">
-          <div
-            class="flex px-5 py-2 border-b border-neutral-800 justify-between items-center"
-          >
-            <h1 class="text-lg font-bold text-center w-full select-none">Mailing List</h1>
-          </div>
-          <div class="px-5 py-3 text-sm">
-            <div class="overflow-hidden flex items-center justify-between border rounded-lg
-                    border-neutral-900 font-mono"
-            >
-              <p
-                id="copy-text"
-                class="px-3 py-2 select-none cursor-pointer w-full"
-                onclick="copyText()"
-              >
-                [email protected]
-              </p>
-              <button
-                id="copy-button"
-                class="w-fit py-2 px-3 border-l border-neutral-900 hover:border-neutral-800
-                    hover:bg-neutral-800 transition-colors duration-300 ease-in-out"
-                title="Copy to Clipboard"
-                onclick="copyText()"
-              >
-                Copy
-              </button>
-            </div>
-          </div>
-        </section>
-
-        <!-- USEFUL LINKS SECTION -->
-        <section class="border border-neutral-800 rounded-xl overflow-hidden max-w-3xl">
-          <div
-            class="flex px-5 py-2 border-b border-neutral-800 justify-between items-center"
-          >
-            <h1 class="text-lg font-bold text-center w-full select-none">Useful Links</h1>
-          </div>
-          <div class="px-5 py-3 grid gap-3 grid-cols-2 text-sm">
-            <a
-              href="https://t.me/GNUWeeb"
-              target="_blank"
-              draggable="false"
-              class="flex items-center gap-2 justify-center px-3 py-2 border rounded-lg
-                    border-neutral-900 hover:border-neutral-800 hover:bg-neutral-800
-                    transition-colors duration-300 ease-in-out"
-            >
-              <svg
-                xmlns="http://www.w3.org/2000/svg"
-                viewBox="0 0 24 24"
-                fill="none"
-                stroke="currentColor"
-                stroke-width="2"
-                stroke-linecap="round"
-                stroke-linejoin="round"
-                class="w-5 h-5"
-              >
-                <path d="m22 2-7 20-4-9-9-4Z" />
-                <path d="M22 2 11 13" />
-              </svg>
-              <span class="select-none">Telegram</span>
-            </a>
-            <a
-              href="https://lore.gnuweeb.org/gwml"
-              target="_blank"
-              draggable="false"
-              class="flex items-center gap-2 justify-center px-3 py-2 border rounded-lg
-                    border-neutral-900 hover:border-neutral-800 hover:bg-neutral-800
-                    transition-colors duration-300 ease-in-out"
-            >
-              <svg
-                xmlns="http://www.w3.org/2000/svg"
-                viewBox="0 0 24 24"
-                fill="none"
-                stroke="currentColor"
-                stroke-width="2"
-                stroke-linecap="round"
-                stroke-linejoin="round"
-                class="w-5 h-5"
-              >
-                <path
-                  d="M8 21h12a2 2 0 0 0 2-2v-2H10v2a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v3h4"
-                />
-                <path d="M19 17V5a2 2 0 0 0-2-2H4" />
-                <path d="M15 8h-5" />
-                <path d="M15 12h-5" />
-              </svg>
-              <span class="select-none">GWML Lore</span>
-            </a>
-            <a
-              href="https://discord.gg/GyRxNzK3Zs"
-              target="_blank"
-              draggable="false"
-              class="flex items-center gap-2 justify-center px-3 py-2 border rounded-lg
-                    border-neutral-900 hover:border-neutral-800 hover:bg-neutral-800
-                    transition-colors duration-300 ease-in-out"
-            >
-              <svg
-                xmlns="http://www.w3.org/2000/svg"
-                viewBox="0 0 24 24"
-                fill="none"
-                stroke="currentColor"
-                stroke-width="2"
-                stroke-linecap="round"
-                stroke-linejoin="round"
-                class="w-5 h-5"
-              >
-                <path
-                  d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"
-                />
-                <path
-                  d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
-                />
-              </svg>
-              <span class="select-none">Discord</span>
-            </a>
-            <a
-              href="https://social.gnuweeb.org/"
-              target="_blank"
-              draggable="false"
-              class="flex items-center gap-2 justify-center px-3 py-2 border rounded-lg
-                    border-neutral-900 hover:border-neutral-800 hover:bg-neutral-800
-                    transition-colors duration-300 ease-in-out"
-            >
-              <svg
-                xmlns="http://www.w3.org/2000/svg"
-                viewBox="0 0 24 24"
-                fill="none"
-                stroke="currentColor"
-                stroke-width="2"
-                stroke-linecap="round"
-                stroke-linejoin="round"
-                class="w-5 h-5"
-              >
-                <path d="m3 21 1.9-5.7a8.5 8.5 0 1 1 3.8 3.8z" />
-              </svg>
-              <span class="select-none">GW Social</span>
-            </a>
-          </div>
-        </section>
-
-      </section>
-
-      <!-- MEMBER LIST SECTION | RIGHT -->
-      <section class="hidden xl:flex flex-col space-y-3 py-5 max-h-screen">
-        <section class="border border-neutral-800 rounded-xl overflow-hidden w-[20rem]">
-          <div class="flex px-5 py-2 border-b border-neutral-800 justify-between items-center">
-            <h1 class="text-lg font-bold text-center w-full">Member List</h1>
-          </div>
-          <div id="member-list" class="px-3 py-2 space-y-1 text-sm max-h-[300px] overflow-y-auto"></div>
-          <a href="https://github.com/orgs/gnuweeb/people" draggable="false" target="_blank">
-            <div
-              class="p-3 border-t border-neutral-800 hover:bg-neutral-800
-                    flex justify-center items-center w-full"
-            >
-              <span class="select-none font-semibold text-sky-500 mr-1">View on GitHub</span>
-              <svg class="w-3 h-3 text-neutral-500" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
-                <path d="M 40.960938 4.9804688 A 2.0002 2.0002 0 0 0 40.740234 5 L 28 5 A 2.0002 2.0002 0 1 0 28 9 L 36.171875 9 L 22.585938 22.585938 A 2.0002 2.0002 0 1 0 25.414062 25.414062 L 39 11.828125 L 39 20 A 2.0002 2.0002 0 1 0 43 20 L 43 7.2460938 A 2.0002 2.0002 0 0 0 40.960938 4.9804688 z M 12.5 8 C 8.3826878 8 5 11.382688 5 15.5 L 5 35.5 C 5 39.617312 8.3826878 43 12.5 43 L 32.5 43 C 36.617312 43 40 39.617312 40 35.5 L 40 26 A 2.0002 2.0002 0 1 0 36 26 L 36 35.5 C 36 37.446688 34.446688 39 32.5 39 L 12.5 39 C 10.553312 39 9 37.446688 9 35.5 L 9 15.5 C 9 13.553312 10.553312 12 12.5 12 L 22 12 A 2.0002 2.0002 0 1 0 22 8 L 12.5 8 z"></path>
-              </svg>
-            </div>
-          </a>
-        </section>
-      </section>
-    </main>
-
-    <footer class="pt-10 p-5">
-      <p class="text-xs opacity-70 mx-auto text-center">
-        &copy; 2023 GNU/Weeb.<br />Licensed under BSD 3-Clause License.
-      </p>
-    </footer>
-
-    <script lang="text/javascript">
-      const API_URL = "https://telegram-bot.teainside.org";
-
-      function copyText() {
-        var copyText = document.getElementById("copy-button");
-        var text = document.getElementById("copy-text").innerText;
-        navigator.clipboard.writeText(text);
-        copyText.innerText = "Copied!";
-        copyText.classList.add("bg-neutral-800");
-        setTimeout(function () {
-          copyText.innerText = "Copy";
-          copyText.classList.remove("bg-neutral-800");
-        }, 3000);
-      }
-
-      async function getOrgMembers() {
-        const response = await fetch("https://api.github.com/orgs/gnuweeb/members");
-        const data = await response.json();
-
-        data.sort((left, right) => {
-          const usernameA = left.login.toLowerCase();
-          const usernameB = right.login.toLowerCase();
-          if (usernameA < usernameB) return -1;
-          if (usernameA > usernameB) return 1;
-          return 0;
-        });
-
-        return data;
-      }
-
-      async function renderMemberList() {
-        const membersData = await getOrgMembers();
-        const memberList = document.getElementById("member-list");
-
-        membersData.forEach(e => {
-          const userAnchorEl = document.createElement("a");
-          userAnchorEl.href = e.html_url;
-          userAnchorEl.classList.add(
-            "flex", "items-center", "space-x-3",
-            "p-1", "rounded-lg", "hover:bg-neutral-800"
-          );
-
-          const userImgEl = document.createElement("img");
-          userImgEl.src = e.avatar_url;
-          userImgEl.alt = `${e.login} | Organization Member`;
-          userImgEl.classList.add("rounded-full", "w-10");
-
-          const usernameDivEl = document.createElement("div");
-          usernameDivEl.classList.add("truncate", "text-sky-500");
-          usernameDivEl.innerText = `@${e.login}`;
-          userAnchorEl.appendChild(userImgEl);
-          userAnchorEl.appendChild(usernameDivEl);
-          memberList.appendChild(userAnchorEl);
-        });
-      }
-
-      async function getRecentMessages() {
-        try {
-          const response = await fetch(API_URL + "/zxc.php?action=get_messages&chat_id=-1001483770714&limit=50");
-          const { data } = (await response.json()).result;
-
-          const transformedData = data.map(item => {
-            return {
-              user_id: item[0],
-              username: item[1],
-              first_name: item[2],
-              last_name: item[3],
-              user_photo: item[4],
-              message_id: item[5],
-              reply_to_message_id: item[6],
-              message_type: item[7],
-              text: item[8],
-              text_entities: item[9] ? JSON.parse(item[9]) : null,
-              file: item[10],
-              date: item[11]
-            };
-          });
-
-          return transformedData.reverse();
-        } catch {
-          return [];
-        }
-      }
-
-      function hashCode(name) {
-        var hash = 0;
-        for (var i = 0; i < name.length; i++) {
-            var character = name.charCodeAt(i);
-            hash = ((hash << 5) - hash) + character;
-        }
-        return Math.abs(hash);
-      }
-
-      function getFixedRandomColor(name) {
-        const colorData = {
-          red: "text-red-400 border-red-400",
-          yellow: "text-yellow-400 border-yellow-400",
-          blue: "text-blue-400 border-blue-400",
-          sky: "text-sky-400 border-sky-400",
-          purple: "text-purple-400 border-purple-400",
-          orange: "text-orange-400 border-orange-400",
-          amber: "text-amber-400 border-amber-400",
-          lime: "text-lime-400 border-lime-400",
-          green: "text-green-400 border-green-400",
-          emerald: "text-emerald-400 border-emerald-400",
-          teal: "text-teal-400 border-teal-400",
-          cyan: "text-cyan-400 border-cyan-400",
-          indigo: "text-indigo-400 border-indigo-400",
-          violet: "text-violet-400 border-violet-400",
-          fuchsia: "text-fuchsia-400 border-fuchsia-400",
-          pink: "text-pink-400 border-pink-400",
-          rose: "text-rose-400 border-rose-400",
-        };
-        const colorNames = Object.keys(colorData);
-        return colorData[colorNames[hashCode(name) % colorNames.length]].split(" ");
-      }
-
-      function cleanMessageText(text) {
-        return text.replaceAll(/\n/g, " ");
-      }
-
-      function setupUserName(first, last) {
-        const firstName = first.trimEnd();
-        let lastName = "";
-        if(last !== null) {
-          lastName = " " + last.trimEnd();
-        }
-        return [ firstName, lastName ];
-      }
-
-      async function renderRecentMessages() {
-        const messageData = await getRecentMessages();
-        const recentMessages = document.getElementById("recent-messages");
-
-        if (messageData.length === 0) {
-          const connectionErrEl = document.createElement("div");
-          connectionErrEl.classList.add("text-red-500", "italic", "text-center", "p-3");
-          connectionErrEl.innerText = "Cannot Connect to the API.\nAPI Connection failure.";
-          recentMessages.appendChild(connectionErrEl);
-          return;
-        }
-
-        messageData.forEach(message => {
-          const getColor = m => getFixedRandomColor(`${m.first_name}`);
-
-          const chatContainer = document.createElement("div");
-          chatContainer.id = message.message_id;
-          chatContainer.classList.add("chat", "chat-start", "max-w-[300px]");
-
-          const chatAvatar = document.createElement("div");
-          chatAvatar.classList.add("chat-image", "avatar");
-
-          const avatarRounded = document.createElement("div");
-          avatarRounded.classList.add("w-10", "rounded-full");
-
-          const avatarImg = document.createElement("img");
-          avatarImg.setAttribute("draggable", "false");
-          avatarImg.setAttribute("src", API_URL + "/storage/files/" + message.user_photo);
-
-          avatarRounded.appendChild(avatarImg);
-          chatAvatar.appendChild(avatarRounded);
-
-          const chatBubble = document.createElement("div");
-          chatBubble.id = `${message.message_id}-highlight`;
-          chatBubble.classList.add(
-            "chat-bubble", "transition", "before:transition",
-            "duration-500", "before:duration-500", "ease-in-out",
-            "before:ease-in-out", "delay-200", "before:delay-200"
-          );
-
-          const chatHeader = document.createElement("div");
-          chatHeader.classList.add(
-            "chat-header", "font-semibold", "pb-1",
-            "line-clamp-1", getColor(message)[0],
-          );
-          const [ firstName, lastName ] = setupUserName(
-            message.first_name,
-            message.last_name
-          );
-          chatHeader.innerText = firstName + lastName;
-
-          const chatMsgContent = document.createElement("div");
-          if(message.message_type === "text") {
-            chatMsgContent.classList.add(
-              "text-neutral-300", "max-w-[150px]",
-              "max-h-min", "line-clamp-2"
-            );
-            chatMsgContent.innerText = cleanMessageText(message.text);
-          } else if(message.message_type === "photo") {
-            const imageFile = API_URL + "/storage/files/" + message.file;
-
-            const msgPhotoContainer = document.createElement("div");
-            msgPhotoContainer.classList.add("relative");
-
-            const messagePhoto = document.createElement("img");
-            messagePhoto.src = imageFile;
-            messagePhoto.classList.add("rounded-md", "mt-1", "relative");
-
-            const hoverSeeImg = document.createElement("a");
-            hoverSeeImg.href = imageFile;
-            hoverSeeImg.setAttribute("target", "_blank");
-            hoverSeeImg.setAttribute("draggable", "false");
-            hoverSeeImg.classList.add(
-              "absolute", "top-0", "w-full", "h-full", "flex", "rounded-md",
-              "items-center", "justify-center", "hover:bg-neutral-900", "uppercase",
-              "hover:bg-opacity-60", "transition", "duration-200", "ease-in-out",
-              "font-bold", "text-xl", "text-white", "opacity-0", "hover:opacity-100",
-              "select-none"
-            );
-            hoverSeeImg.innerText = "See";
-
-            msgPhotoContainer.appendChild(messagePhoto);
-            msgPhotoContainer.appendChild(hoverSeeImg);
-            chatMsgContent.appendChild(msgPhotoContainer);
-
-            if(message.text !== null) {
-              const photoCaption = document.createElement("div");
-              photoCaption.classList.add(
-                "text-neutral-300", "line-clamp-2",
-                "max-w-[150px]", "mt-2"
-              );
-              photoCaption.innerText = cleanMessageText(message.text);
-              chatMsgContent.appendChild(photoCaption);
-            }
-          }
-
-          const chatFooter = document.createElement("div");
-          chatFooter.classList.add(
-            "flex", "items-center", "pt-2",
-            "justify-between", "space-x-3"
-          );
-
-          const readMore = document.createElement("a");
-          readMore.setAttribute("href", "https://t.me/gnuweeb/" + message.message_id);
-          readMore.setAttribute("draggable", "false");
-          readMore.setAttribute("target", "_blank");
-          readMore.classList.add(
-            "text-xs", "text-sky-400", "opacity-70",
-            "font-semibold", "select-none"
-          );
-          readMore.innerText = "Read more";
-          chatFooter.appendChild(readMore);
-
-          const chatDate = document.createElement("div");
-          chatDate.classList.add(
-            "flex", "justify-end", "space-x-1",
-            "text-xs", "opacity-70",
-          );
-
-          const msgTime = document.createElement("time");
-          msgTime.innerText = message.date;
-
-          chatDate.appendChild(msgTime);
-
-          chatFooter.appendChild(chatDate);
-
-          chatBubble.appendChild(chatHeader);
-
-          const replyMessages = messageData.filter(msg => {
-            return msg.message_id === message.reply_to_message_id
-          });
-          if(message.reply_to_message_id !== null && replyMessages.length > 0) {
-            const replyMessage = replyMessages[0];
-
-            const chatMsgReply = document.createElement("button");
-            chatMsgReply.onclick = () => {
-              const targetReply = document.getElementById(message.reply_to_message_id.toString());
-              const highlightReply = document.getElementById(`${message.reply_to_message_id}-highlight`);
-
-              targetReply.scrollIntoView({
-                behavior: "smooth", block: "end", inline: "nearest"
-              });
-
-              highlightReply.classList.add(
-                "!bg-neutral-700", "!scale-105"
-              );
-
-              setTimeout(() => {
-                highlightReply.classList.remove(
-                  "!bg-neutral-700", "!scale-105"
-                );
-              }, 2000);
-            }
-            chatMsgReply.classList.add(
-              "w-full", "border-l-2", "!my-2", "text-sm", "text-start",
-              "pl-2", "py-1", getColor(replyMessage)[1], "flex", "flex-col",
-              "text-neutral-300", "text-opacity-80", "hover:bg-neutral-800",
-              "rounded-r-md", "rounded-l-sm"
-            );
-
-            const usernameMsgReply = document.createElement("span");
-            usernameMsgReply.classList.add(
-              "not-italic", "font-semibold", "line-clamp-1",
-              "select-none", getColor(replyMessage)[0]
-            );
-            const [ firstName, lastName ] = setupUserName(
-              replyMessage.first_name,
-              replyMessage.last_name
-            );
-            usernameMsgReply.innerText = firstName + lastName;
-
-            const textMsgReply = document.createElement("span");
-            textMsgReply.classList.add(
-              "line-clamp-1", "max-w-[150px]",
-              "max-h-min", "text-start"
-            );
-            textMsgReply.innerText = cleanMessageText(
-              replyMessage.text !== null ? replyMessage.text : "Photo"
-            );
-
-            chatMsgReply.appendChild(usernameMsgReply);
-            chatMsgReply.appendChild(textMsgReply);
-            chatBubble.appendChild(chatMsgReply);
-          };
-
-          chatBubble.appendChild(chatMsgContent);
-          chatBubble.appendChild(chatFooter);
-
-          chatContainer.appendChild(chatAvatar);
-          chatContainer.appendChild(chatBubble);
-
-          recentMessages.appendChild(chatContainer);
-        });
-
-        recentMessages.lastChild.scrollIntoView({
-          behavior: "instant", block: "end", inline: "nearest"
-        });
-      };
-
-      document.addEventListener("DOMContentLoaded", function() {
-        renderMemberList();
-        renderRecentMessages();
-      });
-    </script>
-
-  </body>
-
-</html>
diff --git a/style.css b/style.css
deleted file mode 100644
index 19d1659..0000000
--- a/style.css
+++ /dev/null
@@ -1,57 +0,0 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
-
-
-.chat {
-  @apply grid gap-x-3 py-1
-}
-
-.chat-start {
-  @apply place-items-start grid-cols-[auto,1fr];
-}
-
-.chat-image {
-  @apply row-span-2 self-end;
-}
-
-.chat-start .chat-image {
-  @apply col-start-1;
-}
-
-.chat-start .chat-header {
-  @apply col-start-2;
-}
-
-.chat-bubble {
-  @apply relative block w-fit px-4 py-2 max-w-[90%] rounded-2xl
-  min-h-[2.75rem] min-w-[2.75rem] bg-neutral-900 text-neutral-500;
-}
-
-.chat-bubble::before {
-  @apply absolute bottom-0 h-3 w-3 bg-inherit content-[""];
-  mask-size: contain;
-  -webkit-mask-size: contain;
-  mask-repeat: no-repeat;
-  -webkit-mask-repeat: no-repeat;
-  mask-position: center;
-  -webkit-mask-position: center;
-}
-
-.chat-start .chat-bubble {
-  @apply col-start-2 rounded-bl-none;
-}
-
-.chat-start .chat-bubble::before {
-  @apply content-[""] -left-3;
-  mask-image: url("data:image/svg+xml,%3csvg width='3' height='3' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='m 0 3 L 3 3 L 3 0 C 3 1 1 3 0 3'/%3e%3c/svg%3e");
-  -webkit-mask-image: url("data:image/svg+xml,%3csvg width='3' height='3' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='m 0 3 L 3 3 L 3 0 C 3 1 1 3 0 3'/%3e%3c/svg%3e");
-}
-
-.avatar {
-  @apply relative inline-flex;
-}
-
-.avatar > div {
-  @apply block aspect-square overflow-hidden;
-}
-- 
Muhammad Rizki


      parent reply	other threads:[~2023-10-03  2:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03  2:51 [PATCH v1 00/13] GNU/Weeb Web Migration to SvelteKit Muhammad Rizki
2023-10-03  2:51 ` [PATCH v1 01/13] refactor: migrate: migrate to sveltekit framework Muhammad Rizki
2023-10-03  2:51 ` [PATCH v1 02/13] feat(app): add app types file Muhammad Rizki
2023-10-03  2:51 ` [PATCH v1 03/13] feat(lib): add API_URL and STORAGE_URL constant variable Muhammad Rizki
2023-10-03  2:51 ` [PATCH v1 04/13] feat(lib): add lib functions file Muhammad Rizki
2023-10-03  2:51 ` [PATCH v1 05/13] feat(lib): add newly created lib constants variables and functions Muhammad Rizki
2023-10-03  2:51 ` [PATCH v1 06/13] feat(lib/functions): add getRepliedMessage() function Muhammad Rizki
2023-10-03  2:51 ` [PATCH v1 07/13] feat(lib/functions): add dateFormat() function Muhammad Rizki
2023-10-03  2:51 ` [PATCH v1 08/13] feat(components): add <OrganizationMembers/> component Muhammad Rizki
2023-10-03  2:51 ` [PATCH v1 09/13] feat(components): add <RecentMessages/> component Muhammad Rizki
2023-10-03  2:51 ` [PATCH v1 10/13] feat(routes): add +page.server.ts Muhammad Rizki
2023-10-03  2:51 ` [PATCH v1 11/13] feat(routes/page): add +page.svelte Muhammad Rizki
2023-10-03  2:51 ` [PATCH v1 12/13] chore(README): update README.md Muhammad Rizki
2023-10-05 19:29   ` Ammar Faizi
2023-10-07  5:36     ` Muhammad Rizki
2023-10-03  2:51 ` Muhammad Rizki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox