index.html 1.6 KB
Newer Older
Miykael_xxm's avatar
Miykael_xxm 已提交
1 2 3 4
{{ define "main" }}

<section class="text-gray-700 body-font">
  <div class="container px-5 py-8 mx-auto">
郭维嘉 已提交
5
    <!-- {{- partial "custom-message.html" . -}}-->
Miykael_xxm's avatar
Miykael_xxm 已提交
6 7

    <div class="flex flex-wrap sm:-m-4 -mx-4 -mb-10 -mt-4">
郭维嘉 已提交
8
      {{ range where .Site.Pages "Kind" "page" }} {{ if ne .Params.Exclude true }}
Miykael_xxm's avatar
Miykael_xxm 已提交
9 10 11 12 13 14
      <a
        target="_blank"
        rel="noopener"
        href="{{ .Params.Link }}"
        class="card p-4 md:w-1/3 sm:mb-4 mb-6 hover:shadow-xl hover:bg-gray-400 transition duration-200 ease-in rounded-lg {{ lower .Section }}"
      >
郭维嘉 已提交
15
        <div class="rounded-lg h-64 overflow-hidden card-item relative">
Miykael_xxm's avatar
Miykael_xxm 已提交
16
          {{ if (or .Params.Image .CurrentSection.Params.Image) }}
郭维嘉 已提交
17
          <img alt="{{ .Title }}" class="object-cover object-center h-full w-full" src="{{ (or .Params.Image .CurrentSection.Params.Image) }}" />
Miykael_xxm's avatar
Miykael_xxm 已提交
18
          {{ end }}
郭维嘉 已提交
19 20 21 22 23 24 25 26 27 28 29
          <div class="card-content">
            <span class="bg-blue-500 text-white px-3 py-1 tracking-widest text-xs absolute right-0 top-0 rounded-bl">{{ title .Section }}</span>
            <h2
              class="h2 text-white px-2 py-1 tracking-widest text-2xl leading-tight font-extrabold font-bree text-center w-full h-full flex justify-center items-center absolute top-0 left-0"
            >
              {{ .Title }}
            </h2>
            <p class="h3 text-white px-2 py-1 tracking-widest text-md leading-tight font-light w-full text-center absolute bottom-0 left-0">
              {{ .Params.Subtitle }}
            </p>
          </div>
Miykael_xxm's avatar
Miykael_xxm 已提交
30 31
        </div>
      </a>
郭维嘉 已提交
32
      {{ end }} {{ end }}
Miykael_xxm's avatar
Miykael_xxm 已提交
33 34 35 36 37
    </div>
  </div>
</section>

{{ end }}