feat: add pagination

This commit is contained in:
log101 2023-12-07 09:28:51 +00:00
parent 338a6fc456
commit 52cefd37ca
17 changed files with 47 additions and 21 deletions

View File

@ -144,3 +144,26 @@
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;
}

View File

@ -9,6 +9,7 @@ pygmentsUseClasses = true
rssLimit = 10 # Maximum number of items in the RSS feed.
enableEmoji = true
paginate = 5
[languages]
[languages.tr]
@ -52,7 +53,7 @@ enableEmoji = true
# Add custom css
# customCSS = ["css/foo.css", "css/bar.css"]
[[params.author]]
[params.author]
name = "Furkan Erdem"
# Social Icons

View File

@ -7,7 +7,7 @@ tags = [
"themes",
"development",
]
date = "2014-04-02"
date = "2015-04-02"
toc = true
+++

View File

@ -7,7 +7,7 @@ tags = [
"themes",
"development",
]
date = "2014-04-02"
date = "2016-04-02"
toc = true
+++

View File

@ -7,7 +7,7 @@ tags = [
"themes",
"development",
]
date = "2014-04-02"
date = "2017-04-02"
toc = true
+++

View File

@ -7,7 +7,7 @@ tags = [
"themes",
"development",
]
date = "2014-04-02"
date = "2018-04-02"
toc = true
+++

View File

@ -7,7 +7,7 @@ tags = [
"themes",
"development",
]
date = "2014-04-02"
date = "2019-04-02"
toc = true
+++

View File

@ -7,7 +7,7 @@ tags = [
"themes",
"development",
]
date = "2014-04-02"
date = "2020-04-02"
toc = true
+++

View File

@ -7,7 +7,7 @@ tags = [
"themes",
"development",
]
date = "2014-04-02"
date = "2021-04-02"
toc = true
+++

View File

@ -7,7 +7,7 @@ tags = [
"themes",
"development",
]
date = "2014-04-02"
date = "2022-04-02"
toc = true
+++

View File

@ -10,3 +10,5 @@
translation: "Running"
- id: backTitle
translation: "🞀 Back To Home"
- id: tags
translation: "Tags"

View File

@ -2,3 +2,5 @@
translation: "🞀 Anasayfaya Dön"
- id: posts
translation: "Yazılar"
- id: tags
translation: "Etiketler"

View File

@ -1,5 +1,5 @@
{{ define "header" }}
{{ partialCached "header.html" . }}
{{ partial "header.html" . }}
{{ end }}
{{ define "main" }}
@ -9,19 +9,18 @@
{{ .Content }}
</div>
{{- end }}
{{- range .Data.Pages.GroupByDate "2006" }}
{{ range (.Paginate .Pages.ByPublishDate ).Pages }}
<div class="posts-group">
<div class="posts-list">
{{- range .Pages }}
<p class="post-item">
<a href="{{.Permalink}}">
<span class="post-title">{{.Title}}</span>
</a>
</p>
{{- end }}
</div>
</div>
{{- end }}
{{ end }}
{{ template "_internal/pagination.html" . }}
</main>
{{ end }}

View File

@ -12,14 +12,13 @@
{{- if (or .Site.Params.images .Site.Params.bgImg) }}
<div class="bg-img"></div>
{{- end }}
<div id="spotlight" class="animated fadeIn">
<div id="home-center">
<h1 id="home-title">{{ .Site.Title }}</h1>
<nav id="home-nav" class="site-nav">
{{ partialCached "menu.html" . }}
</nav>
</div>
<div id="home-footer">
<div id="site-footer">
{{ if .IsTranslated }}
<nav class="LangNav">
{{ range .Translations }}
@ -28,8 +27,8 @@
</nav>
{{ end }}
<p>
&copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}
&copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Params.author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}
</p>
</div>
</div>
{{ end }}

View File

@ -7,6 +7,6 @@
</nav>
{{ end }}
<p>
&copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}
&copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Params.author.name }}</a>{{ .Site.Params.footerCopyright | safeHTML }}
</p>
</div>

View File

@ -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}

View File

@ -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="}}