<head>
	  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> <link rel="stylesheet" href="{{ .Site.BaseURL  }}css/main_menu.css">
	    <link rel="stylesheet" href="{{ .Site.BaseURL  }}css/postcard.css">
</head>

<body>
<!-- For future posts -->
<h3>Upcoming</h3>
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/postcard.css">
{{ range ($.Page.CurrentSection.Pages.ByParam "endEventDate") }}
  {{ $FormattedNow := (now.AddDate 0 0 -1) }}
  {{ if le $FormattedNow .Params.eventEndDate }}
    {{ partial "postcard" (dict "context" . "card_type" "upcoming" ) }}
  {{ end }}
<!-- Add alternate content to show when there is no upcoming event -->
{{ end }}

<!-- For past posts -->
{{ $numlist := 3 }} <!-- number of posts to display -->
<hr>
<h3>{{ $numlist }} Newest Posts</h3>
{{ range first $numlist (where $.Page.CurrentSection.Pages "Section" "post") }}
  {{ partial "postcard" (dict "context" . "card_type" "normal" ) }}
{{ end }}
