feat: add pagination
This commit is contained in:
parent
338a6fc456
commit
52cefd37ca
|
@ -144,3 +144,26 @@
|
||||||
color: #787878;
|
color: #787878;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
display: flex; /* Enable flexbox layout */
|
||||||
|
list-style: none; /* Remove default list styling */
|
||||||
|
padding: 0; /* Remove default padding */
|
||||||
|
margin: 0; /* Adjust margin as needed */
|
||||||
|
justify-content: center; /* Center the pagination items */
|
||||||
|
font-family: Inter;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination .page-item {
|
||||||
|
margin: 0; /* Adjust margin between items as needed */
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination .page-link {
|
||||||
|
display: block; /* Make the link fill the li element */
|
||||||
|
padding: 5px 10px; /* Adjust padding as needed */
|
||||||
|
margin: 0 2px; /* Space out the page links */
|
||||||
|
}
|
||||||
|
|
||||||
|
#site-footer {
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ pygmentsUseClasses = true
|
||||||
|
|
||||||
rssLimit = 10 # Maximum number of items in the RSS feed.
|
rssLimit = 10 # Maximum number of items in the RSS feed.
|
||||||
enableEmoji = true
|
enableEmoji = true
|
||||||
|
paginate = 5
|
||||||
|
|
||||||
[languages]
|
[languages]
|
||||||
[languages.tr]
|
[languages.tr]
|
||||||
|
@ -52,7 +53,7 @@ enableEmoji = true
|
||||||
# Add custom css
|
# Add custom css
|
||||||
# customCSS = ["css/foo.css", "css/bar.css"]
|
# customCSS = ["css/foo.css", "css/bar.css"]
|
||||||
|
|
||||||
[[params.author]]
|
[params.author]
|
||||||
name = "Furkan Erdem"
|
name = "Furkan Erdem"
|
||||||
|
|
||||||
# Social Icons
|
# Social Icons
|
||||||
|
|
|
@ -7,7 +7,7 @@ tags = [
|
||||||
"themes",
|
"themes",
|
||||||
"development",
|
"development",
|
||||||
]
|
]
|
||||||
date = "2014-04-02"
|
date = "2015-04-02"
|
||||||
toc = true
|
toc = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ tags = [
|
||||||
"themes",
|
"themes",
|
||||||
"development",
|
"development",
|
||||||
]
|
]
|
||||||
date = "2014-04-02"
|
date = "2016-04-02"
|
||||||
toc = true
|
toc = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ tags = [
|
||||||
"themes",
|
"themes",
|
||||||
"development",
|
"development",
|
||||||
]
|
]
|
||||||
date = "2014-04-02"
|
date = "2017-04-02"
|
||||||
toc = true
|
toc = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ tags = [
|
||||||
"themes",
|
"themes",
|
||||||
"development",
|
"development",
|
||||||
]
|
]
|
||||||
date = "2014-04-02"
|
date = "2018-04-02"
|
||||||
toc = true
|
toc = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ tags = [
|
||||||
"themes",
|
"themes",
|
||||||
"development",
|
"development",
|
||||||
]
|
]
|
||||||
date = "2014-04-02"
|
date = "2019-04-02"
|
||||||
toc = true
|
toc = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ tags = [
|
||||||
"themes",
|
"themes",
|
||||||
"development",
|
"development",
|
||||||
]
|
]
|
||||||
date = "2014-04-02"
|
date = "2020-04-02"
|
||||||
toc = true
|
toc = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ tags = [
|
||||||
"themes",
|
"themes",
|
||||||
"development",
|
"development",
|
||||||
]
|
]
|
||||||
date = "2014-04-02"
|
date = "2021-04-02"
|
||||||
toc = true
|
toc = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ tags = [
|
||||||
"themes",
|
"themes",
|
||||||
"development",
|
"development",
|
||||||
]
|
]
|
||||||
date = "2014-04-02"
|
date = "2022-04-02"
|
||||||
toc = true
|
toc = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
@ -10,3 +10,5 @@
|
||||||
translation: "Running"
|
translation: "Running"
|
||||||
- id: backTitle
|
- id: backTitle
|
||||||
translation: "🞀 Back To Home"
|
translation: "🞀 Back To Home"
|
||||||
|
- id: tags
|
||||||
|
translation: "Tags"
|
||||||
|
|
|
@ -2,3 +2,5 @@
|
||||||
translation: "🞀 Anasayfaya Dön"
|
translation: "🞀 Anasayfaya Dön"
|
||||||
- id: posts
|
- id: posts
|
||||||
translation: "Yazılar"
|
translation: "Yazılar"
|
||||||
|
- id: tags
|
||||||
|
translation: "Etiketler"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ define "header" }}
|
{{ define "header" }}
|
||||||
{{ partialCached "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
@ -9,19 +9,18 @@
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- range .Data.Pages.GroupByDate "2006" }}
|
{{ range (.Paginate .Pages.ByPublishDate ).Pages }}
|
||||||
<div class="posts-group">
|
<div class="posts-group">
|
||||||
<div class="posts-list">
|
<div class="posts-list">
|
||||||
{{- range .Pages }}
|
|
||||||
<p class="post-item">
|
<p class="post-item">
|
||||||
<a href="{{.Permalink}}">
|
<a href="{{.Permalink}}">
|
||||||
<span class="post-title">{{.Title}}</span>
|
<span class="post-title">{{.Title}}</span>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
{{- end }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{ end }}
|
||||||
|
{{ template "_internal/pagination.html" . }}
|
||||||
</main>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -12,14 +12,13 @@
|
||||||
{{- if (or .Site.Params.images .Site.Params.bgImg) }}
|
{{- if (or .Site.Params.images .Site.Params.bgImg) }}
|
||||||
<div class="bg-img"></div>
|
<div class="bg-img"></div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<div id="spotlight" class="animated fadeIn">
|
|
||||||
<div id="home-center">
|
<div id="home-center">
|
||||||
<h1 id="home-title">{{ .Site.Title }}</h1>
|
<h1 id="home-title">{{ .Site.Title }}</h1>
|
||||||
<nav id="home-nav" class="site-nav">
|
<nav id="home-nav" class="site-nav">
|
||||||
{{ partialCached "menu.html" . }}
|
{{ partialCached "menu.html" . }}
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
<div id="home-footer">
|
<div id="site-footer">
|
||||||
{{ if .IsTranslated }}
|
{{ if .IsTranslated }}
|
||||||
<nav class="LangNav">
|
<nav class="LangNav">
|
||||||
{{ range .Translations }}
|
{{ range .Translations }}
|
||||||
|
@ -28,8 +27,8 @@
|
||||||
</nav>
|
</nav>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p>
|
<p>
|
||||||
© {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}
|
© {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Params.author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
</nav>
|
</nav>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p>
|
<p>
|
||||||
© {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}
|
© {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Params.author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
#page{height:100vh;margin:0}#spotlight{display:flex;min-height:100vh;flex-direction:column;align-items:start;justify-content:space-between;max-width:400px;margin:auto;font-size:1.5rem}@media(max-width:448px){#spotlight{margin-left:24px}}#home-center{display:flex;flex-direction:column;flex-grow:1;align-items:flex-start;margin-top:10vh}#home-title{color:#202020;font-family:Inter;font-size:48px;font-style:normal;font-weight:500;line-height:normal}#home-nav{display:flex;flex-direction:column}#home-nav a{color:#252525;font-family:Inter;font-size:40px;font-style:normal;font-weight:400;line-height:150%;text-decoration-line:underline}.post-item .post-day,.post-item a{color:#252525;font-family:Inter;font-size:40px;font-style:normal;font-weight:400;line-height:150%;text-decoration-line:underline}#site-footer,#home-footer{width:100%}#site-footer p,#home-footer p{color:#5c5c5c;font-family:Inter;font-size:20px;font-style:normal;font-weight:300;line-height:normal;display:flex;gap:8px;justify-content:center}#site-footer a,#home-footer a{color:#5c5c5c;font-family:Inter;font-size:20px;font-style:normal;font-weight:300;line-height:normal;display:flex;gap:8px;justify-content:center;text-decoration:none}#site-footer a:hover,#home-footer a:hover{text-decoration:underline}.posts-group{width:400px}.back-title{font-family:Inter;font-size:20px;font-style:normal;font-weight:400}.back-title a{text-decoration:none;color:#252525}.back-title a:hover{text-decoration:underline;color:#151515}.post-item{display:flex;justify-content:space-between;align-items:center;width:100%}.post-item a{font-size:30px}.post-item .post-day{font-size:30px;text-decoration:none;color:#787878}
|
#page{height:100vh;margin:0}#spotlight{display:flex;min-height:100vh;flex-direction:column;align-items:start;justify-content:space-between;max-width:400px;margin:auto;font-size:1.5rem}@media(max-width:448px){#spotlight{margin-left:24px}}#home-center{display:flex;flex-direction:column;flex-grow:1;align-items:flex-start;margin-top:10vh}#home-title{color:#202020;font-family:Inter;font-size:48px;font-style:normal;font-weight:500;line-height:normal}#home-nav{display:flex;flex-direction:column}#home-nav a{color:#252525;font-family:Inter;font-size:40px;font-style:normal;font-weight:400;line-height:150%;text-decoration-line:underline}.post-item .post-day,.post-item a{color:#252525;font-family:Inter;font-size:40px;font-style:normal;font-weight:400;line-height:150%;text-decoration-line:underline}#site-footer,#home-footer{width:100%}#site-footer p,#home-footer p{color:#5c5c5c;font-family:Inter;font-size:20px;font-style:normal;font-weight:300;line-height:normal;display:flex;gap:8px;justify-content:center}#site-footer a,#home-footer a{color:#5c5c5c;font-family:Inter;font-size:20px;font-style:normal;font-weight:300;line-height:normal;display:flex;gap:8px;justify-content:center;text-decoration:none}#site-footer a:hover,#home-footer a:hover{text-decoration:underline}.posts-group{width:400px}.back-title{font-family:Inter;font-size:20px;font-style:normal;font-weight:400}.back-title a{text-decoration:none;color:#252525}.back-title a:hover{text-decoration:underline;color:#151515}.post-item{display:flex;justify-content:space-between;align-items:center;width:100%}.post-item a{font-size:30px}.post-item .post-day{font-size:30px;text-decoration:none;color:#787878}.pagination{display:flex;list-style:none;padding:0;margin:0;justify-content:center;font-family:Inter}.pagination .page-item{margin:0}.pagination .page-link{display:block;padding:5px 10px;margin:0 2px}#site-footer{width:400px}
|
|
@ -1 +1 @@
|
||||||
{"Target":"css/style.min.910364c57b3e8dcac2b40ba671bb4535eb005c27b07e67a0755ebc7b7c4d4b46.css","MediaType":"text/css","Data":{"Integrity":"sha256-kQNkxXs+jcrCtAumcbtFNesAXCewfmegdV68e3xNS0Y="}}
|
{"Target":"css/style.min.dd07bb0d6a75bc893e253d7929db53d7b6973c27c5fa5672c5b491e607c2bd3c.css","MediaType":"text/css","Data":{"Integrity":"sha256-3Qe7DWp1vIk+JT15KdtT17aXPCfF+lZyxbSR5gfCvTw="}}
|
Loading…
Reference in New Issue
Block a user