summaryrefslogtreecommitdiff
path: root/views/partials
diff options
context:
space:
mode:
Diffstat (limited to 'views/partials')
-rw-r--r--views/partials/importeventform.handlebars15
-rwxr-xr-xviews/partials/neweventform.handlebars110
-rwxr-xr-xviews/partials/sidebar-dropdown.handlebars11
-rwxr-xr-xviews/partials/sidebar.handlebars5
4 files changed, 141 insertions, 0 deletions
diff --git a/views/partials/importeventform.handlebars b/views/partials/importeventform.handlebars
new file mode 100644
index 0000000..35baf6e
--- /dev/null
+++ b/views/partials/importeventform.handlebars
@@ -0,0 +1,15 @@
+<p>
+ Upload an .ics file here to instantly create an event. You can save a Facebook event as an .ics file by clicking on the context menu next to the 'Import' and 'Edit' buttons on the event page and choosing the 'Export Event' option. Then select the 'Save to calendar' option and save the file on your computer.
+</p>
+
+<img class="img-thumbnail mb-3 d-block mx-auto" src="/images/facebook-export.png" alt="Image showing the location of the export option on Facebook" />
+
+<form id="icsImportForm" action="/importevent" method="post" enctype="multipart/form-data">
+ <div class="custom-file" id="icsImportContainer">
+ <input required name="icsImportControl" type="file" class="custom-file-input" id="icsImportControl" aria-describedby="fileHelp" accept="text/calendar">
+ <label name="icsImportLabel" class="custom-file-label" id="icsImportLabel" for="icsImportControl">
+ <i class="far fa-file-alt"></i> Select file
+ </label>
+ </div>
+ <button type="submit" class="d-block mt-3 mx-auto btn btn-primary w-50">Import</button>
+</form>
diff --git a/views/partials/neweventform.handlebars b/views/partials/neweventform.handlebars
new file mode 100755
index 0000000..8f2b32e
--- /dev/null
+++ b/views/partials/neweventform.handlebars
@@ -0,0 +1,110 @@
+<form id="newEventForm" action="/newevent" method="post" enctype="multipart/form-data">
+ <input type="text" hidden class="form-control" id="eventType" name="eventType" value="{{eventType}}">
+ <div class="form-group row">
+ <label for="eventName" class="col-sm-2 col-form-label">Event name</label>
+ <div class="form-group col-sm-10">
+ <input type="text" class="form-control" id="eventName" name="eventName" placeholder="Make it snappy." value="{{data.eventName}}" data-validation="required length" data-validation-length="3-60">
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="eventLocation" class="col-sm-2 col-form-label">Location</label>
+ <div class="form-group col-sm-10">
+ <input type="text" class="form-control" id="eventLocation" name="eventLocation" placeholder="Be specific." value="{{data.eventLocation}}" data-validation="required length" data-validation-length="3-60">
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="eventStart" class="col-sm-2 col-form-label">Starts</label>
+ <div class="form-group col-sm-10">
+ <input readonly type="text" class="form-control" id="eventStart" name="eventStart" placeholder="Click me!" value="{{data.eventStart}}" data-validation="required">
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="eventEnd" class="col-sm-2 col-form-label">Ends</label>
+ <div class="form-group col-sm-10">
+ <input readonly type="text" class="form-control" id="eventEnd" name="eventEnd" placeholder="Click me!" value="{{data.eventEnd}}" data-validation="required">
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="eventDescription" class="col-sm-2 col-form-label">Description</label>
+ <div class="form-group col-sm-10">
+ <textarea class="form-control expand" id="eventDescription" name="eventDescription" data-validation="required" placeholder="You can always edit it later."></textarea>
+ <small class="form-text"><a href="https://commonmark.org/help/">Markdown</a> formatting supported.</small>
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="eventURL" class="col-sm-2 col-form-label">Link</label>
+ <div class="form-group col-sm-10">
+ <input type="url" class="form-control" id="eventURL" name="eventURL" placeholder="For tickets or another event page (optional)." data-validation="url" data-validation-optional="true">
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="eventImage" class="col-sm-2 col-form-label">Cover image</label>
+ <div class="form-group col-sm-10">
+ <div id="image-preview">
+ <label for="image-upload" id="image-label">Choose file</label>
+ <input type="file" name="imageUpload" id="image-upload" />
+ </div>
+ <small class="form-text">Recommended dimensions (w x h): 920px by 300px.</small>
+ </div>
+ </div>
+ {{#unless isPublic}}
+ <div class="form-group row">
+ <label for="eventPassword" class="col-sm-2 col-form-label">Event password</label>
+ <div class="form-group col-sm-10">
+ <input type="password" class="form-control" id="eventPassword" name="eventPassword" placeholder="Don't forget it!" data-validation="required">
+ </div>
+ <div class="form-group col-sm-10 offset-sm-2">
+ <div class="" id="passwordStrengthBar"></div>
+ </div>
+ </div>
+ {{/unless}}
+ <div class="form-group row">
+ <label for="hostName" class="col-sm-2 col-form-label">Host name</label>
+ <div class="form-group col-sm-10">
+ <input type="text" class="form-control" id="hostName" name="hostName" placeholder="Will be shown on the event page (optional)." data-validation="length" data-validation-length="2-60" data-validation-optional="true">
+ </div>
+ </div>
+ <div class="form-group row">
+ <label for="creatorEmail" class="col-sm-2 col-form-label">Your email</label>
+ <div class="form-group col-sm-10">
+ <input type="email" class="form-control" id="creatorEmail" name="creatorEmail" placeholder="We won't spam you <3" data-validation="email required">
+ <small class="form-text">We will send your secret editing link to this email address.</small>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="col-sm-2">Options</div>
+ <div class="col-sm-10">
+ <div class="form-check">
+ <input class="form-check-input" type="checkbox" id="joinCheckbox" name="joinCheckbox">
+ <label class="form-check-label" for="joinCheckbox">
+ Users can mark themselves as attending this event
+ </label>
+ </div>
+ <div class="form-check">
+ <input class="form-check-input" type="checkbox" id="interactionCheckbox" name="interactionCheckbox">
+ <label class="form-check-label" for="interactionCheckbox">
+ Users can post comments on this event
+ </label>
+ </div>
+ </div>
+ </div>
+ <div class="form-group row">
+ <div class="col-sm-12 pt-3 pb-3 text-center">
+ <button type="submit" class="btn btn-primary w-50">Create</button>
+ </div>
+ </div>
+</form>
+
+<script>
+ $(document).ready(function() {
+ $.uploadPreview({
+ input_field: "#image-upload",
+ preview_box: "#image-preview",
+ label_field: "#image-label",
+ label_default: "Choose file",
+ label_selected: "Change file",
+ no_label: false
+ });
+ autosize($('textarea'));
+ });
+</script>
diff --git a/views/partials/sidebar-dropdown.handlebars b/views/partials/sidebar-dropdown.handlebars
new file mode 100755
index 0000000..9f9e564
--- /dev/null
+++ b/views/partials/sidebar-dropdown.handlebars
@@ -0,0 +1,11 @@
+<div class="dropdown mb-2">
+ <a class="w-100 btn btn-dark dropdown-toggle" href="#" role="button" id="newEventDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ New event
+ </a>
+
+ <div class="dropdown-menu" aria-labelledby="newEventDropdownMenuLink">
+ <a class="dropdown-item" href="/new/event/private">Private</a>
+ <a class="dropdown-item" href="/new/event/public">Public</a>
+ <a class="dropdown-item" href="/new/event/organisation">Organisation</a>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/partials/sidebar.handlebars b/views/partials/sidebar.handlebars
new file mode 100755
index 0000000..75f5ca8
--- /dev/null
+++ b/views/partials/sidebar.handlebars
@@ -0,0 +1,5 @@
+<h1><a href="/" class="text-dark">gath<span class="text-muted">io</span></a></h1>
+
+<p class="lead text-center mb-4">Nicer events</p>
+
+<a class="btn btn-success mb-2 btn-block" href="/new/event/public"><i class="far fa-calendar-plus"></i> New event</a>