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
  <<HTML
<body><div id="top">
#{output_navbar}
<h1>#{site_title}</h1>
#{}
</div><div id="inner">
<h2>#{title}</h2>
#{output_inner_content}
</div></body>
HTML
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
  <<HTML
<head>
<meta charset="UTF-8">
<title>#{site_title} - #{title}</title>
<style>
#{::File.read(::File.join(__dir__, 'stylesheet.css'))}
</style>
</head>
HTML
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