runeblog 0.1.81 → 0.1.86

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: a40ca6858d4ca38b504ef54bb5a8f87433abb297b8ec63c88ae1b5d2aa3762eb
4
- data.tar.gz: 960b06aadc8ab29c28bf46c8907722b9dc91ce095157ca9cfc554fc3fbd05675
3
+ metadata.gz: ba9b860dd117682b59ecd6b7c6f1fcc10272b7a1e556ac98c3f3206dbfe3bed3
4
+ data.tar.gz: 7ddc0c9c23b85eeac21c63cd673340ccf2a17f79d2e8a668627f39fb67602cab
5
5
  SHA512:
6
- metadata.gz: 5a81c6cb6fe18bc970997818775e8ce8e348acb9fd75e83f2f8fd75a83bee3875f83cf5bead1e6f9bbddf7da9060ff20a228b1f7d0ad632a8f52c139e90f621d
7
- data.tar.gz: 59a0c7e1da3d22d22ebf207d1543850355048fca50cae82483739c9a0ce65d49fbd3bb0ea8d6c43556a04c7fc64c33d7f44b692edb210cdde680ecf1735be4a8
6
+ metadata.gz: cd69ba907ebcf89687c6e1549b72f47ce5173ca38c8e5eec6d795e82b7c4a123c9d8557efe953389a97d90b97d0906f0d03386651e8ba448cd4971fca351e488
7
+ data.tar.gz: 94c47ec9b446b857991776d1b147817310344f5f25daddeff1735b5439438425f8703ed9f9df6093463d2f2326cd90d63f47ac601f98fe9b11436d64a8523db2
@@ -23,6 +23,9 @@ def RuneBlog.post_template(num: 0, title: "No title", date: nil, view: "test_vie
23
23
  #{teaser}
24
24
  .end
25
25
  #{body}
26
+
27
+ <br>
28
+ <a href="javascript:history.go(-1)">[Back]</a>
26
29
  TEXT
27
30
 
28
31
  end
@@ -4,6 +4,20 @@ require 'runeblog_version'
4
4
 
5
5
  module RuneBlog::Helpers
6
6
 
7
+ def copy(src, dst)
8
+ system("cp #{src} #{dst}")
9
+ end
10
+
11
+ def copy!(src, dst)
12
+ system("cp -r #{src} #{dst}")
13
+ end
14
+
15
+ def livetext(src, dst)
16
+ src << ".lt3" unless src.end_with?(".lt3")
17
+ dst << ".html" unless src.end_with?(".html")
18
+ system("livetext #{src} >#{dst}")
19
+ end
20
+
7
21
  def get_root
8
22
  if $_blog
9
23
  if $_blog.root
@@ -51,6 +65,17 @@ module RuneBlog::Helpers
51
65
  vals
52
66
  end
53
67
 
68
+ def put_config(root:, view:"test_view", editor: "/bin/vim")
69
+ Dir.mkdir(root) unless Dir.exist?(root)
70
+ Dir.chdir(root) do
71
+ File.open("config", "w") do |cfg|
72
+ cfg.puts "root: #{root}"
73
+ cfg.puts "current_view: #{view}"
74
+ cfg.puts "editor: #{editor}"
75
+ end
76
+ end
77
+ end
78
+
54
79
  def write_config(obj, file)
55
80
  hash = obj.to_h
56
81
  # Dir.chdir(::Home)
@@ -72,9 +97,10 @@ module RuneBlog::Helpers
72
97
  # end
73
98
  end
74
99
 
75
- def new_dotfile(root: "./.blogs/data", current_view: "no_default", editor: "vi")
76
- raise BlogAlreadyExists if Dir.exist?(".blogs")
77
- Dir.mkdir(".blogs")
100
+ def new_dotfile(root: ".blogs", current_view: "test_view", editor: "vi")
101
+ # raise BlogAlreadyExists if Dir.exist?(".blogs")
102
+ # Dir.mkdir(".blogs")
103
+ root = Dir.pwd + "/" + root
78
104
  x = OpenStruct.new
79
105
  x.root, x.current_view, x.editor = root, current_view, editor
80
106
  write_config(x, ".blogs/" + RuneBlog::ConfigFile)
@@ -114,9 +140,9 @@ module RuneBlog::Helpers
114
140
  raise CantCreateDir(dir) unless result
115
141
  end
116
142
 
117
- def interpolate(str)
143
+ def interpolate(str, binding)
118
144
  wrap = "<<-EOS\n#{str}\nEOS"
119
- eval wrap
145
+ eval wrap, binding
120
146
  end
121
147
 
122
148
  def error(err) # Hmm, this is duplicated
@@ -20,7 +20,11 @@ STDERR.reopen(errfile)
20
20
  =end
21
21
 
22
22
  def init_liveblog # FIXME - a lot of this logic sucks
23
- @blog = $_blog = RuneBlog.new(false)
23
+ here = Dir.pwd
24
+ dir = here
25
+ loop { dir = Dir.pwd; break if File.exist?("config"); Dir.chdir("..") }
26
+ Dir.chdir(here)
27
+ @blog = $_blog = RuneBlog.new(dir)
24
28
  @root = @blog.root
25
29
  @view = @blog.view
26
30
  @view_name = @blog.view.name
@@ -32,6 +36,7 @@ end
32
36
  def post
33
37
  @meta = OpenStruct.new
34
38
  @meta.num = _args[0]
39
+ _out " <!-- Post number #{@meta.num} -->\n "
35
40
  end
36
41
 
37
42
  def _view_from_cwd
@@ -235,6 +240,7 @@ def finalize
235
240
  @slug = @blog.make_slug(@meta)
236
241
  slug_dir = @slug
237
242
  @postdir = @blog.view.dir + "/posts/#{slug_dir}"
243
+ STDERR.puts "--- finalize: pwd = #{Dir.pwd} postdir = #@postdir"
238
244
  write_post
239
245
  @meta
240
246
  end
@@ -300,7 +306,7 @@ def head
300
306
  "linkc" => %[<link rel="canonical" href="#{_var(:host)}">],
301
307
  "og:url" => %[<meta property="og:url" content="#{_var(:host)}">],
302
308
  "og:site_name" => %[<meta property="og:site_name" content="#{_var(:title)}">],
303
- "style" => %[<link rel="stylesheet" href="blog-application.css">],
309
+ "style" => %[<link rel="stylesheet" href="assets/blog.css">],
304
310
  "feed" => %[<link type="application/atom+xml" rel="alternate" href="#{_var(:host)}/feed.xml" title="#{_var(:title)}">],
305
311
  "favicon" => %[<link rel="shortcut icon" type="image/x-icon" href="../assets/favicon.ico">\n <link rel="apple-touch-icon" href="../assets/favicon.ico">]
306
312
  }
