Sha256: d2f9357e19702092c838730500e0b844e828d5d7026329d20d96c0d62d23e874

Contents?: true

Size: 565 Bytes

Versions: 4

Compression:

Stored size: 565 Bytes

Contents

<% module_namespacing do -%>
module Views
  class <%= class_name %> < Phlex::HTML
    include Phlex::Rails::Layout

    def initialize(title:)
      @title = title
    end

    def template(&)
      doctype

      html do
        head do
          meta charset: "utf-8"
          csp_meta_tag
          csrf_meta_tags
          meta name: "viewport", content: "width=device-width,initial-scale=1"
          title { @title }
          stylesheet_link_tag "application"
        end

        body do
          main(&)
        end
      end
    end
  end
end
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
phlex-rails-0.6.1 lib/generators/phlex/layout/templates/layout.rb.erb
phlex-rails-0.6.0 lib/generators/phlex/layout/templates/layout.rb.erb
phlex-rails-0.5.1 lib/generators/phlex/layout/templates/layout.rb.erb
phlex-rails-0.5.0 lib/generators/phlex/layout/templates/layout.rb.erb