From 881e80ccce53136652b269aa34b6c7cb6ceb34ca Mon Sep 17 00:00:00 2001
From: Ralph Amissah
Date: Wed, 7 Jan 2015 19:04:46 -0500
Subject: c&d: html, ocn link back to self reinstated
* requested, used as quick means to get object url reference link
* d: removed ocn_html_identifier variable, unnecessary in html5
(requirement previously forced by html4)
---
lib/sisu/current/css.rb | 18 ++++++++----------
lib/sisu/current/html_format.rb | 2 +-
lib/sisu/develop/ao_idx.rb | 18 ++++++++----------
lib/sisu/develop/css.rb | 18 ++++++++----------
lib/sisu/develop/html.rb | 10 ++++------
lib/sisu/develop/html_format.rb | 8 +++-----
lib/sisu/develop/html_lite_shared.rb | 3 +--
lib/sisu/develop/html_minitoc.rb | 5 ++---
8 files changed, 35 insertions(+), 47 deletions(-)
(limited to 'lib')
diff --git a/lib/sisu/current/css.rb b/lib/sisu/current/css.rb
index 8e57abba..1832b66c 100644
--- a/lib/sisu/current/css.rb
+++ b/lib/sisu/current/css.rb
@@ -355,16 +355,6 @@ WOK
color: #000000;
background-color: #f9f9aa;
}
- a.lnkocn:link {
- color: #777777;
- text-decoration: none;
- }
-/*
- a:hover {
- border-bottom: 2px solid #777777;
- background-color: #fff3b6;
- }
-*/
a:hover img {
background-color: #ffffff;
}
@@ -372,6 +362,14 @@ WOK
color: #003399;
text-decoration: underline;
}
+ a.lnkocn:link {
+ color: #777777;
+ text-decoration: none;
+ }
+ a.lnkocn:visited {
+ color: #555555;
+ text-decoration: none;
+ }
div {
margin-left: 0;
margin-right: 0;
diff --git a/lib/sisu/current/html_format.rb b/lib/sisu/current/html_format.rb
index af9b9c3c..8f83219f 100644
--- a/lib/sisu/current/html_format.rb
+++ b/lib/sisu/current/html_format.rb
@@ -69,7 +69,7 @@ module SiSU_HTML_Format
or @ocn.empty?
''
else
- %{}
+ %{}
end
else
''
diff --git a/lib/sisu/develop/ao_idx.rb b/lib/sisu/develop/ao_idx.rb
index cd24854f..80dca601 100644
--- a/lib/sisu/develop/ao_idx.rb
+++ b/lib/sisu/develop/ao_idx.rb
@@ -61,8 +61,6 @@ module SiSU_AO_BookIndex
@rgx_idx=/#{Mx[:idx_o]}(?:.+?)#{Mx[:idx_c]}\s*/
@rgx_idx_ocn_seg=/(.+?)~(\d+)~(\S+)/
@rgx_idx_ocn=/(.+?)~(\d+)/
- @ocn_html_identifier=
- SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
@env ||=SiSU_Env::InfoEnv.new(@md.fns)
end
def indexing_song
@@ -261,13 +259,13 @@ module SiSU_AO_BookIndex
if a[:range]
idx[:sst_rel_html_seg][@o]=
idx[:sst_rel_html_seg][@o] +
- %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}/#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}#{Mx[:rel_c]}, }
+ %{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}/#{a[:seg]}.html##{a[:ocn]}#{Mx[:rel_c]}, }
idx[:sst_rel][@t]=
idx[:sst_rel][@t] +
%{#{Mx[:lnk_o]}#{a[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, }
idx[:html][@q]=
idx[:html][@q] +
- %{#{a[:range]}, }
+ %{#{a[:range]}, }
idx[:xhtml][@q]=
idx[:xhtml][@q] +
%{#{a[:range]}, }
@@ -275,13 +273,13 @@ module SiSU_AO_BookIndex
elsif a[:ocn]
idx[:sst_rel_html_seg][@o]=
idx[:sst_rel_html_seg][@o] +
- %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}#{Mx[:rel_c]}, }
+ %{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:seg]}.html##{a[:ocn]}#{Mx[:rel_c]}, }
idx[:sst_rel][@t]=
idx[:sst_rel][@t] +
%{#{Mx[:lnk_o]}#{a[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{a[:ocn]}#{Mx[:rel_c]}, }
idx[:html][@q]=
idx[:html][@q] +
- %{#{a[:ocn]}, }
+ %{#{a[:ocn]}, }
idx[:xhtml][@q]=
idx[:xhtml][@q] +
%{#{a[:ocn]}, }
@@ -313,13 +311,13 @@ module SiSU_AO_BookIndex
if z[:range]
idx[:sst_rel_html_seg][@o]=
idx[:sst_rel_html_seg][@o] +
- %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}#{Mx[:rel_c]}, }
+ %{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, }
idx[:sst_rel][@t]=
idx[:sst_rel][@t] +
%{#{Mx[:lnk_o]}#{z[:range]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, }
idx[:html][@q]=
idx[:html][@q] +
- %{#{z[:range]}, }
+ %{#{z[:range]}, }
idx[:xhtml][@q]=
idx[:xhtml][@q] +
%{#{z[:range]}, }
@@ -327,13 +325,13 @@ module SiSU_AO_BookIndex
elsif z[:ocn]
idx[:sst_rel_html_seg][@o]=
idx[:sst_rel_html_seg][@o] +
- %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}#{Mx[:rel_c]}, }
+ %{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:seg]}.html##{z[:ocn]}#{Mx[:rel_c]}, }
idx[:sst_rel][@t]=
idx[:sst_rel][@t] +
%{#{Mx[:lnk_o]}#{z[:ocn]}#{Mx[:lnk_c]}#{Mx[:rel_o]}#{z[:ocn]}#{Mx[:rel_c]}, }
idx[:html][@q]=
idx[:html][@q] +
- %{#{z[:ocn]}, }
+ %{#{z[:ocn]}, }
idx[:xhtml][@q]=
idx[:xhtml][@q] +
%{#{z[:ocn]}, }
diff --git a/lib/sisu/develop/css.rb b/lib/sisu/develop/css.rb
index b32bfc50..19c87c07 100644
--- a/lib/sisu/develop/css.rb
+++ b/lib/sisu/develop/css.rb
@@ -355,16 +355,6 @@ WOK
color: #000000;
background-color: #f9f9aa;
}
- a.lnkocn:link {
- color: #777777;
- text-decoration: none;
- }
-/*
- a:hover {
- border-bottom: 2px solid #777777;
- background-color: #fff3b6;
- }
-*/
a:hover img {
background-color: #ffffff;
}
@@ -372,6 +362,14 @@ WOK
color: #003399;
text-decoration: underline;
}
+ a.lnkocn:link {
+ color: #777777;
+ text-decoration: none;
+ }
+ a.lnkocn:visited {
+ color: #555555;
+ text-decoration: none;
+ }
div {
margin-left: 0;
margin-right: 0;
diff --git a/lib/sisu/develop/html.rb b/lib/sisu/develop/html.rb
index 737d532e..2386394f 100644
--- a/lib/sisu/develop/html.rb
+++ b/lib/sisu/develop/html.rb
@@ -261,8 +261,6 @@ module SiSU_HTML
@@firstseg=nil
def initialize(md=nil,data='')
@data,@md=data,md
- @ocn_html_identifier=
- SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
@tell=SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set]) if @md
end
def songsheet #extracts toc for scroll & seg
@@ -377,7 +375,7 @@ WOK
title=if dob.ocn ==0 then linkname
else
@@toc[:scr] << '
'
- %{#{linkname}}
+ %{#{linkname}}
end
txt_obj={ txt: title }
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
@@ -419,7 +417,7 @@ WOK
end
else
@@toc[:scr] << '
'
- %{#{linkname}}
+ %{#{linkname}}
end
txt_obj={ txt: title }
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
@@ -536,7 +534,7 @@ WOK
}
f=@md.file.base_filename.html_seg(fnh)
p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
- lnk_n_txt=%{
+ lnk_n_txt=%{
#{linkname}
}
txt_obj={ txt: lnk_n_txt }
@@ -561,7 +559,7 @@ WOK
}
f=@md.file.base_filename.html_seg(fnh)
p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,ocn)
- lnk_n_txt=%{
+ lnk_n_txt=%{
#{linkname}
}
txt_obj={ txt: lnk_n_txt }
diff --git a/lib/sisu/develop/html_format.rb b/lib/sisu/develop/html_format.rb
index 5d7a4a7d..1692e452 100644
--- a/lib/sisu/develop/html_format.rb
+++ b/lib/sisu/develop/html_format.rb
@@ -60,7 +60,6 @@ module SiSU_HTML_Format
def initialize(md,ocn)
@md,@ocn=md,ocn.to_s
@ocn ||=''
- @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
@make=SiSU_Env::ProcessingSettings.new(@md)
end
def ocn_display
@@ -69,7 +68,7 @@ module SiSU_HTML_Format
or @ocn.empty?
''
else
- %{}
+ %{}
end
else
''
@@ -89,7 +88,7 @@ module SiSU_HTML_Format
end
def goto
(@ocn==nil || @ocn.empty?) \
- ? '' : %{}
+ ? '' : %{}
end
end
class HeadInformation
@@ -1147,7 +1146,6 @@ WOK
end
def subtoc_lev(tag,attrib)
@txt=clean(@txt)
- @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
txt=if @txt \
and @txt =~/<\/?i>|/mi
@txt.gsub(/<\/?i>|/mi,'') #removes name markers from subtoc, go directly to substantive text
@@ -1161,7 +1159,7 @@ WOK
gsub(/ \d+<\/sup> /m,'')
end
%{<#{tag} class="#{attrib}">
- #{txt} #{note}
+ #{txt} #{note}
#{tag}>}
end
def subtoc_lev5
diff --git a/lib/sisu/develop/html_lite_shared.rb b/lib/sisu/develop/html_lite_shared.rb
index 65c0537d..5c74fa85 100644
--- a/lib/sisu/develop/html_lite_shared.rb
+++ b/lib/sisu/develop/html_lite_shared.rb
@@ -75,7 +75,6 @@ module SiSU_FormatShared
else @@hname
end
@tab="\t"
- @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
@@tablehead,@@tablefoot=[],[]
@env=SiSU_Env::InfoEnv.new(@md.fns)
@base_url="#{@env.url.root}/#{@md.fnb}/#{@hname}.html"
@@ -204,7 +203,7 @@ GSUB
%{#{h[:txt]}
\n} << "\n"
end
def lev_toc_hname
- %{#{@txt}
\n} #<< "\n"
+ %{#{@txt}
\n} #<< "\n"
end
def lev_toc
h={ txt: txt, class: "toc#{@lv}", type: 'toc' }
diff --git a/lib/sisu/develop/html_minitoc.rb b/lib/sisu/develop/html_minitoc.rb
index 3cb87577..96da06d7 100644
--- a/lib/sisu/develop/html_minitoc.rb
+++ b/lib/sisu/develop/html_minitoc.rb
@@ -64,7 +64,6 @@
def initialize(md,data)
@md,@data=md,data
@pat_strip_heading_name=/(.+?)<\/a>/
- @ocn_html_identifier=SiSU_Env::ProcessingSettings.new(@md).ocn_html_identifier
@tell=SiSU_Screen::Ansi.new(@md.opt.act[:color_state][:set]) if @md
end
def songsheet
@@ -199,7 +198,7 @@
fn: @@seg_url,
}
f=@md.file.base_filename.html_seg(fnh)
- lnk_n_txt=%{
+ lnk_n_txt=%{
#{txt.obj}
}
txt_obj={ txt: lnk_n_txt }
@@ -218,7 +217,7 @@
fn: @@seg_url,
}
f=@md.file.base_filename.html_seg(fnh)
- lnk_n_txt=%{
+ lnk_n_txt=%{
#{txt.obj}
}
txt_obj={ txt: lnk_n_txt }
--
cgit v1.2.3