aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/current/css.rb18
-rw-r--r--lib/sisu/current/html_format.rb2
-rw-r--r--lib/sisu/develop/ao_idx.rb18
-rw-r--r--lib/sisu/develop/css.rb18
-rw-r--r--lib/sisu/develop/html.rb10
-rw-r--r--lib/sisu/develop/html_format.rb8
-rw-r--r--lib/sisu/develop/html_lite_shared.rb3
-rw-r--r--lib/sisu/develop/html_minitoc.rb5
8 files changed, 35 insertions, 47 deletions
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
- %{<label class="ocn">#{@ocn}</label>}
+ %{<label class="ocn"><a href="##{@ocn_html_identifier}#{@ocn}" class="lnkocn">#{@ocn}</a></label>}
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 href="#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}">#{a[:range]}</a>, }
+ %{<a href="#{a[:seg]}.html##{a[:ocn]}">#{a[:range]}</a>, }
idx[:xhtml][@q]=
idx[:xhtml][@q] +
%{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:range]}</a>, }
@@ -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 href="#{a[:seg]}.html##{@ocn_html_identifier}#{a[:ocn]}">#{a[:ocn]}</a>, }
+ %{<a href="#{a[:seg]}.html##{a[:ocn]}">#{a[:ocn]}</a>, }
idx[:xhtml][@q]=
idx[:xhtml][@q] +
%{<a href="#{a[:seg]}.xhtml#o#{a[:ocn]}">#{a[:ocn]}</a>, }
@@ -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] +
- %{<a href="#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}">#{z[:range]}</a>, }
+ %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:range]}</a>, }
idx[:xhtml][@q]=
idx[:xhtml][@q] +
%{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:range]}</a>, }
@@ -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] +
- %{<a href="#{z[:seg]}.html##{@ocn_html_identifier}#{z[:ocn]}">#{z[:ocn]}</a>, }
+ %{<a href="#{z[:seg]}.html##{z[:ocn]}">#{z[:ocn]}</a>, }
idx[:xhtml][@q]=
idx[:xhtml][@q] +
%{<a href="#{z[:seg]}.xhtml#o#{z[:ocn]}">#{z[:ocn]}</a>, }
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] << '<br>'
- %{<b><a href="##{@ocn_html_identifier}#{dob.ocn}">#{linkname}</a></b>}
+ %{<b><a href="##{dob.ocn}">#{linkname}</a></b>}
end
txt_obj={ txt: title }
format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj)
@@ -419,7 +417,7 @@ WOK
end
else
@@toc[:scr] << '<br>'
- %{<b><a href="##{@ocn_html_identifier}#{dob.ocn}">#{linkname}</a></b>}
+ %{<b><a href="##{dob.ocn}">#{linkname}</a></b>}
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=%{ <a href="#{f}##{@ocn_html_identifier}#{ocn}">
+ lnk_n_txt=%{ <a href="#{f}##{ocn}">
#{linkname}
</a>}
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=%{ <a href="#{f}##{@ocn_html_identifier}#{ocn}">
+ lnk_n_txt=%{ <a href="#{f}##{ocn}">
#{linkname}
</a>}
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
- %{<label class="ocn">#{@ocn}</label>}
+ %{<label class="ocn"><a href="##{@ocn}" class="lnkocn">#{@ocn}</a></label>}
end
else
''
@@ -89,7 +88,7 @@ module SiSU_HTML_Format
end
def goto
(@ocn==nil || @ocn.empty?) \
- ? '' : %{<a href="##{@ocn_html_identifier}#{@ocn}">}
+ ? '' : %{<a href="##{@ocn}">}
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>|<a\s+name="\S+?">/mi
@txt.gsub(/<\/?i>|<a\s+name="\S+?">/mi,'') #removes name markers from subtoc, go directly to substantive text
@@ -1161,7 +1159,7 @@ WOK
gsub(/<a[\s]+name="-\d+"[\s]+href="#_\d+">&nbsp;<sup>\d+<\/sup>&nbsp;/m,'')
end
%{<#{tag} class="#{attrib}">
- <a href="##{@ocn_html_identifier}#{@ocn}"><i>#{txt}</i></a> #{note}
+ <a href="##{@ocn}"><i>#{txt}</i></a> #{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
%{<p class="#{h[:class]}" type="#{h[:type]}">#{h[:txt]}</a></p>\n} << "\n"
end
def lev_toc_hname
- %{<p class="toc#{@lv}" header="#{@hname}"><a href="##{@ocn_html_identifier}#{@ocn}">#{@txt}</a></p>\n} #<< "\n"
+ %{<p class="toc#{@lv}" header="#{@hname}"><a href="##{@ocn}">#{@txt}</a></p>\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 name="h?\d.*?">(.+?)<\/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=%{ <a href="#{f}##{@ocn_html_identifier}#{txt.ocn}">
+ lnk_n_txt=%{ <a href="#{f}##{txt.ocn}">
#{txt.obj}
</a>}
txt_obj={ txt: lnk_n_txt }
@@ -218,7 +217,7 @@
fn: @@seg_url,
}
f=@md.file.base_filename.html_seg(fnh)
- lnk_n_txt=%{ <a href="#{f}##{@ocn_html_identifier}#{txt.ocn}">
+ lnk_n_txt=%{ <a href="#{f}##{txt.ocn}">
#{txt.obj}
</a>}
txt_obj={ txt: lnk_n_txt }