Welcome to mirror list, hosted at ThFree Co, Russian Federation.

recentBlogPosts.html « footer « sections « partials « layouts - github.com/gurusabarish/hugo-profile.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 72edf38f29eeb2e69db89dff1539bee7d3d4ebbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<div class="container py-3" id="recent-posts">
    {{ if .Site.Params.footer.recentPosts | default true }}
    <div class="h3 text-center text-secondary py-3">Recent posts</div>
    <div class="row justify-content-center">
        {{ range ( where .Site.RegularPages "Type" "blog" | first 3 ) }}
        <div class="col-lg-4 col-md-6 pt-2">
            <div class="card h-100">
                <div class="card-body bg-transparent p-3 shadow-sm">
                    <a href="{{ .RelPermalink }}" class="primary-font card-title">
                        <h5 class="card-title bg-transparent" title="{{ .Title }}">{{ .Title | truncate 25 }}</h5>
                    </a>
                    <div class="card-text secondary-font">
                        <p>{{ .Summary | truncate 300}}</p>
                    </div>
                </div>
                <div class="mt-auto card-footer">
                    <span class="float-start">{{ .Date.Format "January 2, 2006" }}</span>
                    <a href="{{ .RelPermalink }}" class="float-end btn btn-outline-info btn-sm">Read</a>
                </div>
            </div>
        </div>
        {{ end }}
    </div>
    {{ end }}
</div>