mirror of
https://github.com/Vimux/Binario.git
synced 2024-11-21 21:58:28 +00:00
Improve semantic layout
This commit is contained in:
parent
1665f619df
commit
cdc13f1bf7
5 changed files with 52 additions and 44 deletions
|
@ -1,7 +1,9 @@
|
|||
{{ define "main" }}
|
||||
<div class="page404 block center">
|
||||
<h1 class="page404__title">{{ T "page404_title" }}</h1>
|
||||
<p class="page404__lead">{{ T "page404_lead" }}</p>
|
||||
<a class="page404__link" href="">{{ T "page404_link" }}</a>
|
||||
</div>
|
||||
<main class="main">
|
||||
<div class="page404 block center">
|
||||
<h1 class="page404__title">{{ T "page404_title" }}</h1>
|
||||
<p class="page404__lead">{{ T "page404_lead" }}</p>
|
||||
<a class="page404__link" href="">{{ T "page404_link" }}</a>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
|
@ -26,7 +26,7 @@
|
|||
</head>
|
||||
<body>
|
||||
{{ partial "header" . }}
|
||||
<div class="main">
|
||||
<div class="primary">
|
||||
{{ block "main" . }}
|
||||
{{- if or .Title .Content }}
|
||||
<div class="page block">
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{{ define "main" }}
|
||||
<div class="cards">
|
||||
{{ range .Paginator.Pages }}
|
||||
<div class="card{{ if $.Param "cardsPerRow" }} card--{{ $.Param "cardsPerRow" }}col{{ else }} card--2col{{ end }}">
|
||||
{{ .Render "summary" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<main class="main">
|
||||
<div class="cards">
|
||||
{{ range .Paginator.Pages }}
|
||||
<div class="card{{ if $.Param "cardsPerRow" }} card--{{ $.Param "cardsPerRow" }}col{{ else }} card--2col{{ end }}">
|
||||
{{ .Render "summary" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</main>
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ end }}
|
|
@ -1,19 +1,21 @@
|
|||
{{ define "main" }}
|
||||
<div class="single block">
|
||||
<article class="post">
|
||||
{{- partial "post_thumbnail.html" (dict "page" . ) }}
|
||||
<div class="post__meta meta mb">{{ partial "post_meta.html" . }}</div>
|
||||
<h1 class="post__title">{{ .Title }}</h1>
|
||||
{{- partial "post_toc.html" . }}
|
||||
<div class="post__content">{{ .Content }}</div>
|
||||
{{ if or (.Param "share") (isset $.Params "tags") }}
|
||||
<footer class="post__footer">
|
||||
{{ partial "post_tags.html" . }}
|
||||
{{ partial "post_share.html" . }}
|
||||
</footer>
|
||||
{{ end }}
|
||||
</article>
|
||||
</div>
|
||||
<main class="main">
|
||||
<div class="single block">
|
||||
<article class="post">
|
||||
{{- partial "post_thumbnail.html" (dict "page" . ) }}
|
||||
<div class="post__meta meta mb">{{ partial "post_meta.html" . }}</div>
|
||||
<h1 class="post__title">{{ .Title }}</h1>
|
||||
{{- partial "post_toc.html" . }}
|
||||
<div class="post__content">{{ .Content }}</div>
|
||||
{{ if or (.Param "share") (isset $.Params "tags") }}
|
||||
<footer class="post__footer">
|
||||
{{ partial "post_tags.html" . }}
|
||||
{{ partial "post_share.html" . }}
|
||||
</footer>
|
||||
{{ end }}
|
||||
</article>
|
||||
</div>
|
||||
</main>
|
||||
{{ partial "related.html" . }}
|
||||
{{ partial "comments.html" . }}
|
||||
{{ end }}
|
|
@ -1,20 +1,22 @@
|
|||
{{ define "main" }}
|
||||
<div class="cards">
|
||||
{{ $mainSections := .Site.Params.mainSections | default (slice "post") }}
|
||||
{{ $paginator := .Paginate ( where .Data.Pages "Section" "in" $mainSections ) }}
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="card{{ if $.Param "cardsPerRow" }} card--{{ $.Param "cardsPerRow" }}col{{ else }} card--2col{{ end }}">
|
||||
{{ .Render "summary" }}
|
||||
<main class="main">
|
||||
<div class="cards">
|
||||
{{ $mainSections := .Site.Params.mainSections | default (slice "post") }}
|
||||
{{ $paginator := .Paginate ( where .Data.Pages "Section" "in" $mainSections ) }}
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="card{{ if $.Param "cardsPerRow" }} card--{{ $.Param "cardsPerRow" }}col{{ else }} card--2col{{ end }}">
|
||||
{{ .Render "summary" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{- if eq $paginator.TotalNumberOfElements 0 }}
|
||||
<div class="empty block center">
|
||||
<div class="empty__icon">¯\_(ツ)_/¯</div>
|
||||
<h3 class="empty__title">{{ T "empty_title" }}</h3>
|
||||
<p class="empty__text">{{ T "empty_text_start" | safeHTML }} ({{ delimit (apply $mainSections "printf" "<code>content/%s</code>" ".") ", " | safeHTML }}), {{ T "empty_text_end" }}.</p>
|
||||
<p class="empty__tip">{{ T "empty_tip" | safeHTML }}</p>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- if eq $paginator.TotalNumberOfElements 0 }}
|
||||
<div class="empty block center">
|
||||
<div class="empty__icon">¯\_(ツ)_/¯</div>
|
||||
<h3 class="empty__title">{{ T "empty_title" }}</h3>
|
||||
<p class="empty__text">{{ T "empty_text_start" | safeHTML }} ({{ delimit (apply $mainSections "printf" "<code>content/%s</code>" ".") ", " | safeHTML }}), {{ T "empty_text_end" }}.</p>
|
||||
<p class="empty__tip">{{ T "empty_tip" | safeHTML }}</p>
|
||||
</div>
|
||||
{{- end }}
|
||||
</main>
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ end }}
|
Loading…
Reference in a new issue