[PATCH 2/2] i forgot to add ringfairy

--- ringfairy/assets/styles.css | 157 ++++++++++++++++++++++++++++++ ringfairy/templates/grid.html | 24 +++++ ringfairy/templates/random.html | 0 ringfairy/templates/template.html | 18 ++++ 4 files changed, 199 insertions(+) create mode 100644 ringfairy/assets/styles.css create mode 100644 ringfairy/templates/grid.html create mode 100644 ringfairy/templates/random.html create mode 100644 ringfairy/templates/template.html diff --git a/ringfairy/assets/styles.css b/ringfairy/assets/styles.css new file mode 100644 index 0000000..dcec5fb --- /dev/null +++ b/ringfairy/assets/styles.css @@ -0,0 +1,157 @@ +body { + font-family: monospace; +/* text-transform: lowercase;*/ + font-size: 18px; + line-height: 1.6; + background-color: #111; + color: #d4d4d4; + max-width: 80%; + margin: auto; +} + +h1 { + text-align: center; +} + +h1,h2,h3,h4 { + font-family: Courier New, Courier, Consolas, monospace; +} + +a { + color: #DF6464; + text-decoration: none; + background-color: transparent; +} + +a:hover, a:focus { + text-decoration: none; + background-color: #DF6464; + color: #d4d4d4; +} + +/*table { */ +/* width: 90%;*/ +/* border-collapse: collapse;*/ +/* margin: 12px auto;*/ +/* font-size: 1em;*/ +/*}*/ + + +table { + width: 100%; + border-collapse: collapse; + margin: 12px auto; + font-size: 1em; + font-family: Courier, Consolas, "Courier New", monospace; + table-layout: auto; + overflow-x: auto; + display: block; /* Enables horizontal scrolling */ +} + +tr { + margin-bottom: 10px; +} + +tr:nth-child(odd) { + background-color: #111; /* Light gray for odd rows */ +} + +tr>td:nth-of-type(4) { + white-space: normal; + overflow-wrap: break-word; + width: 100%; +} + +tr:hover { + background-color: #222; /* hover effect for table rows */ +} + +/*th, td {*/ +/* padding: 10px;*/ +/* border: 2px solid #666;*/ +/* text-align: left; */ +/* white-space: nowrap;*/ +/* overflow: hidden;*/ +/* text-overflow: ellipsis;*/ +/*}*/ + + +th, td { + padding: 6px 8px; + border: 1px solid #555; + text-align: left; + white-space: pre; /* Preserve spacing, prevent wrapping */ + overflow: hidden; + text-overflow: ellipsis; + font-family: inherit; + width: 10ch; +} + + +/*th {*/ +/* background-color: #444;*/ +/* text-align: center;*/ +/* font-size: 1.1em;*/ +/* font-family: Courier New, Courier, Consolas, monospace;*/ +/*}*/ + +th { + background-color: #333; + text-align: left; + font-weight: bold; +} + +.container { + max-width: 800px; + margin: auto; + padding: 12px; +} + +@media screen and (max-width: 600px) { + body { + font-size: 0.9rem; + } + +} +: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/ringfairy/templates/grid.html b/ringfairy/templates/grid.html new file mode 100644 index 0000000..19b6921 --- /dev/null +++ b/ringfairy/templates/grid.html @@ -0,0 +1,24 @@ +<!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> + </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/ringfairy/templates/random.html b/ringfairy/templates/random.html new file mode 100644 index 0000000..e69de29 diff --git a/ringfairy/templates/template.html b/ringfairy/templates/template.html new file mode 100644 index 0000000..0ae260d --- /dev/null +++ b/ringfairy/templates/template.html @@ -0,0 +1,18 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta http-equiv="refresh" content="0; url={{ url }}"> + <title>Redirecting...</title> + + <style> + body { + background-color: #000; + color: #fff; + } + </style> +</head> +<body> + <p>A fairy is teleporting you to <a href="{{ url }}">{{ url }}</a>...!</p> +</body> +</html> -- 2.50.1

Thanks for the patch, I'll take a look when I have some free time.
Your contribution is appreciated!
Best, Daniel
-- Daniel Fichtinger
Computer programmer.
https://ficd.sh https://git.ficd.sh https://codeberg.org/ficd

Hey,
I applied your patch to a local branch, but I can't get ringfairy to build. It keeps throwing this error:
Error: TemplateError(Error { kind: TemplateNotFound("random.html"), source: None })
Not sure why this is happening, since random.html does exist in the template directory.
-- Daniel Fichtinger
Computer programmer.
https://ficd.sh https://git.ficd.sh https://codeberg.org/ficd
participants (1)
-
Daniel Fichtinger
-
Zunda