Sha256: dc4066218986d5490ee81a3fd1167223f7838146769c0aed1b0486e146049169
Contents?: true
Size: 679 Bytes
Versions: 3
Compression:
Stored size: 679 Bytes
Contents
# theme_online.rb: choice theme from online repository on tDiary.org # # Copyright (C) 2014 by TADA Tadashi <t@tdtds.jp> # You can distribute and/or modify it under GPL2 or any later version. # require 'json' require 'open-uri' def theme_list_online(list) begin online_list = JSON.load(open('http://theme.tdiary.org/themes.json', &:read))['themes'] list + online_list.keys.map do |t| title = online_list[t]['title'] label = t == title ? '' : " (#{title})" ["online/#{t}", "#{t}#{label}"] end rescue @logger.error "could not get theme list from online: #$!" list end end def theme_url_online(theme) "http://theme.tdiary.org/#{h theme}/#{h theme}.css" end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tdiary-4.1.1 | misc/plugin/theme_online.rb |
tdiary-4.1.0 | misc/plugin/theme_online.rb |
tdiary-4.1.0.20141126 | misc/plugin/theme_online.rb |