diff --git a/templates/calendar.html.twig b/templates/calendar.html.twig deleted file mode 100644 index 6b319c6..0000000 --- a/templates/calendar.html.twig +++ /dev/null @@ -1,163 +0,0 @@ -{% extends 'partials/base.html.twig' %} - -{% if page.header.show_breadcrumbs is defined %} - {% set show_breadcrumbs = page.header.show_breadcrumbs %} -{% else %} - {% set show_breadcrumbs = true %} -{% endif %} - -{% block menu %} - {% include 'partials/sidebar_right.html.twig' %} -{% endblock %} - -{% block content %} - {% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %} - {% include 'partials/breadcrumbs.html.twig' %} - {% endif %} - -
-
-
-

{{ page.header.title }}

- {% if page.header.subtitle %} -

{{ page.header.subtitle }}

- {% endif %} -
-
- {{ page.content|raw }} - -{% set prevYearUrl = page.url ~ '/year:' ~ calendar.prevYear|date('Y') ~ '/month:' ~ calendar.prevYear|date('m') %} -{% set nextYearUrl = page.url ~ '/year:' ~ calendar.nextYear|date('Y') ~ '/month:' ~ calendar.nextYear|date('m') %} -{% set prevMonthUrl = page.url ~ '/year:' ~ calendar.prev.date|date('Y') ~ '/month:' ~ calendar.prev.date|date('m') %} -{% set nextMonthUrl = page.url ~ '/year:' ~ calendar.next.date|date('Y') ~ '/month:' ~ calendar.next.date|date('m') %} -{% set currMonthUrl = page.url ~ '/year:' ~ now|date('Y') ~ '/month:' ~ now|date('m') %} - -{% set prevYearTitle = calendar.prevYear|dateTranslate(config.plugins.events.calendar.header) %} -{% set nextYearTitle = calendar.nextYear|dateTranslate(config.plugins.events.calendar.header) %} -{% set prevMonthTitle = calendar.prev.date|dateTranslate(config.plugins.events.calendar.header) %} -{% set nextMonthTitle = calendar.next.date|dateTranslate(config.plugins.events.calendar.header) %} - -
-
- - - - - - - - - - - {% set fdowOffset = config.plugins.events.calendar.first_dow %} - {% set dayChar = config.plugins.events.calendar.day_char %} - {% if dayChar == 0 %} - {% set dayChar = 1000 %} - {% endif %} - {% for day in range(0,6) %} - - {% endfor %} - - - - - - {% set startDow = (calendar.date|date('w') +6-fdowOffset) % 7 %} - {% set dow = startDow %} - {% set month = "now"|date("F") %} - {% set year = "now"|date("Y") %} - {% for day in range(1,calendar.daysInMonth) %} - {% if loop.first and startDow != 0 %} - - {% endif %} - - {% if loop.last and dow != 6 %} - - {% endif %} - {% if dow == 6 %} - {% set dow = 0 %} - - - {% else %} - {% set dow = dow + 1 %} - {% endif %} - {% endfor %} - - -
- « - - - - - {{ calendar.date|dateTranslate(config.plugins.events.calendar.header) }} - - - - - » -
{{ 'GRAV.DAYS_OF_THE_WEEK'|ta((fdowOffset+day) % 7)|slice(0, dayChar) }}
-
- {% if calendar.events[calendar.year][calendar.month][day] != null %} - {% set title_date = calendar.month ~ '/' ~ day ~ '/' ~ calendar.year %} - - {% else %} -
- {{ day }} -
- {% endif %} - -
- {% set title_date = calendar.month ~ '/' ~ day ~ '/' ~ calendar.year %} -

{{ title_date|dateTranslate(config.plugins.events.calendar.details.title) }}

-
    - {% for event in calendar.events[calendar.year][calendar.month][day] %} - {% if event.title %} -
  • - {% include 'partials/event_calendar_item.html.twig' with { 'event': event } %} -
  • - {% endif %} - {% endfor %} -
-
-
-
 
-
- -
-
- {% set day = "now"|date("j") %} - {% set month = "now"|date("n") %} - {% set year = "now"|date("Y") %} -

{{ "now"|dateTranslate(config.plugins.events.calendar.details.title) }}

-
    - {% if calendar.events[year][month][day] == null %} -
  • {{ "PLUGIN_EVENTS.CALENDAR.NO_EVENTS"|t }}
  • - {% else %} - {% for event in calendar.events[year][month][day] %} - {% if event.title %} -
  • - {% include 'partials/event_calendar_item.html.twig' with { 'event': event } %} -
  • - {% endif %} - {% endfor %} - {% endif %} -
-
- -

- {{ "PLUGIN_EVENTS.CALENDAR.VIEW_ALL_EVENTS"|t }} -

-
-
-
- - -{% endblock %}