# encoding: utf-8 =begin * Name: SiSU * Description: a framework for document structuring, publishing and search * Author: Ralph Amissah * Copyright: (C) 1997 - 2012, Ralph Amissah, All Rights Reserved. * License: GPL 3 or later: SiSU, a framework for document structuring, publishing and search Copyright (C) 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 include SiSU_Viz class ParagraphNumber def initialize(md,ocn) @md,@ocn=md,ocn.to_s @ocn ||='' vz=SiSU_Env::GetInit.instance.skin @skin_no_ocn=if defined? vz.ocn_display_off \ and vz.ocn_display_off==true true else false end end def ocn_display if @md.markup.inspect =~/no_ocn/ \ or @md.opt.mod.inspect =~/--no-ocn/ \ or @skin_no_ocn ocn_class='ocn_off' @ocn.gsub(/^(\d+|)$/, %{ }) elsif @ocn.to_i==0 @ocn.gsub(/^(\d+|)$/, %{ }) else ocn_class='ocn' @ocn.gsub(/^(\d+|)$/, %{\\1}) end end def name %{} end def id #w3c? "tidy" complains about numbers as identifiers ! annoying %{id="o#{@ocn}"} end def goto %{} end end class HeadInformation require_relative 'css' # css.rb require_relative 'shared_xml' # shared_xml.rb include SiSU_Viz attr_reader :md,:rdf,:vz def initialize(md) @md=md # DublinCore 1 - title @vz=SiSU_Env::GetInit.instance.skin @seg_name_html=(SiSU_HTML::Source::Seg.new.seg_name_html || []) @seg_name_html_tracker=(SiSU_HTML::Source::Seg.new.seg_name_html_tracker || []) @metalink='#metadata' @tocband_scroll,@tocband_segtoc=nil,nil @stylesheet=SiSU_Style::CSS_HeadInfo.new(md).stylesheet @o_str ||=SiSU_Env::OutputStructure.new(md).output_dir_structure @index='index' @toc="#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}" end def url_path_image_sys (@o_str.dump_or_redirect?) \ ? './image' : "#{Xx[:html_relative2]}_sisu/image_sys" end def icon def up 'arrow_up_red.png' end def next 'arrow_next_red.png' end def previous 'arrow_prev_red.png' end def dot_clear 'dot_clear.png' end def dot_white 'dot_white.png' end def dot dot_white end self end def png_nav def toc %{} end def pre %{} end def nxt %{} end def dot_toc %{} end def dot_pre %{} end def dot_nxt %{} end self end def doc_types #used in toc & seg_nav_band scroll=seg='' wgt=SiSU_HTML_Format::Widget.new(@md) %{ #{wgt.manifest} #{wgt.search} } end def rdf SiSU_XML_Tags::RDF.new(md) end def doc_type %{ \n} end def table_close %{ #{@vz.table_close}} end def buttons_home %{ #{@vz.banner_home_and_index_buttons} } end def copyat %{#{@vz.paragraph_font_tiny}copy @ #{@vz.txt_home} } end def html_close #moved %{