runeblog 0.1.96 → 0.1.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/helpers-blog.rb +6 -2
- data/lib/liveblog.rb +23 -11
- data/lib/runeblog.rb +1 -1
- data/lib/runeblog_version.rb +1 -1
- data/runeblog.gemspec +1 -1
- data/themes/standard/navbar/contact.html +6 -0
- data/themes/standard/widgets/README +4 -0
- data/themes/standard/widgets/pages/README +2 -0
- data/themes/standard/widgets/pages/disclaim.lt3 +6 -0
- data/themes/standard/widgets/pages/faq.lt3 +6 -0
- data/themes/standard/widgets/pages/generated.lt3 +4 -0
- data/themes/standard/widgets/pages/lifestory.lt3 +6 -0
- data/themes/standard/widgets/pages/like-dislike.lt3 +6 -0
- data/themes/standard/widgets/pages/list.data +4 -0
- data/themes/standard/widgets/pages/main.html +9 -0
- data/themes/standard/widgets/pages/main.lt3 +18 -0
- metadata +15 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5eca7ee5a581fc5af8c648cd0dce750f120753d30f550f49bdd5053196fd79ad
|
4
|
+
data.tar.gz: 84bcf2f35639ea08c61b9ed4171e97a7502ac71fd48fe2d1967efac0c7d62fa8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a3810d114c88ef15c583a811c5dda94d4722b6b051f63a683dafae31c06e14be0fe8cb65bc939fee9545a53acd5977c39e68df694241a205918263f73f6bf56
|
7
|
+
data.tar.gz: 9aa1d0e162b1c7c1ecaec21530b17596b62aff75e69c0cf04ac7b341e5b0b2c5bf04ccb2c4bf609d42f42af4e24b8ce36c4448f823bf9439e7f3ec2b8a505f95
|
data/lib/helpers-blog.rb
CHANGED
@@ -18,9 +18,13 @@ module RuneBlog::Helpers
|
|
18
18
|
return false
|
19
19
|
end
|
20
20
|
|
21
|
-
def livetext(src, dst)
|
21
|
+
def livetext(src, dst=nil)
|
22
22
|
src << ".lt3" unless src.end_with?(".lt3")
|
23
|
-
|
23
|
+
if dst
|
24
|
+
dst << ".html" unless dst.end_with?(".html")
|
25
|
+
else
|
26
|
+
dst = src.sub(/.lt3$/, "")
|
27
|
+
end
|
24
28
|
return unless stale?(src, dst)
|
25
29
|
system("livetext #{src} >#{dst}")
|
26
30
|
end
|
data/lib/liveblog.rb
CHANGED
@@ -368,8 +368,11 @@ def sidebar
|
|
368
368
|
_out %[<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">]
|
369
369
|
_body do |line|
|
370
370
|
tag = line.chomp.strip
|
371
|
-
|
372
|
-
|
371
|
+
source = "sidebar/#{tag.downcase}.lt3"
|
372
|
+
unless File.exist?(source)
|
373
|
+
source = "widgets/#{tag.downcase}.lt3"
|
374
|
+
end
|
375
|
+
_include_file source
|
373
376
|
end
|
374
377
|
_out %[</div>]
|
375
378
|
end
|
@@ -378,8 +381,11 @@ def sidebar!
|
|
378
381
|
_out %[<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">]
|
379
382
|
_args do |line|
|
380
383
|
tag = line.chomp.strip
|
381
|
-
|
382
|
-
|
384
|
+
source = "sidebar/#{tag.downcase}.lt3"
|
385
|
+
unless File.exist?(source)
|
386
|
+
source = "widgets/#{tag.downcase}/main.lt3"
|
387
|
+
end
|
388
|
+
_include_file source
|
383
389
|
end
|
384
390
|
_out %[</div>]
|
385
391
|
end
|
@@ -520,16 +526,21 @@ def card_iframe
|
|
520
526
|
_card_generic(card_title: title, middle: middle, extra: "bg-dark text-white")
|
521
527
|
end
|
522
528
|
|
529
|
+
def _main(url)
|
530
|
+
%[href="javascript: void(0)" onclick="javascript:open_main('#{url}')"]
|
531
|
+
end
|
532
|
+
|
523
533
|
def card1
|
524
534
|
title, lines = _data, _body
|
525
535
|
lines.map!(&:chomp)
|
526
536
|
|
527
537
|
card_text = lines[0]
|
528
538
|
url, target, classname, cdata = lines[1].split(",", 4)
|
539
|
+
main = _main(url)
|
529
540
|
|
530
541
|
middle = <<-HTML
|
531
542
|
<p class="card-text">#{card_text}</p>
|
532
|
-
<a
|
543
|
+
<a #{main} class="#{classname}">#{cdata}</a>
|
533
544
|
HTML
|
534
545
|
|
535
546
|
_card_generic(card_title: title, middle: middle, extra: "bg-dark text-white")
|
@@ -550,7 +561,8 @@ def card2
|
|
550
561
|
_out open
|
551
562
|
_body do |line|
|
552
563
|
url, target, cdata = line.chomp.split(",", 3)
|
553
|
-
|
564
|
+
main = _main(url)
|
565
|
+
_out %[<li class="list-group-item"><a #{main}}">#{cdata}</a> </li>]
|
554
566
|
end
|
555
567
|
close = %[ </ul>\n </div>]
|
556
568
|
_out close
|
@@ -570,7 +582,8 @@ def tag_cloud
|
|
570
582
|
_body do |line|
|
571
583
|
line.chomp!
|
572
584
|
url, target, classname, cdata = line.split(",", 4)
|
573
|
-
|
585
|
+
main = _main(url)
|
586
|
+
_out %[<a #{main} class="#{classname}">#{cdata}</a>]
|
574
587
|
end
|
575
588
|
rescue
|
576
589
|
puts @live.body
|
@@ -605,14 +618,13 @@ def navbar
|
|
605
618
|
_out open
|
606
619
|
_body do |line|
|
607
620
|
href, cdata = line.chomp.strip.split(" ", 2)
|
608
|
-
|
621
|
+
main = _main(href)
|
609
622
|
if first
|
610
623
|
first = false
|
611
624
|
_out %[<li class="nav-item active"> <a class="nav-link" href="#{href}">#{cdata}<span class="sr-only">(current)</span></a> </li>]
|
612
625
|
else
|
613
|
-
|
614
|
-
|
615
|
-
_out %[<li class="nav-item"> <a class="nav-link" #{href_click}>#{cdata}</a> </li>]
|
626
|
+
main = _main("navbar/#{href}")
|
627
|
+
_out %[<li class="nav-item"> <a class="nav-link" #{main}>#{cdata}</a> </li>]
|
616
628
|
end
|
617
629
|
end
|
618
630
|
_out close
|
data/lib/runeblog.rb
CHANGED
@@ -178,7 +178,7 @@ class RuneBlog
|
|
178
178
|
copy!("#{Themes}", "themes")
|
179
179
|
create_dirs(:assets, :posts)
|
180
180
|
create_dirs(:staging, "remote/permalink", "remote/navbar")
|
181
|
-
livetext "themes/standard/etc/blog.css.lt3"
|
181
|
+
livetext "themes/standard/etc/blog.css.lt3" # strip ext
|
182
182
|
copy!("themes/standard/*", "staging/")
|
183
183
|
copy!("themes/standard/etc", "remote/")
|
184
184
|
copy!("themes/standard/assets", "remote/")
|
data/lib/runeblog_version.rb
CHANGED
data/runeblog.gemspec
CHANGED
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
|
|
20
20
|
s.authors = ["Hal Fulton"]
|
21
21
|
s.email = 'rubyhacker@gmail.com'
|
22
22
|
s.executables << "blog"
|
23
|
-
s.add_runtime_dependency 'livetext', '~> 0.8', '>= 0.8.
|
23
|
+
s.add_runtime_dependency 'livetext', '~> 0.8', '>= 0.8.92'
|
24
24
|
s.add_runtime_dependency 'rubytext', '~> 0.1', '>= 0.1.16'
|
25
25
|
|
26
26
|
# Files...
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.card_iframe
|
2
|
+
<h1>Pages</h1>
|
3
|
+
|
4
|
+
.def make_links
|
5
|
+
pairs = File.readlines("list.data").map {|line| line.chomp.split(" ", 2) }
|
6
|
+
File.open("generated.lt3", "w") do |f|
|
7
|
+
pairs.each do |file, title|
|
8
|
+
f.puts <<-EOS
|
9
|
+
<a href="#{file}">#{title}</a> <br>
|
10
|
+
EOS
|
11
|
+
end
|
12
|
+
end
|
13
|
+
.end
|
14
|
+
|
15
|
+
.make_links
|
16
|
+
|
17
|
+
.include generated.lt3
|
18
|
+
.end
|
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.1.
|
4
|
+
version: 0.1.97
|
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-09-
|
11
|
+
date: 2019-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '0.8'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.8.
|
22
|
+
version: 0.8.92
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '0.8'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.8.
|
32
|
+
version: 0.8.92
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rubytext
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- themes/standard/etc/misc.js
|
89
89
|
- themes/standard/global.lt3
|
90
90
|
- themes/standard/navbar/about.html
|
91
|
+
- themes/standard/navbar/contact.html
|
91
92
|
- themes/standard/navbar/navbar.lt3
|
92
93
|
- themes/standard/post/generate.lt3
|
93
94
|
- themes/standard/post/head.lt3
|
@@ -97,6 +98,16 @@ files:
|
|
97
98
|
- themes/standard/sidebar/calendar.lt3
|
98
99
|
- themes/standard/sidebar/news.lt3
|
99
100
|
- themes/standard/sidebar/tag-cloud.lt3
|
101
|
+
- themes/standard/widgets/README
|
102
|
+
- themes/standard/widgets/pages/README
|
103
|
+
- themes/standard/widgets/pages/disclaim.lt3
|
104
|
+
- themes/standard/widgets/pages/faq.lt3
|
105
|
+
- themes/standard/widgets/pages/generated.lt3
|
106
|
+
- themes/standard/widgets/pages/lifestory.lt3
|
107
|
+
- themes/standard/widgets/pages/like-dislike.lt3
|
108
|
+
- themes/standard/widgets/pages/list.data
|
109
|
+
- themes/standard/widgets/pages/main.html
|
110
|
+
- themes/standard/widgets/pages/main.lt3
|
100
111
|
homepage: https://github.com/Hal9000/runeblog
|
101
112
|
licenses:
|
102
113
|
- Ruby
|