Sha256: ea7dda0a024d0a9b9df4f46f4c7edbc07deed0d1d368d7a171fdfe630b35e7f2
Contents?: true
Size: 970 Bytes
Versions: 9
Compression:
Stored size: 970 Bytes
Contents
# Custom code for 'links' widget require 'liveblog' class ::RuneBlog::Widget class Links Type = "links" def initialize(repo) @blog = repo end def build input = "list.data" lines = File.readlines(input) data = lines.map! {|x| x.chomp.split(/, */, 3) } css = "* { font-family: verdana }" card_title = "External Links" # FIXME File.open("#{Type}-main.html", "w") do |f| _html_body(f, css) do f.puts "<h1>#{card_title}</h1><br><hr>" url_ref = nil data.each do |url, frameable, title| url_ref = (frameable == "yes") ? "href = '#{url}'" : _blank(url) css = "color: #8888FF; text-decoration: none; font-size: 21px" # ; font-family: verdana" f.puts %[<a style="#{css}" #{url_ref}>#{title}</a> <br>] end end end # remember -card also end def edit_menu end def refresh end end end
Version data entries
9 entries across 9 versions & 1 rubygems