runeblog 0.2.30 → 0.2.31

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: '086ad42b02c7892a35f650ea63686128bc378ba0db488b68b5bcdc3ad30bfc85'
4
- data.tar.gz: 807fc24717d0d85237aaef95d5309a133302d927e2c64e390913fc4614a49072
3
+ metadata.gz: 24f0f2eb8b2b217131e1a0bf2c74edd38efd672161f4cfbbe2f32caca0f7198a
4
+ data.tar.gz: a356e607a4e20cf4e024995441966f42031f98ce58ef1bff1b616d3f44446cd2
5
5
  SHA512:
6
- metadata.gz: fd52ccaadf34f3b8def644bd8e44c626d4b9fe16475f75d10fbf596258821c3e216df62a2fc6deea69e9c1b77e6458c4ce992a601bb21cfa8c9750c46fe3f0d7
7
- data.tar.gz: 3057408282565272df97cc797197324f00c116fffed9a76de3cd9a27a444d7dca0ed4ae9a5860ad6131fdf840e11b9d8e5f7fe2fe92249176d6a4b27a2ab40c7
6
+ metadata.gz: 23d9b96c624032f42f9928e376c3df6d075a548b4f53278c8adecc9c7379ab999b0d2c2964f867c9379fb78d0373863a5de57b52e8c12a3dfbca463f502b288e
7
+ data.tar.gz: 50b81e2e7db6e3f418600bf529fedd1353eeffb39a1bab6f58ed72641e244d4608c44c580864e9c420a6bdd3f39d40f3a8314b551197ef5d26bcee93366852c6
Binary file
@@ -37,6 +37,27 @@ def backlink
37
37
  _out %[<br><a href="javascript:history.go(-1)">[Back]</a>]
38
38
  end
39
39
 
40
+ def dropcap
41
+ # Bad form: adds another HEAD
42
+ _out <<-HTML
43
+ <head>
44
+ <style>
45
+ p:first-child:first-letter {
46
+ color: #0000ff;
47
+ float: left;
48
+ font-family: Georgia;
49
+ font-size: 75px;
50
+ line-height: 60px;
51
+ padding-top: 4px;
52
+ padding-right: 8px;
53
+ padding-left: 3px;
54
+ }
55
+ </style>
56
+ </head>
57
+ HTML
58
+ _out " "
59
+ end
60
+
40
61
  def quote
41
62
  _passthru "<blockquote>"
42
63
  _passthru _body
@@ -292,7 +313,7 @@ end
292
313
  def recent_posts # side-effect
293
314
  _out <<-HTML
294
315
  <div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
295
- <iframe id="main" style="width: 100vw; height: 100vh; position: relative;"
316
+ <iframe id="main" style="width: 70vw; height: 100vh; position: relative;"
296
317
  src='recent.html' width=100% frameborder="0" allowfullscreen>
297
318
  </iframe>
298
319
  </div>
@@ -542,24 +563,17 @@ def _write_card(cardfile, mainfile, pairs, card_title, tag, relative: true)
542
563
  local = _local_tag?(tag)
543
564
  pairs.each do |file, title|
544
565
  url = file
545
- yesno = "yes"
546
- yesno, title = title.split(/, */) if title =~ /^[yes|no]/ # FIXME please!
547
-
548
- case [yesno, local]
549
- when ["yes", false] # can iframe, remote file
550
- url_ref = "href='#{file}'"
551
- when ["yes", true] # can iframe, local file
552
- url_ref = _widget_card(file, tag)
553
- when ["no", false] # CAN'T iframe, remote file
554
- url_ref = _blank(file)
555
- when ["no", true] # CAN'T iframe, local file (possible?)
556
- url_ref = _blank(file)
566
+ type, title = page_type(tag, title)
567
+ case type
568
+ when :local; url_ref = _widget_main(file, tag) # local always frameable
569
+ when :frame; url_ref = _main(file) # remote, frameable
570
+ when :noframe; url_ref = _blank(file) # remote, not frameable
557
571
  end