@@ -325,7 +331,7 @@ def head
325
331
  end
326
332
  end
327
333
  hash = defaults.dup.update(result) # FIXME collisions?
328
- _out "<html lang=en_US>"
334
+ # _out "<html lang=en_US>"
329
335
  _out "<head>"
330
336
  hash.each_value {|x| _out " " + x }
331
337
  _out "</head>"
@@ -402,6 +408,7 @@ def script
402
408
  _out %[<script src="#{url}" integrity="#{integ}" crossorigin="#{cross}"></script>]
403
409
  end
404
410
 
411
+
405
412
  ### How this next bit works:
406
413
  ###
407
414
  ### all_teasers will call _find_recent_posts
@@ -439,7 +446,7 @@ def all_teasers
439
446
 
440
447
  text = <<-HTML
441
448
  <html>
442
- <head><link rel="stylesheet" href="blog-application.css"></head>
449
+ <head><link rel="stylesheet" href="assets/blog.css"></head>
443
450
  <body>
444
451
  HTML
445
452
  posts = _find_recent_posts
@@ -491,6 +498,7 @@ def _teaser(slug)
491
498
  text
492
499
  end
493
500
 
501
+
494
502
  def card_iframe
495
503
  title = _data
496
504
  lines = _body
@@ -139,6 +139,7 @@ end
139
139
  class RuneBlog::ViewPost
140
140
  attr_reader :path, :nslug, :aslug, :title, :date,
141
141
  :teaser_text
142
+
142
143
  def initialize(view, postdir)
143
144
  # Assumes already parsed/processed
144
145
  @blog = RuneBlog.blog || raise(NoBlogAccessor)
@@ -153,5 +154,18 @@ class RuneBlog::ViewPost
153
154
  @title = lines.grep(/title:/).first[7..-1].chomp
154
155
  @date = lines.grep(/pubdate:/).first[9..-1].chomp
155
156
  end
157
+
158
+ def get_dirs
159
+ fname = File.basename(draft)
160
+ noext = fname.sub(/.lt3$/, "")
161
+ vdir = "#@root/views/#{view}"
162
+ dir = "#{vdir}/posts/#{noext}/"
163
+ Dir.mkdir(dir) unless Dir.exist?(dir)
164
+ system("cp #{draft} #{dir}")
165
+ viewdir, slugdir, aslug = vdir, dir, noext[5..-1]
166
+ theme = viewdir + "/themes/standard"
167
+ [noext, viewdir, slugdir, aslug, theme]
168
+ end
169
+
156
170
  end
157
171
 
@@ -1,4 +1,5 @@
1
- require 'livetext'
1
+ require 'date'
2
+ # require 'livetext'
2
3
 
3
4
  require 'runeblog_version'
4
5
  require 'global'
@@ -14,7 +15,7 @@ class RuneBlog
14
15
 
15
16
  DotDir = ".blogs"
16
17
  ConfigFile = "config"
17
- GemData = RuneBlog::Path + "/../data"
18
+ Themes = RuneBlog::Path + "/../themes"
18
19
 
19
20
  make_exception(:FileNotFound, "File $1 was not found")
20
21
  make_exception(:BlogRepoAlreadyExists, "Blog repo $1 already exists")
