From d43865fb6a093625a77e8605d6fb00158546e1e4 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 12 Aug 2008 23:37:42 -0400 Subject: html increased use of css; dal, middle layer, url representation, interim commit --- lib/sisu/v0/html_format_css.rb | 133 ++++++++++++++++------------------------- 1 file changed, 53 insertions(+), 80 deletions(-) (limited to 'lib/sisu/v0/html_format_css.rb') diff --git a/lib/sisu/v0/html_format_css.rb b/lib/sisu/v0/html_format_css.rb index ace6983b..106157ba 100644 --- a/lib/sisu/v0/html_format_css.rb +++ b/lib/sisu/v0/html_format_css.rb @@ -155,53 +155,29 @@ module SiSU_HTML_Format_type def initialize(md='') super(md) end - def toc_endnote - %{#{@vz.margin_css} -

- - Endnotes - -

-#{@vz.table_close}} - end end class Format_scroll < SiSU_HTML_Format::Format_text_object def initialize(md='',*txt) super(md,*txt) @vz=SiSU_Env::Get_init.instance.skin end - def indent_one_no_paranum - %{#{@vz.margin_txt_1} -#{@paragraph.txt} - #@one -#{@vz.margin_num} -#{@vz.table_close}} - end - def indent_two_no_paranum - %{#{@vz.margin_txt_1} -#{@paragraph.txt} - #@one -#{@vz.margin_num} -#{@vz.table_close}} - end def endnote_body - %{#{@vz.margin_css} -

- #@one + %{

+

 

+

+ #@one

-#{@vz.margin_num_css} -   -#{@vz.table_close}} +
+} end def header_normal - %{#{@vz.margin_css} + %{
+ #{@p_num.ocn_display} <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} #@headname #@parablock -#{@vz.margin_num_css} - #{@p_num.ocn_display} -#{@vz.table_close}} +
} end def heading_body @tag,@class='p','norm' @@ -236,13 +212,6 @@ module SiSU_HTML_Format_type def initialize(md='',*txt) super(md,*txt) end - def navigation_para - %{#{@vz.margin_css} -#{@paragraph.txt} - #@one -

-#{@vz.table_close}} - end def navigation_toc_lev1_advert %{#{@banner.home_button}\n
@@ -291,39 +260,36 @@ module SiSU_HTML_Format_type end def navigation_toc_lev6 end - def endnote_body_seg_tail - %{#{@vz.margin_css} + def endnote_body_seg_tail #FIX + %{

#@one

-#{@vz.margin_num_css}  -#{@vz.table_close}} +
} end def endnote_body_seg_tail_indent - %{#{@vz.margin_css} + %{

#@one

-#{@vz.margin_num_css}  -#{@vz.table_close}} +
} end - def endnote_seg_body(fn='') #url construction keep within single line... BUG WATCH 200408 + def endnote_seg_body(fn='') #FIX #url construction keep within single line... BUG WATCH 200408 fn='doc' if fn.empty? #you may wish to reconsider, sends to 'doc' where no segment info - %{#{@vz.margin_css} + %{

#@one#{@md.fnl[:pre]}#{fn}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}#@two#@three

-#{@vz.margin_num_css}  -#{@vz.table_close}} +
} end def title_header - %{#{@vz.margin_css} - <#@tag class="#@class"> + %{
+ #@two +<#@tag class="#@class"> #@one -#{@vz.margin_num_css}  -#@two -#{@vz.table_close}} +
+} end def title_header1 @tag,@class='h1','banner' @@ -338,12 +304,12 @@ module SiSU_HTML_Format_type title_header end def title_header4 - %{#{@vz.margin_css} + %{
+

 

-#{@vz.margin_num_css}  -#{@vz.table_close}} +
} end def subtoc_lev one=if @one \ @@ -374,25 +340,22 @@ module SiSU_HTML_Format_type end #% para sisu def header4 - %{#@format #{@vz.margin_css} + %{
+#{@p_num.ocn_display}

#{@p_num.name} #@format #@parablock

