<!-- BEGIN hero.html -->
<div id="banner" style={% if page.url == "/" %}"height:100%"{% else %}"height:60%;"{% endif %}>

  <div>
    <a href="{{ site.baseurl }}/" class="nodecoration"><img id="logo"
        src="{{ site.baseurl }}/assets/img/logo%20galleri%20momangen.svg" alt="{{ site.title }}" title="{{ site.title }}" /></a>
    {% if page.url == "/" %}
    <div id="poster">
      <!-- Begin Up next -->


{% assign now = site.time %}
{% assign upcoming = site.events | sort: 'event_data.start_datetime' %}
{% for event in upcoming %}   
{% if event.event_data.end_datetime >= now %}  


      <div>
        På gång:
        <a href="cloudcannon:collections/{{ event.path }}" rel="nofollow" class="editor-link cms-editor-link">Redigera Event</a>
        <h2><a href="{{ event.url }}" class="nodecoration">{{ event.title }}</a></h2>
        <p>
          {% assign d = event.event_data.start_datetime | date: "%-d"  %}
          {% case d %}
          {% when '1' or '21' or '31' or '2' or '22' %}{{ d }}:a          
          {% else %}{{ d }}:e
          {% endcase %}         
          
          {% assign m = event.event_data.start_datetime | date: "%-m" %}          
          {% case m %}           
          {% when '1' %}Januar          
          {% when '2' %}Februari          
          {% when '3' %}Mars           
          {% when '4' %}April          
          {% when '5' %}Maj          
          {% when '6' %}Juni          
          {% when '7' %}Juli          
          {% when '8' %}Augusti          
          {% when '9' %}September          {% when '10' %}October          {% when '11' %}November          {% when '12' %}December         
          {% endcase %}          
          {{ event.event_data.start_datetime | date: "%Y" }}          
          kl. {{ event.event_data.start_datetime | date: "%R"}}
          <br />
          Typ av konst: {{ event.categories }}
          <br /><strong>{{ event.description | truncatewords: 10 }}</strong></p>
        <p><a class="cta" href="{{ event.url }}" style="padding:10px;"> Läs mer </a></p>
      </div>


      {% break %}

      {% break %}  {% endif %}   {% endfor %}
      <!-- end Up next-->
    </div>
    {% else %}
    <div id="flyer" style="background-image: url({{ page.image }})"></div>
    {% endif %}

  </div>
  <div id="decoration"></div>
</div>
<!-- END hero.html -->