@@ -24,7 +25,7 @@ class RuneBlog
24
25
  make_exception(:CantCreateDir, "Can't create directory $1")
25
26
  make_exception(:EditorProblem, "Could not edit $1")
26
27
  make_exception(:NoSuchView, "No such view: $1")
27
- make_exception(:LivetextError, "Livetext#process_file returned nil for $1")
28
+ # make_exception(:LivetextError, "Livetext#process_file returned nil for $1")
28
29
  make_exception(:NoBlogAccessor, "Runeblog.blog is not set")
29
30
 
30
31
 
@@ -40,40 +41,53 @@ class RuneBlog
40
41
 
41
42
  include Helpers
42
43
 
43
- def self.create_new_blog_repo(first_view, dir = ".blogs/data")
44
+ def self.create_new_blog_repo(dir = ".blogs")
44
45
  raise ArgumentError unless dir.is_a?(String) && ! dir.empty?
45
46
  root_dir = Dir.pwd + "/" + dir
46
- raise BlogRepoAlreadyExists if Dir.exist?(root_dir)
47
- new_dotfile(root: root_dir, current_view: first_view)
48
- create_dir(dir)
49
- Dir.chdir(dir) do
47
+ self.create(dir)
48
+ rescue => err
49
+ puts "Can't create blog repo: '#{dir}' - #{err}"
50
+ puts err.backtrace.join("\n")
51
+ end
52
+
53
+ def self.create(root = ".blogs")
54
+ # Crude - FIXME later - # What views are there? Publishing, etc.
55
+ self.blog = self # Weird. Like a singleton - dumbass circular dependency?
56
+ $_blog = self # Dumber still?
57
+ root = Dir.pwd + "/" + root
58
+ raise BlogRepoAlreadyExists if Dir.exist?(root)
59
+ create_dir(root)
60
+ Dir.chdir(root) do
50
61
  create_dir("drafts")
51
62
  create_dir("views")
52
63
  #? create_dir("assets")
53
64
  new_sequence
54
65
  end
55
- blog = self.new
56
- blog.create_view(first_view)
57
- rescue => err
58
- puts "Can't create blog repo: '#{dir}' - #{err}"
59
- puts err.backtrace.join("\n")
66
+ put_config(root: root)
67
+ @blog = self.new(root)
68
+ @blog.create_view("test_view")
69
+ @blog
70
+ end
71
+
72
+ def self.open(root = ".blogs")
73
+ # Crude - FIXME later - # What views are there? Publishing, etc.
74
+ self.blog = self # Weird. Like a singleton - dumbass circular dependency?
75
+ $_blog = self # Dumber still?
76
+ root = Dir.pwd + "/" + root
77
+ blog = self.new(root)
60
78
  end
61
79
 
62
- def initialize(top = true) # at top? always assumes existing blog
80
+ def initialize(root_dir = ".blogs") # always assumes existing blog
63
81
  # Crude - FIXME later - # What views are there? Publishing, etc.
64
82
  self.class.blog = self # Weird. Like a singleton - dumbass circular dependency?
65
83
  $_blog = self # Dumber still?
66
- dir = ""
67
- unless top
68
- md = Dir.pwd.match(%r[.*.blogs])
69
- dir = md[0]
70
- end
71
- file = dir.empty? ? ConfigFile : dir + "/" + ConfigFile
84
+
85
+ @root = root_dir
86
+ file = @root + "/" + ConfigFile
72
87
  errmsg = "No config file! file = #{file.inspect} dir = #{Dir.pwd}"
73
88
  raise errmsg unless File.exist?(file)
74
- # Hmm. current_view doesn't belong?
75
- @root, @view_name, @editor = read_config(file, :root, :current_view, :editor)
76
89
 
90
+ @root, @view_name, @editor = read_config(file, :root, :current_view, :editor)
77
91
  md = Dir.pwd.match(%r[.*/views/(.*?)/])
78
92
  @view_name = md[1] if md
79
93
  @views = get_views
@@ -165,13 +179,19 @@ class RuneBlog
165
179
 
166
180
  Dir.chdir(vdir)
167
181
  x = RuneBlog::Default
168
- create_dir('themes')
182
+ # create_dir('themes')
183
+ copy!("#{Themes}", "themes")
169
184
  create_dir('assets')
170
185
  create_dir('posts')
171
186
 
172
- Dir.chdir("themes") { system("tar zxvf #{GemData}/standard.tgz >/dev/null 2>&1") }
173
- # system("cp themes/standard/blog/assets/* assets/")
174
-
187
+ create_dir('staging')
188
+ create_dir('staging/assets')
189
+ create_dir('remote')
190
+ create_dir('remote/assets')
191
+
192
+ copy!("themes/standard/*", "staging/")
193
+ copy("themes/standard/assets/*", "remote/assets/")
194
+
175
195
  pub = "user: xxx\nserver: xxx\ndocroot: xxx\npath: xxx\nproto: xxx\n"
