diff options
Diffstat (limited to 'lib/sisu/v0/html_format.rb')
-rw-r--r-- | lib/sisu/v0/html_format.rb | 111 |
1 files changed, 59 insertions, 52 deletions
diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb index 0899447e..442f2b19 100644 --- a/lib/sisu/v0/html_format.rb +++ b/lib/sisu/v0/html_format.rb @@ -1,50 +1,58 @@ =begin - * Name: SiSU information Structuring Universe - Structured information, Serialized Units + + * Name: SiSU + + * Description: a framework for document structuring, publishing and search + * Author: Ralph Amissah - * http://www.jus.uio.no/sisu - * http://www.jus.uio.no/sisu/SiSU/download.html - * Description: base formatting template for html generation + * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007 Ralph Amissah All Rights Reserved. - * Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Ralph Amissah + * License: GPL 3 or later: - * License: GPL 2 or later + SiSU, a framework for document structuring, publishing and search - Summary of GPL 2 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007 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 2 of the License, or (at your option) - any later version. + 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. + 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + You should have received a copy of the GNU General Public License along with + this program. If not, see <http://www.gnu.org/licenses/>. - If you have Internet connection, the latest version of the GPL should be - available at these locations: - http://www.fsf.org/licenses/gpl.html - http://www.gnu.org/copyleft/gpl.html - http://www.jus.uio.no/sisu/gpl2.fsf + If you have Internet connection, the latest version of the GPL should be + available at these locations: + <http://www.fsf.org/licenses/gpl.html> + <http://www.gnu.org/copyleft/gpl.html> + <http://www.jus.uio.no/sisu/gpl.fsf> - SiSU was first released to the public on January 4th 2005 + * SiSU uses: + * Standard SiSU markup syntax, + * Standard SiSU meta-markup syntax, and the + * Standard SiSU object citation numbering and system - SiSU uses: + * Hompages: + <http://www.jus.uio.no/sisu> + <http://www.sisudoc.org> - * Standard SiSU markup syntax, - * Standard SiSU meta-markup syntax, and the - * Standard SiSU object citation numbering and system + * Download: + <http://www.jus.uio.no/sisu/SiSU/download.html> - © Ralph Amissah 1997, current 2007. - All Rights Reserved. + * Ralph Amissah + <ralph@amissah.com> + <ralph.amissah@gmail.com> + + ** Description: base formatting template for html generation - * Ralph Amissah: ralph@amissah.com - ralph.amissah@gmail.com =end module SiSU_HTML_Format require "#{SiSU_lib}/param" @@ -212,12 +220,12 @@ module SiSU_HTML_Format def pdf pdf=if @md.programs[:pdf] and @cf_defaults.cf_0 =~/p/ %{ -<td align="center" bgcolor=#{@vz.color_band2} border="0"> +<td align="center" bgcolor=#{@vz.color_band2}> <a href="#{@md.fn[:pdf_p]}" target="_top" #{@vz.js_portrait}> #{@vz.nav_txt_pdf_portrait} </a> </td> -<td align="center" bgcolor=#{@vz.color_band2} border="0"> +<td align="center" bgcolor=#{@vz.color_band2}> <a href="#{@md.fn[:pdf_l]}" target="_top" #{@vz.js_landscape}> #{@vz.nav_txt_pdf_landscape} </a> @@ -238,8 +246,8 @@ module SiSU_HTML_Format end end def concordance(text) - if @md.concord_make or @cf_defaults.cf_0 =~/w/ - %{<td align="center" bgcolor=#{@vz.color_band2} border="0"> + if @md.concord_make and @md.wc_words < 300000 #max word count for display of concordance here as would now be a large file + %{<td align="center" bgcolor=#{@vz.color_band2}> <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}> #{text} </a> @@ -308,7 +316,7 @@ WOK end def make_seg_scroll_pdf wgt=Widget.new(@md) - scroll=%{<td align="center" bgcolor=#{@vz.color_band2} border="0"> + scroll=%{<td align="center" bgcolor=#{@vz.color_band2}> #{@vz.nav_txt_doc_link} </td> } @@ -520,6 +528,7 @@ WOK </table> <p> </p> #{@vz.credits_splash} +#{@vz.credits_sisu} <a name="bottom" id="bottom"></a> <a name="down" id="down"></a> <a name="end" id="end"></a> @@ -531,6 +540,7 @@ WOK nav=scroll_head_navigation_band %{#{nav} #{@vz.credits_splash} +#{@vz.credits_sisu} <a name="bottom" id="bottom"></a> <a name="down" id="down"></a> <a name="end" id="end"></a> @@ -542,6 +552,7 @@ WOK #nav=scroll_head_navigation_band %{<p> </p> #{@vz.credits_splash} +#{@vz.credits_sisu} <a name="bottom" id="bottom"></a> <a name="down" id="down"></a> <a name="end" id="end"></a> @@ -620,6 +631,7 @@ WOK #{@vz.paragraph_txt} <center> #{@vz.credits_splash} + #{@vz.credits_sisu} </center> #{@vz.margin_num} #{@vz.table_close} @@ -886,6 +898,7 @@ WOK def credit %{<br/> #{@vz.credits_splash} +#{@vz.credits_sisu} <a name="bottom" id="bottom"></a> <a name="down" id="down"></a> <a name="end" id="end"></a> @@ -946,41 +959,35 @@ WOK end @vz=SiSU_Env::Get_init.instance.skin end - def para_form # regular paragraphs shaped here + def para_form(tag,attrib) # regular paragraphs shaped here ul=ulc='' ul,ulc="<ul>\n ","\n </ul>" if @tag =~/li/ %{#{@vz.margin_css} - #{ul}<#@tag class="#@class" #{@p_num.id}>#{@p_num.name} + #{ul}<#{tag} class="#{attrib}" #{@p_num.id}>#{@p_num.name} #@parablock - </#@tag>#{ulc} + </#{tag}>#{ulc} #{@vz.margin_num_css} #{@p_num.ocn_display} #{@vz.table_close} } end def para - @tag,@class='p','norm' - para_form + para_form('p','norm') end def code - @tag,@class='p','code' - para_form + para_form('p','code') end def center - @tag,@class='p','center' - para_form + para_form('p','center') end def bold - @tag,@class='p','bold' - para_form + para_form('p','bold') end def bullet - @tag,@class='li','bullet' - para_form + para_form('li','bullet') end def format(tag,atrib) - @tag,@class=tag,atrib - para_form + para_form(tag,atrib) end def dl "<dl><b>#@one</b> #@two</dl>" |