Module: Avmtrf1::InventarioSistemas::SiteBuild::HtmlPageBase::Layout
- Defined in:
- lib/avmtrf1/inventario_sistemas/site_build/html_page_base/layout.rb
Instance Method Summary collapse
- #metadata_info ⇒ Object
- #output_body ⇒ Object
- #output_content ⇒ Object
- #output_header ⇒ Object
- #output_navbar ⇒ Object
- #output_navbar_path(links) ⇒ Object
Instance Method Details
#metadata_info ⇒ Object
8 9 10 11 12 |
# File 'lib/avmtrf1/inventario_sistemas/site_build/html_page_base/layout.rb', line 8 def "<div class='input_metadata'>" \ "Extraído de <strong>#{site.input_file.basename}</strong>." \ '</div>' end |
#output_body ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/avmtrf1/inventario_sistemas/site_build/html_page_base/layout.rb', line 14 def output_body <<~HTML <body><div id="top"> #{} <h1>#{site_title}</h1> #{} </div><div id="inner"> <h2>#{title}</h2> #{output_inner_content} </div></body> HTML end |
#output_content ⇒ Object
27 28 29 |
# File 'lib/avmtrf1/inventario_sistemas/site_build/html_page_base/layout.rb', line 27 def output_content "<html>\n" + output_header + output_body + '</html>' # rubocop:disable Style/StringConcatenation end |
#output_header ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/avmtrf1/inventario_sistemas/site_build/html_page_base/layout.rb', line 31 def output_header <<~HTML <head> <meta charset="UTF-8"> <title>#{site_title} - #{title}</title> <style> #{::File.read(::File.join(__dir__, 'stylesheet.css'))} </style> </head> HTML end |
#output_navbar ⇒ Object
43 44 45 |
# File 'lib/avmtrf1/inventario_sistemas/site_build/html_page_base/layout.rb', line 43 def '<nav>' + (false) + '</nav>' # rubocop:disable Style/StringConcatenation end |
#output_navbar_path(links) ⇒ Object
47 48 49 50 |
# File 'lib/avmtrf1/inventario_sistemas/site_build/html_page_base/layout.rb', line 47 def (links) (parent.present? ? parent.(true) + NAVBAR_SEPARATOR : '') + (links ? self_html_link : title) end |