176
196
  dump(pub, "publish")
177
197
 
@@ -210,6 +230,71 @@ class RuneBlog
210
230
  result
211
231
  end
212
232
 
233
+ def post_lookup(postid) # side-effect?
234
+ # .. = templates, ../.. = views/thisview
235
+ slug = title = date = teaser_text = nil
236
+
237
+ dir_posts = @vdir + "/posts"
238
+ posts = Dir.entries(dir_posts).grep(/^\d\d\d\d/).map {|x| dir_posts + "/" + x }
239
+ posts.select! {|x| File.directory?(x) }
240
+
241
+ post = posts.select {|x| File.basename(x).to_i == postid }
242
+ raise "Error: More than one post #{postid}" if post.size > 1
243
+ postdir = post.first
244
+ vp = RuneBlog::ViewPost.new(self.view, postdir)
245
+ vp
246
+ end
247
+
248
+ def teaser(slug)
249
+ id = slug.to_i
250
+ text = nil
251
+ post_entry_name = @theme + "/blog-_postentry.lt3"
252
+ @_post_entry ||= File.read(post_entry_name)
253
+ vp = post_lookup(id)
254
+ nslug, aslug, title, date, teaser_text =
255
+ vp.nslug, vp.aslug, vp.title, vp.date, vp.teaser_text
256
+ path = vp.path
257
+ # url = "#{path}/#{aslug}.html" # Should be relative to .blogs!! FIXME
258
+ url = "#{aslug}.html" # Should be relative to .blogs!! FIXME
259
+ date = ::Date.parse(date)
260
+ date = date.strftime("%B %e<br>%Y")
261
+ text = interpolate(@_post_entry, binding)
262
+ text
263
+ end
264
+
265
+ def collect_recent_posts(file)
266
+ @vdir = ".."
267
+ posts = nil
268
+ dir_posts = @vdir + "/posts"
269
+ entries = Dir.entries(dir_posts)
270
+ posts = entries.grep(/^\d\d\d\d/).map {|x| dir_posts + "/" + x }
271
+ posts.select! {|x| File.directory?(x) }
272
+ # directories that start with four digits
273
+ posts = posts.sort {|a, b| b.to_i <=> a.to_i } # sort descending
274
+ posts = posts[0..19] # return 20 at most
275
+ text = <<-HTML
276
+ <html>
277
+ <head><link rel="stylesheet" href="assets/blog.css"></head>
278
+ <body>
279
+ HTML
280
+ # posts = _find_recent_posts
281
+ wanted = [5, posts.size].min # estimate how many we want?
282
+ enum = posts.each
283
+ wanted.times do
284
+ postid = File.basename(enum.next)
285
+ postid = postid.to_i
286
+ text << teaser(postid) # side effect! calls _out
287
+ end
288
+ text << "</body></html>"
289
+ File.write(file, text) # FIXME ???
290
+ iframe_text = <<-HTML
291
+ <iframe style="width: 100vw;height: 100vh;position: relative;"
292
+ src='recent.html' width=100% frameborder="0" allowfullscreen>
293
+ </iframe>
294
+ HTML
295
+ # _out iframe_text # FIXME ??
296
+ end
297
+
213
298
  def create_new_post(title, testing = false, teaser: nil, body: nil, other_views: [])
214
299
  save = Dir.pwd
215
300
  Dir.chdir(self.view.dir)
@@ -276,6 +361,7 @@ class RuneBlog
276
361
  raise "No .views call!" if view_line.size < 1
277
362
  view_line = view_line.first
278
363
  views = view_line[7..-1].split
364
+ views
279
365
  end
280
366
 
281
367
  # Remember: A post in multiple views will trigger multiple
@@ -309,25 +395,26 @@ class RuneBlog
309
395
  def generate_post(draft)
310
396
  views = _get_views(draft)
311
397
  views.each do |view|
312
- noext, viewdir, slugdir, aslug, theme = _copy_get_dirs(draft, view)
398
+ noext, viewdir, slugdir, aslug, @theme = _copy_get_dirs(draft, view)
399
+ staging = viewdir + "/staging"
313
400
  Dir.chdir(slugdir) do
314
- html = noext[5..-1] + ".html"
315
- system("livetext #{draft} >#{html}")
316
-
317
- Dir.mkdir("sidebar") unless Dir.exist?("sidebar")
318
- system("cp #{theme}/sidebar/*.lt3 ./sidebar/")
319
- files = ["blog-generate.lt3", "blog-index.lt3", "global.lt3", "blog-head.lt3",
320
- "meta.lt3", "navbar.lt3", "blog-application.css"]
321
- files2 = files.map {|x| theme + "/" + x }
322
- files2.each do |f|
323
- system("cp #{f} .")
401
+ copy(draft, ".")
402
+ lt3 = draft.split("/")[-1]
403
+ # Remember: Some posts may be in more than one view -- careful with links back
404
+ # system("livetext #{draft} >staging/#{name}/index.html") # permalink?
405
+ # Structure is borked?
406
+ copy!("#{@theme}/*", "#{staging}")
407
+ copy(lt3, staging)
408
+ html = noext[5..-1]
409
+ Dir.chdir(staging) do
410
+ livetext draft, html
411
+ # link to POST??
412
+ copy html, "../remote"
413
+ collect_recent_posts("recent.html")
414
+ copy("recent.html", "../remote")
415
+ livetext "blog-generate", "../remote/index"
324
416
  end