-#{@vz.margin_num_css} -#{@p_num.ocn_display} -#{@vz.table_close}} +
} end def header_sub @parablock.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*/m,' ') - %{#{@vz.margin_css} -#{@headname} - <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} + %{
+ #{@p_num.ocn_display} + <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} #{@headname} #{@parablock} -#{@vz.margin_num_css} -#{@p_num.ocn_display} -#{@vz.table_close}} +
} end def header5 @tag,@class='p','bold' @@ -419,17 +382,6 @@ module SiSU_HTML_Format_type %{

#@parablock

} - end - def navigation_indent1 - %{#{@vz.margin_txt_00_1} -#{@paragraph.txt_00} - #@parablock - -

-#{@vz.margin_num_css}  -#{@vz.table_close}} - end - def navigation_indent2 end def navigation_center "
#@parablock
" @@ -475,6 +427,27 @@ module SiSU_HTML_Format_type def lev0 #docinfo lev('h0','toc') end + def mini_lev1 + lev('h1','minitoc') + end + def mini_lev2 + lev('h2','minitoc') + end + def mini_lev3 + lev('h3','minitoc') + end + def mini_lev4 + lev('h4','minitoc') + end + def mini_lev5 + lev('h5','minitoc') + end + def mini_lev6 + lev('h6','minitoc') + end + def mini_lev0 #docinfo + lev('h0','minitoc') + end end end __END__ -- cgit v1.2.3 From e25335596d5c77fd9edb8f806373a41cfdf90622 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 14 Aug 2008 01:30:04 -0400 Subject: html, css and related markup --- lib/sisu/v0/html_format_css.rb | 54 +++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 19 deletions(-) (limited to 'lib/sisu/v0/html_format_css.rb') diff --git a/lib/sisu/v0/html_format_css.rb b/lib/sisu/v0/html_format_css.rb index 106157ba..1573d107 100644 --- a/lib/sisu/v0/html_format_css.rb +++ b/lib/sisu/v0/html_format_css.rb @@ -162,22 +162,25 @@ module SiSU_HTML_Format_type @vz=SiSU_Env::Get_init.instance.skin end def endnote_body - %{
-

 

-

+ %{ +

+ +

#@one

} end def header_normal - %{
+ %{ +
#{@p_num.ocn_display} <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} #@headname #@parablock -
} +
+} end def heading_body @tag,@class='p','norm' @@ -261,29 +264,36 @@ module SiSU_HTML_Format_type def navigation_toc_lev6 end def endnote_body_seg_tail #FIX - %{
+ %{ +

#@one

-
} +
+} end def endnote_body_seg_tail_indent - %{
+ %{ +

#@one

-
} +
+} end def endnote_seg_body(fn='') #FIX #url construction keep within single line... BUG WATCH 200408 fn='doc' if fn.empty? #you may wish to reconsider, sends to 'doc' where no segment info - %{
+ %{ +

#@one#{@md.fnl[:pre]}#{fn}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}#@two#@three

-
} +
+} end def title_header - %{
+ %{ +
#@two <#@tag class="#@class"> #@one @@ -304,12 +314,14 @@ module SiSU_HTML_Format_type title_header end def title_header4 - %{
-

 

+ %{ +
+ -
} +
+} end def subtoc_lev one=if @one \ @@ -340,22 +352,26 @@ module SiSU_HTML_Format_type end #% para sisu def header4 - %{
+ %{ +
#{@p_num.ocn_display}

#{@p_num.name} #@format #@parablock

-
} +
+} end def header_sub @parablock.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*/m,' ') - %{
+ %{ +
#{@p_num.ocn_display} <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} #{@headname} #{@parablock} -
} +
+} end def header5 @tag,@class='p','bold' -- cgit v1.2.3 From 6759751b4a94ee4866c6f150b0245a3da7e98370 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 14 Aug 2008 19:55:27 -0400 Subject: html format, consolidate html_format file, prune later; version number bumped version number bump: is necessary to re-initialize using new css for html presentation sisu -CC --- lib/sisu/v0/html_format_css.rb | 469 ----------------------------------------- 1 file changed, 469 deletions(-) delete mode 100644 lib/sisu/v0/html_format_css.rb (limited to 'lib/sisu/v0/html_format_css.rb') diff --git a/lib/sisu/v0/html_format_css.rb b/lib/sisu/v0/html_format_css.rb deleted file mode 100644 index 1573d107..00000000 --- a/lib/sisu/v0/html_format_css.rb +++ /dev/null @@ -1,469 +0,0 @@ -# coding: utf-8 -=begin - - * Name: SiSU - - * Description: a framework for document structuring, publishing and search - - * Author: Ralph Amissah - - * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008 Ralph Amissah All Rights Reserved. - - * License: GPL 3 or later: - - SiSU, a framework for document structuring, publishing and search - - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008 Ralph Amissah - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - this program. If not, see . - - If you have Internet connection, the latest version of the GPL should be - available at these locations: - - - - - - - - * SiSU uses: - * Standard SiSU markup syntax, - * Standard SiSU meta-markup syntax, and the - * Standard SiSU object citation numbering and system - - * Hompages: - - - - * Download: - - - * Ralph Amissah - - - - ** Description: html formating, css template - -=end -module SiSU_HTML_Format_type - require "#{SiSU_lib}/html_format" - include SiSU_Viz - include SiSU_HTML_Format - class Head_toc < SiSU_HTML_Format::Head_toc - def initialize(md='') - super(md) - end - def head - %{#{doc_type} - - - #{@md.html_title} - - -#{@rdf.rdftoc} -#{@rdf.metatag_html} -#{@css.html} - -#{@vz.color_body} - - - -#{@vz.js_top}} - end - def concordance - if @md.concord_make - %{#{@vz.margin_css} -

