Sha256: 9c7fec30fb53ab699eaa2a397dffb509cb48060c5ff5e9f2034b46f6e9777547
Contents?: true
Size: 653 Bytes
Versions: 1
Compression:
Stored size: 653 Bytes
Contents
# frozen_string_literal: true module Layouts class Site < Layout include Phlex::DeferredRender def view_template html lang: "en_US", data: { theme: "onedark" } do render Layouts::Head.new(&head) body do render UI::Navbar.new(class: css[:navbar]) main(class: css[:main], &content) render UI::Footer.new(class: css[:footer]) end end end def with_head(&block) @head = block end def with_content(&block) @content = block end private def content @content || proc {} end def head @head || proc {} end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
staticky-0.1.0 | site_template/app/views/layouts/site.rb |