about summary refs log tree commit diff
path: root/hosted/tmpl
diff options
context:
space:
mode:
authorhanemile <mail@emile.space>2020-07-19 01:56:09 +0200
committerhanemile <mail@emile.space>2020-07-19 01:56:09 +0200
commitfc63adf55849f748a37cef4c425a19a1c0f0e76e (patch)
tree034c6ab3abb08fe15c702298f294226f1b0071c2 /hosted/tmpl
initial commit
Diffstat (limited to 'hosted/tmpl')
-rw-r--r--hosted/tmpl/index.html31
-rw-r--r--hosted/tmpl/propose.html86
-rw-r--r--hosted/tmpl/singleTalk.html39
-rw-r--r--hosted/tmpl/stylesheets.html4
-rw-r--r--hosted/tmpl/upcoming.html31
-rw-r--r--hosted/tmpl/upcomingTalks.html41
6 files changed, 232 insertions, 0 deletions
diff --git a/hosted/tmpl/index.html b/hosted/tmpl/index.html
new file mode 100644
index 0000000..124271a
--- /dev/null
+++ b/hosted/tmpl/index.html
@@ -0,0 +1,31 @@
+{{define "index"}}
+<!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 "upcomingTalks" . }}
+
+        </main>
+    </body>
+
+</html>
+{{end}}
\ No newline at end of file
diff --git a/hosted/tmpl/propose.html b/hosted/tmpl/propose.html
new file mode 100644
index 0000000..a76c830
--- /dev/null
+++ b/hosted/tmpl/propose.html
@@ -0,0 +1,86 @@
+{{define "propose"}}
+<!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>Please enter the Details for your talk below:</p>
+                </div>
+            </div>
+
+            <div class="container mt-5">
+                <form enctype="multipart/form-data" action="/api/propose" , method="post">
+
+                    <div class="mb-3 row">
+                        <label for="title" class="col-sm-2 col-form-label">Title</label>
+                        <div class="col-sm-10">
+                            <input type="text" class="form-control" id="title" name="title"
+                                placeholder="So Long, and Thanks for All the CVEs" required>
+                        </div>
+                    </div>
+
+                    <div class="mb-3 row">
+                        <label for="description" class="col-sm-2 col-form-label">Description</label>
+                        <div class="col-sm-10">
+                            <textarea class="form-control" id="description" name="description" rows="3" required></textarea>
+                        </div>
+                    </div>
+
+                    <div class="mb-3 row">
+                        <label for="date" class="col-sm-2 col-form-label">Date</label>
+                        <div class="col-sm-10">
+                            <input type="date" id="date" name="date" min="{{ .nextFriday }}" step=7 required>
+                        </div>
+                    </div>
+
+                    <div class="mb-3 row">
+                        <label for="nickname" class="col-sm-2 col-form-label">Nickname</label>
+                        <div class="col-sm-10">
+                            <input type="text" class="form-control" id="nickname" name="nickname" placeholder="" required>
+                        </div>
+                    </div>
+
+                    <div class="mb-3 row">
+                        <label for="slides" class="col-sm-2 col-form-label">Slides</label>
+                        <div class="col-sm-10">
+                            <div class="form-group form-file">
+                                <input id="slides" name="slides" type="file" class="form-file-input" multiple
+                                    data-show-upload="true" data-show-caption="true" required>
+
+                                <label class="form-file-label" for="slides">
+                                    <span class="form-file-text">Upload your slides</span>
+                                    <span class="form-file-button">Browse</span>
+                                </label>
+                            </div>
+                        </div>
+                    </div>
+
+                    <br>
+                    <div class="form-group row mt-3">
+                        <div class="col-sm-10">
+                            <button type="submit" class="btn btn-primary">Submit Talk</button>
+                        </div>
+                    </div>
+                </form>
+            </div>
+
+
+        </main>
+    </body>
+
+</html>
+{{end}}
\ No newline at end of file
diff --git a/hosted/tmpl/singleTalk.html b/hosted/tmpl/singleTalk.html
new file mode 100644
index 0000000..01ee15d
--- /dev/null
+++ b/hosted/tmpl/singleTalk.html
@@ -0,0 +1,39 @@
+{{define "singleTalk"}}
+<!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>
+                </div>
+            </div>
+
+            <div class="container mt-5">
+                <h2>{{ .talk.Title }}</h2>
+                <div class="alert alert-light" role="alert">
+                <span class="badge bg-primary">{{ .talk.Nickname }}</span>
+                <span class="badge bg-info"><a class="text-decoration-none text-white" href="/{{ .talk.Slides }}">Slides</a></span>
+</div>
+
+                <p>{{ .talk.Description }}</p>
+            </div>
+
+
+        </main>
+    </body>
+
+</html>
+{{end}}
\ No newline at end of file
diff --git a/hosted/tmpl/stylesheets.html b/hosted/tmpl/stylesheets.html
new file mode 100644
index 0000000..791d54c
--- /dev/null
+++ b/hosted/tmpl/stylesheets.html
@@ -0,0 +1,4 @@
+{{ define "stylesheets" }}
+    <!--<link rel="stylesheet" href="/static/css/bootstrap/4.4.1/bootstrap.min.css" />-->
+    <link rel="stylesheet" href="/static/css/bootstrap/5.0.0-alpha1/bootstrap.min.css" />
+{{ end }}
\ No newline at end of file
diff --git a/hosted/tmpl/upcoming.html b/hosted/tmpl/upcoming.html
new file mode 100644
index 0000000..3d6e828
--- /dev/null
+++ b/hosted/tmpl/upcoming.html
@@ -0,0 +1,31 @@
+{{define "upcoming"}}
+<!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 "upcomingTalks" . }}
+
+        </main>
+    </body>
+
+</html>
+{{end}}
\ No newline at end of file
diff --git a/hosted/tmpl/upcomingTalks.html b/hosted/tmpl/upcomingTalks.html
new file mode 100644
index 0000000..6eb1b49
--- /dev/null
+++ b/hosted/tmpl/upcomingTalks.html
@@ -0,0 +1,41 @@
+{{ define "upcomingTalks" }}
+            <div class="container mt-5">
+                <h2>Upcoming talks: {{ .upcomingCount }}</h2>
+                <hr>
+                <div class="row">
+                    <div class="row row-cols-1 row-cols-md-3">
+                        {{ range $i, $talk := .upcomingTalks }}
+                        <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="/upcoming" class="link-secondary">view all</a>
+                    </div>
+                    {{ end }}
+                </div>
+                <hr>
+            </div>
+{{ end }}
\ No newline at end of file