fixtures/layout.rb

Lines

11%

2 of 17 covered

Branches

—

0 of 0 covered

Methods

0%

0 of 2 covered

Not run
5-69-1417-2226
Never called
1# frozen_string_literal: true
2
32module Example
42 class LayoutComponent < Phlex::HTML
50 def initialize(title: "Example")
60 @title = title
7 end
8
90 def view_template(&block)
100 html do
110 head do
120 title { @title }
130 meta name: "viewport", content: "width=device-width,initial-scale=1"
140 link href: "/assets/tailwind.css", rel: "stylesheet"
15 end
16
170 body class: "bg-zinc-100" do
180 nav class: "p-5", id: "main_nav" do
190 ul do
200 li(class: "p-5") { a(href: "/") { "Home" } }
210 li(class: "p-5") { a(href: "/about") { "About" } }
220 li(class: "p-5") { a(href: "/contact") { "Contact" } }
23 end
24 end
25
260 div class: "container mx-auto p-5", &block
27 end
28 end
29 end
30 end
31end