Module: Avmtrf1::InventarioSistemas::SiteBuild::HtmlPageBase::Layout

Defined in:
lib/avmtrf1/inventario_sistemas/site_build/html_page_base/layout.rb

Instance Method Summary collapse

Instance Method Details

#metadata_infoObject



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_bodyObject



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
  "<body><div id=\"top\">\n\#{output_navbar}\n<h1>\#{site_title}</h1>\n\#{metadata_info}\n</div><div id=\"inner\">\n<h2>\#{title}</h2>\n\#{output_inner_content}\n</div></body>\n"
end

#output_contentObject



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>'
end

#output_headerObject



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
  "<head>\n<meta charset=\"UTF-8\">\n<title>\#{site_title} - \#{title}</title>\n<style>\n\#{::File.read(::File.join(__dir__, 'stylesheet.css'))}\n</style>\n</head>\n"
end

#output_navbarObject



43
44
45
# File 'lib/avmtrf1/inventario_sistemas/site_build/html_page_base/layout.rb', line 43

def output_navbar
  '<nav>' + output_navbar_path(false) + '</nav>'
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 output_navbar_path(links)
  (parent.present? ? parent.output_navbar_path(true) + NAVBAR_SEPARATOR : '') +
    (links ? self_html_link : title)
end