mirror of
https://gitlab.com/fabinfra/fabinfra-theme.git
synced 2025-03-12 14:41:51 +01:00
Fixed: Layout Structure
This commit is contained in:
parent
aa4fc48483
commit
1b4d111f5e
@ -2,18 +2,31 @@
|
|||||||
|
|
||||||
<main>
|
<main>
|
||||||
<h2>{{ .Title }}</h2>
|
<h2>{{ .Title }}</h2>
|
||||||
|
|
||||||
{{ range (.Paginator 10).Pages }}
|
{{ range (.Paginator 10).Pages }}
|
||||||
{{ if eq "Posts" $.Title }}
|
<div class="list-item">
|
||||||
{{partial "list-item-post.html" .}}
|
<div class="list-logo">
|
||||||
{{else}}
|
<a href="{{ .Permalink }}">
|
||||||
{{ partial "list-item-project.html" . }}
|
<img src="{{ .Params.logo }}">
|
||||||
{{end}}
|
</a>
|
||||||
{{end}}
|
</div>
|
||||||
|
<div class="list-content">
|
||||||
|
<a href="{{ .Permalink }}">
|
||||||
|
<h4>{{ .Title }}</h4>
|
||||||
|
</a>
|
||||||
|
<h5>{{ .Description }}</h5>
|
||||||
|
{{ range.Params.categories }}
|
||||||
|
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
|
||||||
|
<kbd class="item-cat"> {{ . }} </kbd>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
|
||||||
|
<kbd class="item-tag"> {{ . }} </kbd>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
{{ partial "paginator" . }}
|
|
||||||
|
|
||||||
|
|
||||||
{{ partial "footer" . }}
|
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
{{ partial "header" . }}
|
{{ partial "header" . }}
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
{{ if eq "Posts" $.Title }}
|
<div class="item-header">
|
||||||
{{partial "post.html" .}}
|
<h2>{{ .Title }}</h2>
|
||||||
{{else}}
|
</div>
|
||||||
{{ partial "project" . }}
|
|
||||||
{{end}}
|
<div class="item">
|
||||||
|
<div class="text-justify">{{ .Content }}</div>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer" . }}
|
@ -1,23 +0,0 @@
|
|||||||
{{ partial "header" . }}
|
|
||||||
|
|
||||||
<main>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2>{{ .Title }}</h2>
|
|
||||||
|
|
||||||
<ul class="terms">
|
|
||||||
{{ range $key, $value := .Data.Terms }}
|
|
||||||
<li>
|
|
||||||
<a href='{{ (print "/" $.Data.Plural "/" $key) | relURL }}'>
|
|
||||||
{{ $key }}
|
|
||||||
</a>
|
|
||||||
({{ len $value }})
|
|
||||||
</li>
|
|
||||||
{{ end }}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</main>
|
|
||||||
|
|
||||||
|
|
||||||
{{ partial "footer" . }}
|
|
@ -1,22 +0,0 @@
|
|||||||
<div class="item-header">
|
|
||||||
{{ .Date.Format (.Site.Params.dateFormat | default "") | $.Scratch.Set "pub_date" }}
|
|
||||||
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
|
|
||||||
{{ with .ReadingTime }} {{ $.Scratch.Set "read_time" . }} {{ end }}
|
|
||||||
|
|
||||||
|
|
||||||
<h4>{{ .Title }}</h4>
|
|
||||||
<h5>{{ $.Scratch.Get "pub_date" }} - {{ $.Scratch.Get "read_time" }} minutes</h5>
|
|
||||||
<h5>{{ $.Scratch.Get "subtitle" }}</h5>
|
|
||||||
|
|
||||||
{{ range.Params.categories }}
|
|
||||||
|
|
||||||
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
|
|
||||||
<kbd class="item-cat"> {{ . }} </kbd>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ range .Params.tags }}
|
|
||||||
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
|
|
||||||
<kbd class="item-tag"> {{ . }} </kbd>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
@ -1,30 +0,0 @@
|
|||||||
<div class="item-header">
|
|
||||||
{{ $.Scratch.Set "link" .RelPermalink }}
|
|
||||||
{{ with .Params.repo }}
|
|
||||||
{{ $repoHost := default "gitlab" $.Params.repoHost }}
|
|
||||||
{{ if eq "github" $repoHost }}
|
|
||||||
{{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
|
|
||||||
{{ else if eq "gitlab" $repoHost }}
|
|
||||||
{{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
|
|
||||||
|
|
||||||
<a href="{{ .Scratch.Get "link" }}">
|
|
||||||
<img class="logo" src="../{{ .Params.logo }}">
|
|
||||||
<h1>{{ .Title }}</h1>
|
|
||||||
</a>
|
|
||||||
<h4>{{ $.Scratch.Get "subtitle" }}</h4>
|
|
||||||
|
|
||||||
{{ range.Params.categories }}
|
|
||||||
|
|
||||||
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
|
|
||||||
<kbd class="item-cat"> {{ . }} </kbd>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ range .Params.tags }}
|
|
||||||
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
|
|
||||||
<kbd class="item-tag"> {{ . }} </kbd>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
@ -1,21 +0,0 @@
|
|||||||
<div class="list-item">
|
|
||||||
{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "pub_date" }}
|
|
||||||
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
|
|
||||||
{{ with .ReadingTime }} {{ $.Scratch.Set "read_time" . }} {{ end }}
|
|
||||||
|
|
||||||
|
|
||||||
<h4><a href="{{ .Scratch.Get "link" }}">{{ .Title }}</a></h4>
|
|
||||||
<h5>{{ $.Scratch.Get "pub_date" }} - {{ $.Scratch.Get "read_time" }} minutes</h5>
|
|
||||||
<h5>{{ $.Scratch.Get "subtitle" }}</h5>
|
|
||||||
{{ range.Params.categories }}
|
|
||||||
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
|
|
||||||
<kbd class="item-cat"> {{ . }} </kbd>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ range .Params.tags }}
|
|
||||||
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
|
|
||||||
<kbd class="item-tag"> {{ . }} </kbd>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
</div>
|
|
@ -1,23 +0,0 @@
|
|||||||
<div class="list-item">
|
|
||||||
<div class="list-logo">
|
|
||||||
<a href="{{ .Permalink }}">
|
|
||||||
<img src="{{ .Params.logo }}">
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="list-content">
|
|
||||||
<a href="{{ .Permalink }}">
|
|
||||||
<h4>{{ .Title }}</h4>
|
|
||||||
</a>
|
|
||||||
<h5>{{ .Description }}</h5>
|
|
||||||
{{ range.Params.categories }}
|
|
||||||
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
|
|
||||||
<kbd class="item-cat"> {{ . }} </kbd>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ range .Params.tags }}
|
|
||||||
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
|
|
||||||
<kbd class="item-tag"> {{ . }} </kbd>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,37 +0,0 @@
|
|||||||
<div class="item">
|
|
||||||
|
|
||||||
{{ $.Scratch.Set "link" .RelPermalink }}
|
|
||||||
{{ with .Params.repo }}
|
|
||||||
{{ $repoHost := default "github" $.Params.repoHost }}
|
|
||||||
{{ if eq "github" $repoHost }}
|
|
||||||
{{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
|
|
||||||
{{ else if eq "gitlab" $repoHost }}
|
|
||||||
{{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
|
|
||||||
{{ else if eq "bitbucket" $repoHost }}
|
|
||||||
{{ printf "https://bitbucket.org/%s/%s/" $.Site.Params.bitbucketUsername . | $.Scratch.Set "link" }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }}
|
|
||||||
|
|
||||||
{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "pub_date" }}
|
|
||||||
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
|
|
||||||
{{ with .ReadingTime }} {{ $.Scratch.Set "read_time" . }} {{ end }}
|
|
||||||
|
|
||||||
|
|
||||||
<h4><a href="{{ .Scratch.Get "link" }}">{{ .Title }}</a></h4>
|
|
||||||
<h5>{{ $.Scratch.Get "pub_date" }} - {{ $.Scratch.Get "read_time" }} minutes</h5>
|
|
||||||
<h5>{{ $.Scratch.Get "subtitle" }}</h5>
|
|
||||||
|
|
||||||
{{ range.Params.categories }}
|
|
||||||
|
|
||||||
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
|
|
||||||
<kbd class="item-cat"> {{ . }} </kbd>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
{{ range .Params.tags }}
|
|
||||||
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
|
|
||||||
<kbd class="item-tag"> {{ . }} </kbd>
|
|
||||||
</a>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
</div>
|
|
@ -1,7 +1,6 @@
|
|||||||
{{ partial "header-post" .}}
|
{{ partial "header-post" .}}
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<br> <div class="text-justify">{{ .Content }}</div>
|
<br> <div class="text-justify">{{ .Content }}</div>
|
||||||
|
|
||||||
<!-- related posts with the same tags -->
|
<!-- related posts with the same tags -->
|
||||||
{{ $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "post") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
{{ $related := first 3 (where (where (where .Site.Pages.ByDate.Reverse ".Type" "==" "post") ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
||||||
|
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
{{ partial "header-project" .}}
|
|
||||||
<div class="item">
|
|
||||||
<br> <div class="text-justify">{{ .Content }}</div>
|
|
||||||
</div>
|
|
32
layouts/projects/list.html
Normal file
32
layouts/projects/list.html
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{{ partial "header" . }}
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<h2>{{ .Title }}</h2>
|
||||||
|
{{ range .Pages }}
|
||||||
|
<div class="list-item">
|
||||||
|
<div class="list-logo">
|
||||||
|
<a href="{{ .Permalink }}">
|
||||||
|
<img src="{{ .Params.logo }}">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="list-content">
|
||||||
|
<a href="{{ .Permalink }}">
|
||||||
|
<h4>{{ .Title }}</h4>
|
||||||
|
</a>
|
||||||
|
<h5>{{ .Description }}</h5>
|
||||||
|
{{ range.Params.categories }}
|
||||||
|
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
|
||||||
|
<kbd class="item-cat"> {{ . }} </kbd>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
|
||||||
|
<kbd class="item-tag"> {{ . }} </kbd>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
{{ partial "footer" . }}
|
40
layouts/projects/single.html
Normal file
40
layouts/projects/single.html
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{{ partial "header" . }}
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="item-header">
|
||||||
|
{{ $.Scratch.Set "link" .RelPermalink }}
|
||||||
|
{{ with .Params.repo }}
|
||||||
|
{{ $repoHost := default "gitlab" $.Params.repoHost }}
|
||||||
|
{{ if eq "github" $repoHost }}
|
||||||
|
{{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
|
||||||
|
{{ else if eq "gitlab" $repoHost }}
|
||||||
|
{{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
|
||||||
|
|
||||||
|
<a href="{{ .Scratch.Get "link" }}">
|
||||||
|
<img class="logo" src="../{{ .Params.logo }}">
|
||||||
|
<h1>{{ .Title }}</h1>
|
||||||
|
</a>
|
||||||
|
<h4>{{ $.Scratch.Get "subtitle" }}</h4>
|
||||||
|
|
||||||
|
{{ range.Params.categories }}
|
||||||
|
|
||||||
|
<a href="{{"/categories/"|relLangURL }}{{.|urlize}}">
|
||||||
|
<kbd class="item-cat"> {{ . }} </kbd>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
<a href="{{"/tags/"|relLangURL }}{{.|urlize}}">
|
||||||
|
<kbd class="item-tag"> {{ . }} </kbd>
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="item">
|
||||||
|
<br> <div class="text-justify">{{ .Content }}</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
{{ partial "footer" . }}
|
Loading…
x
Reference in New Issue
Block a user