{{ if isset .Site.Params "events" }}
{{ if .Site.Params.events.enable }}
        <div class="events active">
                <h2>
                    {{ i18n "main_events_title" }}
                    <a href="{{ "/events.html" | relLangURL  }}">
                        <p>{{ i18n "main_list_more" }} ></p>
                    </a>
                </h2>

                <ul>
                {{ $events := .Paginate (where .Data.Pages "Type" "events") }}
                {{ range first 2 $events.Pages }}

                <li>
                        <h6>
                            <span>{{ i18n "main_events_subtitle" }}</span> <i>|</i> <span>{{ .Date.Format .Site.Params.date_format }}</span>
                        </h6>
                        <a href="{{ .URL }}">
                            <p>{{ .Title }}</p>
                        </a>
                </li>
                {{ end }}
            </ul>
        </div>

{{ end }}
{{ end }}
