Layout rework, two-column style
This commit is contained in:
parent
db02c6922b
commit
5b5619fa57
@ -1,7 +1,5 @@
|
||||
{{ define "main" }}
|
||||
{{ $baseurl := .Site.BaseURL }}
|
||||
|
||||
<div class="container">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
{{ if eq .Data.Singular "tag" }}
|
||||
@ -16,7 +14,7 @@
|
||||
{{ range (.Paginate (.Data.Pages.GroupByDate "2006")).PageGroups }}
|
||||
<h3 class="is-size-4">{{ .Key }}</h3>
|
||||
{{ range .Pages }}
|
||||
<article class="tile is-child">
|
||||
<article>
|
||||
<span class="is-size-2"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
|
||||
{{ if .Params.tags }}
|
||||
<div class="tags is-pulled-right">
|
||||
@ -33,7 +31,6 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ partial "pagination" . }}
|
||||
|
||||
|
@ -1,10 +1,5 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<div class="container">
|
||||
<br>
|
||||
{{ partial "article" . }}
|
||||
{{ partial "single_footer" . }}
|
||||
</div>
|
||||
|
||||
|
||||
{{ end }}
|
||||
|
@ -1,12 +1,6 @@
|
||||
{{ define "main" }}
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="tile is-ancestor">
|
||||
<div class="tile is-vertical">
|
||||
<div class="tile">
|
||||
<div class="tile is-parent is-vertical">
|
||||
{{ range $index, $page := first 10 (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
|
||||
<article class="tile is-child">
|
||||
<article>
|
||||
<span class="is-size-2">
|
||||
<a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
|
||||
{{ if .Params.tags }}
|
||||
@ -28,11 +22,4 @@
|
||||
<hr>
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ end }}
|
@ -1,4 +1,3 @@
|
||||
<article class="content">
|
||||
<span class="is-size-2"><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
|
||||
{{ if .Params.tags }}
|
||||
<div class="tags is-pulled-right">
|
||||
@ -9,8 +8,9 @@
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ partial "aside" . }}
|
||||
<hr>
|
||||
|
||||
<div class="is-clearfix">
|
||||
</div>
|
||||
<div class="content">
|
||||
{{.Content}}
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
@ -1,5 +1,7 @@
|
||||
</main>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="content has-text-centered">
|
||||
@ -11,5 +13,4 @@
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -3,23 +3,31 @@
|
||||
<html lang="{{ .Site.LanguageCode | default " en-us " }}">
|
||||
|
||||
<head>
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<title>{{ if ne .Page.Title .Site.Title }}{{ .Page.Title }} | {{ .Site.Title }} {{ else }}{{ .Site.Title }}{{ end }}</title>
|
||||
{{ partial "meta" . }} {{ partial "header_includes" . -}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="container">
|
||||
<nav class="navbar is-dark is-active" role="navigation" aria-label="main navigation">
|
||||
<div class="navbar-start">
|
||||
<div class="navbar-brand">
|
||||
<a class="navbar-item" href="{{ relURL " / " }}">{{ .Site.Title | markdownify }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-end">
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="navbar-item" href="{{.URL}}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</nav>
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="columns">
|
||||
<div class="column is-3">
|
||||
<nav class="panel">
|
||||
<p class="panel-heading">
|
||||
|
||||
</p>
|
||||
<div class="panel-block">
|
||||
<div class="media">
|
||||
<div class="media-content">
|
||||
<p class="title is-4"><a href="{{ relURL "/" }}">{{ .Site.Title | markdownify }}</a></p>
|
||||
<p class="subtitle is-5">{{ .Site.Params.description }} </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="panel-block" href="{{.URL}}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
</div>
|
||||
<div class="column is-9">
|
||||
<main>
|
@ -1,9 +1,7 @@
|
||||
{{ $pag := $.Paginator }} {{ if gt $pag.TotalPages 1 }}
|
||||
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
|
||||
<a href="{{ if $pag.HasPrev }}{{ $pag.Prev.URL }}{{ end }}" class="pagination-previous" {{ if not $pag.HasPrev }}disabled{{
|
||||
end }}>←</a>
|
||||
<a href="{{ if $pag.HasNext }}{{ $pag.Next.URL }}{{ end }}" class="pagination-next" {{ if not $pag.HasNext }}disabled{{ end
|
||||
}}>→</a>
|
||||
<a href="{{ if $pag.HasPrev }}{{ $pag.Prev.URL }}{{ end }}" class="pagination-previous" {{ if not $pag.HasPrev }}disabled{{ end }}>←</a>
|
||||
<a href="{{ if $pag.HasNext }}{{ $pag.Next.URL }}{{ end }}" class="pagination-next" {{ if not $pag.HasNext }}disabled{{ end }}>→</a>
|
||||
<ul class="pagination-list">
|
||||
{{ range $pag.Pagers }}
|
||||
<li>
|
||||
|
@ -1,10 +1,7 @@
|
||||
{{ if not .Params.meta }}
|
||||
<div class="column">
|
||||
{{ with .PrevInSection }}
|
||||
<a class="button is-pulled-left" href="{{.Permalink}}">← {{ .Title }}</a>
|
||||
{{ end }} {{ with .NextInSection }}
|
||||
<a class="button is-pulled-right" href="{{.Permalink}}">{{ .Title }} -></a>
|
||||
<a class="button is-pulled-right" href="{{.Permalink}}">{{ .Title }} →</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ else }}
|
||||
<br> {{ end }}
|
Loading…
Reference in New Issue
Block a user