aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoaos <soaos@soaos.dev>2025-08-16 14:59:19 -0400
committersoaos <soaos@soaos.dev>2025-08-16 14:59:19 -0400
commit68b6d1eb607af5fb3e51391f8f12f1a95b405d56 (patch)
tree5e5f8e59425dfc29ea0d1def4b6dc87cd99c7b96
parent396458d0021e5d6e8574444b8c14348f9217b100 (diff)
Updated to work with ringfairy 0.2
-rw-r--r--.gitea/workflows/deploy.yaml22
-rw-r--r--.radicle/native.yaml1
-rw-r--r--data/assets/styles.css70
-rw-r--r--data/templates/grid.html23
-rw-r--r--data/templates/index.html47
-rw-r--r--data/templates/random.html29
-rw-r--r--data/templates/redirect.html (renamed from data/templates/template.html)0
-rw-r--r--ringfairy.toml11
-rw-r--r--websites.json3
9 files changed, 159 insertions, 47 deletions
diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml
deleted file mode 100644
index 0059230..0000000
--- a/.gitea/workflows/deploy.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: Deploying Static Site
-on: [push]
-
-jobs:
- Build:
- container:
- image: "git.soaos.dev/soaos/ringfairy:latest"
- steps:
- - name: Check out repository code
- uses: actions/checkout@v4
- - name: Build webring using ringfairy
- run: ringfairy
- - name: Write SSH keys
- run: |
- install -m 600 -D /dev/null ~/.ssh/id_ed25519
- echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
- ssh-keyscan -H 192.168.1.113 > ~/.ssh/known_hosts
- - name: Copy built site to server
- run: |
- ssh git@192.168.1.113 "rm -rf /var/www/evilr.ing && mkdir /var/www/evilr.ing"
- scp -sr webring/. git@192.168.1.113:/var/www/evilr.ing
-
diff --git a/.radicle/native.yaml b/.radicle/native.yaml
new file mode 100644
index 0000000..7c2cd61
--- /dev/null
+++ b/.radicle/native.yaml
@@ -0,0 +1 @@
+shell: ringfairy && rm -rf /var/www/evilr.ing && mkdir /var/www/evilr.ing && cp webring/* -r /var/www/evilr.ing
diff --git a/data/assets/styles.css b/data/assets/styles.css
index f0e8ef5..4ff8fec 100644
--- a/data/assets/styles.css
+++ b/data/assets/styles.css
@@ -1,9 +1,9 @@
body {
- font-family: serif;
+ font-family: sans-serif;
line-height: 1.6;
- background-color: #2D353B;
- color: #D3C6AA;
- max-width: 80rem;
+ background-color: #111;
+ color: #fff;
+ max-width: 80%;
margin: auto;
}
@@ -11,16 +11,20 @@ h1 {
text-align: center;
}
+h1,h2,h3,h4 {
+ font-family: Courier New, Courier, Consolas, monospace;
+}
+
a {
- color: #7FBBB3;
+ color: #f3c;
text-decoration: none;
background-color: transparent;
}
a:hover, a:focus {
text-decoration: none;
- background-color: #7FBBB3;
- color: #2D353B;
+ background-color: #f3c;
+ color: #fff;
}
table {
@@ -35,16 +39,16 @@ tr {
}
tr:nth-child(odd) {
- background-color: #343F44; /* Light gray for odd rows */
+ background-color: #222; /* Light gray for odd rows */
}
tr:hover {
- background-color: #3D484D; /* hover effect for table rows */
+ background-color: #444; /* hover effect for table rows */
}
th, td {
padding: 10px;
- border: 2px solid #475258;
+ border: 2px solid #666;
text-align: left;
white-space: nowrap;
overflow: hidden;
@@ -52,8 +56,10 @@ th, td {
}
th {
+ background-color: #444;
text-align: center;
font-size: 1.1em;
+ font-family: Courier New, Courier, Consolas, monospace;
}
.container {
@@ -85,4 +91,46 @@ th {
flex-direction: column;
}
-} \ No newline at end of file
+}
+:root {
+ --card-border: #446868;
+ --card-link-color: #88bebe;
+}
+.cards-container {
+ width: 90%;
+ margin-left: auto;
+ margin-right: auto;
+}
+.cards-container a {
+ color: var(--card-link-color);
+}
+.cards {
+ display: grid;
+ grid-gap: 0.5rem;
+ grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
+}
+.card {
+ border: 2px solid var(--card-border);
+ border-radius: 0.5rem;
+}
+.card-name {
+ background-color: var(--card-border);
+ font-size: 1.25rem;
+ padding: 0.25rem;
+ border-radius: 0.25rem 0.25rem 0 0;
+ text-transform: lowercase;
+}
+.card-content {
+ padding: 0.5rem;
+}
+.card-link {
+ font-size: .95rem;
+ text-transform: lowercase;
+}
+.card-text {
+ font-size: 0.75rem;
+}
+.card-slug {
+ font-size: 0.75rem;
+}
+
diff --git a/data/templates/grid.html b/data/templates/grid.html
new file mode 100644
index 0000000..2c187b1
--- /dev/null
+++ b/data/templates/grid.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>{{ ring_name }} List</title>
+ </head>
+ <body>
+ <div class="cards-container">
+ <h1>{{ ring_name }} List</h1>
+ <p>{{ ring_description }}</p>
+ <p>Add all sites with declared RSS feeds to your feed reader with this <a href ="{{ opml }}">OPML</a> link.</p>
+
+ {{ grid_of_sites | safe }}
+
+ <br>
+ <footer>
+ <p>Last updated: {{ current_time }} </p>
+ <p>Powered by <a href="https://github.com/k3rs3d/ringfairy">ringfairy</a>!</p>
+ </footer>
+ </div>
+ </body>
+</html>
diff --git a/data/templates/index.html b/data/templates/index.html
index 86f3b19..e7f6503 100644
--- a/data/templates/index.html
+++ b/data/templates/index.html
@@ -1,22 +1,55 @@
<!DOCTYPE html>
<html lang="en">
- <link rel="stylesheet" href="./styles.css">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ ring_name }} List</title>
- <meta property="og:url" content="https://evilr.ing"/>
- <meta property="og:title" content="EVILRING"/>
- <meta name="description" content="an evil webring for evil creatures">
- <meta name="og:description" content="an evil webring for evil creatures">
</head>
<body>
<h1>{{ ring_name }} List</h1>
<p>{{ ring_description }}</p>
- <p>If you are evil email me your site at <a href="mailto:silas@soaos.dev">silas@soaos.dev</a>.</p>
<p>Add all sites with declared RSS feeds to your feed reader with this <a href ="{{ opml }}">OPML</a> link.</p>
- {{ table_of_sites | safe}}
+
+ {% if sites %}
+ <table>
+ <thead>
+ <tr>
+ <th scope="col">Name</th>
+ <th scope="col">URL</th>
+ <th scope="col">About</th>
+ <th scope="col">Owner</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for site in sites %}
+ <tr>
+ <td>{{ site.website.slug }}</td>
+ <td>
+ <a href="{{ site.website.url }}" target="_blank">{{ site.website.url }}</a>
+ {% if site.website.rss %}
+ <a href="{{ site.website.rss }}" target="_blank">[rss]</a>
+ {% endif %}
+ {% if site.website.atom %}
+ <a href="{{ site.website.atom }}" target="_blank">[atom]</a>
+ {% endif %}
+ </td>
+ <td>{{ site.website.about | default(value="") }}</td>
+ <td>{{ site.website.owner | default(value="") }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% endif %}
+ {% if failed_sites %}
+ The following member sites were not included in this iteration of the webring:
+ <ul>
+ {% for site in failed_sites %}
+ <li>{{ site.website.url }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+
<br>
<footer>
diff --git a/data/templates/random.html b/data/templates/random.html
new file mode 100644
index 0000000..b4a5816
--- /dev/null
+++ b/data/templates/random.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Redirecting...</title>
+
+ <style>
+ body {
+ background-color: #000;
+ color: #fff;
+ }
+ </style>
+</head>
+
+<script>
+ var links = []
+ {% if sites %}
+ {% for site in sites %}
+ links.push("{{ site.website.url }}")
+ {% endfor %}
+ {% endif %}
+ window.location.replace(links[Math.floor(Math.random() * links.length)])
+</script>
+
+<body>
+ <p>A fairy is guiding you to a most suitable destination...</p>
+</body>
+
+</html>
diff --git a/data/templates/template.html b/data/templates/redirect.html
index 0ae260d..0ae260d 100644
--- a/data/templates/template.html
+++ b/data/templates/redirect.html
diff --git a/ringfairy.toml b/ringfairy.toml
index fe5e6e3..a9adbef 100644
--- a/ringfairy.toml
+++ b/ringfairy.toml
@@ -2,13 +2,14 @@ base_url = "https://evilr.ing"
ring_name = "EVILRING"
ring_description = "An evil webring for evil creatures"
ring_owner = "soaos"
-ring_owner_site = "https://exvacuum.dev"
+ring_owner_site = "https://soaos.dev"
-filepath_list = "./websites.json" # Website list; should be a JSON file with 'name', 'url', etc
+filepath_list = ["./websites.json"] # Website list; should be a JSON file with 'name', 'url', etc
path_output = "./webring" # Generated files will be saved in this folder.
path_assets = "./data/assets" # All contents of the asset folder will be copied directly into the output directory
path_templates = "./data/templates" # The folder containing HTML templates to use, ie, anything with {{ tags }}
-filename_template_redirect = "template.html" # This template gets reused to build the redirect pages for each site, and is ignored when building the other custom templates
+filename_template_random = "random.html"
+filename_template_redirect = "redirect.html" # This template gets reused to build the redirect pages for each site, and is ignored when building the other custom templates
client_user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"
client_header = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
@@ -16,7 +17,7 @@ audit_retries_delay = 100
audit_retries_max = 2
shuffle = false # Randomizes website sequence when generating
-verbose = false # Enables verbose logging
-skip_minify = false # If your generated HTML have issues, or you want hand-editable output, try skip minification
+verbose = false # Enables verbose logging
+skip_minify = false # If your generated HTML have issues, or you want hand-editable output, try skip minification
skip_verify = false # Skips verification of the URLs in the list. Might be unwise!
dry_run = false # Perform a dry run without writing any files. Can be used to check the site audit for example.
diff --git a/websites.json b/websites.json
index 6497609..618893c 100644
--- a/websites.json
+++ b/websites.json
@@ -4,8 +4,7 @@
"slug": "soaos",
"about": "soaos",
"url": "https://soaos.dev",
- "owner": "Silas Bartha",
- "rss": "https://soaos.dev/rss.xml"
+ "owner": "Silas Bartha"
},
{
"name": "Evan Pratten",