add channels page
@@ -70,15 +70,17 @@ http {
|
||||
|
||||
access_log syslog:server=unix:/dev/log,facility=local7;
|
||||
|
||||
location ~ ^/(channels|privacy)/?$ {
|
||||
default_type text/html;
|
||||
try_files /$1.html =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to displaying a 404.
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
# Redirect exact /channels (no trailing slash) to /channels/
|
||||
location = /channels {
|
||||
return 301 $scheme://$host$uri/;
|
||||
}
|
||||
|
||||
location /metrics {
|
||||
default_type text/plain;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,293 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>ArcaneChat Channels</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||
Oxygen, Ubuntu, Cantarell, sans-serif;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
min-height: 100vh;
|
||||
padding: 40px 20px;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
color: white;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
font-size: 2.5em;
|
||||
margin-bottom: 10px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.header p {
|
||||
font-size: 1.1em;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.channels-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
gap: 25px;
|
||||
}
|
||||
|
||||
.channel-card {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
padding: 25px;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
||||
transition: all 0.3s ease;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.channel-card:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.channel-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.channel-avatar {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
min-width: 60px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
background: #f0f0f0;
|
||||
border: 1px solid #e0e0e0;
|
||||
}
|
||||
|
||||
.channel-name {
|
||||
font-size: 1.3em;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.channel-content {
|
||||
flex: 1;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.channel-description {
|
||||
display: inline;
|
||||
font-size: 0.95em;
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.show-more-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #667eea;
|
||||
font-size: 0.9em;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
padding: 4px 0;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.show-more-btn:hover {
|
||||
color: #764ba2;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.join-button {
|
||||
display: inline-block;
|
||||
flex: 1;
|
||||
padding: 0.8rem 1rem;
|
||||
transition: all 0.3s ease;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.join-button:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
|
||||
}
|
||||
|
||||
.join-button:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.share-button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0.8rem 1rem;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
background-color: rgb(229, 231, 235);
|
||||
text-decoration: none;
|
||||
color: rgb(55, 65, 81);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.share-button:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
|
||||
}
|
||||
|
||||
.share-button:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.channels-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
font-size: 2em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>Channel Directory</h1>
|
||||
<p>Discover ArcaneChat channels</p>
|
||||
</div>
|
||||
|
||||
<div class="channels-grid" id="channelsContainer"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const assets = "/assets/channels";
|
||||
|
||||
function toOpenpgp4fpr(url) {
|
||||
return url
|
||||
.replace(/https:\/\/i\.delta\.chat\/#/, "openpgp4fpr:")
|
||||
.replace(/&/, "#");
|
||||
}
|
||||
|
||||
async function renderChannels() {
|
||||
function h(tag, attributes, ...children) {
|
||||
const element = document.createElement(tag);
|
||||
if (attributes) {
|
||||
Object.entries(attributes).forEach((entry) => {
|
||||
element.setAttribute(entry[0], entry[1]);
|
||||
});
|
||||
}
|
||||
element.append(...children);
|
||||
return element;
|
||||
}
|
||||
|
||||
const data = (
|
||||
await (await fetch(`${assets}/channels-others.json`)).json()
|
||||
).concat(await (await fetch(`${assets}/channels.json`)).json());
|
||||
|
||||
const container = document.getElementById("channelsContainer");
|
||||
const MAX_LENGTH = 160;
|
||||
|
||||
data.forEach((channel) => {
|
||||
const description = channel.settings.description || "";
|
||||
const isLong = description.length > MAX_LENGTH;
|
||||
|
||||
const descEl = h("p", { class: "channel-description" });
|
||||
const channelContent = [descEl];
|
||||
|
||||
if (isLong) {
|
||||
descEl.textContent =
|
||||
description.substring(0, MAX_LENGTH).trimEnd() + "...";
|
||||
|
||||
const showMoreBtn = h(
|
||||
"button",
|
||||
{ class: "show-more-btn" },
|
||||
"Show more",
|
||||
);
|
||||
channelContent.push(showMoreBtn);
|
||||
|
||||
let expanded = false;
|
||||
showMoreBtn.addEventListener("click", () => {
|
||||
expanded = !expanded;
|
||||
if (expanded) {
|
||||
descEl.textContent = description;
|
||||
showMoreBtn.textContent = "Show Less";
|
||||
} else {
|
||||
descEl.textContent =
|
||||
description.substring(0, MAX_LENGTH).trimEnd() + "... ";
|
||||
showMoreBtn.textContent = "Show more";
|
||||
}
|
||||
});
|
||||
} else {
|
||||
descEl.textContent = description;
|
||||
}
|
||||
|
||||
container.appendChild(
|
||||
h(
|
||||
"div",
|
||||
{ class: "channel-card" },
|
||||
h(
|
||||
"div",
|
||||
{ class: "channel-header" },
|
||||
h("img", {
|
||||
src: `${assets}/images/${channel.image}`,
|
||||
class: "channel-avatar",
|
||||
}),
|
||||
h("h2", { class: "channel-name" }, channel.settings.name),
|
||||
),
|
||||
h("div", { class: "channel-content" }, ...channelContent),
|
||||
h(
|
||||
"div",
|
||||
{ class: "button-group" },
|
||||
h(
|
||||
"a",
|
||||
{ href: toOpenpgp4fpr(channel.invite), class: "join-button" },
|
||||
"Join Channel",
|
||||
),
|
||||
h(
|
||||
"a",
|
||||
{
|
||||
href: channel.invite,
|
||||
class: "share-button",
|
||||
target: "_blank",
|
||||
},
|
||||
"Share",
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", renderChannels);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -356,7 +356,8 @@
|
||||
<a href="%VITE_FORUM_URL%">ArcaneChat Forum</a>. To receive news
|
||||
and spoilers right inside ArcaneChat, you can subscribe to the
|
||||
official <a href="%VITE_AC_CHANNEL%">ArcaneChat Channel</a>. To
|
||||
get in contact with ArcaneChat developers right inside ArcaneChat, scan the following QR code or
|
||||
get in contact with ArcaneChat developers right inside
|
||||
ArcaneChat, scan the following QR code or
|
||||
<a href="%VITE_CONTACT_LINK%">click here</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
allowBuilds:
|
||||
"@parcel/watcher": false
|
||||
esbuild: true
|
||||
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"settings": {
|
||||
"name": "Debugging Memes",
|
||||
"description": "Memes and other content around developers, free/libre software culture and other nerdy stuff"
|
||||
},
|
||||
"image": "debugging-memes.png",
|
||||
"invite": "https://i.delta.chat/#B68D965B65A63BBE7EB32D56234652E2C899213F&v=3&x=ImcSr1dp4fEWrZreS4Emlb5u&j=eX6UqJEePp9y_i-225abLctf&s=NKEuhQYd9UlzXhnW7rCTHNbF&a=57cyvwkiidqqxnryms0q%40chat.in%2Dthe.eu&n=Debugging+Memes&b=Debugging+Memes"
|
||||
},
|
||||
{
|
||||
"settings": {
|
||||
"name": "Meme Logistics",
|
||||
"description": "Your go-to lefty memes supply chain. Join us, you have nothing to lose but your chains!"
|
||||
},
|
||||
"image": "meme-logistics.jpg",
|
||||
"invite": "https://i.delta.chat/#818297831FAA0AB9917497FA5B145F41993374F1&v=3&x=xusVctOPSGOA6oFq4esfR68V&j=YspskxfxoImavuPj3qFTuX7H&s=d1sWSLq-ceUR9x5nJpWX7dLa&a=207nv967sz55do78f1xj%40chat.in%2Dthe.eu&n=Meme+Logistics&b=Meme+Logistics"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,126 @@
|
||||
[
|
||||
{
|
||||
"settings": {
|
||||
"url": "http://animecorner.me/feed/",
|
||||
"name": "Anime Corner",
|
||||
"description": "News & Features Straight From Japan. A reliable source of news about anime and Japan",
|
||||
"html": false,
|
||||
"socialImg": true
|
||||
},
|
||||
"image": "animecorner.png",
|
||||
"invite": "https://i.delta.chat/#EB87F92DC57303205E7F3ACB6DAA06D8FE761414&v=3&x=NE8KI1SvCtGBWE8krUJ1J7Gz&j=-Q4tOAHM6R9t9v8ZlfXTZzmX&s=HzAlOhkw7afFMGGBV_ipwHtG&a=6j2tb0xyz%40arcanechat.me&n=ChannelsBot&b=Anime+Corner"
|
||||
},
|
||||
{
|
||||
"settings": {
|
||||
"url": "https://newatlas.com/technology/index.rss",
|
||||
"name": "New Atlas: Technology",
|
||||
"description": "Technology News. Extraordinary ideas and innovations moving the world forward.",
|
||||
"html": false,
|
||||
"extractImg": true
|
||||
},
|
||||
"image": "new-atlas.jpg",
|
||||
"invite": "https://i.delta.chat/#EB87F92DC57303205E7F3ACB6DAA06D8FE761414&v=3&x=stxlc-uanELJUkKlQanbApJq&j=0N8oaa7wCRRfpsjvECBROdU1&s=YHPb1I1u0B9cZwjYSKKjr-Ef&a=6j2tb0xyz%40arcanechat.me&n=ChannelsBot&b=New+Atlas%3A+Technology"
|
||||
},
|
||||
{
|
||||
"settings": {
|
||||
"url": "https://feeds.feedburner.com/smittenkitchen",
|
||||
"name": "Smitten Kitchen",
|
||||
"description": "Fearless cooking from a tiny NYC kitchen",
|
||||
"extractImg": true
|
||||
},
|
||||
"image": "smitten-kitchen.png",
|
||||
"invite": "https://i.delta.chat/#EB87F92DC57303205E7F3ACB6DAA06D8FE761414&v=3&x=sMDBUBjhmIdCn4vh1kJlK2qX&j=WvqpUwYPMgOw3IeqArCY84g9&s=Vc3MYePPJzlB-ZBOoxJ8_i0H&a=6j2tb0xyz%40arcanechat.me&n=ChannelsBot&b=Smitten+Kitchen"
|
||||
},
|
||||
{
|
||||
"settings": {
|
||||
"url": "https://damndelicious.net/feed/",
|
||||
"name": "Damn Delicious",
|
||||
"description": "Quick and Easy Recipes",
|
||||
"extractImg": true
|
||||
},
|
||||
"image": "damn-delicious.png",
|
||||
"invite": "https://i.delta.chat/#EB87F92DC57303205E7F3ACB6DAA06D8FE761414&v=3&x=lQXlrGYNu-Vt15ReKOS5LgVI&j=2JxUQxKSeOASyp3qflMcsQ7R&s=ITadcr8PbiWuyeLv7bdJ5rb7&a=6j2tb0xyz%40arcanechat.me&n=ChannelsBot&b=Damn+Delicious"
|
||||
},
|
||||
{
|
||||
"settings": {
|
||||
"url": "https://refractor.io/index.rss",
|
||||
"name": "Refractor - Science in Focus",
|
||||
"description": "Latest Science and Health news. Extraordinary ideas moving the world forward.",
|
||||
"html": false,
|
||||
"extractImg": true
|
||||
},
|
||||
"image": "refractor.png",
|
||||
"invite": "https://i.delta.chat/#EB87F92DC57303205E7F3ACB6DAA06D8FE761414&v=3&x=IYXGrjwIfoSSQp_6Tx3_cM83&j=4Tz1Jkg1V5dziiDQGMLiQ_vk&s=SlY-mJEObtnoOndD1JQJvHt9&a=6j2tb0xyz%40arcanechat.me&n=ChannelsBot&b=Refractor+%2D+Science"
|
||||
},
|
||||
{
|
||||
"settings": {
|
||||
"url": "https://delta.chat/feed.xml",
|
||||
"name": "Delta Chat (Blog)",
|
||||
"description": "The official Delta Chat blog (https://delta.chat/blog)",
|
||||
"extractImg": true
|
||||
},
|
||||
"image": "dc-blog.png",
|
||||
"invite": "https://i.delta.chat/#EB87F92DC57303205E7F3ACB6DAA06D8FE761414&v=3&x=HAohSURiQW-mZg2OU8Nr50Gv&j=L8xK0jBW_d7BRFa1IHz5AvEK&s=Dat-girmoflpTTqYI9wgcPcB&a=6j2tb0xyz%40arcanechat.me&n=ChannelsBot&b=Delta+Chat+%28Blog%29"
|
||||
},
|
||||
{
|
||||
"settings": {
|
||||
"url": "https://chaos.social/@delta.rss",
|
||||
"name": "Delta Chat (Social)",
|
||||
"description": "The official Delta Chat account in social media (https://chaos.social/@delta)",
|
||||
"html": false
|
||||
},
|
||||
"image": "dc-social.png",
|
||||
"invite": "https://i.delta.chat/#EB87F92DC57303205E7F3ACB6DAA06D8FE761414&v=3&x=V0eoPL-0Ypa9BYEYPCBuNOYf&j=nM1_cgF2OBoC_3xVQnb9YQFD&s=8PQh-hIBaZxtHxWtlezrSAUC&a=6j2tb0xyz%40arcanechat.me&n=ChannelsBot&b=Delta+Chat+%28Social%29"
|
||||
},
|
||||
{
|
||||
"settings": {
|
||||
"url": "https://www.wired.com/feed/rss",
|
||||
"name": "WIRED",
|
||||
"description": "In-depth reporting on technology, science, security, and innovation with expert commentary and investigative journalism",
|
||||
"html": false
|
||||
},
|
||||
"image": "wired.jpg",
|
||||
"invite": "https://i.delta.chat/#EB87F92DC57303205E7F3ACB6DAA06D8FE761414&v=3&x=D_ZcNp3zuR0BVmVf8WOyH1q-&j=yHqqYUxPpl_qjiRgt_-dz2sY&s=RNBf2hvEl3CjtOkK7lI-2DGh&a=6j2tb0xyz%40arcanechat.me&n=ChannelsBot&b=WIRED"
|
||||
},
|
||||
{
|
||||
"settings": {
|
||||
"url": "https://techcrunch.com/feed/",
|
||||
"name": "TechCrunch",
|
||||
"description": "Startup news, technology trends, product launches, and venture capital coverage from the global tech ecosystem",
|
||||
"html": false,
|
||||
"socialImg": true
|
||||
},
|
||||
"image": "techcrunch.jpg",
|
||||
"invite": "https://i.delta.chat/#EB87F92DC57303205E7F3ACB6DAA06D8FE761414&v=3&x=mtFjM8hBcM-nJkYGwzUP1Flq&j=Qu8gKeQsVD2Rc7cor57OxOrY&s=kp9bXgYKkdAGV19tY-ol6Dss&a=6j2tb0xyz%40arcanechat.me&n=ChannelsBot&b=TechCrunch"
|
||||
},
|
||||
{
|
||||
"settings": {
|
||||
"url": "https://feeds.arstechnica.com/arstechnica/index",
|
||||
"name": "Ars Technica",
|
||||
"description": "Original news, reviews, analysis of tech trends, and expert advice on the most fundamental aspects of tech."
|
||||
},
|
||||
"image": "arstechnica.png",
|
||||
"invite": "https://i.delta.chat/#EB87F92DC57303205E7F3ACB6DAA06D8FE761414&v=3&x=1K7uC8gXJK1jf5Te4iOMlLF9&j=slow94rmJTHE_6KGEngvdY7-&s=CZBYtWNkRJLf39ynRl9mFIpj&a=6j2tb0xyz%40arcanechat.me&n=ChannelsBot&b=Ars+Technica"
|
||||
},
|
||||
{
|
||||
"settings": {
|
||||
"url": "https://www.theverge.com/rss/science/index.xml",
|
||||
"name": "Science | The Verge",
|
||||
"description": "Featuring the latest in daily science news, Verge Science is all you need to keep track of what’s going on in health, the environment, and your whole world",
|
||||
"extractImg": true
|
||||
},
|
||||
"image": "the-verge.jpg",
|
||||
"invite": "https://i.delta.chat/#EB87F92DC57303205E7F3ACB6DAA06D8FE761414&v=3&x=1ASwjrj09u6WUazySPqavMzw&j=kC4SMzOiE9nZcelgfHteQTs2&s=wIIYCJXMMi0v_FDIa2J4Ykfo&a=6j2tb0xyz%40arcanechat.me&n=ChannelsBot&b=Science+%7C+The+Verge"
|
||||
},
|
||||
{
|
||||
"settings": {
|
||||
"url": "https://tmz.com/rss.xml",
|
||||
"name": "TMZ",
|
||||
"description": "Celebrity Gossip and Entertainment News, Covering Celebrity News and Hollywood Rumors. Get All The Latest Gossip at TMZ - Thirty Mile Zone",
|
||||
"html": false,
|
||||
"socialImg": true
|
||||
},
|
||||
"image": "tmz.png",
|
||||
"invite": "https://i.delta.chat/#EB87F92DC57303205E7F3ACB6DAA06D8FE761414&v=3&x=Lag8ma2zvqt9M6lxVyDFAK8M&j=28vnoDuiulBQ3ziLasFkBgTJ&s=yY_cA6MXlKR08nM5zllWlujZ&a=6j2tb0xyz%40arcanechat.me&n=ChannelsBot&b=TMZ"
|
||||
}
|
||||
]
|
||||
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
@@ -7,6 +7,7 @@ export default defineConfig({
|
||||
input: {
|
||||
main: resolve(__dirname, "index.html"),
|
||||
privacy: resolve(__dirname, "privacy.html"),
|
||||
channels: resolve(__dirname, "channels.html"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||