- - Concordance - -

-#{@vz.table_close}} - else - %{#{@vz.margin_css} -#{@vz.table_close}} - end - end - def metadata - %{#{@vz.margin_css} -

- - MetaData - -

-#{@vz.table_close}} - end - end - class Head_seg < SiSU_HTML_Format::Head_seg - def initialize(md='') - super(md) - end - def head - %{#{doc_type} - - - #{@seg_name_html[@seg_name_html_tracker]} - - #{@md.html_title} - - -#{@rdf.rdfseg} -#{@rdf.metatag_html} -#{@css.html} - -#{@vz.color_body} - - - -#{@vz.js_top}} - end - def toc_metadata - @metalink=%{./#{@md.fn[:meatadata]}} - toc_metadata - end - def title_banner(title,subtitle,creator) - %{

- #{title} -

-

- #{subtitle} -

-

- #{creator} -

-

- copy @ - - #{@vz.txt_home} - -

} - end - end - class Head_scroll < SiSU_HTML_Format::Head_scroll - def initialize(md='') - super(md) - end - end - class Format_scroll < SiSU_HTML_Format::Format_text_object - def initialize(md='',*txt) - super(md,*txt) - @vz=SiSU_Env::Get_init.instance.skin - end - def endnote_body - %{ -
- -

- #@one -

-
-} - end - def header_normal - %{ -
- #{@p_num.ocn_display} - <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} - #@headname - #@parablock - -
-} - end - def heading_body - @tag,@class='p','norm' - header_normal - end - def heading_body1 - @tag,@class='h1','norm' - header_normal - end - def heading_body2 - @tag,@class='h2','norm' - header_normal - end - def heading_body3 - @tag,@class='h3','norm' - header_normal - end - def heading_body4 - @tag,@class='h4','norm' - header_normal - end - def heading_body5 - @tag,@class='h5','norm' - header_normal - end - def heading_body6 - @tag,@class='h6','norm' - header_normal - end - end - class Format_seg < SiSU_HTML_Format::Format_text_object - def initialize(md='',*txt) - super(md,*txt) - end - def navigation_toc_lev1_advert - %{#{@banner.home_button}\n -
-#@one -#@two -

} - end - def navigation_toc_lev1 - %{#{@banner.nav_toc}} - end - def navigation_toc_lev2 #change bold use css - %{

- - -
- - - #@one - -

-#{@vz.table_close}} - end - def navigation_toc_lev3 #change bold use css - %{

- - -
- - - #@one - -

-#{@vz.table_close}} - end - def navigation_toc_lev4 - %{ - -
- -

- #@one -

-#{@vz.table_close}} - end - def navigation_toc_lev5 - end - def navigation_toc_lev6 - end - def endnote_body_seg_tail #FIX - %{ -
-

- #@one -

-
-} - end - def endnote_body_seg_tail_indent - %{ -
-

- #@one -

-
-} - end - def endnote_seg_body(fn='') #FIX #url construction keep within single line... BUG WATCH 200408 - fn='doc' if fn.empty? #you may wish to reconsider, sends to 'doc' where no segment info - %{ -
-

