Class: Brut::FrontEnd::Layout
- Defined in:
- lib/brut/front_end/layout.rb
Overview
A layout is common HTML that surrounds different pages. For example, it would hold your
DOCTYPE, <head>
, and possibly any common <body>
elements that every page needs.
A layout is a Phlex component but it must contain a call to yield
somewhere in the
implementation of view_template
.
This base class contains helper methods needed for implementing a layout.
Instance Method Summary collapse
-
#asset_path(path) ⇒ String
Get the actual path of an asset managed by Brut.
Methods inherited from Component
component_name, #component_name
Methods included from Component::Helpers
#global_component, #inline_svg
Methods included from I18n::ForHTML
Methods included from I18n::BaseMethods
#l, #t, #t_direct, #this_field_value
Methods included from Brut::Framework::Errors
Instance Method Details
#asset_path(path) ⇒ String
Get the actual path of an asset managed by Brut. This handles locating the asset's URL as well as ensuring the hash is properly inserted into the filename.
18 |
# File 'lib/brut/front_end/layout.rb', line 18 def asset_path(path) = Brut.container.asset_path_resolver.resolve(path) |