123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <h3 class="post-block-title">
- <span>More News</span>
- </h3>
- <div class="row news-all">
- {{ range $index, $element := (where site.RegularPages "Type" "post") | first 9 }}
- <div class="col-12 col-sm-6 col-lg-4 mb-3">
- <div class="row align-items-center">
- <div class="col-12">
- <a href="{{ .Permalink }}">
- <img class="img-fluid" src="{{ .Params.image | relURL }}" alt="" />
- </a>
- </div>
- <div class="col-12">
- <article>
- <section class="news-info">
- {{ range (.GetTerms "categories") }}
- <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
- {{ end }}
- <small>{{ .Date | time.Format ":date_long" }}</small>
- </section>
- <h2 class="post-title">
- <a href="{{ .Params.url }}">{{ .Params.title }}</a>
- </h2>
- </article>
- </div>
- <!-- <span class="line">
- <hr>
- </span> -->
- </div>
- </div>
- {{ end }}
- </div>
- <!-- <h3 class="post-block-title">
- <span>More News</span>
- </h3>
- <div class="row news-all">
- {{ range $index, $element := (where site.RegularPages "Type" "post") | first 10 }}
- {{ if (eq $index 0) }}
- <div class="col-12">
- <article>
- <a href="{{ .Permalink }}">
- <img class="img-fluid first-img" src="{{ .Params.image | relURL }}" alt="" />
- </a>
- <section class="news-info">
- {{ range (.GetTerms "categories") }}
- <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
- {{ end }}
- <small>{{ .Date | time.Format ":date_long" }}</small>
- </section>
- <h2 class="post-title">
- <a href="{{ .Params.url }}">{{ .Params.title }}</a>
- </h2>
- <hr>
- </article>
- </div>
- {{ else }}
- <div class="col-12">
- <div class="row align-items-center">
- <div class="col-12 col-sm-5">
- <a href="{{ .Permalink }}">
- <img class="img-fluid cover-img" src="{{ .Params.image | relURL }}" alt="" />
- </a>
- </div>
- <div class="col-12 col-sm-7">
- <article>
- <section class="news-info">
- {{ range (.GetTerms "categories") }}
- <a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
- {{ end }}
- <small>{{ .Date | time.Format ":date_long" }}</small>
- </section>
- <h2 class="post-title">
- <a href="{{ .Params.url }}">{{ .Params.title }}</a>
- </h2>
- </article>
- </div>
- <span class="line">
- <hr>
- </span>
- </div>
- </div>
- {{ end }}
- {{ end }}
- </div> -->
|