<% if (data.cal.today.length + data.cal.tomorrow.length + data.cal.week.length > 0  ) {%>
<div id="container" class="mui-panel">
  <h2>Calendar</h2>

  <% if (data.cal.today.length  > 0  ) { %>
    <h3>Today</h3>
    <% for (var i = 0; i < data.cal.today.length; i++) { %>

    <div class="mui-row">
      <div class="mui-col-md-12">
        <%- data.cal.today[i].combined %>
      </div>
    </div>

    <% }
    }
    %>

  <% if (data.cal.tomorrow.length  > 0  ) { %>
    <h3>Tomorrow</h3>
    <% for (var i = 0; i < data.cal.tomorrow.length; i++) { %>

    <div class="mui-row">
      <div class="mui-col-md-12">
        <%- data.cal.tomorrow[i].combined %>
      </div>
    </div>

    <% }
    }
    %>

  <% if (data.cal.week.length  > 0  ) { %>
    <h3>Week ahead</h3>
    <% for (var i = 0; i < data.cal.week.length; i++) { %>

    <div class="mui-row">
      <div class="mui-col-md-12">
        <%- data.cal.week[i].longcombined %>
      </div>
    </div>

    <% }
    }
    %>

</div>

<% } %>

