runeblog 0.2.45 → 0.2.46

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8bb9a39d611dfe53e5ef484072a68b6c28791563469f591c0ed0b1f2af8d19b
4
- data.tar.gz: 3280e0cec145361c3422de113d54f1c54fa617993c96010a06604f8a81f9b2d3
3
+ metadata.gz: c764956fc67556826d90815f706b69523817eaee26cf7ec32671794a65e15538
4
+ data.tar.gz: 3fb1d9bcc3ae3802891378568b4ef729ceb757ace7b4a4efdee7aa3d8ba775d2
5
5
  SHA512:
6
- metadata.gz: dfa3e81153739ccbb5cbea452a33ba523141025df409cd2a33e55d03dd51b4c800a5e49e5fa102063dd71793187df5bed62e847e00bfa75b35dcbc35ed5c3ddf
7
- data.tar.gz: 3b93280f1ac1a370d7ab7ff4f4c1fd28a4cba94af74ebdfb0fc59f21ea1081079786a39f8de9f75216205a256193e774bc379841e675e49600ca7748ed0e655b
6
+ metadata.gz: f52c5f8975373cb2544126e3e7245bc37cf7e3c16a2417cdfb29a002f07e369ad0c8a50018b85665a8a20a21632af3094c9e41fa63f8065ca319acef1480322e
7
+ data.tar.gz: 693309103d55a20a48984da73ecdf4c2544e9b950ea504ec54e895ab1bc68560cfad30eede26f8b30c622d9d47cd773f8424d05cf8fcca5dc6440f929420febe
@@ -40,6 +40,18 @@
40
40
  text-align: top;
41
41
  }
42
42
 
43
+ \.mydrop {
44
+ color: #444444;
45
+ float: left;
46
+ text-align: top;
47
+ # font-family: Verdana;
48
+ font-size: 38px;
49
+ line-height: 38px;
50
+ # padding-top: 0px;
51
+ padding-right: 8px;
52
+ padding-left: 3px;
53
+ }
54
+
43
55
  . not used?
