From 2a2d3ae9d1639ffc0f16026968aebd91a4652870 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sat, 7 Sep 2024 13:32:19 +1000 Subject: [PATCH] Fix timemachine show --- slices/main/decorators/posts/decorator.rb | 2 ++ slices/main/templates/timemachine/show.html.slim | 3 +++ 2 files changed, 5 insertions(+) diff --git a/slices/main/decorators/posts/decorator.rb b/slices/main/decorators/posts/decorator.rb index 9509bf2..a16d814 100644 --- a/slices/main/decorators/posts/decorator.rb +++ b/slices/main/decorators/posts/decorator.rb @@ -204,6 +204,8 @@ module Main results << "" end results + rescue REXML::ParseException => e + return "

No excerpt

" end def attrs_to_s(attrs) diff --git a/slices/main/templates/timemachine/show.html.slim b/slices/main/templates/timemachine/show.html.slim index b05019d..b11ecab 100644 --- a/slices/main/templates/timemachine/show.html.slim +++ b/slices/main/templates/timemachine/show.html.slim @@ -28,6 +28,9 @@ div class="max-w-screen-md mx-auto px-4 m-4 h-max" a href="/post/#{post.slug}" img loading="lazy" class="mb-0 rounded" src="#{photo["value"]}" = post.name + - if post.location + div class="text-sm" + img loading="lazy" class="rounded mb-4" src=post.large_map - else p No posts