forked from transformstudios/statamic-events
-
Notifications
You must be signed in to change notification settings - Fork 0
/
calendar.html
54 lines (54 loc) · 2.22 KB
/
calendar.html
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
<section class="full-calendar">
<div class="container">
<div class="row">
<div class="text-center col-12">
<p>Tap on a day to see the event(s)</p>
<div class="nav">
<a href="{{ permalink }}?year={{ events:now_or_param modify="-1 month" format="Y" }}&month={{ events:now_or_param modify="-1 month" format="F" lower="true" }}"> {{ events:now_or_param modify="-1 month" format="M" }}</a>
</a>
<h2><strong>{{ events:now_or_param format="M" }}</strong> {{ events:now_or_param format="Y" }}</h2>
<a href="{{ permalink }}?year={{ events:now_or_param modify="+1 month" format="Y" }}&month={{ events:now_or_param modify="+1 month" format="F" lower="true" }}">{{ events:now_or_param modify="+1 month" format="M" }} </a>
</div>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="calendar full-view">
<div class="days">
<div class="day">Sun</div>
<div class="day">Mon</div>
<div class="day">Tue</div>
<div class="day">Wed</div>
<div class="day">Thu</div>
<div class="day">Fri</div>
<div class="day">Sat</div>
</div>
<div class="dates">
{{ events:calendar collection="events" :year="get.year" :month="get.month" }}
{{ if date | is_start_of_week }}<div class="week-row">{{ /if }}
<div class="day-cell{{ if date | is_today }} today{{ /if }}{{ if date | is_weekend }} weekend{{ /if }}{{ unless date | in_month }} not-month{{ /unless }}">
<div class="day-number">{{ date format="d" }}</div>
{{ unless no_results }}
<ul class="events">
{{ dates scope="event" }}
<li class="event-item" title="{{ title }}">
{{ if event:body_content }}<a href="{{ permalink }}">{{ /if }}
<div>
<span class="event-title">{{ title }}</span>
{{ if !all_day }}
<span class="event-time">{{ start_time format="g:i" }} {{ start_time format="A" }}</span>{{ /if }}
</div>
{{ if event:body_content }}</a>{{ /if }}
</li>
{{ /dates }}
</ul>
{{ /unless }}
</div>
{{ if date | is_end_of_week }}</div>{{ /if }}
{{ /events:calendar }}
</div>
</div>
</div>
</div>
</section>