44
56
  \.thumbnail img {
45
57
  max-height: 100%;
@@ -17,7 +17,7 @@ def init_liveblog # FIXME - a lot of this logic sucks
17
17
  @blog = RuneBlog.new(dir)
18
18
  @root = @blog.root
19
19
  @view = @blog.view
20
- @view_name = @blog.view.name
20
+ @view_name = @blog.view.name unless @view.nil?
21
21
  @vdir = @blog.view.dir
22
22
  @version = RuneBlog::VERSION
23
23
  @theme = @vdir/:themes/:standard
@@ -27,6 +27,18 @@ end
27
27
  # "dot" commands
28
28
  ##################
29
29
 
30
+
31
+
32
+ def dropcap
33
+ # Bad form: adds another HEAD
34
+ text = _data
35
+ _out " "
36
+ letter = text[0]
37
+ remain = text[1..-1]
38
+ _out %[<div class='mydrop'>#{letter}</div>]
39
+ _out %[<div style="padding-top: 1px">#{remain}]
40
+ end
41
+
30
42
  def post
31
43
  @meta = OpenStruct.new
32
44
  @meta.num = _args[0]
@@ -56,27 +68,6 @@ def backlink
56
68
  _out %[<br><a href="javascript:history.go(-1)">[Back]</a>]
57
69
  end
58
70
 
59
- def dropcap
60
- # Bad form: adds another HEAD
61
- _out <<-HTML
62
- <head>
63
- <style>
64
- p:first-child:first-letter {
65
- color: #0000ff;
66
- float: left;
67
- font-family: Verdana;
68
- font-size: 75px;
69
- line-height: 60px;
70
- padding-top: 4px;
71
- padding-right: 8px;
72
- padding-left: 3px;
73
- }
74
- </style>
75
- </head>
76
- HTML
77
- _out " "
78
- end
79
-
80
71
  def quote
81
72
  _passthru "<blockquote>"
82
73
  _passthru _body
@@ -146,25 +137,36 @@ end
146
137
  def inset
147
138
  lines = _body
148
139
  box = ""
140
+ output = []
149
141
  lines.each do |line|
150
- line = line.dup
151
- if line[0] == "/" # Only into inset
152
- line[0] = ' '
153
- box << line.dup + " "
154
- line.replace(" ")
155
- end
156
- if line[0] == "|" # Into inset and body
157
- line[0] = ' '
158
- box << line.dup + " "
142
+ line = line
143
+ case line[0]
144
+ when "/" # Only into inset
145
+ line[0] = ' '
146
+ box << line
147
+ line.replace(" ")
148
+ when "|" # Into inset and body
149
+ line[0] = ' '
150
+ box << line
151
+ output << line
152
+ else # Only into body
153
+ output << line
159
154
  end
160
- _passthru(line)
155
+ # _passthru(line)
161
156
  end
162
157
  lr = _args.first
163
158
  wide = _args[1] || "25"
164
- _passthru "<div style='float:#{lr}; width: #{wide}%; padding:8px; padding-right:12px'>" # ; font-family:verdana'>"
165
- _passthru '<b><i>'
166
- _passthru box
167
- _passthru_noline '</i></b></div>'
159
+ stuff = "<div style='float:#{lr}; width: #{wide}%; padding:8px; padding-right:12px'>"
160
+ stuff << '<b><i>' + box + '</i></b></div>'
161
+ _out "</p>" # kludge!! nopara
162
+ 0.upto(2) {|i| _passthru output[i] }
163
+ _passthru stuff
164
+ # _passthru "<div style='float:#{lr}; width: #{wide}%; padding:8px; padding-right:12px'>" # ; font-family:verdana'>"
165
+ # _passthru '<b><i>'
166
+ # _passthru box
167
+ # _passthru_noline '</i></b></div>'
168
+ 3.upto(output.length-1) {|i| _passthru output[i] }
169
+ _out "<p>" # kludge!! para
168
170
  _optional_blank_line
169
171
  end
170
172
 
@@ -232,10 +234,16 @@ end
232
234
 
233
235
  def teaser
234
236
  raise "'post' was not called" unless @meta
235
- @meta.teaser = _body_text
237
+ text = _body_text
238
+ @meta.teaser = text
236
239
  setvar :teaser, @meta.teaser
237
- _out @meta.teaser + "\n"
238
- # FIXME
240
+ if _args[0] == "dropcap" # FIXME doesn't work yet!
241
+ letter, remain = text[0], text[1..-1]
242
+ _out %[<div class='mydrop'>#{letter}</div>]
243
+ _out %[<div style="padding-top: 1px">#{remain}] + "\n"
244
+ else
245
+ _out @meta.teaser + "\n"
246
+ end
239
247
  end
240
248
 
241
249
  def finalize
@@ -2,7 +2,7 @@
2
2
  if ! (Object.constants.include?(:RuneBlog) && RuneBlog.constants.include?(:Path))
3
3
 
4
4
  class RuneBlog
5
- VERSION = "0.2.45"
5
+ VERSION = "0.2.46"
6
6
 
7
7
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
8
  Path = File.dirname(path)
@@ -93,29 +93,31 @@ BODY
93
93
  make_post(x, "The graffiti wall", <<-EXCERPT, <<-BODY)
94
94
  RIP, Hope Gallery
95
95
  EXCERPT
96
- .dropcap
97
96
 
98
- It's been a while since I was there. They say it was torn down
99
- while I wasn't looking.
97
+ .dropcap It's been a while since I was there. They say it was torn down
98
+ while I wasn't looking. Never tagged anything there, of course, nor
99
+ anywhere else. Spraypainting public places isn't my thing, but in this
100
+ case I condoned it because it was sort of there for that purpose.
100
101
 
101
102
  This fake entry is a long one so as to demonstrate both drop-caps
102
103
  (above) and an inset quote. Blah blah blah. Lorem ipsum dolor and
103
104
  a partridge in a pear tree.
104
105
 
106
+ .inset left 20
105
107
  Wherever you go, there you are. Last night I saw upon the stair
106
108
  a little man who was not there. He wasn't there again today; I
107
- wish, I wish he'd go away.
108
-
109
- As far as we know, our computer has never had an undetected error.
110
- And never let it be denied that pobbles are happier without their
111
- toes. And may your snark never be a boojum.
109
+ wish, I wish he'd go away. As far as we know, our computer has
110
+ never had an undetected error.
111
+ |On a clean disk, you can seek forever.
112
+ And never let it be denied that
113
+ pobbles are happier without their toes. And may your snark never
114
+ be a boojum. How do you know you aren't dreaming right now? When
115
+ you see a butterfly, think of Chuang Tzu.
116
+ .end
112
117
 
113
118
  Contact light. Houston, this is Tranquility Base. The Eagle has
114
119
  landed. That's one small step for (a) man, one giant leap for
115
120
  mankind.
116
- .inset left 20
117
- On a clean disk, you can seek forever.
118
- .end
119
121
 
120
122
  Pity this busy monster, manunkind, not. Pity rather... Listen:
121
123
  There's a hell of a universe next door; let's go.
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.45
4
+ version: 0.2.46
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-16 00:00:00.000000000 Z
11
+ date: 2019-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext