diff --git a/LICENSE.md b/LICENSE.md
index 25aa6b3..3735196 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,4 +1,4 @@
-Copyright 2024 Leon Mika
+Copyright 2025 Leon Mika
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
diff --git a/README.md b/README.md
index fafebb4..3c4e560 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,11 @@
# Sidebar For Tiny Theme
-## Description
-
Sidebar for Tiny Theme is a Micro.blog plugin that adds a sidebar to a blog using [Tiny Theme](https://tiny.micro.blog/), by Matt Langford. This can be used to show your [blog-roll](https://www.manton.org/2024/03/11/recommendations-and-blogrolls.html), links, and pretty much anything you can imagine going into a sidebar.
For an example of how this looks on a blog, visit [the example site](https://sidebar-for-tiny-theme.lmika.dev/) or [my own blog](https://lmika.org/).
+Questions? Bugs? Ideas? Please raise them as Github issue or [contact me directly](https://leonmika.com).
+
## Credit
Tiny Theme is created and maintained by [Matt Langfield](http://micro.blog/mtt?remote_follow=1).
diff --git a/layouts/partials/microhook-after-post-list.html b/layouts/partials/microhook-below-wrapper.html
similarity index 100%
rename from layouts/partials/microhook-after-post-list.html
rename to layouts/partials/microhook-below-wrapper.html
diff --git a/layouts/partials/sidebar-for-tiny-theme/recommendations.html b/layouts/partials/sidebar-for-tiny-theme/recommendations.html
index 40794a5..a395319 100644
--- a/layouts/partials/sidebar-for-tiny-theme/recommendations.html
+++ b/layouts/partials/sidebar-for-tiny-theme/recommendations.html
@@ -2,15 +2,17 @@
Recommendations
No recommendations yet.
- {{ end }} -No recommendations yet.
+ {{ end }} \ No newline at end of file diff --git a/layouts/partials/sidebar-for-tiny-theme/sidebar.html b/layouts/partials/sidebar-for-tiny-theme/sidebar.html index b7892b5..69c1d8d 100644 --- a/layouts/partials/sidebar-for-tiny-theme/sidebar.html +++ b/layouts/partials/sidebar-for-tiny-theme/sidebar.html @@ -1,7 +1,13 @@ +{{ $isPost := eq .Page.Type "post" -}} +{{ $showOnPosts := $.Site.Params.sidebar_show_on_posts -}} +{{ $showOnPages := $.Site.Params.sidebar_show_on_pages -}} +{{ $shouldShowSidebar := or .IsHome (and $showOnPosts $isPost) (and $showOnPages (not $isPost)) -}} +{{ if $shouldShowSidebar -}} \ No newline at end of file + +{{ end -}} \ No newline at end of file diff --git a/plugin.json b/plugin.json index 54090ac..c4ac5c0 100644 --- a/plugin.json +++ b/plugin.json @@ -1,8 +1,20 @@ { - "version": "0.1.0", - "title": "Sidebar for Tiny theme", - "description": "Adds a sidebar to blogs using the Tiny theme", + "version": "0.0.1", + "title": "Sidebar for Bayou", + "description": "Adds a sidebar to a blog using the Bayou theme", "includes": [ "/sidebar.css" + ], + "fields": [ + { + "field": "params.sidebar_show_on_posts", + "label": "Show sidebar on posts", + "type": "boolean" + }, + { + "field": "params.sidebar_show_on_pages", + "label": "Show sidebar on other pages", + "type": "boolean" + } ] } \ No newline at end of file diff --git a/static/sidebar.css b/static/sidebar.css index 24147a2..10115fd 100644 --- a/static/sidebar.css +++ b/static/sidebar.css @@ -3,7 +3,7 @@ max-width: 50em; } - div.wrapper:has(div.sidebar) { + div.page-content:has(div.sidebar) { display: grid; grid-template-columns: minmax(20em,35em) 15em; column-gap: 60px;