325
-
326
- # system("livetext blog-generate.lt3 >bgen.html")
327
- # files.each {|fname| system("rm ./#{fname}") }
328
- # system("rm -rf ./sidebar/")
329
417
  end
330
- # create framed pure slug (where?)
331
418
  end
332
419
  end
333
420
 
@@ -2,9 +2,10 @@
2
2
  if ! (Object.constants.include?(:RuneBlog) && RuneBlog.constants.include?(:Path))
3
3
 
4
4
  class RuneBlog
5
- VERSION = "0.1.81"
5
+ VERSION = "0.1.86"
6
6
 
7
- Path = File.expand_path(File.join(File.dirname(__FILE__)))
7
+ path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
+ Path = File.dirname(path)
8
9
  end
9
10
 
10
11
  end
@@ -25,7 +25,7 @@ class RuneBlog::View
25
25
  end
26
26
 
27
27
  def local_index
28
- dir + "/generated/index.html"
28
+ dir + "/remote/index.html"
29
29
  end
30
30
 
31
31
  def index
@@ -39,7 +39,7 @@ class RuneBlog::View
39
39
  def publishable_files
40
40
  vdir = dir()
41
41
  files = [local_index()]
42
- others = Dir.entries(vdir + "/generated").grep(/^\d\d\d\d/).map {|x| "#{vdir}/generated/#{x}" }
42
+ others = Dir.entries(vdir + "/remote").grep(/^\d\d\d\d/).map {|x| "#{vdir}/remote/#{x}" }
43
43
  abort "FIXME... publishable_files"
44
44
  deep_assets = Dir["#{vdir}/themes/standard/assets/*"]
45
45
  deep_assets.each do |file| # Do this at view creation
@@ -24,19 +24,13 @@ spec = Gem::Specification.new do |s|
24
24
  s.add_runtime_dependency 'rubytext', '~> 0.1', '>= 0.1.16'
25
25
 
26
26
  # Files...
27
- main = Find.find("bin").to_a +
28
- Find.find("lib").to_a
29
-
30
- Dir.chdir("data") do
31
- system("tar zcvf standard.tgz standard/ >/dev/null 2>&1")
32
- end
33
-
34
- std_theme = ["data/standard.tgz"]
35
-
36
- misc = %w[./README.lt3 ./README.md ./runeblog.gemspec]
27
+ main = Find.find("bin").to_a +
28
+ Find.find("lib").to_a +
29
+ Find.find("themes").to_a
37
30
  test = Find.find("test").to_a
31
+ misc = %w[./README.lt3 ./README.md ./runeblog.gemspec]
38
32
 
39
- s.files = main + std_theme + misc + test
33
+ s.files = main + misc + test
40
34
  s.homepage = 'https://github.com/Hal9000/runeblog'
41
35
  s.license = "Ruby"
42
36
  end
@@ -19,7 +19,8 @@ def debug(str)
19
19
  end
20
20
 
21
21
  def make_post(x, title, teaser, body, views=[])
22
- STDERR.puts "\n========= make_post '#{title}'"
22
+ # STDERR.puts "\n========= make_post '#{title}'"
23
+ print "."
23
24
  meta = OpenStruct.new
24
25
  num = x.create_new_post(title, true, teaser: teaser, body: body, other_views: views)
25
26
  num
@@ -32,15 +33,19 @@ def show_lines(text)
32
33
  str
33
34
  end
34
35
 
36
+
37
+
38
+ puts
39
+
35
40
  system("rm -rf .blogs")
36
- RuneBlog.create_new_blog_repo('test_view', ".blogs/data")
37
- x = RuneBlog.new
41
+ RuneBlog.create_new_blog_repo(".blogs")
42
+ x = RuneBlog.new(".blogs")
38
43
 
39
44
  x.create_view("around_austin") # FIXME remember view title!
40
45
 
41
46
  # Hack:
42
47
  if File.exist?("publish")
43
- system("cp publish .blogs/data/views/around_austin/publish")
48
+ system("cp publish .blogs/views/around_austin/publish")
44
49
  end
45
50
 
46
51
  x.create_view("computing")
@@ -61,36 +66,36 @@ EXCERPT
61
66
  Now, depending on what you consider "major," blah blah blah...
62
67
  BODY
63
68
 
