mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
24 lines
449 B
Ruby
24 lines
449 B
Ruby
require 'phlex'
|
|
|
|
module Pressa
|
|
module Views
|
|
class FeedPostView < Phlex::HTML
|
|
def initialize(post:, site:)
|
|
@post = post
|
|
@site = site
|
|
end
|
|
|
|
def view_template
|
|
div do
|
|
p(class: 'time') { @post.formatted_date }
|
|
raw(@post.body)
|
|
p do
|
|
a(class: 'permalink', href: @site.url_for(@post.path)) { '∞' }
|
|
end
|
|
end
|
|
end
|
|
|
|
private
|
|
end
|
|
end
|
|
end
|