Re-structure note lists

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
hossainemruz 2021-04-01 01:39:23 +06:00
parent fc5656c937
commit 063a8256e2
6 changed files with 88 additions and 21 deletions

View file

@ -40,7 +40,14 @@
<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">
{{ partial "note-aggregator.html" . }}
{{ $paginator := .Paginate .RegularPagesRecursive 10 }}
{{ range $paginator.Pages }}
{{ if .Layout }}
{{/* ignore search.md file*/}}
{{ else }}
{{ .Content }}
{{ end }}
{{ end }}
</div>
<div class="paginator">
{{ template "_internal/pagination.html" . }}
@ -51,6 +58,8 @@
{{ define "scripts" }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
<script src="{{ "/js/imagesloaded.pkgd.min.js" | relURL }}"></script>
<script src="{{ "/js/note.js" | relURL }}"></script>
<script>
hljs.initHighlightingOnLoad();
</script>

View file

@ -4,15 +4,15 @@
{{/* ignore search.md file*/}}
{{ else }}
{{$id := .Params.Menu.Notes.Identifier }}
<h4 class="note-collection-title" id="{{ $id }}">
<a href="#{{ $id }}" title="{{ .Title }}"># {{ .Title }}</a>
<!-- <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>
</h4> -->
{{ .Content }}
<!-- <div class="note-collection">
</div> -->
{{ end }}
{{ end }}

View file

@ -1,11 +1,11 @@
<div class="note-card {{if .Get "size" }}{{.Get "size"}}-note{{end}}">
<div class="card">
<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 class="item">
<h5 class="note-title"><span>{{ .Get "title" }}</span></h5>
<div class="card">
<div class="card-body">{{ .Inner | markdownify }}</div>
{{ if .Get "footer" }}
<div class="card-footer">{{ .Get "footer" }}</div>
{{end}}
</div>
<div class="card-body">{{ .Inner | markdownify }}</div>
{{ if .Get "footer" }}
<div class="card-footer">{{ .Get "footer" }}</div>
{{end}}
</div>
</div>