64
- # x.change_view("computing") # 3 5 6
65
- #
66
- # make_post(x, "Elixir Conf coming up...", <<-EXCERPT, <<-BODY)
67
- # The next Elixir Conf is always coming up.
68
- # EXCERPT
69
- # I mean, unless the previous one was the last one ever, which I don't expect to
70
- # happen for a couple of decades.
71
- # BODY
72
- #
73
- # x.change_view("music") # 4 10
74
- #
75
- # make_post(x, "Does indie still matter?", <<-EXCERPT, <<-BODY)
76
- # Indie msic blah blah blah blah....
77
- # EXCERPT
78
- # And more about indie music.
79
- # BODY
80
- #
81
- # x.change_view("computing")
82
- #
83
- # make_post(x, "The genius of Scenic", <<-EXCERPT, <<-BODY)
84
- # Boyd Multerer is a genius.
85
- # EXCERPT
86
- # And so is Scenic.
87
- # BODY
88
- #
89
- # make_post(x, "The future of coding", <<-EXCERPT, <<-BODY)
90
- # Someday you can forget your text editor entirely.
91
- # EXCERPT
92
- # But that day hasn't come yet.
93
- # BODY
69
+ x.change_view("computing") # 3 5 6
70
+
71
+ make_post(x, "Elixir Conf coming up...", <<-EXCERPT, <<-BODY)
72
+ The next Elixir Conf is always coming up.
73
+ EXCERPT
74
+ I mean, unless the previous one was the last one ever, which I don't expect to
75
+ happen for a couple of decades.
76
+ BODY
77
+
78
+ x.change_view("music") # 4 10
79
+
80
+ make_post(x, "Does indie still matter?", <<-EXCERPT, <<-BODY)
81
+ Indie msic blah blah blah blah....
82
+ EXCERPT
83
+ And more about indie music.
84
+ BODY
85
+
86
+ x.change_view("computing")
87
+
88
+ make_post(x, "The genius of Scenic", <<-EXCERPT, <<-BODY)
89
+ Boyd Multerer is a genius.
90
+ EXCERPT
91
+ And so is Scenic.
92
+ BODY
93
+
94
+ make_post(x, "The future of coding", <<-EXCERPT, <<-BODY)
95
+ Someday you can forget your text editor entirely.
96
+ EXCERPT
97
+ But that day hasn't come yet.
98
+ BODY
94
99
 
95
100
  x.change_view("around_austin")
96
101
 
@@ -124,3 +129,4 @@ BODY
124
129
 
125
130
  x.change_view("around_austin")
126
131
 
132
+ puts
@@ -0,0 +1,26 @@
1
+
2
+ templates The first "default theme" - more later
3
+ ├── README This file
4
+ ├── about.html An "about" file (will move)
5
+ ├── assets Assets for entire view (blog)
6
+ │   ├── application.css "Global" CSS
7
+ │   ├── favicon.ico Favicon
8
+ │   └── ... Other files later, images, etc.
9
+ ├── blog ** The whole template for this view (blog)
10
+ │   ├── _postentry.lt3 Used repeatedly in list of blog posts
11
+ │   ├── generate.lt3 The "main wrapper" that actually generates everything
12
+ │   ├── index.lt3 The main "user editable" portion of the template
13
+ │   ├── navbar.lt3 The navigation bar
14
+ │   └── sidebar The sidebar (which may include different things)
15
+ │   ├── ad.lt3 Code to generate an advertisement
16
+ │   ├── calendar.lt3 Code for a calendar
17
+ │   ├── news.lt3 Recent news
18
+ │   └── tag-cloud.lt3 Tag cloud (generated automatically of course)
19
+ ├── global.lt3 Some global settings
20
+ ├── head.lt3 A standard <head> section
21
+ ├── meta.lt3 Standard meta tags
22
+ └── post
23
+    ├── head.lt3 Specific to post (adds to higher-level head)
24
+    ├── generate.lt3 The "main wrapper" that actually generates the post
25
+    └── index.lt3 The main "user editable" portion of the post template
26
+
@@ -0,0 +1,4 @@
1
+ <section class="post">
2
+ <h1>About me</h1>
3
+ Blah blah blah...
4
+ </section>
@@ -0,0 +1,32 @@
1
+ .post-title a {
2
+ color: #010101;
3
+ font-size: 28px;
4
+ float: right;
5
+ display: inline-block;
6
+ text-align: top;
7
+ text-decoration: none;
8
+ }
9
+
10
+ .post-title a:hover {
11
+ text-decoration: none;
12
+ }
13
+
14
+ .post-title-text a {
15
+ color: #0101a1;
16
+ font-size: 22px;
17
+ # float: right;
18
+ display: block;
19
+ text-decoration: none;
20
+ }
21
+
22
+ .post-title-text a:hover {
23
+ text-decoration: none;
24
+ }
25
+
26
+ .post-date {
27
+ color: #9a9a9a;
28
+ font-size: 15px;
29
+ display: block;
30
+ float: left;
31
+ text-align: top;
32
+ }
@@ -0,0 +1,19 @@
1
+ <div class="post">
2
+ <table width=100%>
3
+ <tr>
4
+ <td width=8% valign=top>
5
+ <span class="post-date mt-1 mb-1">
6
+ <b>#{date}</b>
7
+ </span>
8
+ </td>
9
+ <td> <!-- <span class="post-title-box"> -->
10
+ <span class="post-title-text"><a href="#{url}">#{title}</a></span>
11
+ <p><b>#{teaser_text}</b>
12
+ <br>
13
+ <a style="text-decoration: none" href="#{url}"><small>Keep reading...</small></a></p> <!-- </span> -->
14
+ </td>
15
+ </tr>
16
+ </table>
17
+ <br>
18
+ <br>
19
+ </div>
@@ -0,0 +1,17 @@
1
+ .mixin liveblog
2
+
3
+ <html>
4
+ <!-- Editing this file is not recommended. -->
5
+ <!-- It was generated from $File on $$date. -->
6
+
7
+ .include global.lt3
8
+ .include blog-head.lt3
9
+ <body>
10
+ $.include navbar.lt3
11
+ <div class="content container-fluid mt-4">
12
+ <div class="row">
13
+ $.include blog-index.lt3
14
+ </div>
15
+ </div>
16
+ </body>
17
+ </html>
@@ -0,0 +1,28 @@
1
+ <head> <!-- fix this later -->
2
+
3
+ .include meta.lt3
4
+
5
+ .stylesheet
6
+ https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css
7
+ sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T
8
+ .end
9
+
10
+ .script
11
+ https://code.jquery.com/jquery-3.3.1.slim.min.js
12
+ sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo
13
+ .end
14
+
15
+ .script
16
+ https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js
17
+ sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1
18
+ .end
19
+
20
+ .script
21
+ https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js
22
+ sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM
23
+ .end
24
+
25
+ </head>
26
+
27
+ .head # fix/remove later
28
+ .end
@@ -0,0 +1,11 @@
1
+ .main recent_posts
2
+
3
+ . Should sidebar just stick items on its command line?
4
+
5
+ .sidebar
6
+ AD
7
+ NEWS
8
+ CALENDAR
9
+ TAG-CLOUD
10
+ .end
11
+
@@ -0,0 +1,3 @@
1
+ .meta charset: utf-8
2
+ .meta http-equiv: X-UA-Compatible content: IE=edge,chrome=1
3
+ .meta name: viewport content: width=device-width,initial-scale=1
@@ -0,0 +1,6 @@
1
+ .navbar
2
+ index.html Home
3
+ about.html About
4
+ contact.html Contact
5
+ .end
6
+
@@ -0,0 +1,7 @@
1
+ .set author="Hal Fulton"
2
+ .set title="My Blog (and Welcome To It)"
3
+ .set desc="All the stuff you never needed to know"
4
+ .set host=localhost:4000//
5
+
6
+ . Maybe move publish info here?
7
+
@@ -0,0 +1,28 @@
1
+ <head> <!-- fix this later -->
2
+
3
+ .include meta.lt3
4
+
5
+ .stylesheet
6
+ https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css
7
+ sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T
8
+ .end
9
+
10
+ .script
11
+ https://code.jquery.com/jquery-3.3.1.slim.min.js
12
+ sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo
13
+ .end
14
+
15
+ .script
16
+ https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js
17
+ sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1
18
+ .end
19
+
20
+ .script
21
+ https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js
22
+ sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM
23
+ .end
24
+
25
+ </head>
26
+
27
+ .head # fix/remove later
28
+ .end
@@ -0,0 +1,3 @@
1
+ .meta charset: utf-8
2
+ .meta http-equiv: X-UA-Compatible content: IE=edge,chrome=1
3
+ .meta name: viewport content: width=device-width,initial-scale=1
@@ -0,0 +1,6 @@
1
+ .navbar
2
+ index.html Home
3
+ about.html About
4
+ contact.html Contact
5
+ .end
6
+
@@ -0,0 +1,5 @@
1
+ <section class="post">
2
+ <div class="entry-content">
3
+ POST
4
+ </div>
5
+ </section>
@@ -0,0 +1,4 @@
1
+ . Inherits from ../head.lt3 and overrides with
2
+ . post-specific metadata
3
+
4
+ . To be done...
@@ -0,0 +1,16 @@
1
+ .mixin liveblog
2
+ . ^ get rid of this later
3
+
4
+ .post 0
5
+
6
+ .title The new amphitheatre is overrated
7
+ .pubdate 2019-07-09
8
+ .views around_austin
9
+ .tags
10
+
11
+ .teaser
12
+ It used to be that all major concerts played the Erwin Center.
13
+
14
+ .end
15
+ Now, depending on what you consider "major," blah blah blah...
16
+
@@ -0,0 +1,5 @@
1
+ .card1 Advertisement
2
+ Build your amazing website with blabla.com.
3
+ https://google.com/,_blank,btn btn-light float-right,Visit Page
4
+ .end
5
+
@@ -0,0 +1,6 @@
1
+
2
+ .card_iframe Calendar
3
+ https://calendar.google.com/calendar/embed?src=en-gb.indian%23holiday%40group.v.calendar.google.com&ctz=Asia%2FKolkata
4
+ height="350"
5
+ .end
6
+
@@ -0,0 +1,7 @@
1
+ .card2 Recent News
2
+ https://nest.com/whats-happening/,_blank,Google Is Turning Off the Works-with-Nest API
3
+ https://developers.googleblog.com/2019/05/Flutter-io19.html,_blank,Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
4
+ https://github.com/kkuchta/css-only-chat,_blank,Css-only-chat: A truly monstrous async web chat using no JS on the front end
5
+ https://jaycarlson.net/microcontrollers/,_blank,The Amazing $1 Microcontroller (2017)
6
+ .end
7
+
@@ -0,0 +1,10 @@
1
+ .tag_cloud
2
+ https://google.com/,_blank,btn btn-dark m-1,Programming
3
+ https://google.com/,_blank,btn btn-danger m-1,Science Fiction
4
+ https://google.com/,_blank,btn btn-light m-1,Art
5
+ https://google.com/,_blank,btn btn-dark m-1,Robotics
6
+ https://google.com/,_blank,btn btn-warning m-1,Food and Travel
7
+ https://google.com/,_blank,btn btn-light m-1,DIY Hacks
8
+ https://google.com/,_blank,btn btn-info m-1,Surfing
9
+ .end
10
+
@@ -0,0 +1,5 @@
1
+ .card1 Advertisement
2
+ Build your amazing website with blabla.com.
3
+ https://google.com/,_blank,btn btn-light float-right,Visit Page
4
+ .end
5
+
@@ -0,0 +1,6 @@
1
+
2
+ .card_iframe Calendar
3
+ https://calendar.google.com/calendar/embed?src=en-gb.indian%23holiday%40group.v.calendar.google.com&ctz=Asia%2FKolkata
4
+ height="350"
5
+ .end
6
+
@@ -0,0 +1,7 @@
1
+ .card2 Recent News
2
+ https://nest.com/whats-happening/,_blank,Google Is Turning Off the Works-with-Nest API
3
+ https://developers.googleblog.com/2019/05/Flutter-io19.html,_blank,Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop
4
+ https://github.com/kkuchta/css-only-chat,_blank,Css-only-chat: A truly monstrous async web chat using no JS on the front end
5
+ https://jaycarlson.net/microcontrollers/,_blank,The Amazing $1 Microcontroller (2017)
6
+ .end
7
+
@@ -0,0 +1,10 @@
1
+ .tag_cloud
2
+ https://google.com/,_blank,btn btn-dark m-1,Programming
3
+ https://google.com/,_blank,btn btn-danger m-1,Science Fiction
4
+ https://google.com/,_blank,btn btn-light m-1,Art
5
+ https://google.com/,_blank,btn btn-dark m-1,Robotics
6
+ https://google.com/,_blank,btn btn-warning m-1,Food and Travel
7
+ https://google.com/,_blank,btn btn-light m-1,DIY Hacks
8
+ https://google.com/,_blank,btn btn-info m-1,Surfing
9
+ .end
10
+
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.81
4
+ version: 0.1.86
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-08-21 00:00:00.000000000 Z
11
+ date: 2019-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext
@@ -61,7 +61,6 @@ files:
61
61
  - "./README.md"
