aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/guff/handlers/blog.cr12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/guff/handlers/blog.cr b/src/guff/handlers/blog.cr
index 89393c3..21e7db7 100644
--- a/src/guff/handlers/blog.cr
+++ b/src/guff/handlers/blog.cr
@@ -161,6 +161,10 @@ class Guff::Handlers::BlogHandler < Guff::Handler
end
end
+ #######################
+ # post filter methods #
+ #######################
+
FILTERS = {
year: "year",
month: "month",
@@ -175,6 +179,10 @@ class Guff::Handlers::BlogHandler < Guff::Handler
end
end
+ ######################
+ # draw posts methods #
+ ######################
+
private def draw_posts(context, route, posts)
case route[:type]
when :list
@@ -202,6 +210,10 @@ class Guff::Handlers::BlogHandler < Guff::Handler
context.response.puts page
end
+ #####################
+ # draw tags methods #
+ #####################
+
TAG_TEMPLATES = TemplateCache.new({
body: "
<div class='post'>