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

projects.html « sections « partials « layouts - github.com/2-REC/hugo-myportfolio-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d3c410d5cc83b411dc18831bdcd31230d14485b6 (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
26
27
28
29
30
31
32
{{ $params := .Site.Params.projects }}
<section class="section projects" id="projects_{{ trim .File.Dir "/\\" }}">
    {{ $path := replace .File.Dir "\\" "/" }}
    {{ with .Title }}
    <a href="/{{ $path }}" class="container-fluid projects-link">
        {{ partial "title-bar.html" (dict "title" . "align" $params.title_align "length" $params.title_length) }}
    </a>
    {{ end }}
    <div class="container-fluid">
        <div class="row no-gutter">
            {{ if .Sections }}
                {{/* Sort the list */}}
                {{ partial "utils/ordered-list.html" (dict "list" .Sections "params" .Params "scratch" .Scratch) }}
                {{ $projects := .Scratch.Get "list" }}
                {{ $max := len $projects }}
                {{ if and $params.max_projects (lt $params.max_projects $max) }}
                    {{ $max = $params.max_projects }}
                {{ end }}
                {{ range seq $max }}
                    {{ $project := index $projects (sub . 1) }}
                    {{ partial "project-image.html" (dict "context" $project "data" $params.home "fit" $params.fit_rows "nb" $max "index" .) }}
                {{ end }}
                {{ .Scratch.Delete "list" }}
            {{ end }}
        </div>
        <div class="row no-gutter" style="text-align: center;">
            <a href="/{{ $path }}" >
                More ...
            </a>
        </div>
    </div>
</section>