Fix note organization
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
beea892a20
commit
80f5672f34
10 changed files with 99 additions and 26 deletions
|
@ -8,9 +8,9 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "sidebar" }}
|
||||
{{ $blogHome:="#" }}
|
||||
{{ $homePage:="#" }}
|
||||
{{ if site.IsMultiLingual }}
|
||||
{{ $blogHome = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
|
||||
{{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
|
||||
{{ end }}
|
||||
|
||||
<section class="sidebar-section" id="sidebar-section">
|
||||
|
@ -38,7 +38,11 @@
|
|||
<div class="container-fluid post-card-holder" id="post-card-holder">
|
||||
{{ $paginator := .Paginate .RegularPagesRecursive 12 }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ partial "cards/post.html" . }}
|
||||
{{ if .Layout }}
|
||||
{{/* ignore the search.md file*/}}
|
||||
{{ else }}
|
||||
{{ partial "cards/post.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="paginator">
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "sidebar" }}
|
||||
{{ $blogHome:="#" }}
|
||||
{{ $homePage:="#" }}
|
||||
{{ if site.IsMultiLingual }}
|
||||
{{ $blogHome = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
|
||||
{{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
|
||||
{{ end }}
|
||||
|
||||
<section class="sidebar-section" id="sidebar-section">
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "sidebar" }}
|
||||
{{ $blogHome:="#" }}
|
||||
{{ $homePage:="#" }}
|
||||
{{ if site.IsMultiLingual }}
|
||||
{{ $blogHome = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
|
||||
{{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
|
||||
{{ end }}
|
||||
|
||||
<section class="sidebar-section" id="sidebar-section">
|
||||
|
@ -40,12 +40,10 @@
|
|||
<section class="content-section" id="content-section">
|
||||
<div class="content container-fluid" id="content">
|
||||
<div class="container-fluid note-card-holder" id="note-card-holder">
|
||||
{{ range .RegularPagesRecursive }}
|
||||
{{ if .Layout }}
|
||||
{{ else }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ partial "note-aggregator.html" . }}
|
||||
</div>
|
||||
<div class="paginator">
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
{{ end }}
|
||||
|
||||
{{ define "sidebar" }}
|
||||
{{ $blogHome:="#" }}
|
||||
{{ $homePage:="#" }}
|
||||
{{ if site.IsMultiLingual }}
|
||||
{{ $blogHome = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
|
||||
{{ $homePage = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) .Type) }}
|
||||
{{ end }}
|
||||
|
||||
<section class="sidebar-section" id="sidebar-section">
|
||||
|
@ -40,12 +40,9 @@
|
|||
<section class="content-section" id="content-section">
|
||||
<div class="content container-fluid" id="content">
|
||||
<div class="container-fluid note-card-holder" id="note-card-holder">
|
||||
{{ range .RegularPagesRecursive }}
|
||||
{{ if .Layout }}
|
||||
{{ else }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="note-collection">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
18
layouts/partials/note-aggregator.html
Normal file
18
layouts/partials/note-aggregator.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{ $paginator := .Paginate .RegularPagesRecursive 10 }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ if .Layout }}
|
||||
{{/* ignore search.md file*/}}
|
||||
{{ else }}
|
||||
{{$id := .Params.Menu.Notes.Identifier }}
|
||||
<h4 class="note-collection-title" id="{{ $id }}">
|
||||
<a href="#{{ $id }}"># {{ .Title }}</a>
|
||||
{{$badges:= split .File.Dir "/"}}
|
||||
{{ range after 1 $badges }}
|
||||
<span class="badge btn-info note-badge">{{ . }}</span>
|
||||
{{ end }}
|
||||
</h4>
|
||||
<div class="note-collection">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -9,7 +9,7 @@
|
|||
{{ end }}
|
||||
<div class="container">
|
||||
<div class="row" id="recent-post-cards">
|
||||
{{ range first 3 (where site.RegularPages.ByDate.Reverse "Type" "in" site.Params.mainSections )}}
|
||||
{{ range first 3 (where site.RegularPages.ByDate.Reverse "Type" "in" "posts" )}}
|
||||
{{ partial "cards/recent-post.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div class="card note-card">
|
||||
<div class="card-header">{{.Get "title"}}</div>
|
||||
<div class="card note-card {{if .Get "size" }}{{.Get "size"}}-note{{end}}">
|
||||
<div class="card-header" style="background-color: {{ site.Params.notes.headerBackground | default "transparent" }};">
|
||||
<span class="note-title" style="color: {{ site.Params.notes.headerTextColor | default "#1c2d41" }};">{{.Get "title"}}</span>
|
||||
</div>
|
||||
<div class="card-body">{{ .Inner | markdownify }}</div>
|
||||
{{ if .Get "footer" }}
|
||||
<div class="card-footer">{{ .Get "footer" }}</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue