summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco <tomaselli.fr@gmail.com>2024-04-30 22:12:00 +0200
committerFrancesco <tomaselli.fr@gmail.com>2024-04-30 22:17:59 +0200
commit3b5b22e38dab795fc11e367c30636a3dcd4972fb (patch)
treea2ecdf353814c1b88bf85c2b1cc4da3e2e87f6a1
parent2adacb681f71234a8bb15d731654a8e449c9dfb4 (diff)
Added list summaries configuration, tweaked social icons margin on mobile
-rw-r--r--README.md2
-rw-r--r--assets/css/main.css21
-rw-r--r--assets/css/vars.css6
-rw-r--r--layouts/partials/post-entry.html10
4 files changed, 28 insertions, 11 deletions
diff --git a/README.md b/README.md
index 0aea936..e4a2a0d 100644
--- a/README.md
+++ b/README.md
@@ -154,6 +154,8 @@ homeCollection = 'posts'
# Pagination size across all website, this is the same for homepage and single list page
paginationSize = 100
+# Display summaries under post list entries
+listSummaries = false
# Social icons
[[params.social]]
diff --git a/assets/css/main.css b/assets/css/main.css
index 3c6ac9a..9f6cb73 100644
--- a/assets/css/main.css
+++ b/assets/css/main.css
@@ -151,10 +151,6 @@ footer a {
/* Posts list */
-.post-list-container {
- margin-bottom: 2rem;
-}
-
.post-line {
margin-bottom: .5rem;
display: flex;
@@ -166,18 +162,27 @@ footer a {
margin-bottom: 0rem;
}
-.post-date {
+.line-date {
font-size: small;
font-family: "Monaspace";
- width: 110px;
+ min-width: 110px;
+ max-width: 110px;
text-align: right;
padding-right: 1rem;
+ margin-top: 0rem;
+ margin-bottom: 0rem;
}
-.post-title {
+.line-title {
margin: 0;
}
+.line-summary {
+ font-size: small;
+ margin-top: .2rem !important;
+ font-style: italic;
+}
+
.pagination {
display: flex;
align-items: center;
@@ -209,7 +214,7 @@ footer a {
.social-icons {
padding: 12px 0;
- margin-bottom: 3rem;
+ margin-bottom: var(--social-icons-bottom-margin)
}
.social-icons a {
diff --git a/assets/css/vars.css b/assets/css/vars.css
index e3816e8..f68ff44 100644
--- a/assets/css/vars.css
+++ b/assets/css/vars.css
@@ -29,10 +29,13 @@
--toc-margin-top: 2rem;
--toc-margin-bottom: 3rem;
- /* code */
+ /* Code */
--code-padding: 1.5rem;
--code-border-radius: 10px;
+ /* Social section */
+ --social-icons-bottom-margin: 3rem;
+
/* Footer */
--footer-height: 3rem;
@@ -61,5 +64,6 @@
@media screen and (max-width: 640px) {
:root {
--header-top-gap: 1rem;
+ --social-icons-bottom-margin: 0rem;
}
} \ No newline at end of file
diff --git a/layouts/partials/post-entry.html b/layouts/partials/post-entry.html
index f3f2a23..1752768 100644
--- a/layouts/partials/post-entry.html
+++ b/layouts/partials/post-entry.html
@@ -1,4 +1,10 @@
<div class="post-line">
- <p class="post-date">{{ .Date.Format "2 Jan 2006" }} </p>
- <p class="post-title"> <a href="{{ .RelPermalink }}">{{ .Title }}</a></p>
+ <p class="line-date">{{ .Date.Format "2 Jan 2006" }} </p>
+ <div>
+ <p class="line-title"> <a href="{{ .RelPermalink }}">{{ .Title }}</a></p>
+
+ {{ if .Site.Params.listSummaries }}
+ <p class="line-summary"> {{ .Summary }} </p>
+ {{ end }}
+ </div>
</div> \ No newline at end of file