themes/bases/Campussuite2015/widgets/ModuleCalendarMini/build/includes/month.html.twig line 1

Open in your IDE?
  1. <div class="calendar-header">
  2.     {% if monthBefore is not empty %}
  3.         <a
  4.             class="calendar-header-btn calendar-btn-month-prev" href="#" 
  5.             data-date-year="{{ monthBefore|date('Y') }}"
  6.             data-date-month="{{ monthBefore|date('n') }}"
  7.             data-date-day="1"
  8.         >
  9.             <em class="calendar-icon calendar-icon-prev" aria-hidden="true"></em>
  10.             <span class="sr-only">Navigate to previous month</span>
  11.         </a>
  12.     {% endif %}
  13.     <div class="calendar-header-title">{{ monthStart|date('F') }} {{ monthStart|date('Y') }}</div>
  14.     {% if monthAfter is not empty %}
  15.         <a
  16.             class="calendar-header-btn calendar-btn-month-next" href="#" 
  17.             data-date-year="{{ monthAfter|date('Y') }}"
  18.             data-date-month="{{ monthAfter|date('n') }}"
  19.             data-date-day="1"
  20.         >
  21.             <em class="calendar-icon calendar-icon-next" aria-hidden="true"></em>
  22.             <span class="sr-only">Navigate to next month</span>
  23.         </a>
  24.     {% endif %}
  25. </div>
  26. <div class="calendar-table">
  27.     <ul class="calendar-table-head">
  28.         <li class="calendar-table-day calendar-table-day-empty">S</li>
  29.         <li class="calendar-table-day calendar-table-day-empty">M</li>
  30.         <li class="calendar-table-day calendar-table-day-empty">T</li>
  31.         <li class="calendar-table-day calendar-table-day-empty">W</li>
  32.         <li class="calendar-table-day calendar-table-day-empty">T</li>
  33.         <li class="calendar-table-day calendar-table-day-empty">F</li>
  34.         <li class="calendar-table-day calendar-table-day-empty">S</li>
  35.     </ul>
  36.     <ul class="calendar-table-row">
  37.         {% set week = null %}
  38.         {% for date in dates %}
  39.             {% if week is empty %}
  40.                 {% set week = date.week %}
  41.             {% endif %}
  42.             {% if week != date.week %}
  43.                 {% set week = date.week %}
  44.                 </ul>
  45.                 <ul class="calendar-table-row">
  46.             {% endif %}
  47.             <li
  48.                 class="
  49.                     calendar-table-day
  50.                     {% if date.pm is same as(true) %}calendar-table-day-pm{% endif %}
  51.                     {% if date.nm is same as(true) %}calendar-table-day-nm{% endif %}
  52.                 "
  53.                 data-date-year="{{ date.date|date('Y') }}"
  54.                 data-date-month="{{ date.date|date('n') }}"
  55.                 data-date-day="{{ date.date|date('j') }}"
  56.             >
  57.                 <span>
  58.                     {% if date.date >= monthStart and date.date <= monthEnd and date.events|length > 0 %}
  59.                         <a href="#">
  60.                     {% endif %}
  61.                     <span>{{ date.date|date('j') }}</span>
  62.                     {% if date.date >= monthStart and date.date <= monthEnd and date.events|length > 0 %}
  63.                         </a>
  64.                     {% endif %}
  65.                 </span>
  66.             </li>
  67.             {% if date.date|date('Y-m-d') == today|date('Y-m-d') %}
  68.                 {% set events = date.events %}
  69.             {% endif %}
  70.         {% endfor %}
  71.     </ul>
  72. </div>