runeblog 0.2.49 → 0.2.50
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/pages/faq.lt3 +34 -3
- data/lib/helpers-repl.rb +1 -1
- data/lib/liveblog.rb +21 -4
- data/lib/repl.rb +4 -5
- data/lib/runeblog.rb +2 -2
- 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: 420d1360e5f860c1396eb2ba36a804c999b18d25da0b7157d577280d0cb2d42b
|
4
|
+
data.tar.gz: 65c66113d384de0e752b1abc5a2c9b68074319958f4a7762b8e00781b8a46c91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4a17c66ba757ea6b350d13a9a777e637157065392bfb7096e7c3de302b36c24e7d875ea8ad7cc8143fc384025dc590d5c8e03047b8b6c6477d4a2a967881c43
|
7
|
+
data.tar.gz: ce5188e490205aca014c158fe5f5202664c7d6ac9821c1408c761e2a3185d2c74eec38e9c2c0c98407f7f8e02591d2b1290a07bcc8909aa2dab22d2b65ff5f8a
|
@@ -1,9 +1,40 @@
|
|
1
1
|
.mixin liveblog
|
2
2
|
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
|
6
|
+
<style>
|
7
|
+
* { font-family: verdana }
|
8
|
+
</style>
|
9
|
+
|
10
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
|
11
|
+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"></link>
|
12
|
+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap-theme.min.css"></link>
|
13
|
+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
14
|
+
|
15
|
+
</head>
|
16
|
+
|
17
|
+
<body>
|
18
|
+
|
3
19
|
<h2>Frequently Asked Questions</h2>
|
4
20
|
|
5
|
-
|
6
|
-
|
7
|
-
|
21
|
+
.faq Are you a rabbit?
|
22
|
+
Yes, I am.
|
23
|
+
.end
|
24
|
+
|
25
|
+
.faq Are you a frog?
|
26
|
+
Don't be stupid. I just told you I was a rabbit.
|
27
|
+
.end
|
28
|
+
|
29
|
+
.faq Why do you answer a question with a question?
|
30
|
+
*Do I in fact answer a question with a question?
|
31
|
+
.end
|
32
|
+
|
33
|
+
.faq Are you serious?
|
34
|
+
No, I'm a rabbit.
|
35
|
+
.end
|
8
36
|
|
9
37
|
.backlink
|
38
|
+
|
39
|
+
</body>
|
40
|
+
</html>
|
data/lib/helpers-repl.rb
CHANGED
data/lib/liveblog.rb
CHANGED
@@ -66,13 +66,18 @@ end
|
|
66
66
|
|
67
67
|
def faq
|
68
68
|
@faq_count ||= 0
|
69
|
+
_out "<br>" if @faq_count == 0
|
69
70
|
@faq_count += 1
|
70
71
|
ques = _data.chomp
|
71
72
|
ans = _body_text
|
72
73
|
id = "faq#@faq_count"
|
73
|
-
|
74
|
+
# _out %[ <a class="btn btn-default btn-xs" data-toggle="collapse" href="##{id}" role="button" aria-expanded="false" aria-controls="collapseExample">+</a>]
|
75
|
+
_out %[ <a data-toggle="collapse" href="##{id}" role="button" aria-expanded="false" aria-controls="collapseExample"><font size=+3>⌄</font></a>]
|
74
76
|
_out %[ <b>#{ques}</b>]
|
75
|
-
|
77
|
+
# _out "<font size=-2><br></font>" if @faq_count == 1
|
78
|
+
# _out "<br>" unless @faq_count == 1
|
79
|
+
_out %[<div class="collapse" id="#{id}"><br><font size=+1> #{ans}</font></div>\n]
|
80
|
+
_out "<br>" unless @faq_count == 1
|
76
81
|
_optional_blank_line
|
77
82
|
end
|
78
83
|
|
@@ -261,6 +266,18 @@ def pin
|
|
261
266
|
_debug "data = #{_args}"
|
262
267
|
# verify only already-specified views?
|
263
268
|
@meta.pinned = _args.dup
|
269
|
+
dir = @blog.view.dir/"themes/standard/widgets/pinned/"
|
270
|
+
datafile = dir/"list.data"
|
271
|
+
pins = File.readlines(datafile) rescue []
|
272
|
+
damn = File.new("/tmp/dammit", "w")
|
273
|
+
pins << "#{@meta.num} #{@meta.title}\n"
|
274
|
+
damn.puts pins
|
275
|
+
pins.uniq!
|
276
|
+
damn.puts pins
|
277
|
+
damn.close
|
278
|
+
File.open(datafile, "w") do
|
279
|
+
pins.each {|pin| File.puts pin }
|
280
|
+
end
|
264
281
|
_optional_blank_line
|
265
282
|
end
|
266
283
|
|
@@ -444,7 +461,7 @@ def sidebar
|
|
444
461
|
end
|
445
462
|
end
|
446
463
|
|
447
|
-
xlate cwd: wtag, src: tag, dst: tcard # , debug: (tag == "ad")
|
464
|
+
xlate cwd: wtag, src: tag, dst: tcard, force: true # , debug: (tag == "ad")
|
448
465
|
_include_file wtag/tcard
|
449
466
|
end
|
450
467
|
_out %[</div>]
|
@@ -831,7 +848,7 @@ end
|
|
831
848
|
|
832
849
|
def _write_metadata
|
833
850
|
File.write("teaser.txt", @meta.teaser)
|
834
|
-
fields = [:num, :title, :date, :pubdate, :views, :tags]
|
851
|
+
fields = [:num, :title, :date, :pubdate, :views, :tags, :pinned]
|
835
852
|
fname2 = "metadata.txt"
|
836
853
|
f2 = File.open(fname2, "w") do |f2|
|
837
854
|
fields.each {|fld| f2.puts "#{fld}: #{@meta.send(fld)}" }
|
data/lib/repl.rb
CHANGED
@@ -53,12 +53,11 @@ module RuneBlog::REPL
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def cmd_manage(arg, testing = false)
|
56
|
-
puts "Arg = #{arg.inspect}"
|
57
56
|
case arg
|
58
|
-
when "pages";
|
59
|
-
when "links"; _manage_links(
|
60
|
-
when "navbar"; _manage_navbar(
|
61
|
-
# when "pinned"; _manage_pinned(
|
57
|
+
when "pages"; _manage_pages(nil, testing = false)
|
58
|
+
when "links"; _manage_links(nil, testing = false)
|
59
|
+
when "navbar"; _manage_navbar(nil, testing = false)
|
60
|
+
# when "pinned"; _manage_pinned(nil, testing = false) # ditch this??
|
62
61
|
else
|
63
62
|
puts "#{arg} is unknown"
|
64
63
|
end
|
data/lib/runeblog.rb
CHANGED
@@ -543,7 +543,7 @@ class RuneBlog
|
|
543
543
|
@theme = @root/:views/view_name/:themes/:standard
|
544
544
|
# Step 1...
|
545
545
|
create_dirs(pdraft)
|
546
|
-
xlate cwd: pdraft, src: draft, dst: "guts.html", debug: true
|
546
|
+
xlate cwd: pdraft, src: draft, dst: "guts.html" # , debug: true
|
547
547
|
_post_metadata(draft, pdraft)
|
548
548
|
# Step 2...
|
549
549
|
vposts = @root/:views/view_name/:posts
|
@@ -553,7 +553,7 @@ class RuneBlog
|
|
553
553
|
copy(pdraft/"vars.lt3", @theme/:post)
|
554
554
|
# Step 4...
|
555
555
|
xlate cwd: @theme/:post, src: "generate.lt3", force: true,
|
556
|
-
dst: remote/ahtml, copy: @theme/:post, debug: true
|
556
|
+
dst: remote/ahtml, copy: @theme/:post # , debug: true
|
557
557
|
xlate cwd: @theme/:post, src: "permalink.lt3",
|
558
558
|
dst: remote/:permalink/ahtml # , debug: true
|
559
559
|
copy_widget_html(view_name)
|
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.50
|
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-10-
|
11
|
+
date: 2019-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|