{{- define "main" -}}

<div class="flex flex-row text-gray-700 mt-3 mb-3">
    <div>
        <p class="font-light">Just some Internet Services</p>
    </div>
</div>

<h2 class="mt-5">Services</h2>

    {{ range (where .Site.RegularPages ".Type" "services") }}
    {{ if .Params.startpage }}
    <div class="flex flex-col md:flex-row justify-between mt-5 md:mt-0">
        <div class="md:w-3/12">
            <span class="text-3xl float-left md:text-lg">{{ .Title }} </span>
            {{ if .Params.badge }}
            <img class="float-left my-0 mt-2 ml-4 md:hidden" src="https://sproxy.keks.cloud/?url=https://monitor.keks.cloud/api/badge/{{ .Params.badge }}/uptime/744?style=flat-square">
            {{ end }}
        </div>
        <div class="md:w-2/12">
            {{ if .Params.serviceurl }}
            <a href="{{ .Params.serviceurl }}" class="btn btn-lg md:btn-xs btn-primary btn-outline"><i class="ri-external-link-line"></i></a>
            {{ else }}
            <a href="{{ .Params.serviceurl }}" class="btn btn-lg md:btn-xs btn-primary btn-outline btn-disabled"><i class="ri-external-link-line"></i></a>
            
            {{ end }}
            {{ if .Content }}
            <a href="{{ .Permalink }}" class="btn btn-lg md:btn-xs btn-primary btn-outline">Docs</a>
            {{ else }}
            <a href="#" class="btn btn-lg md:btn-xs btn-primary btn-outline btn-disabled">Docs</a>
              {{ end }}
        </div>
        <div class="space-x-2 hidden md:block w-7/12 items-center">
            {{ if .Params.badge }}
            <img class="float-left my-0 mt-1" src="https://sproxy.keks.cloud/?url=https://monitor.keks.cloud/api/badge/{{ .Params.badge }}/uptime/8760?style=flat-square">
            <img class="float-left my-0 mt-1" src="https://sproxy.keks.cloud/?url=https://monitor.keks.cloud/api/badge/{{ .Params.badge }}/uptime/744?style=flat-square">
            <img class="float-left my-0 mt-1" src="https://sproxy.keks.cloud/?url=https://monitor.keks.cloud/api/badge/{{ .Params.badge }}/uptime/24?style=flat-square">
            {{ end }}
        </div>
    </div>
    {{ end }}
    {{ end }}
    <a href="/services/">All Services</a>

<h2 class="mt-5">News</h2>
<ul>
    {{ range (where .Site.RegularPages ".Type" "posts") }}
    <li>
        {{ if .Content }}
        <a href="{{ .Permalink }}">{{ .Title }}</a> from {{ .PublishDate | time.Format "02.01.2006" }}
        {{ else }}
        {{ .Title }} from {{ .PublishDate | time.Format "02.01.2006" }}
        {{ end }}
    </li>
    {{ end }}
</ul>
{{ end }}