62
62
  - "./runeblog.gemspec"
63
63
  - bin/blog
64
- - data/standard.tgz
65
64
  - lib/Javascript.stuff
66
65
  - lib/default.rb
67
66
  - lib/global.rb
@@ -78,6 +77,31 @@ files:
78
77
  - test/general_test.rb
79
78
  - test/make_blog.rb
80
79
  - test/test
80
+ - themes/standard/README
81
+ - themes/standard/about.html
82
+ - themes/standard/assets/blog.css
83
+ - themes/standard/assets/favicon.ico
84
+ - themes/standard/blog-_postentry.lt3
85
+ - themes/standard/blog-generate.lt3
86
+ - themes/standard/blog-head.lt3
87
+ - themes/standard/blog-index.lt3
88
+ - themes/standard/blog-meta.lt3
89
+ - themes/standard/blog-navbar.lt3
90
+ - themes/standard/global.lt3
91
+ - themes/standard/head.lt3
92
+ - themes/standard/meta.lt3
93
+ - themes/standard/navbar.lt3
94
+ - themes/standard/post-generate.lt3
95
+ - themes/standard/post-head.lt3
96
+ - themes/standard/post-index.lt3
97
+ - themes/standard/sidebar-ad.lt3
98
+ - themes/standard/sidebar-calendar.lt3
99
+ - themes/standard/sidebar-news.lt3
100
+ - themes/standard/sidebar-tag-cloud.lt3
101
+ - themes/standard/sidebar/ad.lt3
102
+ - themes/standard/sidebar/calendar.lt3
103
+ - themes/standard/sidebar/news.lt3
104
+ - themes/standard/sidebar/tag-cloud.lt3
81
105
  homepage: https://github.com/Hal9000/runeblog
82
106
  licenses:
83
107
  - Ruby
Binary file