558
-
559
572
  anchor = %[<a #{url_ref}>#{title}</a>]
560
573
  wrapper = %[<li class="list-group-item">#{anchor}</li>]
561
574
  f.puts wrapper
562
575
  end
576
+ _include_file cardfile+".html"
563
577
  f.puts <<-EOS
564
578
  </div>
565
579
  </div>
@@ -579,6 +593,20 @@ def _local_tag?(tag)
579
593
  end
580
594
  end
581
595
 
596
+ def page_type(tag, title)
597
+ yesno = "yes"
598
+ yesno, title = title.split(/, */) if title =~ /^[yes|no]/
599
+ local = _local_tag?(tag)
600
+ frameable = (yesno == "yes")
601
+ if local
602
+ return [:local, title]
603
+ elsif frameable
604
+ return [:frame, title]
605
+ else
606
+ return [:noframe, title]
607
+ end
608
+ end
609
+
582
610
  def _write_main(mainfile, pairs, card_title, tag)
583
611
  log!(str: "Creating #{mainfile}.html", pwd: true)
584
612
  local = _local_tag?(tag)
@@ -586,17 +614,12 @@ def _write_main(mainfile, pairs, card_title, tag)
586
614
  _html_body(f) do
587
615
  f.puts "<h1>#{card_title}</h1>"
588
616
  pairs.each do |file, title|
589
- yesno = "yes"
590
- yesno, title = title.split(/, */) if title =~ /^[yes|no]/ # FIXME please!
591
- case [yesno, local]
592
- when ["yes", false] # can iframe, remote file
593
- url_ref = "href='#{file}'"
594
- when ["yes", true] # can iframe, local file
595
- url_ref = _widget_main(file, tag)
596
- when ["no", false] # CAN'T iframe, remote file
597
- url_ref = _blank(file)
598
- when ["no", true] # CAN'T iframe, local file (possible?)
599
- url_ref = _blank(file)
617
+ type, title = page_type(tag, title)
618
+ title = title.gsub(/\\/, "") # kludge
619
+ case type
620
+ when :local; url_ref = _widget_main(file, tag) # local always frameable
621
+ when :frame; url_ref = "href = '#{file}'" # local always frameable
622
+ when :noframe; url_ref = _blank(file) # local always frameable
600
623
  end
601
624
  css = "color: #8888FF; text-decoration: none; font-size: 24px; font-family: verdana"
602
625
  f.puts %[<a style="#{css}" #{url_ref}>#{title}</a> <br>]
@@ -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.30"
5
+ VERSION = "0.2.31"
6
6
 
7
7
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
8
  Path = File.dirname(path)
@@ -116,8 +116,32 @@ x.change_view("around_austin")
116
116
  make_post(x, "The graffiti wall", <<-EXCERPT, <<-BODY)
117
117
  RIP, Hope Gallery
118
118
  EXCERPT
119
+ .dropcap
120
+
119
121
  It's been a while since I was there. They say it was torn down
120
122
  while I wasn't looking.
123
+
124
+ This fake entry is a long one so as to demonstrate both drop-caps
125
+ (above) and an inset quote. Blah blah blah. Lorem ipsum dolor and
126
+ a partridge in a pear tree.
127
+
128
+ Wherever you go, there you are. Last night I saw upon the stair
129
+ a little man who was not there. He wasn't there again today; I
130
+ wish, I wish he'd go away.
131
+
132
+ As far as we know, our computer has never had an undetected error.
133
+ And never let it be denied that pobbles are happier without their
134
+ toes. And may your snark never be a boojum.
135
+
136
+ Contact light. Houston, this is Tranquility Base. The Eagle has
137
+ landed. That's one small step for (a) man, one giant leap for
138
+ mankind.
139
+ .inset left
140
+ On a clean disk, you can seek forever.
141
+ .end
142
+
143
+ Pity this busy monster, manunkind, not. Pity rather... Listen:
144
+ There's a hell of a universe next door; let's go.
121
145
  BODY
122
146
 
123
147
  make_post(x, "The Waller Creek project", <<-EXCERPT, <<-BODY)
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.30
4
+ version: 0.2.31
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-12 00:00:00.000000000 Z
11
+ date: 2019-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext