From a22308b48992e548e990fb84a7f8b81e6de87cad Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 11 Oct 2021 02:35:20 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20Update=20a=20few=20things=20(0.2?= =?UTF-8?q?.0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/discord.xml | 2 +- .idea/inspectionProfiles/Project_Default.xml | 1 + _includes/post-summary.html | 17 +++++ _includes/tag.html | 5 ++ _layouts/base.html | 4 +- _layouts/box.html | 1 - _layouts/default.html | 6 +- _layouts/home.html | 43 ++++++++++++ _layouts/post.html | 27 ++++++-- _posts/2021-10-10-test.md | 1 + assets/css/bluelib-jekyll.css | 69 ++++++++++++++++++++ index.html | 6 ++ jekyll-theme-bluelib.gemspec | 2 +- 13 files changed, 171 insertions(+), 13 deletions(-) create mode 100644 _includes/post-summary.html create mode 100644 _includes/tag.html create mode 100644 _layouts/home.html create mode 100644 assets/css/bluelib-jekyll.css create mode 100644 index.html diff --git a/.idea/discord.xml b/.idea/discord.xml index 30bab2a..d8e9561 100644 --- a/.idea/discord.xml +++ b/.idea/discord.xml @@ -1,7 +1,7 @@ - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index b0db9b0..d3f547f 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -1,6 +1,7 @@ \ No newline at end of file diff --git a/_includes/post-summary.html b/_includes/post-summary.html new file mode 100644 index 0000000..25a0c5c --- /dev/null +++ b/_includes/post-summary.html @@ -0,0 +1,17 @@ +
+
+ + {{ post.title }} + +
+ + +
diff --git a/_includes/tag.html b/_includes/tag.html new file mode 100644 index 0000000..7f5ee86 --- /dev/null +++ b/_includes/tag.html @@ -0,0 +1,5 @@ +
+ + {{ tag }} + +
\ No newline at end of file diff --git a/_layouts/base.html b/_layouts/base.html index eca4d67..33a8eee 100644 --- a/_layouts/base.html +++ b/_layouts/base.html @@ -5,7 +5,9 @@ layout: default

- {{ site.title }} + + {{ site.title }} +

{{ content }}
diff --git a/_layouts/box.html b/_layouts/box.html index c21429b..6aebfd9 100644 --- a/_layouts/box.html +++ b/_layouts/box.html @@ -5,4 +5,3 @@ layout: base
{{ content }}
- diff --git a/_layouts/default.html b/_layouts/default.html index f48b6a3..b43312e 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -4,13 +4,13 @@ + {% for css in site.extra_css %} - + {% endfor %} - {{ page.title }} + {{ page.title }} - {{ site.title }} {{ content }} - diff --git a/_layouts/home.html b/_layouts/home.html new file mode 100644 index 0000000..e7ade9a --- /dev/null +++ b/_layouts/home.html @@ -0,0 +1,43 @@ +--- +layout: base +--- + +
+

+ {{ page.title }} +

+ {{ content }} +
+ +
+

+ Latest posts +

+

+ These are the latest posts in the blog in reverse chronological order. +

+ {% for post in site.posts %} + {% include post-summary.html %} + {% endfor %} +
+ +
+

+ Posts by tag +

+

+ These are all the posts in the blog, grouped by their tag. +

+
+ {% for tag_pair in site.tags %} +
+

+ {{ tag_pair[0] }} +

+ {% for post in tag_pair[1] %} + {% include post-summary.html %} + {% endfor %} +
+ {% endfor %} +
+
\ No newline at end of file diff --git a/_layouts/post.html b/_layouts/post.html index 0dab78e..caf9fb1 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -1,10 +1,25 @@ --- -layout: box +layout: base --- -

- {{ page.title }} -

-{{ content }} - +
+
+ +
+
+ {% for tag in page.tags %} + {% include tag.html %} + {% endfor %} +
+
+
+

+ + {{ page.title }} + +

+ {{ content }} +
diff --git a/_posts/2021-10-10-test.md b/_posts/2021-10-10-test.md index ea57cef..17c0ea6 100644 --- a/_posts/2021-10-10-test.md +++ b/_posts/2021-10-10-test.md @@ -1,6 +1,7 @@ --- layout: post title: "Hello world!" +tag: example --- This is a sample post made to display posts made using `jekyll-theme-bluelib`. diff --git a/assets/css/bluelib-jekyll.css b/assets/css/bluelib-jekyll.css new file mode 100644 index 0000000..54e45c8 --- /dev/null +++ b/assets/css/bluelib-jekyll.css @@ -0,0 +1,69 @@ +.post-summary { + display: grid; + + grid-template-areas: + "title tags" + "date tags"; + grid-template-columns: auto 1fr; + grid-template-rows: auto 1fr; + grid-column-gap: 8px; + grid-row-gap: 2px; + + white-space: nowrap; +} + +.post-summary > .post-title { + grid-area: title; + justify-self: start; + + font-size: large; + font-weight: bold; +} + +.post-summary > .post-date { + grid-area: date; + justify-self: start; + + font-style: italic; + font-size: x-small; + + opacity: 0.7; +} + +.post-summary > .post-tags { + grid-area: tags; + justify-self: end; + + display: flex; + flex-direction: row; + gap: 4px; +} + +.page-info { + display: flex; + flex-direction: row; + gap: 4px; + justify-content: space-between; + + font-size: small; +} + +.page-info > .page-date { + display: inline !important; + margin: 0 !important; + width: auto !important; + + justify-self: start; +} + +.page-info > .page-tags { + display: flex; + flex-direction: row; + gap: 4px; +} + +.tag { + display: inline !important; + margin: 0 !important; + width: auto !important; +} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..66d0266 --- /dev/null +++ b/index.html @@ -0,0 +1,6 @@ +--- +layout: home +title: "jekyll-theme-bluelib" +--- + +Appearently, Jekyll needs index.html to exist. \ No newline at end of file diff --git a/jekyll-theme-bluelib.gemspec b/jekyll-theme-bluelib.gemspec index 16220bf..68969aa 100644 --- a/jekyll-theme-bluelib.gemspec +++ b/jekyll-theme-bluelib.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "jekyll-theme-bluelib" - spec.version = "0.1.1" + spec.version = "0.2.0" spec.authors = ["Stefano Pigozzi"] spec.email = ["me@steffo.eu"]