- content_for :header_day do
  .header-day{"data-day" => "#{@today.day}", "data-month" => "#{l(@today, format: :month)}"}
    = @today.day
    %p.header-month= l(@today, format: :month)

- content_for :header_year do
  %section(data-controller="dropdown")
    %span.header-year(data-dropdown-target="toHide")= @year
    .header-panel-info.d-none(data-dropdown-target="toShow")
      %section.row
        - @years.to_a.reverse.each do |year|
          %h3.col-2= link_to year, year_path(year)

.row
  - (1..12).each do |month|
    = cell(:month, nil, year: @year, month: month, today: @today, events: @events, show_desc: current_user&.can_see_description)

- if current_user&.can_see_legend
  .legend.d-none.d-lg-block
    - @activities.each do |i|
      - next if i.count_during_year(@year).zero?
      %p
        %span{class: "badge activity#{i.id}"}= ' '
        = i.count_during_year(@year)
        = i.name

- content_for :footer do
  - if current_user&.can_download
    = link_to "↯ Export #{@year} events as .csv", "#@year.csv"

:javascript
  document.addEventListener('turbo:load', function() {
    $('[data-toggle="tooltip"]').tooltip();
  });

- content_for :header_day do
  .header-day{"data-day" => "#{@today.day}", "data-month" => "#{l(@today, format: :month)}"}
    = @today.day
    %p.header-month= l(@today, format: :month)

- content_for :header_year do
  %section(data-controller="dropdown")
    %span.header-year(data-dropdown-target="toHide")= @year
    .header-panel-info.d-none(data-dropdown-target="toShow")
      %section.row
        - @years.to_a.reverse.each do |year|
          %h3.col-2= link_to year, year_path(year)

.row
  - (1..12).each do |month|
    = cell(:month, nil, year: @year, month: month, today: @today, events: @events, show_desc: current_user&.can_see_description)

- if current_user&.can_see_legend
  .legend.d-none.d-lg-block
    - @activities.each do |i|
      - next if i.count_during_year(@year).zero?
      %p
        %span{class: "badge activity#{i.id}"}= ' '
        = i.count_during_year(@year)
        = i.name

- content_for :footer do
  - if current_user&.can_download
    = link_to "↯ Export #{@year} events as .csv", "#@year.csv"

Remove last bit of jQuery
Remove last bit of jQuery
