account based feeds
[rss-reader.git] / html / index.html
index 47d890f6e183f44134a6ffa9b06ee58b55880db0..b2313c2ff9b25a603b9885a8bf9b838a7b7212a7 100644 (file)
@@ -3,78 +3,26 @@
   <head>
     <title>News River</title>
     <meta charset="utf-8">
-    <link rel="stylesheet" href="style.css">
+    <link rel="stylesheet" href="home.css">
     <script src="https://unpkg.com/htmx.org@1.7.0"></script>
     <base target="_blank">
   </head>
-  <body class="app">
-    <div id="feed-pane" valign="top" hx-get="/feeds" hx-trigger="load, newFeed from:body, every 900s" hx-target="#feed-list">
-      <h1>Feed List</h1>
-      <div id="feed-list"></div>
-      <div id="add-feed">
-        <form hx-post="/feeds">
-          <input type="url" name="link" placeholder="Link to RSS Feed">
-          <button type="submit" class="btn">Add</button>
-        </form>
-      </div>
-    </div>
-    <div id="list-pane"></div>
-    <div id="reading-pane"></div>
-    <div id="status-bar">
-      A project by <a href="https://xangelo.ca">xangelo</a> that is still in active <a href="https://git.xangelo.ca">development</a> (2022)
-    </div>
+  <body>
+    <section>
+      <h1>Rss Reader</h1>
+      <p>This is the home page for a very simple RSS reader project by <a href="https://xangelo.ca">xangelo</a>.</p>
+      <p>I've been a long time fan of RSS and since the death of <a href="https://en.wikipedia.org/wiki/Google_Reader">Google Reader</a> I've found myself bouncing around from RSS reader to RSS reader trying to find something that really worked for me. I spent along time (many years) using a river-of-news style reader I wrote called, unsurprisingly, <a href="https://newsriver.xangelo.ca">NewsRiver</a>. I am definitely a big fan of this style of reader, but I wanted to get back to curating a list of blogs/authors that I enjoyed following.</p>
+      <p>I ended up writing my own RSS Reader and will be working over the next little while to merge the News River functionality in. I'm hoping this will be the final version of the app where I'm able to not just catch up on "news", but also a centralized space for me to keep up with blogs/articles.</p>
+      <p>If you're interested in RSS readers, feel free to sign up and poke around - I would definitely appreciate you letting me know of any bugs that you run in to.</p>
+      <p>I'm also a big fan of supporting user privacy - I'm not going to ask for any information more than your email as a way to keep track of the feeds that are associated wtih you. If at any point you want your account deleted, just let me know.</p>
+      <form hx-post="/login">
+        <label>Email: </label>
+        <input type="email" name="email"> <button class="btn" type="submit">Login</button>
+        <br>
+        <small>
+          This is a "Passwordless" system. You enter your email, and we email you a one-time login code that expires within 30 minutes.
+        </small>
+      </form>
+    </section>
   </body>
-  <script>
-    function $(sel, root, opts) {
-      const el = (root || document).querySelectorAll(sel);
-      if(opts && opts.array) { 
-        return Array.from(el);
-      }
-      if(el.length === 1) {
-        return el[0];
-      }
-      else {
-        return Array.from(el);
-      }
-    }
-
-function activeMarker(e) {
-  // clear sibling active class.
-  if(e.target.parentElement.tagName === 'LI') {
-    const parent = e.target.parentElement.parentElement;
-    $('a.active', parent, {array: true}).forEach(el => {
-      el.classList.remove('active');
-    });
-  }
-
-  e.target.classList.add('active');
-}
-
-    $('body').addEventListener('click', e => {
-      const actions = e.target.getAttribute('data-actions');
-      if(actions && actions.split(' ').includes('activate')) {
-        activeMarker(e);
-      }
-      if (e.target.classList.contains('unread') && e.target.getAttribute('data-feed-item-id') !== null) {
-        e.target.classList.remove('unread');
-        // ok it was unread.. so we should figure out the id that it belongs
-        // to and decr the counter for that!
-        const feedId = e.target.getAttribute('data-feed-id');
-        const el = $(`#feed-list a[data-feed-id="${feedId}"] .unread-count`);
-        if(el) {
-          if(el.innerHTML.length) {
-            let count = parseInt(el.innerHTML.split('(')[1].split(')')[0]);
-            count--;
-            if(count < 1) {
-              el.innerHTML = '';
-              el.parentElement.classList.remove('unread');
-            }
-            else {
-              el.innerHTML = `(${count})`;
-            }
-          }
-        }
-      }
-    });
-  </script>
 </html>