summaryrefslogtreecommitdiff
path: root/views/publicEventList.handlebars
blob: 6d85ca73c02c531e79c39465165011ddb6d0b62f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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>