Class: SiSU_HTML_Format::HeadToc
Instance Attribute Summary
#md, #rdf
Instance Method Summary
collapse
#button_home, #doc_types, #dot, #dot_clear, #dot_nxt, #dot_pre, #dot_toc, #dot_white, #html_close, #icon, #next, #nxt, #png_nav, #pre, #previous, #toc, #up, #url_path_image_sys
#_url_path_image_base, #band1, #band2, #banner_band, #black, #blue_ink, #blue_tinge, #css, #grey, #grey_medium, #grey_pale, #home_button_only, #ico, #instrument_cover_band_scr, #instrument_cover_band_seg, #num, #num_css, #numless, #paragraph_font_small, #paragraph_font_tiny, #png_home, #png_home_button, #set_color, #set_face, #set_fonts, #set_size_endnote, #set_small, #set_tiny, #table1, #table2, #table_txt, #table_txt_r, #the_banner, #the_color, #the_font, #the_line_break, #the_margin, #the_nav, #the_png, #the_table_cellpad_box, #the_table_close, #the_url_decoration, #the_width, #txt_0, #txt_1, #txt_2, #txt_3, #txt_close, #txt_concordance, #txt_doc_link, #txt_homepage, #txt_manifest, #txt_open, #txt_toc_link, #white, #xml_close, #xml_open, #yellow_light
#footer_signature, #home, #home_txt, #i_choice, #i_home_button, #i_ico, #i_new, #rl_root, #root_http, #sisu, #sisu_txt, #sisudoc, #site, #the_icon, #the_text, #the_url, #txt_home, #txt_hp, #txt_hp_alias, #txt_signature, #urify, #url_close, #url_open
Constructor Details
#initialize(md) ⇒ HeadToc
Returns a new instance of HeadToc.
Instance Method Details
#all ⇒ Object
496
497
498
499
500
501
|
# File 'lib/sisu/html_format.rb', line 496
def all
rights=SiSU_HTML_Tune::CleanHTML.new(@md.rights.all).clean_for_html
rights=rights.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>©</sup> ')
%{<p class="small_left">Rights: #{rights}</p>
<p>}
end
|
#concordance ⇒ Object
549
550
551
552
553
554
555
556
557
558
559
560
561
562
|
# File 'lib/sisu/html_format.rb', line 549
def concordance
if @md.concord_make
%{#{the_margin.css}
<h4 class="toc">
<a href="./#{@md.file.base_filename.html_concordance}">
<i>Concordance</i>
</a>
</h4>
#{table_close}}
else
%{#{the_margin.css}
#{table_close}}
end
end
|
#concordance_link(text) ⇒ Object
354
355
356
357
358
359
360
361
362
363
|
# File 'lib/sisu/html_format.rb', line 354
def concordance_link(text)
if @md.concord_make
%{<font size=2>
<a href="#{@md.file.base_filename.html_concordance}" target="_top">
#{text}
</a>
</font>}
else ''
end
end
|
#concordance_navigation_band ⇒ Object
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
|
# File 'lib/sisu/html_format.rb', line 295
def concordance_navigation_band
up_button=if @make.build.html_navigation?
%{</td>
<td width="5%" align="right">
<a href="toc.html" target="_top" alt="->">
#{png_nav.toc}
</a>
}
else ''
end
if @make.build.html_top_band?
%{<table summary="concordance navigation band" id="toc" width="100%" bgcolor=#{the_color.band1}>
<tr><td width="20%">
#{button_home}
</td>
<td width="75%" align="center">
#{doc_types}
#{up_button}
#{the_table_close}
<p>}
else ''
end
end
|
#head ⇒ Object
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
|
# File 'lib/sisu/html_format.rb', line 399
def head
rdf=SiSU_XML_Tags::RDF.new(@md)
%{<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
#{@md.title.full}
</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
#{rdf.metatag_html}
#{@stylesheet.css_head}
</head>
<body lang="#{@md.opt.lng}">
<a name="top" id="top"></a>}
end
|
#links_guide_close ⇒ Object
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
|
# File 'lib/sisu/html_format.rb', line 474
def links_guide_close
insert=''
insert=if @md.sfx_src =~/s?/
link='http://sisudoc.org' url='sisudoc.org'
name='SiSU electronic documents' insert= %{
<li class="ref">
<a href="#{link}" alt="#{name}" target="_top">
#{url}
</a>
</li>
</ul>
</div>
}
end
%{ #{insert}
<!- quick ref -!>}
end
|
#links_guide_horizontal_open ⇒ Object
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
|
# File 'lib/sisu/html_format.rb', line 449
def links_guide_horizontal_open
%{
<div id="horizontal_links">
<ul id="horizontal">
<li class="refbold">
<a href="#{the_url.home}">
#{the_text.txt_hp}
</a>
</li>
<li class="ref">
Quick Ref.:
</li>
<li class="ref">
<a href="#{@md.file.base_filename.manifest}" alt="Document Manifest" target="_top">
Manifest
</a>
</li>
<!- quick ref -!>}
end
|
#links_guide_open(type = 'horizontal') ⇒ Object
469
470
471
472
473
|
# File 'lib/sisu/html_format.rb', line 469
def links_guide_open(type='horizontal')
(type=='vertical') \
? links_guide_vertical_open
: links_guide_horizontal_open
end
|
#links_guide_vertical_open ⇒ Object
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
|
# File 'lib/sisu/html_format.rb', line 429
def links_guide_vertical_open
%{
<div id="vertical_links">
<ul id="vertical">
<li class="refbold">
<a href="#{the_url.home}">
#{the_text.txt_hp}
</a>
</li>
<li class="ref">
Quick Ref.:
</li>
<li class="ref">
<a href="#{@md.file.base_filename.manifest}" alt="Document Manifest" target="_top">
Manifest
</a>
</li>
<!- quick ref -!>}
end
|
#make_concordance ⇒ Object
390
391
392
393
394
395
396
397
398
|
# File 'lib/sisu/html_format.rb', line 390
def make_concordance
wgt=SiSU_HTML_Format::Widget.new(@md)
%{<table summary="toc scroll and segment with pdf" border="0" cellpadding="3" cellspacing="0">
<tr>
<td align="center" bgcolor=#{the_color.band2}>
#{wgt.manifest}
#{wgt.search}
</tr></table>}
end
|
517
518
519
520
521
522
523
524
525
526
|
# File 'lib/sisu/html_format.rb', line 517
def make_scroll
concord=concordance_link(the_nav.txt_concordance)
%{<table summary="toc scroll" border="0" cellpadding="3" cellspacing="0">
<tr><td align="center" bgcolor="white" border="0">
#{the_nav.txt_doc_link}
</td>
<td align="center" bgcolor="white">
#{concord}
#{the_table_close}}
end
|
364
365
366
367
368
369
370
371
372
373
374
375
|
# File 'lib/sisu/html_format.rb', line 364
def make_scroll_search_form_and_manifest_link
wgt=SiSU_HTML_Format::Widget.new(@md)
%{<td align="center" bgcolor=#{the_color.band2}>
#{the_nav.txt_doc_link}
</td>
}
%{<table summary="toc segment and scroll with pdf" border="0" cellpadding="3" cellspacing="0">
<tr>
#{wgt.manifest}
#{wgt.search}
</tr></table>}
end
|
376
377
378
379
380
381
382
383
384
385
386
387
388
389
|
# File 'lib/sisu/html_format.rb', line 376
def make_scroll_seg_pdf
seg=''
wgt=SiSU_HTML_Format::Widget.new(@md)
seg=%{<td align="center" bgcolor=#{the_color.band2}>
#{the_nav.txt_toc_link}
</td>
}
%{<table summary="toc scroll and segment with pdf" border="0" cellpadding="3" cellspacing="0">
<tr>
<td align="center" bgcolor=#{the_color.band2}>
#{wgt.manifest}
#{wgt.search}
</tr></table>}
end
|
#make_seg ⇒ Object
527
528
529
530
531
532
533
534
535
536
537
|
# File 'lib/sisu/html_format.rb', line 527
def make_seg
concord=concordance_link(the_nav.txt_concordance)
%{<table summary="toc segment" border="0" cellpadding="3" cellspacing="0">
<tr><td align="center" bgcolor="white">
#{the_nav.txt_toc_link}
</td>
<td align="center" bgcolor="white">
<font size=2>
#{concord}
#{the_table_close}}
end
|
#manifest ⇒ Object
538
539
540
541
542
543
544
545
546
547
548
|
# File 'lib/sisu/html_format.rb', line 538
def manifest if not @o_str.dump_or_redirect?
manifest=manifest_link(the_nav.txt_manifest)
%{#{the_margin.txt_3}
#{the_font.paragraph_font_small}
#{manifest}
</font>
#{the_table_close}}
else ''
end
end
|
#manifest_link(text) ⇒ Object
348
349
350
351
352
353
|
# File 'lib/sisu/html_format.rb', line 348
def manifest_link(text)
%{<font size=2>
<a href="#{@md.file.base_filename.manifest}" target="_top">#{text}</a>
</font>}
end
|
557
558
559
560
561
562
563
564
565
|
# File 'lib/sisu/html_format.rb', line 557
def metadata
%{#{the_margin.css}
<h4 class="toc">
<a href="#{@metalink}">
<i>MetaData</i>
</a>
</h4>
#{the_table_close}}
end
|
#prefix_a ⇒ Object
493
494
|
# File 'lib/sisu/html_format.rb', line 493
def prefix_a
end
|
#prefix_b ⇒ Object
504
505
506
|
# File 'lib/sisu/html_format.rb', line 504
def prefix_b
%{<p class="small_left">Prefix: #{@md.prefix_b}<p />}
end
|
#rights ⇒ Object
495
496
497
498
499
500
501
502
503
|
# File 'lib/sisu/html_format.rb', line 495
def rights
def all
rights=SiSU_HTML_Tune::CleanHTML.new(@md.rights.all).clean_for_html
rights=rights.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>©</sup> ')
%{<p class="small_left">Rights: #{rights}</p>
<p>}
end
self
end
|
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
# File 'lib/sisu/html_format.rb', line 274
def scroll_head_navigation_band
if @make.build.html_top_band?
<<WOK
<td align="center" width="60%">
#{make_scroll_search_form_and_manifest_link}
</td>
WOK
%{<table summary="table of contents scroll navigation band" id="toc" width="100%" bgcolor=#{the_color.band1}>
<tr><td width="20%">
#{button_home(:scroll)}
</td>
<td width="75%" align="center">
#{doc_types}
</td>
<td width="20%">
#{the_table_close}
<p>}
else ''
end
end
|
507
508
509
510
511
|
# File 'lib/sisu/html_format.rb', line 507
def scroll_head_title_banner_open
icon=@md.icon ? %{<center>\n#{@md.icon}\n</center>} : ''
%{#{icon}
#{the_banner.instrument_cover_band_scr}}
end
|
589
590
591
592
593
594
595
596
597
598
599
|
# File 'lib/sisu/html_format.rb', line 589
def scroll_tail nav=scroll_head_navigation_band
%{
<div class="main_column">
#{nav}
#{@bits.credits_sisu}
<a name="bottom" id="bottom"></a>
<a name="end" id="end"></a>
</div>
}
end
|
#seg_head_navigation_band(page = :seg) ⇒ Object
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
# File 'lib/sisu/html_format.rb', line 318
def seg_head_navigation_band(page=:seg)
if @make.build.html_navigation?
if page==:manifest
nxt=(@file.output_dir_structure.by_language_code? \
|| @file.output_dir_structure.by_filetype?) \
? "../html/#{@md.fnb}/toc#{@md.lang_code_insert}#{Sfx[:html]}"
: "toc#{@md.lang_code_insert}#{Sfx[:html]}"
firstseg=%{<a href="#{nxt}" target="_top" alt="->">
#{png_nav.nxt}</a>}
elsif @md.firstseg =~/\S+/
firstseg=%{<a href="#{@md.firstseg}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top" alt="->">
#{png_nav.nxt}</a>}
end
else ''
end
if @make.build.html_top_band?
%{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{the_color.band1}>
<tr><td width="20%">
#{button_home(page)}
</td>
<td width="75%" align="center">
#{doc_types(page)}
</td>
<td width="5%" align="right">
#{firstseg}
#{the_table_close}
<p>}
else ''
end
end
|
#seg_head_title_banner_open ⇒ Object
512
513
514
515
516
|
# File 'lib/sisu/html_format.rb', line 512
def seg_head_title_banner_open
icon=@md.icon ? %{<center>\n#{@md.icon}\n</center>} : ''
%{#{icon}
#{the_banner.instrument_cover_band_seg}}
end
|
#seg_navigation_tail ⇒ Object
this is a bug area, look up and “tidy”
600
601
602
603
604
605
606
607
608
609
610
611
|
# File 'lib/sisu/html_format.rb', line 600
def seg_navigation_tail %{
<div class="main_column">
<p> </p>
#{@bits.credits_sisu}
<a name="bottom" id="bottom"></a>
<a name="end" id="end"></a>
</div>
</div>
</div>
}
end
|
#seg_tail ⇒ Object
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
|
# File 'lib/sisu/html_format.rb', line 566
def seg_tail
%{
<div class="main_column">
<p> <p>
<table summary="toc segment tail" bgcolor=#{the_color.band1}>
<tr><td width="20%">
#{the_banner.banner_band}
</td>
<td width="60%">
<center>
#{@tocband_segtoc}
</center>
</td></tr>
</table>
<p> </p>
#{@bits.credits_sisu}
<a name="bottom" id="bottom"></a>
<a name="end" id="end"></a>
</div>
</div>
</div>
}
end
|