Skip to content

Instantly share code, notes, and snippets.

@isralduke
Created January 15, 2016 13:46
Show Gist options
  • Save isralduke/8da196f5487f8a8e98cd to your computer and use it in GitHub Desktop.
Save isralduke/8da196f5487f8a8e98cd to your computer and use it in GitHub Desktop.
Raven Calendar Add-On
{{ calendar:set_month folder="calendar" inherit="true" year="{ segment_3 }" month="{ segment_4 }" }}
<h2 class="page-title">{{ calendar:month_name }} {{ segment_3 }}</h2>
<div class="month-select">
{{ theme:partial src="month-select" }}
</div>
{{ calendar:month folder="calendar" inherit="true" year="{ segment_3 }" month="{ segment_4 }" }}
<div class="calendar">
<div class="calendar-header group">
{{ days_of_week }}
<div class="calendar-header-item">{{ day_name }}</div>
{{ /days_of_week }}
</div>
<div class="calendar-body">
{{ weeks }}
<div class="calendar-week group">
{{ days }}
<div class="calendar-day {{ if other_month }}other-month{{ endif }} ">
<div class="calendar-day-digit {{ if today }}today{{ endif }}">
{{ day }}
</div>
{{ entries }}
<div class="calendar-entry">
<div class="event {{ if all_day }}all-day{{ endif }}">
{{ unless all_day }}
<b class="event-time">{{ start_time }}{{ if end_time }} - {{ end_time }}{{ endif }}:</b><br />
{{ endif }}
{{ if !content }}
{{ title }}
{{ else }}
<a class="event-title" href="{{ url }}" title="More info on {{ title }}">{{ title }}</a>
{{ endif }}
</div>
</div>
{{ /entries }}
</div>
{{ /days }}
</div>
{{ /weeks }}
</div>
</div>
{{ /calendar:month }}
<div class="month-select visible-xs visible-sm ">
{{ calendar:prev_month }}
<a href="/calendar/month/{{ year }}/{{ month }}" title="{{ month_name }} {{ year }}"><span class="glyphicon glyphicon-chevron-left"></span> Prev</a>
{{ /calendar:prev_month }}
{{ calendar:date_select attr="class:date-select" year="{ segment_3 }" month="{ segment_4 }" from="-2 months" to="+6 months" }}
{{ calendar:next_month }}
<a href="/calendar/month/{{ year }}/{{ month }}" title="{{ month_name }} {{ year }}">Next <span class="glyphicon glyphicon-chevron-right"></a>
{{ /calendar:next_month }}
</div>
###########################################################################################
#
# STATAMIC CUSTOM ROUTES
#
###########################################################################################
routes:
# SIMPLE ROUTE EXAMPLE
# Visiting example.com/contact-us will...
# load the /templates/contact.html
# taken from: https://pixelfear.com/addons/calendar/docs/usage
#/events/*: calendar_month
/calendar/month/*: calendar_month
#template: calendar_month
#layout: default
# ADVANCED ROUTE EXAMPLE
# Visiting example.com/members/login will...
# load the /templates/success.html template
# and use the /layouts/system.html layout
# /members/login:
# template: success
# layout: system
ignore:
# - success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment