summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-08-23 15:30:46 +0200
committerVolpeon <git@volpeon.ink>2022-08-23 15:30:46 +0200
commit72c4d72bc6cbcea23e237e92ae19a07ee83d5944 (patch)
tree4cf8de3b11ae35b2e13346589fd37b18060029a9
parentBetter navigation of related content (diff)
downloadvolpeon.ink-72c4d72bc6cbcea23e237e92ae19a07ee83d5944.tar.gz
volpeon.ink-72c4d72bc6cbcea23e237e92ae19a07ee83d5944.tar.bz2
volpeon.ink-72c4d72bc6cbcea23e237e92ae19a07ee83d5944.zip
Fixed related layout
-rw-r--r--scripts/page.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/page.lua b/scripts/page.lua
index 48eef6e..33982ba 100644
--- a/scripts/page.lua
+++ b/scripts/page.lua
@@ -149,9 +149,12 @@ function generate_related(meta)
149 149
150 if not meta.prev and not meta.next then return nil end 150 if not meta.prev and not meta.next then return nil end
151 151
152 local layout = meta.parent.list_layout 152 local layout
153 local layout_id = utils.stringify(layout.id) 153 local layout_id = utils.stringify(meta.parent.list_layout.id)
154 if layout_id ~= "grid-2" and layout_id ~= "gallery-2" then 154
155 if layout_id == "gallery-2" or layout_id == "gallery-3" then
156 layout = common.prep_layout("gallery-2")
157 else
155 layout = common.prep_layout("grid-2") 158 layout = common.prep_layout("grid-2")
156 end 159 end
157 160