- #@one#{@md.fnl[:pre]}#{fn}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}#@two#@three -

-
-} - end - def title_header - %{ -
- #@two -<#@tag class="#@class"> - #@one - -
-} - end - def title_header1 - @tag,@class='h1','banner' - title_header - end - def title_header2 - @tag,@class='h2','banner' - title_header - end - def title_header3 - @tag,@class='h3','banner' - title_header - end - def title_header4 - %{ -
- - -
-} - end - def subtoc_lev - one=if @one \ - and @one =~/<\/?i>|/mi - @one.gsub(/<\/?i>|/mi,'') #removes name markers from subtoc, go directly to substantive text - else @one - end - note='' - if one =~/((?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*)/m #this is a clumsy fix, revisit and address upstream - note=$1 - note.gsub!(/[\n\s]+/m,' ') - one.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*/m,' ') - one.gsub!(/ \d+<\/sup> /m,'') - end - %{<#@tag class="#@class"> - - #{one} - #{note} - } - end - def subtoc_lev5 - @tag,@class='h5','subtoc' - subtoc_lev if @one - end - def subtoc_lev6 - @tag,@class='h6','subtoc' - subtoc_lev if @one - end - #% para sisu - def header4 - %{ -
-#{@p_num.ocn_display} -

#{@p_num.name} - #@format - #@parablock -

-
-} - end - def header_sub - @parablock.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*/m,' ') - %{ -
- #{@p_num.ocn_display} - <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} #{@headname} - #{@parablock} - -
-} - end - def header5 - @tag,@class='p','bold' - header_sub - end - def header6 - @tag,@class='p','bold' - header_sub - end - def navigation_header4 - %{ -
-

- #@parablock -

-#{@vz.table_close}} - end - def navigation_header5 - %{

- #@parablock -

} - end - def navigation_header6 - %{

- #@parablock -

} - end - def navigation_center - "
#@parablock
" - end - end - class Format_toc < SiSU_HTML_Format::Format_text_object - def initialize(md='',*txt) - super(md,*txt) - end - def links_guide - #@three distinguishes between _top and external, can be used e.g. for different colour scheme - %{
  • - - #@linkname - -
  • -} - end - def lev(tag,attrib) - %{<#{tag} class="#{attrib}"> - #@one - -} - end - def lev1 - lev('h1','toc') - end - def lev2 - lev('h2','toc') - end - def lev3 - lev('h3','toc') - end - def lev4 - lev('h4','toc') - end - def lev5 - lev('h5','toc') - end - def lev6 - lev('h6','toc') - end - def lev0 #docinfo - lev('h0','toc') - end - def mini_lev1 - lev('h1','minitoc') - end - def mini_lev2 - lev('h2','minitoc') - end - def mini_lev3 - lev('h3','minitoc') - end - def mini_lev4 - lev('h4','minitoc') - end - def mini_lev5 - lev('h5','minitoc') - end - def mini_lev6 - lev('h6','minitoc') - end - def mini_lev0 #docinfo - lev('h0','minitoc') - end - end -end -__END__ -- cgit v1.2.3