about summary refs log tree commit diff
path: root/hosted/tmpl
diff options
context:
space:
mode:
authorhanemile <mail@emile.space>2020-07-19 13:10:44 +0200
committerhanemile <mail@emile.space>2020-07-19 13:10:44 +0200
commitfa7cc403aaf9cfc61a54cbbc132c361965e747ae (patch)
tree0a40f270f7f7dcf75055ff5b31fa20e993a582a1 /hosted/tmpl
parentfc63adf55849f748a37cef4c425a19a1c0f0e76e (diff)
past talks can now be seen
Diffstat (limited to 'hosted/tmpl')
-rw-r--r--hosted/tmpl/index.html2
-rw-r--r--hosted/tmpl/past.html31
-rw-r--r--hosted/tmpl/pastTalks.html41
3 files changed, 74 insertions, 0 deletions
diff --git a/hosted/tmpl/index.html b/hosted/tmpl/index.html
index 124271a..c9bf28d 100644
--- a/hosted/tmpl/index.html
+++ b/hosted/tmpl/index.html
@@ -24,6 +24,8 @@
 
             {{ template "upcomingTalks" . }}
 
+            {{ template "pastTalks" . }}
+
         </main>
     </body>
 
diff --git a/hosted/tmpl/past.html b/hosted/tmpl/past.html
new file mode 100644
index 0000000..233bc55
--- /dev/null
+++ b/hosted/tmpl/past.html
@@ -0,0 +1,31 @@
+{{define "past"}}
+<!DOCTYPE html>
+<html lang="en">
+
+    <head>
+        <meta charset="UTF-8">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta http-equiv="X-UA-Compatible" content="ie=edge">
+        {{ template "stylesheets" . }}
+        <title>Freitagsfoo</title>
+    </head>
+
+    <body>
+        <main role="main">
+
+            <div class="container-fluid bg-success text-white p-5">
+                <div class="container">
+                    <h1 class="display-3">
+                        <a href="/" class="text-decoration-none text-white">Freitagsfoo!</a>
+                    </h1>
+                    <p><a class="btn btn-primary btn-lg" href="/propose" role="button">Propose a talk &raquo;</a></p>
+                </div>
+            </div>
+
+            {{ template "pastTalks" . }}
+
+        </main>
+    </body>
+
+</html>
+{{end}}
\ No newline at end of file
diff --git a/hosted/tmpl/pastTalks.html b/hosted/tmpl/pastTalks.html
new file mode 100644
index 0000000..cf2f0f1
--- /dev/null
+++ b/hosted/tmpl/pastTalks.html
@@ -0,0 +1,41 @@
+{{ define "pastTalks" }}
+            <div class="container mt-5">
+                <h2>Past talks: {{ .pastCount }}</h2>
+                <hr>
+                <div class="row">
+                    <div class="row row-cols-1 row-cols-md-3">
+                        {{ range $i, $talk := .pastTalks }}
+                        <div class="col mb-3">
+                            <div class="card h-100">
+                                <div class="card-header">
+                                    <h5 class="card-title">{{ $talk.Title }}</h5>
+                                </div>
+                                <div class="card-body">
+                                    <p class="card-text">{{ $talk.Description }}</p>
+                                    <a href="/talk/{{ $talk.UUID }}" class="btn btn-primary">Details</a>
+                                </div>
+                                <div class="card-footer text-muted">
+                                    <div class="row">
+                                        <div class="col text-left">
+                                            {{ $talk.FormattedDate }}
+                                        </div>
+                                        <div class="col text-right">
+                                            {{ $talk.Nickname }}
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                        {{ end }}
+                    </div>
+
+                    {{ if .All }}
+                    {{ else }}
+                    <div class="text-right mt-3">
+                        <a href="/past" class="link-secondary">view all</a>
+                    </div>
+                    {{ end }}
+                </div>
+                <hr>
+            </div>
+{{ end }}
\ No newline at end of file