summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorRaphael Kabo <raphaelkabo@hey.com>2024-02-25 21:34:33 +0000
committerRaphael Kabo <raphaelkabo@hey.com>2024-02-26 00:11:03 +0000
commitb3c9cba6478dc16d135313aa6d0adcc02d67ece6 (patch)
tree508ef236dc805b950fedeeca7f8dd3559d66a162 /views
parentafd9fc4477fff90e5db917f350d99c3d01fba2bd (diff)
feat: optional public events/groups
Diffstat (limited to 'views')
-rwxr-xr-xviews/event.handlebars3
-rwxr-xr-xviews/eventgroup.handlebars1
-rwxr-xr-xviews/home.handlebars44
-rwxr-xr-xviews/layouts/main.handlebars2
-rwxr-xr-xviews/partials/eventForm.handlebars8
-rw-r--r--views/partials/eventGroupForm.handlebars11
-rwxr-xr-xviews/partials/sidebar.handlebars12
-rw-r--r--views/publicEventList.handlebars72
8 files changed, 138 insertions, 15 deletions
diff --git a/views/event.handlebars b/views/event.handlebars
index 4402578..44c2f4b 100755
--- a/views/event.handlebars
+++ b/views/event.handlebars
@@ -109,7 +109,7 @@
{{#if eventHasConcluded}}
<div class="alert alert-warning mb-4" role="alert">
- This event has concluded. It can no longer be edited, and will be automatically deleted <span class="daysToDeletion"></span>.
+ This event has concluded. It can no longer be edited{{#if eventWillBeDeleted}}, and will be automatically deleted {{daysUntilDeletion}}{{/if}}.
</div>
{{/if}}
{{#if firstLoad}}
@@ -523,7 +523,6 @@ window.eventData = {{{ json jsonData }}};
$(this).html('<i class="fas fa-copy"></i> Copied!');
setTimeout(function(){ $("#copyAPLink").html('<i class="fas fa-copy"></i> Copy');}, 5000);
})
- $(".daysToDeletion").html(moment("{{eventEndISO}}").add(7, 'days').fromNow());
if ($("#joinCheckbox").is(':checked')){
$("#maxAttendeesCheckboxContainer").css("display","flex");
}
diff --git a/views/eventgroup.handlebars b/views/eventgroup.handlebars
index 434f691..7ad3570 100755
--- a/views/eventgroup.handlebars
+++ b/views/eventgroup.handlebars
@@ -122,6 +122,7 @@
<a href="/{{this.id}}" class="list-group-item list-group-item-action" target="_blank">
<i class="fas fa-fw fa-calendar-day"></i>
<strong>{{this.name}}</strong>
+ {{#if this.location}}<span class="ml-2 text-muted"><i class="fas fa-map-marker-alt"></i> {{this.location}}</span>{{/if}}
<span class="ml-2 text-muted">{{this.displayDate}}</span>
</a>
{{/unless}}
diff --git a/views/home.handlebars b/views/home.handlebars
index add7eac..bf92724 100755
--- a/views/home.handlebars
+++ b/views/home.handlebars
@@ -1,25 +1,53 @@
-<p class="lead">A quick and easy way to make and share events which respects your privacy.</p>
+<p class="lead">Gathio is a simple, federated, privacy-first event hosting platform.</p>
-<hr>
+<div class="card mb-3 border-primary">
+<div class="card-header">
+ This instance, <strong>{{siteName}}</strong>, has the following features:
+</div>
-<p>You don't need to sign up for an account. When you create an event, we generate a password which allows you to edit the event. Send all your guests the public link, and all your co-hosts the secret editing link containing the password. A week after the event finishes, it's deleted from our servers for ever, and your email goes with it.</p>
+<div class="card-body m-0 p-0">
+ <ul class="list-group list-group-flush">
+ {{#each instanceRules}}
+ <li class="list-group-item"><i class="{{this.icon}} fa-fw mr-2"></i> {{this.text}}</li>
+ {{/each}}
+ </ul>
+</div>
+</div>
<div id="example-event" class="text-center w-100 mt-4 mb-5">
<img alt ="An example event page for a picnic. The page shows the event's location, host, date and time, and description, as well as buttons to save the event to Google Calendar, export it, and open the location in OpenStreetMap and Google Maps." src="images/example-event-2023.png" class="img-fluid w-75 mx-auto shadow-lg rounded">
</div>
-<p>Also, we don't show you ads, don't sell your data, and never send you unnecessary emails.</p>
+<h3>Privacy-first</h3>
+
+<p>There are no accounts on Gathio. When you create an event, we generate a password which allows you to edit the event. Send all your guests the public link, and all your co-hosts the secret editing link containing the password.</p>
+
+<p>If you supply your email, we'll send you the editing password so you don't lose it - but supplying your email is optional!</p>
+
+<p>If this instance automatically deletes its events, sometime after the event finishes, it's deleted from the database for ever, and your data goes with it.</p>
+
+<p>Also, Gathio doesn't show you ads, doesn't sell your data, and never sends you unnecessary emails.</p>
+
+<p>But remember: all events are visible to anyone who knows the link, so probably don't use Gathio to plot your surprise birthday party or revolution. Or whatever, you do you.</p>
+
+<h3>Configurable</h3>
+
+<p>The <a href="https://gath.io">flagship Gathio instance at gath.io</a> is designed for anyone to create ephemeral, hidden events. Anyone can create an event; events are never displayed anywhere public; and they're deleted 7 days after they end.</p>
+
+<p>But if your community sets up their own instance, you can limit event creation to a specific list of people, display events on a handy list on the homepage, and disable event deletion entirely!</p>
+
+<h3>Federation and self-hosting</h3>
-<p>But remember: all events are visible to anyone who knows the link, so probably don't use <strong>gathio</strong> to plot your surprise birthday party or revolution. Or whatever, you do you.</p>
+<p>Gathio can easily be self-hosted, and supports ActivityPub services like Mastodon, Pleroma, and Friendica, allowing you to access events from anywhere on the Fediverse. We encourage you to spin up your own instance for your community. Detailed instructions on <a href="https://github.com/lowercasename/gathio/wiki/Fediverse-Instructions">ActivityPub access</a> and <a href="https://github.com/lowercasename/gathio/wiki/Installation-instructions">self-hosted installation</a> live on our GitHub wiki.
-<h4 class="pt-2">Federation and self-hosting</h4>
+<h3>Open source</h3>
-<p><strong>gathio</strong> can easily be self-hosted, and supports ActivityPub services like Mastodon, Pleroma, and Friendica, allowing you to access events from anywhere on the Fediverse. We encourage you to spin up your own instance for your community. Detailed instructions on <a href="https://github.com/lowercasename/gathio/wiki/Fediverse-Instructions">ActivityPub access</a> and <a href="https://github.com/lowercasename/gathio/wiki/Installation-instructions">self-hosted installation</a> live on our GitHub wiki. Leave a question in our <a href="https://github.com/lowercasename/gathio/issues">tracker</a> if you encounter any issues.</p>
+<p>Gathio is delighted to be open source, and is built by a lovely group of people. Leave a question in our <a href="https://github.com/lowercasename/gathio/issues">tracker</a> if you encounter any issues.</p>
{{#if showKofi}}
<div class="card border-secondary mt-5 mb-3 mx-auto" style="min-width:300px;max-width:50%;">
<div class="card-body text-secondary">
- <p>If you find yourself using and enjoying <strong>gath<span class="text-muted">io</span></strong>, consider buying me a coffee. It'll help keep the site running! <i class="far fa-heart"></i></p>
+ <p>If you find yourself using and enjoying Gathio, consider buying Raphael a coffee. It'll help keep the project and main site running! <i class="far fa-heart"></i></p>
<script type='text/javascript' src='https://ko-fi.com/widgets/widget_2.js'></script><script type='text/javascript'>kofiwidget2.init('Support Me on Ko-fi', '#46b798', 'Q5Q2O7T5');kofiwidget2.draw();</script>
</div>
</div>
diff --git a/views/layouts/main.handlebars b/views/layouts/main.handlebars
index d45d596..996d35f 100755
--- a/views/layouts/main.handlebars
+++ b/views/layouts/main.handlebars
@@ -70,7 +70,7 @@
<div id="footerContainer">
{{#if showInstanceInformation}}
<p class="small text-muted">
- <strong>{{domain}}</strong>
+ <strong>{{siteName}}</strong>
{{#each staticPages}}
{{#if @first}}
&middot;
diff --git a/views/partials/eventForm.handlebars b/views/partials/eventForm.handlebars
index c2eebc3..9227300 100755
--- a/views/partials/eventForm.handlebars
+++ b/views/partials/eventForm.handlebars
@@ -73,6 +73,14 @@
<div class="form-group">
<label>Options</label>
<div >
+ {{#if showPublicEventList}}
+ <div class="form-check">
+ <input class="form-check-input" type="checkbox" id="publicEventCheckbox" name="publicCheckbox" x-model="data.publicCheckbox">
+ <label class="form-check-label" for="publicEventCheckbox">
+ Display this event on the public event list
+ </label>
+ </div>
+ {{/if}}
<div class="form-check">
<input class="form-check-input" type="checkbox" id="eventGroupCheckbox" name="eventGroupCheckbox" x-model="data.eventGroupCheckbox">
<label class="form-check-label" for="eventGroupCheckbox">
diff --git a/views/partials/eventGroupForm.handlebars b/views/partials/eventGroupForm.handlebars
index 258c321..284343f 100644
--- a/views/partials/eventGroupForm.handlebars
+++ b/views/partials/eventGroupForm.handlebars
@@ -31,6 +31,17 @@
</div>
<small class="form-text">Recommended dimensions (w x h): 920px by 300px.</small>
</div>
+{{#if showPublicEventList}}
+ <div class="form-group">
+ <label>Options</label>
+ <div class="form-check">
+ <input class="form-check-input" type="checkbox" id="publicGroupCheckbox" name="publicCheckbox" x-model="data.publicCheckbox">
+ <label class="form-check-label" for="publicGroupCheckbox">
+ Display this group on the public group list
+ </label>
+ </div>
+ </div>
+{{/if}}
<div class="form-group">
<div class="col-12">
<div
diff --git a/views/partials/sidebar.handlebars b/views/partials/sidebar.handlebars
index 5d8e847..1882aef 100755
--- a/views/partials/sidebar.handlebars
+++ b/views/partials/sidebar.handlebars
@@ -1,7 +1,11 @@
<div id="fixedContainer" class="pt-3">
- <h1><a href="/">gath<span class="text-muted">io</span></a></h1>
+ <h1 class="mb-4"><a href="/">gathio</a></h1>
- <p class="lead text-center mb-4">Nicer events</p>
-
- <a class="btn btn-success mb-2 btn-block" href="/new"><i class="far fa-calendar-plus"></i> New</a>
+ <ul id="sidebar__nav">
+ <li><a class="btn btn-success" href="/new"><i class="far fa-calendar-plus"></i> New</a></li>
+ {{#if showPublicEventList}}
+ <li><a href="/events">View events</a></li>
+ <li><a href="/about">About</a></li>
+ {{/if}}
+ </ul>
</div>
diff --git a/views/publicEventList.handlebars b/views/publicEventList.handlebars
new file mode 100644
index 0000000..6d85ca7
--- /dev/null
+++ b/views/publicEventList.handlebars
@@ -0,0 +1,72 @@
+<article x-data="{currentTab: 'events'}">
+<h2 class="mb-4">{{siteName}}</h2>
+<p><strong>{{siteName}}</strong> is an instance of <a href="/about">Gathio</a>, a simple, federated, privacy-first event hosting platform.</p>
+<ul class="nav nav-pills">
+ <li class="nav-item">
+ <a class="nav-link" x-bind:class="currentTab === 'events' && 'active'" aria-current="page" href="#" x-on:click.prevent="currentTab = 'events'">Events</a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link" x-bind:class="currentTab === 'groups' && 'active'" href="#" x-on:click.prevent="currentTab = 'groups'">Groups</a>
+ </li>
+</ul>
+
+<div x-show="currentTab === 'events'">
+ <div class="card mt-4 mb-4">
+ <h5 class="card-header">Upcoming events</h5>
+ <div class="list-group list-group-flush">
+ {{#if upcomingEvents}}
+ {{#each upcomingEvents}}
+ <a href="/{{this.id}}" class="list-group-item list-group-item-action">
+ <i class="fas fa-fw fa-calendar-day"></i>
+ <strong>{{this.name}}</strong>
+ {{#if this.location}}<span class="ml-2 text-muted"><i class="fas fa-map-marker-alt"></i> {{this.location}}</span>{{/if}}
+ <span class="ml-2 text-muted">{{this.displayDate}}</span>
+ {{#if this.eventGroup}}
+ <span class="badge badge-secondary ml-2">{{this.eventGroup.name}}</span>
+ {{/if}}
+ </a>
+ {{/each}}
+ {{else}}
+ <div class="list-group-item">No events!</div>
+ {{/if}}
+ </div>
+ </div>
+
+ <div class="card mt-4 mb-4">
+ <h5 class="card-header">Past events</h5>
+ <div class="list-group list-group-flush">
+ {{#if pastEvents}}
+ {{#each pastEvents}}
+ <a href="/{{this.id}}" class="list-group-item list-group-item-action">
+ <i class="fas fa-fw fa-calendar-day"></i>
+ <strong>{{this.name}}</strong>
+ <span class="ml-2 text-muted">{{this.displayDate}}</span>
+ {{#if this.eventGroup}}
+ <span class="badge badge-secondary ml-2">In group: {{this.eventGroup.name}}</span>
+ {{/if}}
+ </a>
+ {{/each}}
+ {{else}}
+ <div class="list-group-item">No events!</div>
+ {{/if}}
+ </div>
+ </div>
+</div>
+
+<div x-show="currentTab === 'groups'">
+ <div class="card mt-4 mb-4">
+ <h5 class="card-header">Event groups</h5>
+ <div class="list-group list-group-flush">
+ {{#if eventGroups}}
+ {{#each eventGroups}}
+ <a href="/group/{{this.id}}" class="list-group-item list-group-item-action">
+ <i class="fas fa-fw fa-calendar-alt"></i>
+ <strong>{{this.name}}</strong>
+ </a>
+ {{/each}}
+ {{else}}
+ <div class="list-group-item">No groups!</div>
+ {{/if}}
+</div>
+
+</article> \ No newline at end of file