diff options
Diffstat (limited to 'data/templates')
| -rw-r--r-- | data/templates/grid.html | 23 | ||||
| -rw-r--r-- | data/templates/index.html | 47 | ||||
| -rw-r--r-- | data/templates/random.html | 29 | ||||
| -rw-r--r-- | data/templates/redirect.html (renamed from data/templates/template.html) | 0 |
4 files changed, 92 insertions, 7 deletions
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 |
