aboutsummaryrefslogtreecommitdiff
path: root/ui/html
diff options
context:
space:
mode:
Diffstat (limited to 'ui/html')
-rw-r--r--ui/html/base.tmpl.html1
-rw-r--r--ui/html/pages/feed.tmpl.html15
-rw-r--r--ui/html/pages/feed_index.tmpl.html37
3 files changed, 53 insertions, 0 deletions
diff --git a/ui/html/base.tmpl.html b/ui/html/base.tmpl.html
index 628994e..5d69616 100644
--- a/ui/html/base.tmpl.html
+++ b/ui/html/base.tmpl.html
@@ -22,6 +22,7 @@
<a href="https://git.paterissa.net" class="nav_tag">Git</a>
<a href="https://starless.paterissa.net" class="nav_tag">Starless</a>
<a href="https://charts.paterissa.net" class="nav_tag">Parliament Builder</a>
+ <a href="/feeds" class="nav_tag">Feeds</a>
</nav>
</header>
<hr>
diff --git a/ui/html/pages/feed.tmpl.html b/ui/html/pages/feed.tmpl.html
new file mode 100644
index 0000000..83332f2
--- /dev/null
+++ b/ui/html/pages/feed.tmpl.html
@@ -0,0 +1,15 @@
+{{define "title"}}{{.Feed.Name}}{{end}}
+{{define "description"}}"Recent videos from {{.Feed.Name}}"{{end}}
+
+{{define "main"}}
+ {{range .Videos}}
+ <div class="card">
+ <div class="header">
+ <h4><b>{{.Title}} - {{.Published}}</b></h4>
+ <iframe class="video" src="{{.Link}}"></iframe>
+ </div>
+ <p>{{.Description}}</p>
+ </div>
+ {{end}}
+{{end}}
+
diff --git a/ui/html/pages/feed_index.tmpl.html b/ui/html/pages/feed_index.tmpl.html
new file mode 100644
index 0000000..59b37d4
--- /dev/null
+++ b/ui/html/pages/feed_index.tmpl.html
@@ -0,0 +1,37 @@
+{{define "title"}}RSS Feeds{{end}}
+{{define "description"}}"alternative to social media platforms"{{end}}
+
+{{define "main"}}
+ <div class="flex_between">
+ <div class="topline">
+ <h2>Feeds</h2>
+ <p>Alternative to social media platforms</p>
+ </div>
+ <div class="spacer"></div>
+ {{if .IsAuth}}
+ <a href="/logout" class="nav_tag right">Logout</a>
+ {{else}}
+ <a href="/login" class="nav_tag right">Login</a>
+ {{end}}
+ </div>
+ {{if .IsAuth}}
+ <div class="card">
+ <form class="url_form center" action="/feeds/new" method="POST">
+ <label for="name">Channel Name:</label>
+ <input type="text" id="name" name="name">
+ <label for="url">URL:</label>
+ <input type="text" id="url" name="url">
+ <div class="right">
+ <input type="submit" value="Submit">
+ </div>
+ </form>
+ </div>
+ {{end}}
+ {{range .Rows}}
+ <div class="card">
+ <div class="header">
+ <h4><a href="/feed?id={{.Id}}">{{.Name}} - added by {{.User}}</a></h4>
+ </div>
+ </div>
+ {{end}}
+{{end}}