aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/html_manifest.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/html_manifest.rb')
-rw-r--r--lib/sisu/v5/html_manifest.rb33
1 files changed, 16 insertions, 17 deletions
diff --git a/lib/sisu/v5/html_manifest.rb b/lib/sisu/v5/html_manifest.rb
index 45ee2aae..02368111 100644
--- a/lib/sisu/v5/html_manifest.rb
+++ b/lib/sisu/v5/html_manifest.rb
@@ -63,13 +63,13 @@ module SiSU_Manifest
require_relative 'prog_text_translation' # prog_text_translation.rb
require_relative 'se_hub_particulars' # se_hub_particulars.rb
include SiSU_Particulars
+ require_relative 'html_parts' # html_parts.rb
require_relative 'html_minitoc' # html_minitoc.rb
require_relative 'html' # html.rb
include SiSU_HTML_Format
require_relative 'dp' # dp.rb
include SiSU_Param
require_relative 'i18n' # i18n.rb
- include SiSU_Viz
class Source
def initialize(opt)
@opt=opt
@@ -123,6 +123,7 @@ module SiSU_Manifest
end
private
class Output <Source
+ include SiSU_Parts_HTML
def initialize(md)
@manifest={ txt: [], html: [] }
@md,@fns=md,md.fns
@@ -140,7 +141,6 @@ module SiSU_Manifest
l=SiSU_Env::StandardiseLanguage.new(md.opt.lng).language
@language=l[:n]
@translate=SiSU_Translate::Source.new(md,@language)
- @brace_url=SiSU_Viz::Defaults.new.url_decoration
@stylesheet=SiSU_Style::CSS_HeadInfo.new(md).stylesheet
@fn_lng=(@f.output_dir_structure.by_language_code?) \
? ''
@@ -158,9 +158,9 @@ module SiSU_Manifest
if @o_str.dump_or_redirect?
''
elsif src==:src #check
- %{<br />#{@brace_url.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{@brace_url.xml_close}}
+ %{<br>#{the_url_decoration.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{the_url_decoration.xml_close}}
else
- %{<p class="tiny">#{@brace_url.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{@brace_url.xml_close}</p>}
+ %{<p class="tiny">#{the_url_decoration.xml_open}<a href="#{url}/#{file}">#{url}/#{file}</a>#{the_url_decoration.xml_close}</p>}
end
end
def summarize(id,file,pth='',rel='',url='',img='● ')
@@ -261,11 +261,11 @@ module SiSU_Manifest
def published_languages(id)
published_manifests?.each do |l|
@manifest[:txt] << "#{l[:mu]} #{l[:l]}\n"
- @manifest[:html] << %{<tr><th class="left"><p class="bold"><a href="#{l[:mu]}">#{l[:l]}</a></p></th><td><p class="norm">#{l[:l]}</p><p class="tiny">#{@brace_url.xml_open}<a href="#{l[:mu]}">#{l[:mu]}</a>#{@brace_url.xml_close}</p></td><td class="right"><p class="right">&nbsp;</p></td></tr>\n}
+ @manifest[:html] << %{<tr><th class="left"><p class="bold"><a href="#{l[:mu]}">#{l[:l]}</a></p></th><td><p class="norm">#{l[:l]}</p><p class="tiny">#{the_url_decoration.xml_open}<a href="#{l[:mu]}">#{l[:mu]}</a>#{the_url_decoration.xml_close}</p></td><td class="right"><p class="right">&nbsp;</p></td></tr>\n}
end
end
def metadata(id,info)
- info=info.to_s.gsub(/(?:#{Mx[:br_line]}|\\)+/,'<br />')
+ info=info.to_s.gsub(/(?:#{Mx[:br_line]}|\\)+/,'<br>')
@manifest[:html] << %{<tr><th class="left"><p class="bold_left">#{id}:</p></th><td><p class="left">#{info}</p></td></tr>\n}
end
def links(url,lnk,target)
@@ -273,7 +273,7 @@ module SiSU_Manifest
elsif url =~/^\.\.\// then url.gsub(/^\.(\.)?/,@env.url.root)
else url
end
- @manifest[:html] << %{<tr><th class="right" width=5%><p class="norm">●</p></th><td class="left"><p class="norm"><a href="#{url}">#{lnk}</a></p><p class="tiny">&nbsp;&nbsp;#{@brace_url.xml_open}<a href="#{static}">#{static}</a>#{@brace_url.xml_close}</p></td></tr>\n}
+ @manifest[:html] << %{<tr><th class="right" width=5%><p class="norm">●</p></th><td class="left"><p class="norm"><a href="#{url}">#{lnk}</a></p><p class="tiny">&nbsp;&nbsp;#{the_url_decoration.xml_open}<a href="#{static}">#{static}</a>#{the_url_decoration.xml_close}</p></td></tr>\n}
end
def output_tests
if FileTest.file?(@f.place_file.html_segtoc.dir)==true
@@ -885,7 +885,6 @@ WOK
begin
make=SiSU_Env::ProcessingSettings.new(@md)
minitoc=SiSU_HTML_MiniToc::TocMini.new(@md,data).songsheet.join("\n")
- vz=SiSU_Viz::Defaults.new
format_head_toc=SiSU_HTML_Format::HeadToc.new(@md)
@manifest[:html] <<<<WOK
<!DOCTYPE html>
@@ -901,7 +900,7 @@ SiSU manifest: #{@md.title.full}
<link rel="shortcut icon" href="#{@f.path_rel_links.html_scroll_css}_sisu/image_sys/rb7.ico" />
#{@stylesheet.css_head}
</head>
-<body lang="en" xml:lang="en">
+<body lang="#{@md.opt.lng}">
#{format_head_toc.seg_head_navigation_band(:manifest)}
WOK
if make.build.manifest_minitoc?
@@ -963,26 +962,26 @@ WOK
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#links">metadata suggested links (if any)</a>
</p>
</div>
-<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
+<table summary="normal text css" width="100%" border="0" cellpadding="2" align="center">
WOK
published_versions
@manifest[:html] << '</table>'
@manifest[:html] <<<<WOK
<h2 class="small"><a name="output">#{@translate.manifest_description_output}</a></h2>
-<table summary="available output/filetypes" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
+<table summary="available output/filetypes" width="100%" border="0" cellpadding="2" align="center">
<tr> <th class="left"><p class="bold">#{@translate.filetype_description}</p></th><th class="left"><p class="bold">#{@translate.filename}</p></th><th class="right"><p class="right"><b>#{@translate.file_size}</b></p><p class="tiny_right">(kB)</p></th></tr>
WOK
output_tests
@manifest[:html] << '</table>'
@manifest[:html] <<<<WOK
-<table summary="normal text css" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
+<table summary="normal text css" width="100%" border="0" cellpadding="2" align="center">
WOK
source_tests
@manifest[:html] << '</table>'
@manifest[:html] <<<<WOK
<h2 class="small"><a name="metadata">#{@translate.manifest_description_metadata}</a></h2>
-<table summary="document metadata" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
+<table summary="document metadata" width="100%" border="0" cellpadding="2" align="center">
<tr> <th class="left"><p class="bold">#{@translate.metadata}</p></th><th class="left"><p class="bold">#{@translate.description}</p></th></tr>
WOK
metadata_tests
@@ -991,7 +990,7 @@ WOK
WOK
@manifest[:html] <<<<WOK
<p class="bold"><a name="links">#{@translate.suggested_links}:</a></p>
-<table summary="suggested links" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
+<table summary="suggested links" width="100%" border="0" cellpadding="2" align="center">
WOK
links_tests
@manifest[:html] <<<<WOK
@@ -999,7 +998,7 @@ WOK
WOK
@manifest[:html] <<<<WOK
<h2 class="small"><a name="languages">#{@translate.language_version_list}</a></h2>
-<table summary="language versions" width="100%" border="0" bgcolor="white" cellpadding="2" align="center">
+<table summary="language versions" width="100%" border="0" cellpadding="2" align="center">
<tr> <th class="left"><p class="bold">#{@translate.filename}</p></th><th class="left"><p class="bold">#{@translate.description}</p></th><th class="right"><p class="right">&nbsp;</p></th></tr>
WOK
@@ -1009,8 +1008,8 @@ WOK
</table>
</div>
<div>
-<br />
-#{vz.credits_sisu_manifest}
+<br>
+#{SiSU_Proj_HTML::Bits.new.credits_sisu_manifest}
</div>
</body>
</html>