runeblog 0.2.61 → 0.2.62
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/empty_view/themes/standard/widgets/pinned/pinned.rb +1 -3
- data/lib/liveblog.rb +24 -22
- data/lib/runeblog_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe49e283ad5e20a9b78d6aba39cd7a8ac16140808e99e58976568143390c1656
|
4
|
+
data.tar.gz: 433a53274f650079da5854ef70a6b539ec4c558dcab0f02da495eea91b537231
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b66d544078f5bb178c54aa8eb9bf42e0b74ddb85755ff3d9e41a4cc7a34d2dd7a17568d7a0ad9302817a9aa5453ee9abe77ba036950b98e5301b2eef3f7fd6b
|
7
|
+
data.tar.gz: cc8b4d721b32056750c855e27861c01c6bc4e229c03704756a4f99a8549c98bdb9c887c8fd2f91b5a7fce6f4adc47d8b3d594290cf82357c7736951f4ce8a4ff
|
@@ -7,9 +7,7 @@ class ::RuneBlog::Widget
|
|
7
7
|
def initialize(repo)
|
8
8
|
@blog = repo
|
9
9
|
@datafile = "list.data"
|
10
|
-
# f = File.new("/tmp/mehhh", "w")
|
11
10
|
@lines = File.exist?(@datafile) ? File.readlines(@datafile) : []
|
12
|
-
# f.puts #{@lines.inspect} in #{Dir.pwd}"
|
13
11
|
File.open("/tmp/mehhh", "w") {|f| f.puts "#{@lines.inspect} in #{Dir.pwd}" }
|
14
12
|
end
|
15
13
|
|
@@ -50,7 +48,7 @@ class ::RuneBlog::Widget
|
|
50
48
|
mainfile = "#{tag}-main"
|
51
49
|
File.open("#{mainfile}.html", "w") do |f|
|
52
50
|
_html_body(f, css) do
|
53
|
-
f.puts "<!-- #{@lines.inspect} in #{Dir.pwd} -->"
|
51
|
+
f.puts "<!-- #{@lines.inspect} in #{Dir.pwd} -->"
|
54
52
|
f.puts "<h1>#{card_title}</h1><br><hr>"
|
55
53
|
@links.each do |title, file|
|
56
54
|
title = title.gsub(/\\/, "") # kludge
|
data/lib/liveblog.rb
CHANGED
@@ -480,7 +480,18 @@ def pinned_rebuild
|
|
480
480
|
widget = code.new(@blog)
|
481
481
|
widget.build
|
482
482
|
end
|
483
|
-
_include_file wtag/"pinned-card.html"
|
483
|
+
# _include_file wtag/"pinned-card.html"
|
484
|
+
end
|
485
|
+
end
|
486
|
+
end
|
487
|
+
|
488
|
+
def _handle_standard_widget(tag)
|
489
|
+
wtag = :widgets/tag
|
490
|
+
code = _load_local(tag)
|
491
|
+
if code
|
492
|
+
Dir.chdir(wtag) do
|
493
|
+
widget = code.new(@blog)
|
494
|
+
widget.build
|
484
495
|
end
|
485
496
|
end
|
486
497
|
end
|
@@ -494,7 +505,7 @@ def sidebar
|
|
494
505
|
|
495
506
|
_out %[<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">]
|
496
507
|
|
497
|
-
standard = %w[pinned pages links]
|
508
|
+
standard = %w[pinned pages links news]
|
498
509
|
|
499
510
|
_body do |token|
|
500
511
|
tag = token.chomp.strip.downcase
|
@@ -502,27 +513,18 @@ def sidebar
|
|
502
513
|
raise "Can't find #{wtag}" unless Dir.exist?(wtag)
|
503
514
|
tcard = "#{tag}-card.html"
|
504
515
|
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
516
|
+
case
|
517
|
+
when standard.include?(tag)
|
518
|
+
_handle_standard_widget(tag)
|
519
|
+
when tag == "ad"
|
520
|
+
num = rand(1..4)
|
521
|
+
img = "widgets/ad/ad#{num}.png"
|
522
|
+
src, dst = img, @root/:views/@view_name/"remote/widgets/ad/"
|
523
|
+
system!("cp #{src} #{dst}") # , show: true)
|
524
|
+
File.open(wtag/"vars.lt3", "w") do |f|
|
525
|
+
f.puts ".set ad.image = #{img}"
|
511
526
|
end
|
512
|
-
|
513
|
-
_include_file wtag/tcard
|
514
|
-
next
|
515
|
-
end
|
516
|
-
|
517
|
-
if tag == "ad"
|
518
|
-
num = rand(1..4)
|
519
|
-
img = "widgets/ad/ad#{num}.png"
|
520
|
-
src, dst = img, @root/:views/@view_name/"remote/widgets/ad/"
|
521
|
-
system!("cp #{src} #{dst}") # , show: true)
|
522
|
-
File.open(wtag/"vars.lt3", "w") do |f|
|
523
|
-
f.puts ".set ad.image = #{img}"
|
524
|
-
end
|
525
|
-
xlate cwd: wtag, src: tag, dst: tcard, force: true # , deps: depend # , debug: true
|
527
|
+
xlate cwd: wtag, src: tag, dst: tcard, force: true # , deps: depend # , debug: true
|
526
528
|
end
|
527
529
|
|
528
530
|
_include_file wtag/tcard
|
data/lib/runeblog_version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runeblog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.62
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|