Skip to content

Commit

Permalink
fix: fix landing page rendering with weight order (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jcahilltorre authored Dec 14, 2023
1 parent df39e17 commit d9ebb8a
Showing 1 changed file with 27 additions and 24 deletions.
51 changes: 27 additions & 24 deletions layouts/partials/list-main.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,46 @@ <h1 class="bd-title">
{{ .Title }}
</h1>
{{ if .Description }}
<p>
<p class="bd-lead">
{{ .Description | markdownify }}
</p>
{{ end}}
{{ if .Content }}
<p>
<p class="bd-lead">
{{ .Content | markdownify }}
</p>
{{ end }}
</div>
</div>

<section>
<section class="col-md-12 col-xl-12 py-md-3 pl-md-5" id="section-content-list">

<div class="row">
<div class="card-deck">
{{ range .Pages.GroupBy "Section" }}

{{ range .Pages.ByWeight }}
<div class="col-md-5 card">
<div class="card-body">
<h3 class="card-title">
<i class="fas fa-{{if eq .Kind "page"}}file-alt{{else}}book{{end}} fa-2x card-img-top"></i>
<a href="{{ if .Params.url}}{{ .Params.url}}{{else}}{{ .Permalink }}{{end}}">{{ .Title }}</a>
</h3>
{{/*}}<p class="card-text">
{{ if .Description }}{{ .Description | markdownify }}{{ end }}
</p>{{*/}}

</div>
</div>

{{ end }}
<div class="card-deck">
{{ range .Pages.ByWeight }}
<div class="col-md-5 card">
<div class="card-body">
<h3 class="card-title">
<i class="fas fa-{{if eq .Kind "page"}}file-alt{{else}}book{{end}} fa-2x card-img-top"></i>
<a href="{{ if .Params.url}}{{ .Params.url}}{{else}}{{ .Permalink }}{{end}}">{{ .Title }}</a>
</h3>
{{/*}}<p class="card-text">
{{ if .Description }}{{ .Description | markdownify }}{{ end }}
</p>{{*/}}
</div>
</div>
{{ end }}
</div>
</div>
</div>
{{ end }}
</section>
</div>


</section>
{{ if not .IsHome }}
<div class="row justify-content-center">
{{ partial "pagination.html" . }}
</div>
{{ end }}


</div>

0 comments on commit d9ebb8a

Please # to comment.