https://blog.naskya.net/

[[ 🗃 ^wzWnj blog ]] :: [📥 Inbox] [📤 Outbox] [💥 Errbox] [🐤 Followers] [🤝 Collaborators] [🏗 Projects] [🛠 Commits]

Clone

HTTPS: git clone https://code.naskya.net/repos/wzWnj

SSH: git clone USERNAME@code.naskya.net:wzWnj

Branches

Tags

main :: themes / hugo-tania-custom / layouts / _default /

index.html

{{ define "main" }}

{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $projects := where .Site.RegularPages "Section" "projects" }}
{{ $pages = .Paginate ($pages)  }}
{{ $archivesPage := first 1 (where .Site.RegularPages "Layout" "eq" "archives") }}

<div class="container">
    <section>
        <h2 id="index-header">
            Latest Articles
            {{ range $archivesPage }}
            <a class="section-button" href="{{ .RelPermalink }}">View all</a>
            {{ end }}
        </h2>
        <div class="posts">
            {{ range $pages.Pages }}
            <div class="post">
                <a href="{{ .RelPermalink }}">
                    <div class="post-row">
                        <time>{{ .Date.Format "2006-01-02" }}</time>
                        <h3>{{ .Title }}</h3>
                    </div>
                    <!--<div class="new-post">New!</div>-->
                </a>
            </div>
            {{ end }}
        </div>
    </section>
    {{ if gt (len $projects) 0}}
    <section>
        <h2>Projects</h2>
        <div class="projects">
            {{ range $projects.ByWeight }}
            <div class="project">
                <div>
                    <a href="{{ .Params.link }}" target="_blank" rel="noreferrer">
                        <div class="icon">{{ .Params.icon }}</div>
                        <h3>{{ .Title }}</h3>
                    </a>
                    <div class="description">{{ .Params.description }}</div>
                </div>
                <div class="flex">
                    <a href="{{ .Params.repo }}" class="button" target="_blank" rel="noreferrer">Source</a>
                </div>
            </div>
            {{ end }}
        </div>
    </section>
    {{ end }}
</div>

{{ end }}

[See repo JSON]