aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/param.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v4/param.rb')
-rw-r--r--lib/sisu/v4/param.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/sisu/v4/param.rb b/lib/sisu/v4/param.rb
index 740a7598..f9607df2 100644
--- a/lib/sisu/v4/param.rb
+++ b/lib/sisu/v4/param.rb
@@ -1071,6 +1071,12 @@ module SiSU_Param
else nil
end
end
+ def footer
+ s=if @h['footer']
+ @h['footer'].split(/\s*;\s*/)
+ else nil
+ end
+ end
self
end
def current_publisher
@@ -1162,6 +1168,7 @@ module SiSU_Param
else
".#{@opt.lng}"
end
+ @footer_links= { left: { say: '', url: '' }, center: { say: '', url: '' } }
@rgx_image=/(?:^|[^_\\])\{(?:\s*|\~\^\s+)(\S+?\.(?:png|jpg|gif)\b)/m
@rgx_audio=/\{\s*(\S+?\.(?:mp3|ogg))/
@rgx_mm=/\{\s*(\S+?\.(?:ogg|mpeg))/ #expand and distinguish ogg
@@ -1361,6 +1368,25 @@ module SiSU_Param
? @make.manpage.section
: 1
end
+ if defined? @make.footer \
+ and @make.footer.is_a?(Array)
+ @footer_links= { left: { say: '', url: '' }, center: { say: '', url: '' } } #already set
+ @footer_links[:left]=if @make.footer[0]=~/\{.+?\}(?:(?:https?|file|ftp):\/|\.\.)\/\S+(?:\s|$)/
+ say,url=/\{\s*(.+?)\s*\}((?:(?:https?|file|ftp):\/|\.\.)\/\S+)/im.match(@make.footer[0])[1,2]
+ { say: say, url: url }
+ else
+ { say: '', url: '' }
+ end
+ @footer_links[:center]=if @make.footer[1]=~/\{.+?\}(?:(?:https?|file|ftp):\/|\.\.)\/\S+(?:\s|$)/
+ say,url=/\{\s*(.+?)\s*\}((?:(?:https?|file|ftp):\/|\.\.)\/\S+)/im.match(@make.footer[1])[1,2]
+ { say: say, url: url }
+ else
+ { say: '', url: '' }
+ end
+ @footer_links
+ else #already set
+ @footer_links= { left: { say: '', url: '' }, center: { say: '', url: '' } }
+ end
if defined? @make.home_button_text \
and @make.home_button_text.is_a?(Array)
a_idx=0