runeblog 0.2.58 → 0.2.59
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/banner/list.data +3 -0
- data/empty_view/themes/standard/blog/generate.lt3 +2 -0
- data/empty_view/themes/standard/widgets/links/links.rb +20 -6
- data/empty_view/themes/standard/widgets/news/news.rb +2 -2
- data/empty_view/themes/standard/widgets/pages/pages.rb +26 -13
- data/empty_view/themes/standard/widgets/pinned/pinned.rb +25 -22
- data/lib/liveblog.rb +83 -82
- data/lib/runeblog.rb +2 -1
- data/lib/runeblog_version.rb +1 -1
- metadata +3 -9
- data/empty_view/remote/navbar/GIT_IS_DUMB +0 -1
- data/empty_view/themes/standard/banner/navbar.lt3 +0 -17
- data/empty_view/themes/standard/navbar/about.lt3 +0 -18
- data/empty_view/themes/standard/navbar/contact.lt3 +0 -18
- data/empty_view/themes/standard/navbar/faq.lt3 +0 -1
- data/empty_view/themes/standard/navbar/navbar.lt3 +0 -19
- data/empty_view/themes/standard/navbar/vnavbar.lt3 +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b2d47a65fa785c2f35b7f5609cc790eae415a33f7be148d2ffd7ac1dfa20cbe
|
4
|
+
data.tar.gz: 425c8a969db5a7ad6b3716e6141715a7e44d31d4eea21a2faf11e0995d612ddc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d19541de995f0fbd20b3193166db86410226e2fc53018fa61cfda5b8c39789288e4ee7f30946cf5779422b3181d2c0c3dc5530d46af8ee95f8392ba1164972fb
|
7
|
+
data.tar.gz: 855b0768c3c79e6026e5ddcc4d079c53f2f45162a520cbe1b38b1b4b297e81e44c0bfe734abdfda6a8993bfdeab0b50078aa1db1e94e0e2a121e5c1895f2171b
|
@@ -4,30 +4,43 @@ require 'liveblog'
|
|
4
4
|
|
5
5
|
class ::RuneBlog::Widget
|
6
6
|
class Links
|
7
|
-
Type = "links"
|
7
|
+
Type, Title = "links", "External links"
|
8
8
|
|
9
9
|
def initialize(repo)
|
10
10
|
@blog = repo
|
11
|
+
@datafile = input = "list.data"
|
12
|
+
@lines = File.readlines(input)
|
11
13
|
end
|
12
14
|
|
13
15
|
def build
|
14
|
-
input = "list.data"
|
15
|
-
@lines = File.readlines(input)
|
16
16
|
write_main
|
17
17
|
write_card
|
18
18
|
end
|
19
19
|
|
20
|
+
def _html_body(file, css = nil)
|
21
|
+
file.puts "<html>"
|
22
|
+
if css
|
23
|
+
file.puts " <head>"
|
24
|
+
file.puts " <style>\n#{css}\n </style>"
|
25
|
+
file.puts " </head>"
|
26
|
+
end
|
27
|
+
file.puts " <body>"
|
28
|
+
yield
|
29
|
+
file.puts " </body>\n</html>"
|
30
|
+
end
|
31
|
+
|
20
32
|
def write_main
|
21
33
|
@data = @lines.map! {|x| x.chomp.split(/, */, 3) }
|
22
34
|
css = "* { font-family: verdana }"
|
23
|
-
card_title =
|
35
|
+
card_title = Title
|
24
36
|
File.open("#{Type}-main.html", "w") do |f|
|
25
37
|
_html_body(f, css) do
|
26
38
|
f.puts "<h1>#{card_title}</h1><br><hr>"
|
27
39
|
url_ref = nil
|
28
40
|
@data.each do |url, frameable, title|
|
29
|
-
url_ref =
|
30
|
-
|
41
|
+
url_ref = "href = '#{url}'"
|
42
|
+
url_ref << " target=blank" if frameable == "yes"
|
43
|
+
css = "color: #8888FF; text-decoration: none; font-size: 21px"
|
31
44
|
f.puts %[<a style="#{css}" #{url_ref}>#{title}</a> <br>]
|
32
45
|
end
|
33
46
|
end
|
@@ -52,6 +65,7 @@ class ::RuneBlog::Widget
|
|
52
65
|
<div class="collapse" id="#{tag}">
|
53
66
|
EOS
|
54
67
|
@data.each do |url2, frameable, title|
|
68
|
+
f.puts "<!-- #{[url2, frameable, title].inspect} -->"
|
55
69
|
main_ref = %[href="javascript: void(0)" onclick="javascript:open_main('#{url2}')"]
|
56
70
|
tab_ref = %[href="#{url2}"]
|
57
71
|
url_ref = (frameable == "yes") ? main_ref : tab_ref
|
@@ -7,11 +7,11 @@ class ::RuneBlog::Widget
|
|
7
7
|
def initialize(repo)
|
8
8
|
@blog = repo
|
9
9
|
@datafile = "list.data"
|
10
|
+
lines = File.readlines(@datafile)
|
11
|
+
@data = lines.map {|line| line.chomp.split(/, */) }
|
10
12
|
end
|
11
13
|
|
12
14
|
def build
|
13
|
-
lines = File.readlines(@datafile)
|
14
|
-
@data = lines.map {|line| line.chomp.split(/, */) }
|
15
15
|
write_main
|
16
16
|
write_card
|
17
17
|
end
|
@@ -4,11 +4,13 @@
|
|
4
4
|
|
5
5
|
class ::RuneBlog::Widget
|
6
6
|
class Pages
|
7
|
-
Type = "pages"
|
7
|
+
Type, Title = "pages", "Pages"
|
8
8
|
|
9
9
|
def initialize(repo)
|
10
10
|
@blog = repo
|
11
11
|
@datafile = "list.data"
|
12
|
+
@lines = File.readlines(@datafile)
|
13
|
+
@data = @lines.map {|x| x.chomp.split(/, */, 2) }
|
12
14
|
end
|
13
15
|
|
14
16
|
def build
|
@@ -16,24 +18,34 @@ class ::RuneBlog::Widget
|
|
16
18
|
children = Dir["*.lt3"] - ["pages.lt3"]
|
17
19
|
children.each do |child|
|
18
20
|
dest = child.sub(/.lt3$/, ".html")
|
19
|
-
xlate src: child, dst: dest
|
21
|
+
xlate src: child, dst: dest
|
20
22
|
end
|
21
|
-
@lines = File.readlines(@datafile)
|
22
23
|
write_main
|
23
24
|
write_card
|
24
25
|
end
|
25
26
|
|
27
|
+
def _html_body(file, css = nil)
|
28
|
+
file.puts "<html>"
|
29
|
+
if css
|
30
|
+
file.puts " <head>"
|
31
|
+
file.puts " <style>\n#{css}\n </style>"
|
32
|
+
file.puts " </head>"
|
33
|
+
end
|
34
|
+
file.puts " <body>"
|
35
|
+
yield
|
36
|
+
file.puts " </body>\n</html>"
|
37
|
+
end
|
38
|
+
|
26
39
|
def write_main
|
27
|
-
@data = @lines.map! {|x| x.chomp.split(/, */, 3) }
|
28
40
|
css = "* { font-family: verdana }"
|
29
|
-
card_title =
|
41
|
+
card_title = Title
|
30
42
|
File.open("#{Type}-main.html", "w") do |f|
|
31
43
|
_html_body(f, css) do
|
32
44
|
f.puts "<h1>#{card_title}</h1><br><hr>"
|
33
45
|
url_ref = nil
|
34
|
-
@data.each do |url,
|
35
|
-
url_ref =
|
36
|
-
css = "color: #8888FF; text-decoration: none; font-size: 21px"
|
46
|
+
@data.each do |url, title|
|
47
|
+
url_ref = "href = '#{url}'"
|
48
|
+
css = "color: #8888FF; text-decoration: none; font-size: 21px"
|
37
49
|
f.puts %[<a style="#{css}" #{url_ref}>#{title}</a> <br>]
|
38
50
|
end
|
39
51
|
end
|
@@ -53,14 +65,15 @@ class ::RuneBlog::Widget
|
|
53
65
|
<button type="button" class="btn btn-primary" data-toggle="collapse" data-target="##{tag}">+</button>
|
54
66
|
<a href="javascript: void(0)"
|
55
67
|
onclick="javascript:open_main('#{url}')"
|
56
|
-
style="text-decoration: none; color: black"
|
68
|
+
style="text-decoration: none; color: black">#{card_title}</a>
|
57
69
|
</h5>
|
58
70
|
<div class="collapse" id="#{tag}">
|
59
71
|
EOS
|
60
|
-
@data.each do |url2,
|
61
|
-
|
62
|
-
|
63
|
-
|
72
|
+
@data.each do |url2, title|
|
73
|
+
f.puts "<!-- #{[url2, title].inspect} -->"
|
74
|
+
url3 = :widgets/tag/url2
|
75
|
+
f.puts "<!-- url3 = #{url3.inspect} -->"
|
76
|
+
url_ref = %[href="javascript: void(0)" onclick="javascript:open_main('#{url3}')"]
|
64
77
|
anchor = %[<a #{url_ref}>#{title}</a>]
|
65
78
|
wrapper = %[<li class="list-group-item">#{anchor}</li>]
|
66
79
|
f.puts wrapper
|
@@ -2,32 +2,35 @@
|
|
2
2
|
|
3
3
|
class ::RuneBlog::Widget
|
4
4
|
class Pinned
|
5
|
+
Type, Title = "pinned", "Pinned posts"
|
6
|
+
|
5
7
|
def initialize(repo)
|
6
8
|
@blog = repo
|
7
|
-
@self = "pinned"
|
8
9
|
@datafile = "list.data"
|
10
|
+
# f = File.new("/tmp/mehhh", "w")
|
11
|
+
@lines = File.exist?(@datafile) ? File.readlines(@datafile) : []
|
12
|
+
# f.puts #{@lines.inspect} in #{Dir.pwd}"
|
13
|
+
File.open("/tmp/mehhh", "w") {|f| f.puts "#{@lines.inspect} in #{Dir.pwd}" }
|
9
14
|
end
|
10
15
|
|
11
|
-
def _html_body(file, css = nil) # FIXME
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
end
|
16
|
+
def _html_body(file, css = nil) # FIXME
|
17
|
+
file.puts "<html>"
|
18
|
+
if css
|
19
|
+
file.puts " <head>"
|
20
|
+
file.puts " <style>\n#{css}\n </style>"
|
21
|
+
file.puts " </head>"
|
22
|
+
end
|
23
|
+
file.puts " <body>"
|
24
|
+
yield
|
25
|
+
file.puts " </body>\n</html>"
|
26
|
+
end
|
22
27
|
|
23
28
|
def build
|
24
|
-
@tmp = File.new("/tmp/debug-out", "w")
|
25
29
|
posts = nil
|
26
30
|
Dir.chdir(@blog.root/:posts) { posts = Dir["*"] }
|
27
|
-
lines = File.exist?(@datafile) ? File.readlines(@datafile) : []
|
28
31
|
hash = {}
|
29
32
|
@links = []
|
30
|
-
lines.each do |x|
|
33
|
+
@lines.each do |x|
|
31
34
|
num, title = x.chomp.split(" ", 2)
|
32
35
|
hash[num] = title
|
33
36
|
pre = '%04d' % num
|
@@ -41,13 +44,13 @@ end
|
|
41
44
|
end
|
42
45
|
|
43
46
|
def write_main
|
44
|
-
tag =
|
45
|
-
card_title =
|
46
|
-
# setvar "card.title", card_title
|
47
|
+
tag = Type
|
48
|
+
card_title = Title
|
47
49
|
css = "* { font-family: verdana }"
|
48
|
-
mainfile = "
|
50
|
+
mainfile = "#{tag}-main"
|
49
51
|
File.open("#{mainfile}.html", "w") do |f|
|
50
52
|
_html_body(f, css) do
|
53
|
+
f.puts "<!-- #{@lines.inspect} in #{Dir.pwd} -->"
|
51
54
|
f.puts "<h1>#{card_title}</h1><br><hr>"
|
52
55
|
@links.each do |title, file|
|
53
56
|
title = title.gsub(/\\/, "") # kludge
|
@@ -59,10 +62,10 @@ end
|
|
59
62
|
end
|
60
63
|
|
61
64
|
def write_card
|
62
|
-
tag =
|
65
|
+
tag = Type
|
63
66
|
url = :widgets/tag/tag+"-main.html"
|
64
|
-
card_title =
|
65
|
-
cardfile = "
|
67
|
+
card_title = Title
|
68
|
+
cardfile = "#{tag}-card"
|
66
69
|
File.open("#{cardfile}.html", "w") do |f|
|
67
70
|
f.puts <<-EOS
|
68
71
|
<div class="card mb-3">
|
data/lib/liveblog.rb
CHANGED
@@ -86,6 +86,12 @@ def backlink
|
|
86
86
|
_out %[<br><a href="javascript:history.go(-1)">[Back]</a>]
|
87
87
|
end
|
88
88
|
|
89
|
+
def _read_navbar_data
|
90
|
+
dir = @blog.root/:views/@blog.view/"themes/standard/banner/"
|
91
|
+
datafile = dir/"list.data"
|
92
|
+
File.readlines(datafile)
|
93
|
+
end
|
94
|
+
|
89
95
|
def banner # still experimental
|
90
96
|
_out "<table width=100% bgcolor=#101035>"
|
91
97
|
_out " <tr>"
|
@@ -98,35 +104,48 @@ def banner # still experimental
|
|
98
104
|
case arg
|
99
105
|
when "image"
|
100
106
|
image = "banner/banner.jpg"
|
101
|
-
_out " <td colspan=#{span}><img src=#{image} height=150></img></td>"
|
107
|
+
_out " <td colspan=#{span}><img src=#{image} height=150></img></td>" +
|
108
|
+
" <!-- #{arg} -->"
|
102
109
|
when "image:"
|
103
110
|
image = "banner/#{enum.next}"
|
104
|
-
_out " <td colspan=#{span}><img src=#{image} height=150></img></td>"
|
111
|
+
_out " <td colspan=#{span}><img src=#{image} height=150></img></td>" +
|
112
|
+
" <!-- #{arg} -->"
|
105
113
|
when "text"
|
106
|
-
file = "banner/
|
107
|
-
_out "<td colspan=#{span}>" + File.read(file) + "</td>"
|
114
|
+
file = "banner/top.html"
|
115
|
+
_out "<td colspan=#{span}>" + File.read(file) + "</td>" +
|
116
|
+
" <!-- #{arg} -->"
|
108
117
|
when "text:"
|
109
118
|
file = "banner/#{enum.next}"
|
110
|
-
_out "<td colspan=#{span}>" + File.read(file) + "</td>"
|
119
|
+
_out "<td colspan=#{span}>" + File.read(file) + "</td>" +
|
120
|
+
" <!-- #{arg} -->"
|
111
121
|
when "navbar"
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
122
|
+
# STDERR.puts "-- navbar: pwd = #{Dir.pwd}: #{`ls`}"
|
123
|
+
dir = @blog.root/:views/@blog.view/"themes/standard/banner/"
|
124
|
+
hnavbar
|
125
|
+
# xlate cwd: dir, src: "navbar.lt3", dst: "navbar.html" # , debug: true
|
126
|
+
stuff = File.read("banner/navbar.html")
|
127
|
+
_out "<td colspan=#{span}><div style='text-align: center'>#{stuff}</div></td>" +
|
128
|
+
" <!-- #{arg} -->"
|
116
129
|
when "vnavbar"
|
117
|
-
dir = @blog.root/:views/@blog.view/"themes/standard/
|
118
|
-
|
119
|
-
|
120
|
-
|
130
|
+
dir = @blog.root/:views/@blog.view/"themes/standard/banner/"
|
131
|
+
vnavbar
|
132
|
+
# xlate cwd: dir, src: "vnavbar.lt3", dst: "vnavbar.html" # , debug: true
|
133
|
+
file = "banner/vnavbar.html"
|
134
|
+
_out "<td colspan=#{span}>" + File.read(file) + "</td>" +
|
135
|
+
"<!-- #{arg} -->"
|
121
136
|
when "//"
|
122
137
|
span = count - 1
|
123
|
-
_out " </tr>\n <tr>"
|
138
|
+
_out " </tr>\n <tr>" + "<!-- #{arg} -->"
|
124
139
|
else
|
125
140
|
_out " '#{arg}' isn't known"
|
126
141
|
end
|
127
142
|
end
|
128
143
|
_out " </tr>"
|
129
144
|
_out "</table>"
|
145
|
+
rescue => err
|
146
|
+
STDERR.puts "err = #{err}"
|
147
|
+
STDERR.puts err.backtrace.join("\n")
|
148
|
+
gets
|
130
149
|
end
|
131
150
|
|
132
151
|
def quote
|
@@ -290,16 +309,15 @@ def pin
|
|
290
309
|
end
|
291
310
|
pins << "#{@meta.num} #{@meta.title}\n"
|
292
311
|
pins.uniq!
|
293
|
-
|
294
|
-
|
295
|
-
outfile.puts pin
|
312
|
+
File.open(datafile, "w") do |outfile|
|
313
|
+
pins.each {|pin| outfile.puts pin }
|
296
314
|
end
|
297
|
-
outfile.close
|
298
315
|
end
|
299
316
|
_optional_blank_line
|
317
|
+
pinned_rebuild # FIXME experimental
|
300
318
|
rescue => err
|
301
|
-
puts "err = #{err}"
|
302
|
-
puts err.backtrace.join("\n")
|
319
|
+
STDERR.puts "err = #{err}"
|
320
|
+
STDERR.puts err.backtrace.join("\n")
|
303
321
|
gets
|
304
322
|
end
|
305
323
|
|
@@ -438,6 +456,7 @@ def _make_class_name(app)
|
|
438
456
|
end
|
439
457
|
|
440
458
|
def _load_local(widget)
|
459
|
+
STDERR.puts "widget = #{widget} pwd = #{Dir.pwd}"
|
441
460
|
Dir.chdir("widgets/#{widget}") do
|
442
461
|
rclass = _make_class_name(widget)
|
443
462
|
found = (require("./#{widget}") if File.exist?("#{widget}.rb"))
|
@@ -450,6 +469,20 @@ rescue => err
|
|
450
469
|
exit
|
451
470
|
end
|
452
471
|
|
472
|
+
def pinned_rebuild
|
473
|
+
Dir.chdir(@blog.root/:views/@blog.view/"themes/standard/") do
|
474
|
+
wtag = "widgets/pinned"
|
475
|
+
code = _load_local("pinned")
|
476
|
+
if code
|
477
|
+
Dir.chdir(wtag) do
|
478
|
+
widget = code.new(@blog)
|
479
|
+
widget.build
|
480
|
+
end
|
481
|
+
_include_file wtag/"pinned-card.html"
|
482
|
+
end
|
483
|
+
end
|
484
|
+
end
|
485
|
+
|
453
486
|
def sidebar
|
454
487
|
_debug "--- handling sidebar\r"
|
455
488
|
if _args.include? "off"
|
@@ -487,16 +520,16 @@ def sidebar
|
|
487
520
|
File.open(wtag/"vars.lt3", "w") do |f|
|
488
521
|
f.puts ".set ad.image = #{img}"
|
489
522
|
end
|
523
|
+
xlate cwd: wtag, src: tag, dst: tcard, force: true # , deps: depend # , debug: true
|
490
524
|
end
|
491
525
|
|
492
|
-
depend = %w[card.css main.css custom.rb local.rb]
|
493
|
-
depend += ["#{wtag}.lt3", "#{wtag}.rb"]
|
494
|
-
depend += %w[pieces/card-head.lt3 pieces/card-tail.lt3]
|
495
|
-
depend += %w[pieces/main-head.lt3 pieces/main-tail.lt3]
|
496
|
-
depend.map! {|x| @blog.view.dir/"themes/standard/widgets"/wtag/x }
|
497
|
-
_debug "--- call xlate #{tag} src = #{tag} dst = #{tcard}\r"
|
498
|
-
xlate cwd: wtag, src: tag, dst: tcard, force: true, deps: depend # , debug: true
|
499
526
|
_include_file wtag/tcard
|
527
|
+
# depend = %w[card.css main.css custom.rb local.rb]
|
528
|
+
# depend += ["#{wtag}.lt3", "#{wtag}.rb"]
|
529
|
+
# depend += %w[pieces/card-head.lt3 pieces/card-tail.lt3]
|
530
|
+
# depend += %w[pieces/main-head.lt3 pieces/main-tail.lt3]
|
531
|
+
# depend.map! {|x| @blog.view.dir/"themes/standard/widgets"/wtag/x }
|
532
|
+
# _debug "--- call xlate #{tag} src = #{tag} dst = #{tcard}\r"
|
500
533
|
end
|
501
534
|
_out %[</div>]
|
502
535
|
rescue => err
|
@@ -650,18 +683,22 @@ def tag_cloud
|
|
650
683
|
end
|
651
684
|
|
652
685
|
def vnavbar
|
653
|
-
|
686
|
+
str = _make_navbar(:vert)
|
687
|
+
_out str
|
654
688
|
end
|
655
689
|
|
656
690
|
def hnavbar
|
657
|
-
|
691
|
+
str = _make_navbar # horiz is default
|
692
|
+
STDERR.puts "STR = #{str.inspect}"
|
693
|
+
_out str
|
658
694
|
end
|
659
695
|
|
660
696
|
def navbar
|
661
|
-
|
697
|
+
str = _make_navbar # horiz is default
|
698
|
+
_out str
|
662
699
|
end
|
663
700
|
|
664
|
-
def
|
701
|
+
def _make_navbar(orient = :horiz)
|
665
702
|
vdir = @blog.view.dir
|
666
703
|
title = _var(:blog)
|
667
704
|
|
@@ -678,70 +715,34 @@ def _custom_navbar(orient = :horiz)
|
|
678
715
|
</nav>
|
679
716
|
HTML
|
680
717
|
|
681
|
-
|
682
|
-
|
683
|
-
|
718
|
+
name = (orient == :horiz) ? "navbar.html" : "vnavbar.html"
|
719
|
+
|
720
|
+
html_file = @blog.root/:views/@blog.view/"themes/standard/banner"/name
|
721
|
+
# STDERR.puts "html = #{html_file.inspect} pwd = #{Dir.pwd}"
|
722
|
+
output = File.new(html_file, "w")
|
684
723
|
output.puts start
|
685
|
-
lines =
|
686
|
-
lines = ["
|
724
|
+
lines = _read_navbar_data
|
725
|
+
lines = ["index Home"] + lines unless _args.include?("nohome")
|
726
|
+
STDERR.puts " #{lines.size} lines"
|
687
727
|
lines.each do |line|
|
728
|
+
STDERR.puts " handling: #{line.inspect}"
|
688
729
|
basename, cdata = line.chomp.strip.split(" ", 2)
|
689
|
-
full = :
|
730
|
+
full = :banner/basename+".html"
|
690
731
|
href_main = _main(full)
|
691
732
|
if basename == "index" # special case
|
692
733
|
output.puts %[<li class="nav-item active"> <a class="nav-link" href="index.html">#{cdata}<span class="sr-only">(current)</span></a> </li>]
|
693
734
|
else
|
694
|
-
|
735
|
+
dir = @blog.root/:views/@blog.view/"themes/standard/banner"
|
736
|
+
xlate cwd: dir, src: basename, dst: vdir/"remote/banner"/basename+".html" # , debug: true
|
695
737
|
output.puts %[<li class="nav-item"> <a class="nav-link" #{href_main}>#{cdata}</a> </li>]
|
696
738
|
end
|
697
739
|
end
|
698
740
|
output.puts finish
|
741
|
+
output.close
|
742
|
+
STDERR.puts "-- html_file: #{`ls -l #{html_file}`}"
|
743
|
+
return File.read(html_file)
|
699
744
|
end
|
700
745
|
|
701
|
-
def _old_navbar
|
702
|
-
vdir = @blog.view.dir
|
703
|
-
title = _var(:blog)
|
704
|
-
|
705
|
-
open = <<-HTML
|
706
|
-
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
707
|
-
<a class="navbar-brand" href="index.html">#{title}</a>
|
708
|
-
<button class="navbar-toggler"
|
709
|
-
type="button"
|
710
|
-
data-toggle="collapse"
|
711
|
-
data-target="#navbarSupportedContent"
|
712
|
-
aria-controls="navbarSupportedContent"
|
713
|
-
aria-expanded="false"
|
714
|
-
aria-label="Toggle navigation">
|
715
|
-
<span class="navbar-toggler-icon"></span>
|
716
|
-
</button>
|
717
|
-
<div class="collapse navbar-collapse pull-right"
|
718
|
-
id="navbarSupportedContent">
|
719
|
-
<ul class="navbar-nav mr-auto">
|
720
|
-
HTML
|
721
|
-
close = <<-HTML
|
722
|
-
</ul>
|
723
|
-
</div>
|
724
|
-
</nav>
|
725
|
-
HTML
|
726
|
-
|
727
|
-
first = true
|
728
|
-
_out open
|
729
|
-
lines = _body
|
730
|
-
lines.each do |line|
|
731
|
-
basename, cdata = line.chomp.strip.split(" ", 2)
|
732
|
-
full = :navbar/basename+".html"
|
733
|
-
href_main = _main(full)
|
734
|
-
if first
|
735
|
-
first = false # hardcode this part??
|
736
|
-
_out %[<li class="nav-item active"> <a class="nav-link" href="index.html">#{cdata}<span class="sr-only">(current)</span></a> </li>]
|
737
|
-
else
|
738
|
-
depend = Find.find(@blog.root/:views/@blog.view.to_s/"themes/standard/navbar/").to_a
|
739
|
-
xlate cwd: "navbar", src: basename, dst: vdir/"remote/navbar"/basename+".html", deps: depend # , debug: true
|
740
|
-
_out %[<li class="nav-item"> <a class="nav-link" #{href_main}>#{cdata}</a> </li>]
|
741
|
-
end
|
742
|
-
end
|
743
|
-
_out close
|
744
|
-
end
|
745
746
|
|
746
747
|
##################
|
747
748
|
# helper methods
|
data/lib/runeblog.rb
CHANGED
@@ -437,7 +437,8 @@ class RuneBlog
|
|
437
437
|
vdir = @root/:views/view
|
438
438
|
@theme = @root/:views/view/:themes/:standard
|
439
439
|
depend = [vdir/"remote/etc/blog.css", @theme/"global.lt3",
|
440
|
-
@theme/"blog/head.lt3",
|
440
|
+
@theme/"blog/head.lt3",
|
441
|
+
# @theme/"navbar/navbar.lt3",
|
441
442
|
@theme/"blog/index.lt3"] # FIXME what about assets?
|
442
443
|
xlate cwd: vdir/"themes/standard/etc", deps: depend,
|
443
444
|
src: "blog.css.lt3", copy: vdir/"remote/etc/blog.css" # , debug: true
|
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.59
|
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-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -68,7 +68,6 @@ files:
|
|
68
68
|
- empty_view/remote/banner/austin-pano.jpg
|
69
69
|
- empty_view/remote/banner/top.html
|
70
70
|
- empty_view/remote/etc/GIT_IS_DUMB
|
71
|
-
- empty_view/remote/navbar/GIT_IS_DUMB
|
72
71
|
- empty_view/remote/permalink/GIT_IS_DUMB
|
73
72
|
- empty_view/themes/standard/README
|
74
73
|
- empty_view/themes/standard/banner/about.lt3
|
@@ -76,7 +75,7 @@ files:
|
|
76
75
|
- empty_view/themes/standard/banner/blog-banner.jpg
|
77
76
|
- empty_view/themes/standard/banner/contact.lt3
|
78
77
|
- empty_view/themes/standard/banner/faq.lt3
|
79
|
-
- empty_view/themes/standard/banner/
|
78
|
+
- empty_view/themes/standard/banner/list.data
|
80
79
|
- empty_view/themes/standard/banner/top.html
|
81
80
|
- empty_view/themes/standard/blog/generate.lt3
|
82
81
|
- empty_view/themes/standard/blog/head.lt3
|
@@ -87,11 +86,6 @@ files:
|
|
87
86
|
- empty_view/themes/standard/etc/favicon.ico
|
88
87
|
- empty_view/themes/standard/etc/misc.js
|
89
88
|
- empty_view/themes/standard/global.lt3
|
90
|
-
- empty_view/themes/standard/navbar/about.lt3
|
91
|
-
- empty_view/themes/standard/navbar/contact.lt3
|
92
|
-
- empty_view/themes/standard/navbar/faq.lt3
|
93
|
-
- empty_view/themes/standard/navbar/navbar.lt3
|
94
|
-
- empty_view/themes/standard/navbar/vnavbar.lt3
|
95
89
|
- empty_view/themes/standard/post/generate.lt3
|
96
90
|
- empty_view/themes/standard/post/head.lt3
|
97
91
|
- empty_view/themes/standard/post/index.lt3
|
@@ -1 +0,0 @@
|
|
1
|
-
meh
|
@@ -1,17 +0,0 @@
|
|
1
|
-
. --------------------------------------------------
|
2
|
-
. This defines the content of the navigation bar.
|
3
|
-
. The first one is a special case.
|
4
|
-
. The others are understood to refer to .lt3 files
|
5
|
-
. such as navbar/about.lt3 (which is processed into
|
6
|
-
. HTML).
|
7
|
-
. The title may be more than one word. Quotes are
|
8
|
-
. not needed.
|
9
|
-
. --------------------------------------------------
|
10
|
-
|
11
|
-
.navbar2
|
12
|
-
index Home
|
13
|
-
about About
|
14
|
-
contact Contact
|
15
|
-
faq FAQ
|
16
|
-
.end
|
17
|
-
|
@@ -1,18 +0,0 @@
|
|
1
|
-
. --------------------------------------------------
|
2
|
-
. This is a sample file typical of page referenced
|
3
|
-
. directly from the navigation bar.
|
4
|
-
. It is like a special case of a page in the "pages"
|
5
|
-
. widget.
|
6
|
-
. --------------------------------------------------
|
7
|
-
|
8
|
-
.set this.title="About me"
|
9
|
-
. make this better later
|
10
|
-
<html><body>
|
11
|
-
<div class="content container-fluid mt-4">
|
12
|
-
<div class="row">
|
13
|
-
<h1>$this.title</h1>
|
14
|
-
. content starts here...
|
15
|
-
Blah blah blah...
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
</body></html>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
. --------------------------------------------------
|
2
|
-
. This is a sample file typical of page referenced
|
3
|
-
. directly from the navigation bar.
|
4
|
-
. It is like a special case of a page in the "pages"
|
5
|
-
. widget.
|
6
|
-
. --------------------------------------------------
|
7
|
-
|
8
|
-
.set this.title="Contact"
|
9
|
-
. make this better later
|
10
|
-
<html><body>
|
11
|
-
<div class="content container-fluid mt-4">
|
12
|
-
<div class="row">
|
13
|
-
<h1>$this.title</h1>
|
14
|
-
. content starts here...
|
15
|
-
How to contact me by email, smoke signals, ICBM, seance, ...
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
</body></html>
|
@@ -1 +0,0 @@
|
|
1
|
-
.include ../widgets/pages/faq.lt3
|
@@ -1,19 +0,0 @@
|
|
1
|
-
. --------------------------------------------------
|
2
|
-
. This defines the content of the navigation bar.
|
3
|
-
. The first one is a special case.
|
4
|
-
. The others are understood to refer to .lt3 files
|
5
|
-
. such as navbar/about.lt3 (which is processed into
|
6
|
-
. HTML).
|
7
|
-
. The title may be more than one word. Quotes are
|
8
|
-
. not needed.
|
9
|
-
. --------------------------------------------------
|
10
|
-
|
11
|
-
.nopara
|
12
|
-
.mixin liveblog
|
13
|
-
|
14
|
-
.navbar
|
15
|
-
about About
|
16
|
-
contact Contact
|
17
|
-
faq FAQ
|
18
|
-
.end
|
19
|
-
|
@@ -1,19 +0,0 @@
|
|
1
|
-
. --------------------------------------------------
|
2
|
-
. This defines the content of the navigation bar.
|
3
|
-
. The first one is a special case.
|
4
|
-
. The others are understood to refer to .lt3 files
|
5
|
-
. such as navbar/about.lt3 (which is processed into
|
6
|
-
. HTML).
|
7
|
-
. The title may be more than one word. Quotes are
|
8
|
-
. not needed.
|
9
|
-
. --------------------------------------------------
|
10
|
-
|
11
|
-
.nopara
|
12
|
-
.mixin liveblog
|
13
|
-
|
14
|
-
.vnavbar
|
15
|
-
about About
|
16
|
-
contact Contact
|
17
|
-
faq FAQ
|
18
|
-
.end
|
19
|
-
|