runeblog 0.2.57 → 0.2.58

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: 4bef2ece4e81cf77b6418ee5eec97c79a2bcffe8917da084759c96a079e84de7
4
- data.tar.gz: 4f55658cc1592fb4af748286027c2b504160cd2c61a1c23e5260aa94e6ba1a22
3
+ metadata.gz: '0873c41ad8c6eeae9fd84afe21144479c1c6bc1592ce74a18a84876b9d759aa4'
4
+ data.tar.gz: a3bb718ca13531568b0cce72f574c4642a976577b1449f37a592c845966c0084
5
5
  SHA512:
6
- metadata.gz: 2bc13f4c60be93ed5ecf215990b60140bb5c977a0bb130d06bd830b656d86c1103ab88a4e3037e108ef1502fd583ac816d0239040d50f06340eef48835fbd0d9
7
- data.tar.gz: 5f2a2257355c259b769b6d2625bb8918fc4d538e416d38485a8a8fb0f649ad65ec5ac3af17f7701d76a1c472cee4aa1f7f5b626b9ff501a12383f27fbb480b24
6
+ metadata.gz: 6a059e27fa46e4367dfb9827f7587472152b6c62120abd10ab3ff61432e4363c122889150d027a32e673029e5ace5414c646e99d8700f2e9c17efa7e7be93e3f
7
+ data.tar.gz: 5d370df15a116caf0d6b3a3f2322af80e629d02ecfbd7b8274196b14f02bcf9edf15e8c48420f8b14235ee58946f7a3f86524496e08127b034df03531120c0ed
data/README.lt3 CHANGED
@@ -1,23 +1,18 @@
1
1
  .mixin markdown
2
- <div float="left" align="left">
3
-
4
-
5
- <img src="raido.png" width="196" height="275" align="left"></img>
2
+ <div style="float: left; align: left; vertical-align: bottom">
3
+ <img src="raido4.png" width="210" height="295" align="left"></img>
6
4
  </div>
5
+ <h1>runeblog</h1><b>Runeblog</b> is a blogging tool written in Ruby. It has these basic characteristics:
6
+ <ul>
7
+ <li>It is usable entirely in text mode from the terminal</li>
8
+ <li>It publishes web pages as static HTML</li>
9
+ <li>So far, yes, like Jekyll</li>
10
+ <li>It's based on Livetext (highly extensible Ruby-based markup)</li>
11
+ <li>It has the concept of multiple "views" for a blog</li>
12
+ <li>The multiple views are in effect multiple blogs managed with the same backend.</li>
13
+ </ul>
7
14
 
8
- .h1 runeblog
9
-
10
- Runeblog is a blogging tool written in Ruby. It has these basic characteristics:
11
-
12
- .list
13
- It is usable entirely from the command line
14
- It publishes web pages as static HTML
15
- So far, yes, like Jekyll
16
- It's based on Livetext (highly extensible Ruby-based markup)
17
- It has the concept of multiple "views" for a blog
18
- .end
19
15
 
20
- The multiple views are in effect multiple blogs managed with the same backend.
21
16
 
22
17
  .h2 What is Livetext?
23
18
 
@@ -38,15 +33,16 @@ would go into another. There might be a view that only old friends or close frie
38
33
  can see. There might be a view purely for reviews of music, books, and movies.
39
34
 
40
35
  But the important points are these:
36
+
41
37
  .list
42
- _All the views will be managed the same way in the same place, and they will all share common data.
38
+ <i>All</i> the views will be managed the same way in the same place, and they will all share common data.
43
39
  Any post can easily be included in a single view, in more than one, or in all of them.
44
40
  Each view can have its own look and feel, and it can be linked/published separately from the others.
45
41
  Each view can be hosted in a different location and/or a different server and domain
46
42
  Any post can be in more than one view
47
43
  .end
48
44
 
49
- .h2 The `[blog] environment
45
+ .h2 The <tt>blog</tt> environment
50
46
 
51
47
  There is a command-line tool called `blog which is a REPL (read-eval-print loop).
52
48
  Note that this tool is a curses-based environment (mainly so it can display menus
@@ -55,93 +51,192 @@ and such to the user).
55
51
  The help message looks like this:
56
52
 
57
53
  .mono
58
- Commands:
54
+ <b>Basics:</b> <b>Views:</b>
55
+ ------------------------------------------- -------------------------------------------
56
+ <b>h, help</b> This message <b>change view VIEW</b> Change current view
57
+ <b>q, quit</b> Exit the program <b>cv VIEW</b> Change current view
58
+ <b>v, version</b> Print version information <b>new view</b> Create a new view
59
+ <b>clear</b> Clear screen <b>list views</b> List all views available
60
+ <b>lsv</b> Same as: list views
61
+ <br>
62
+ <b>Posts:</b> <b>Advanced:</b>
63
+ ------------------------------------------- -------------------------------------------
64
+ <b>p, post</b> Create a new post <b>config</b> Edit various system files
65
+ <b>new post</b> Same as p, post <b>customize</b> (BUGGY) Change set of tags, extra views
66
+ <b>lsp, list posts</b> List posts in current view <b>preview</b> Look at current (local) view in browser
67
+ <b>lsd, list drafts</b> List all drafts (all views) <b>browse</b> Look at current (published) view in browser
68
+ <b>delete ID [ID...]</b> Remove multiple posts <b>rebuild</b> Regenerate all posts and relink
69
+ <b>undelete ID</b> Undelete a post <b>publish</b> Publish (current view)
70
+ <b>edit ID</b> Edit a post <b>ssh</b> Login to remote server
71
+ <b>import ASSETS</b> Import assets (images, etc.) <b>manage WIDGET</b> Manage content/layout of a widget
72
+ .end
73
+
74
+ .h2 Getting started
59
75
 
60
- h, help This message
61
- q, quit Exit the program
76
+ But when you first run the REPL, it checks for an existing blog repository under
77
+ the `[.blogs] directory. If it doesn't find one, it asks whether you want to create
78
+ a new blog repo. Enter `y for yes.
79
+ . If you enter `y for yes, it creates a sort of "skeleton" with a single view called `[test_view].
62
80
 
63
- change view _view Change current view
64
- new view Create a new view
65
- list views List all views available
66
- lsv Same as: list views
81
+ You'll then enter the editor (vim for now) to add configuration info to the `global.lt3 file.
67
82
 
68
- p, post Create a new post
69
- new post Same as post (create a post)
70
- lsp, list posts List posts in current view
71
- lsd, list drafts List all posts regardless of view
83
+ <pre><b>FIXME add menu screenshot here</b></pre>
84
+ <pre><b>FIXME add vim screenshot here</b></pre>
72
85
 
73
- rm _id Remove a post
74
- edit _id Edit a post
86
+ The next thing you should do is to create at least one view of your own. Use the
87
+ `[new view] command for this. Note that the current view is displayed as part of the prompt.
75
88
 
76
- preview Look at current (local) view in browser
77
- browse Look at current (deployed) view in browser
89
+ <pre>
90
+ <b>[no view]</b> new view mystuff<br>
91
+ <b>[mystuff]</b>
92
+ </pre>
78
93
 
79
- relink Regenerate index for all views (MAY CHANGE)
80
- rebuild Regenerate all posts and relink (MAY CHANGE)
81
- deploy Deploy (current view)
82
- .end
94
+ To create a new post, use the `[new post] command (also abbreviated `post or simply `[p]). You will be
95
+ prompted for a title:
83
96
 
84
- .h2 Getting started
97
+ <pre>
98
+ <b>[around_austin]</b> new post<br>
99
+ <b>Title:</b> This is my first post
100
+ </pre>
85
101
 
86
- But when you first run the REPL, it checks for an existing blog repository under
87
- the `[.blog] directory. If it doesn't find one, it asks whether you want to create
88
- a new blog repo. If you enter `y for yes, it creates a sort of "skeleton" with a
89
- single view called `[test_view].
102
+ Then you'll be sent into the editor (currently vim but can be others):
90
103
 
91
- The next thing you should do is to create at least one view of your own. Use the
92
- `[new view] command for this.
104
+ <pre><b>FIXME add example here</b></pre>
93
105
 
94
- (new view)
106
+ <pre>
107
+ <b>FIXME wizard?</b>
108
+ (publishing one-time setup - server, ssh keys, etc.)
109
+ preview...
110
+ publish...
111
+ browse...
112
+ (and so on)
113
+ </pre>
95
114
 
96
- (new post)
115
+ <b>To be continued</b>
97
116
 
98
- (preview)
117
+ .h2 Customizing the default templates and configuration
99
118
 
100
- (publishing one-time setup - server, ssh keys, etc.)
119
+ You can use the `config command to choose a file to edit.
101
120
 
102
- (publish)
121
+ <pre><b>FIXME add screenshot here</b></pre>
103
122
 
104
- (browse)
123
+ The meaning and interaction of these files will be explained later. *FIXME
105
124
 
106
- (and so on...)
125
+ When you make changes, `rebuild will detect these and regenerate whatever files
126
+ are needed.
107
127
 
108
- *[To be continued]
128
+ .h2 The directory structure for a view
109
129
 
110
- .h2 Changing the default templates
130
+ <pre><b>FIXME add details here</b></pre>
111
131
 
112
- *TBD
113
132
 
114
133
  .h2 Basics of Livetext
115
134
 
116
- *TBD
135
+ <b>TBD</b>
136
+
137
+ <b>Bold, italics, etc.</b>
138
+ single, double, bracketed
139
+
140
+ <b>Common dot commands)
141
+ <pre>
142
+ .debug
143
+ .say
144
+ .nopara
145
+ .quit
146
+ indented dot-commands
147
+ </pre>
148
+
149
+ <b>Using external files</b>
150
+ <pre>
151
+ .mixin
152
+ .include
153
+ .copy
154
+ .seek
155
+ </pre>
156
+
157
+ <b>Predefined functions and variables</b>
158
+ <pre>
159
+ \$File
160
+ \$\$date
161
+ etc.
162
+ </pre>
163
+
164
+ .h2 Runeblog-specific features (Liveblog</b>
165
+
166
+ <b>TBD</b>
167
+
168
+ <b>Dot commands - the basics</b>
169
+ <pre>
170
+ .mixin liveblog
171
+ .post
172
+ .title
173
+ .views
174
+ .tags
175
+ .teaser
176
+ </pre>
177
+
178
+ <b>Dot commands - more advanced</b>
179
+ <pre>
180
+ .image
181
+ .inset
182
+ .dropcap
183
+ .pin
184
+ </pre>
185
+
186
+ <b>Variables and functions</b>
187
+ <pre>
188
+ \$view, etc.
189
+ \$\$date, \$\$link, etc.
190
+ </pre>
117
191
 
118
- (bold, italics, etc.)
119
192
 
120
- (common dot commands)
193
+ .h2 Defining your own features
121
194
 
122
- (predefined functions and variables)
195
+ <b>Dot commands, variables, functions</b>
196
+ <pre>
197
+ .def/.end
198
+ .set
199
+ .variables
200
+ .heredoc
201
+ .func
202
+ </pre>
123
203
 
124
- .h2 Runeblog-specific features (Liveblog)
204
+ <b>Defining these in Ruby</b>
125
205
 
126
- *TBD
127
206
 
128
- (dot commands)
207
+ .h2 More topics
129
208
 
130
- (variables and functions)
209
+ <b>Meta tags, etc.</b>
210
+ <b>CSS</b>
131
211
 
132
- .h2 Defining your own features
212
+ <b>Widgets</b>
213
+ <pre>
214
+ pages
215
+ links
216
+ pinned
217
+ faq
218
+ sitemap
219
+ news
220
+ etc.
221
+ </pre>
133
222
 
134
- (dot commands)
223
+ <b>Banner and navbar</b>
135
224
 
136
- (variables and functions)
225
+ <b>Creating your own widgets</b>
137
226
 
138
- *TBD
227
+ <b>Special tags coming "soon"</b>
228
+ <pre>
229
+ github, gitlab, gist
230
+ wikipedia
231
+ youtube, vimeo
232
+ twitter, instagram
233
+ etc.
234
+ </pre>
139
235
 
140
- .h2
141
236
 
142
- *TBD
237
+ <b>TBD</b>
143
238
 
144
239
  .h2 More later...
145
240
 
146
- *TBD
241
+ <b>TBD</b>
147
242
 
data/README.md CHANGED
@@ -1,22 +1,19 @@
1
- <div float="left" align="left">
2
- <p>
3
-
4
- <p>
5
-
6
- <img src="raido.png" width="196" height="275" align="left"></img>
1
+ <div style="float: left; align: left; vertical-align: bottom">
2
+ <img src="raido4.png" width="210" height="295" align="left"></img>
7
3
  </div>
4
+ <h1>runeblog</h1><b>Runeblog</b> is a blogging tool written in Ruby. It has these basic characteristics:
5
+ <ul>
6
+ <li>It is usable entirely in text mode from the terminal</li>
7
+ <li>It publishes web pages as static HTML</li>
8
+ <li>So far, yes, like Jekyll</li>
9
+ <li>It's based on Livetext (highly extensible Ruby-based markup)</li>
10
+ <li>It has the concept of multiple "views" for a blog</li>
11
+ <li>The multiple views are in effect multiple blogs managed with the same backend.</li>
12
+ </ul>
8
13
  <p>
9
14
 
10
- # runeblog
11
- Runeblog is a blogging tool written in Ruby. It has these basic characteristics:
12
15
  <p>
13
16
 
14
- * It is usable entirely from the command line
15
- * It publishes web pages as static HTML
16
- * So far, yes, like Jekyll
17
- * It's based on Livetext (highly extensible Ruby-based markup)
18
- * It has the concept of multiple "views" for a blog
19
- The multiple views are in effect multiple blogs managed with the same backend.
20
17
  <p>
21
18
 
22
19
  ## What is Livetext?
@@ -40,12 +37,14 @@ can see. There might be a view purely for reviews of music, books, and movies.
40
37
  <p>
41
38
 
42
39
  But the important points are these:
43
- * _All the views will be managed the same way in the same place, and they will all share common data.
40
+ <p>
41
+
42
+ * <i>All</i> the views will be managed the same way in the same place, and they will all share common data.
44
43
  * Any post can easily be included in a single view, in more than one, or in all of them.
45
44
  * Each view can have its own look and feel, and it can be linked/published separately from the others.
46
45
  * Each view can be hosted in a different location and/or a different server and domain
47
46
  * Any post can be in more than one view
48
- ## The `[blog] environment
47
+ ## The <tt>blog</tt> environment
49
48
  There is a command-line tool called <font size=+1><tt>blog</tt></font> which is a REPL (read-eval-print loop).
50
49
  Note that this tool is a curses-based environment (mainly so it can display menus
51
50
  and such to the user).
@@ -55,108 +54,220 @@ The help message looks like this:
55
54
  <p>
56
55
 
57
56
  <pre>
58
- Commands:
57
+ <b>Basics:</b> <b>Views:</b>
58
+ ------------------------------------------- -------------------------------------------
59
+ <b>h, help</b> This message <b>change view VIEW</b> Change current view
60
+ <b>q, quit</b> Exit the program <b>cv VIEW</b> Change current view
61
+ <b>v, version</b> Print version information <b>new view</b> Create a new view
62
+ <b>clear</b> Clear screen <b>list views</b> List all views available
63
+ <b>lsv</b> Same as: list views
64
+ <br>
65
+ <b>Posts:</b> <b>Advanced:</b>
66
+ ------------------------------------------- -------------------------------------------
67
+ <b>p, post</b> Create a new post <b>config</b> Edit various system files
68
+ <b>new post</b> Same as p, post <b>customize</b> (BUGGY) Change set of tags, extra views
69
+ <b>lsp, list posts</b> List posts in current view <b>preview</b> Look at current (local) view in browser
70
+ <b>lsd, list drafts</b> List all drafts (all views) <b>browse</b> Look at current (published) view in browser
71
+ <b>delete ID [ID...]</b> Remove multiple posts <b>rebuild</b> Regenerate all posts and relink
72
+ <b>undelete ID</b> Undelete a post <b>publish</b> Publish (current view)
73
+ <b>edit ID</b> Edit a post <b>ssh</b> Login to remote server
74
+ <b>import ASSETS</b> Import assets (images, etc.) <b>manage WIDGET</b> Manage content/layout of a widget
75
+ </pre>
76
+ ## Getting started
77
+ But when you first run the REPL, it checks for an existing blog repository under
78
+ the <font size=+1><tt>.blogs</tt></font> directory. If it doesn't find one, it asks whether you want to create
79
+ a new blog repo. Enter <font size=+1><tt>y</tt></font> for yes.
80
+ <p>
59
81
 
60
- h, help This message
61
- q, quit Exit the program
82
+ You'll then enter the editor (vim for now) to add configuration info to the <font size=+1><tt>global.lt3</tt></font> file.
83
+ <p>
62
84
 
63
- change view _view Change current view
64
- new view Create a new view
65
- list views List all views available
66
- lsv Same as: list views
85
+ <pre><b>FIXME add menu screenshot here</b></pre>
86
+ <pre><b>FIXME add vim screenshot here</b></pre>
87
+ <p>
67
88
 
68
- p, post Create a new post
69
- new post Same as post (create a post)
70
- lsp, list posts List posts in current view
71
- lsd, list drafts List all posts regardless of view
89
+ The next thing you should do is to create at least one view of your own. Use the
90
+ `[new view] command for this. Note that the current view is displayed as part of the prompt.
91
+ <p>
72
92
 
73
- rm _id Remove a post
74
- edit _id Edit a post
93
+ <pre>
94
+ <b>[no view]</b> new view mystuff<br>
95
+ <b>[mystuff]</b>
96
+ </pre>
97
+ <p>
75
98
 
76
- preview Look at current (local) view in browser
77
- browse Look at current (deployed) view in browser
99
+ To create a new post, use the <font size=+1><tt>new post</tt></font> command (also abbreviated <font size=+1><tt>post</tt></font> or simply <font size=+1><tt>p</tt></font>). You will be
100
+ prompted for a title:
101
+ <p>
78
102
 
79
- relink Regenerate index for all views (MAY CHANGE)
80
- rebuild Regenerate all posts and relink (MAY CHANGE)
81
- deploy Deploy (current view)
103
+ <pre>
104
+ <b>[around_austin]</b> new post<br>
105
+ <b>Title:</b> This is my first post
82
106
  </pre>
83
- ## Getting started
84
- But when you first run the REPL, it checks for an existing blog repository under
85
- the <font size=+1><tt>.blog</tt></font> directory. If it doesn't find one, it asks whether you want to create
86
- a new blog repo. If you enter <font size=+1><tt>y</tt></font> for yes, it creates a sort of "skeleton" with a
87
- single view called <font size=+1><tt>test_view</tt></font>.
88
107
  <p>
89
108
 
90
- The next thing you should do is to create at least one view of your own. Use the
91
- <font size=+1><tt>new view</tt></font> command for this.
109
+ Then you'll be sent into the editor (currently vim but can be others):
92
110
  <p>
93
111
 
94
- (new view)
112
+ <pre><b>FIXME add example here</b></pre>
95
113
  <p>
96
114
 
97
- (new post)
115
+ <pre>
116
+ <b>FIXME wizard?</b>
117
+ (publishing one-time setup - server, ssh keys, etc.)
118
+ preview...
119
+ publish...
120
+ browse...
121
+ (and so on)
122
+ </pre>
98
123
  <p>
99
124
 
100
- (preview)
125
+ <b>To be continued</b>
101
126
  <p>
102
127
 
103
- (publishing one-time setup - server, ssh keys, etc.)
128
+ ## Customizing the default templates and configuration
129
+ You can use the <font size=+1><tt>config</tt></font> command to choose a file to edit.
104
130
  <p>
105
131
 
106
- (publish)
132
+ <pre><b>FIXME add screenshot here</b></pre>
107
133
  <p>
108
134
 
109
- (browse)
135
+ The meaning and interaction of these files will be explained later. <b>FIXME</b>
110
136
  <p>
111
137
 
112
- (and so on...)
138
+ When you make changes, <font size=+1><tt>rebuild</tt></font> will detect these and regenerate whatever files
139
+ are needed.
113
140
  <p>
114
141
 
115
- *[To be continued]
142
+ ## The directory structure for a view
143
+ <pre><b>FIXME add details here</b></pre>
116
144
  <p>
117
145
 
118
- ## Changing the default templates
119
- *TBD
120
146
  <p>
121
147
 
122
148
  ## Basics of Livetext
123
- *TBD
149
+ <b>TBD</b>
150
+ <p>
151
+
152
+ <b>Bold, italics, etc.</b>
153
+ single, double, bracketed
154
+ <p>
155
+
156
+ <b>Common dot commands)
157
+ <pre>
158
+ .debug
159
+ .say
160
+ .nopara
161
+ .quit
162
+ indented dot-commands
163
+ </pre>
164
+ <p>
165
+
166
+ <b>Using external files</b>
167
+ <pre>
168
+ .mixin
169
+ .include
170
+ .copy
171
+ .seek
172
+ </pre>
124
173
  <p>
125
174
 
126
- (bold, italics, etc.)
175
+ <b>Predefined functions and variables</b>
176
+ <pre>
177
+ $File
178
+ $\[date is undefined]
179
+ etc.
180
+ </pre>
127
181
  <p>
128
182
 
129
- (common dot commands)
183
+ ## Runeblog-specific features (Liveblog</b>
184
+ <b>TBD</b>
130
185
  <p>
131
186
 
132
- (predefined functions and variables)
187
+ <b>Dot commands - the basics</b>
188
+ <pre>
189
+ .mixin liveblog
190
+ .post
191
+ .title
192
+ .views
193
+ .tags
194
+ .teaser
195
+ </pre>
133
196
  <p>
134
197
 
135
- ## Runeblog-specific features (Liveblog)
136
- *TBD
198
+ <b>Dot commands - more advanced</b>
199
+ <pre>
200
+ .image
201
+ .inset
202
+ .dropcap
203
+ .pin
204
+ </pre>
137
205
  <p>
138
206
 
139
- (dot commands)
207
+ <b>Variables and functions</b>
208
+ <pre>
209
+ $view, etc.
210
+ $\[date is undefined], $\[link is undefined], etc.
211
+ </pre>
140
212
  <p>
141
213
 
142
- (variables and functions)
143
214
  <p>
144
215
 
145
216
  ## Defining your own features
146
- (dot commands)
217
+ <b>Dot commands, variables, functions</b>
218
+ <pre>
219
+ .def/.end
220
+ .set
221
+ .variables
222
+ .heredoc
223
+ .func
224
+ </pre>
147
225
  <p>
148
226
 
149
- (variables and functions)
227
+ <b>Defining these in Ruby</b>
228
+ <p>
229
+
230
+ <p>
231
+
232
+ ## More topics
233
+ <b>Meta tags, etc.</b>
234
+ <b>CSS</b>
235
+ <p>
236
+
237
+ <b>Widgets</b>
238
+ <pre>
239
+ pages
240
+ links
241
+ pinned
242
+ faq
243
+ sitemap
244
+ news
245
+ etc.
246
+ </pre>
247
+ <p>
248
+
249
+ <b>Banner and navbar</b>
250
+ <p>
251
+
252
+ <b>Creating your own widgets</b>
253
+ <p>
254
+
255
+ <b>Special tags coming "soon"</b>
256
+ <pre>
257
+ github, gitlab, gist
258
+ wikipedia
259
+ youtube, vimeo
260
+ twitter, instagram
261
+ etc.
262
+ </pre>
150
263
  <p>
151
264
 
152
- *TBD
153
265
  <p>
154
266
 
155
- ##
156
- *TBD
267
+ <b>TBD</b>
157
268
  <p>
158
269
 
159
270
  ## More later...
160
- *TBD
271
+ <b>TBD</b>
161
272
  <p>
162
273
 
@@ -8,8 +8,8 @@
8
8
  .recent_posts
9
9
 
10
10
  .sidebar
11
- ad
12
11
  links
12
+ ad
13
13
  pinned
14
14
  pages
15
15
  news
@@ -8,6 +8,9 @@
8
8
  . not needed.
9
9
  . --------------------------------------------------
10
10
 
11
+ .nopara
12
+ .mixin liveblog
13
+
11
14
  .navbar
12
15
  about About
13
16
  contact Contact
@@ -0,0 +1,19 @@
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
+
@@ -38,7 +38,7 @@ class ::RuneBlog::Widget
38
38
  tag = "links"
39
39
  url = :widgets/tag/tag+"-main.html"
40
40
  card_title = "External links" # FIXME
41
- cardfile = "#@self-card"
41
+ cardfile = "#{Type}-card"
42
42
  File.open("#{cardfile}.html", "w") do |f|
43
43
  f.puts <<-EOS
44
44
  <div class="card mb-3">
@@ -2,11 +2,81 @@
2
2
 
3
3
  class ::RuneBlog::Widget
4
4
  class News
5
+ Type, Title = "news", "News"
6
+
5
7
  def initialize(repo)
6
8
  @blog = repo
9
+ @datafile = "list.data"
7
10
  end
8
11
 
9
12
  def build
13
+ lines = File.readlines(@datafile)
14
+ @data = lines.map {|line| line.chomp.split(/, */) }
15
+ write_main
16
+ write_card
17
+ end
18
+
19
+ def _html_body(file, css = nil)
20
+ file.puts "<html>"
21
+ if css
22
+ file.puts " <head>"
23
+ file.puts " <style>\n#{css}\n </style>"
24
+ file.puts " </head>"
25
+ end
26
+ file.puts " <body>"
27
+ yield
28
+ file.puts " </body>\n</html>"
29
+ end
30
+
31
+ def write_main
32
+ mainfile = "#{Type}-main"
33
+ css = "* { font-family: verdana }"
34
+ File.open("#{mainfile}.html", "w") do |f|
35
+ _html_body(f, css) do
36
+ f.puts "<h1>#{Title}</h1><br><hr>"
37
+ @data.each do |file, frameable, title|
38
+ title = title.gsub(/\\/, "") # kludge
39
+ case frameable
40
+ when "yes"; url_ref = "href = '#{file}'"
41
+ when "no"; url_ref = %[href='#{file}' target='blank']
42
+ end
43
+ css = "color: #8888FF; text-decoration: none; font-size: 21px"
44
+ f.puts %[<a style="#{css}" #{url_ref}>#{title}</a> <br>]
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ def write_card
51
+ cardfile = "#{Type}-card"
52
+ url = "widgets/#{Type}/#{Type}-main.html"
53
+ File.open("#{cardfile}.html", "w") do |f|
54
+ f.puts <<-EOS
55
+ <div class="card mb-3">
56
+ <div class="card-body">
57
+ <h5 class="card-title">
58
+ <button type="button" class="btn btn-primary" data-toggle="collapse" data-target="##{Type}">+</button>
59
+ <a href="javascript: void(0)"
60
+ onclick="javascript:open_main('#{url}')"
61
+ style="text-decoration: none; color: black"> #{Title}</a>
62
+ </h5>
63
+ <div class="collapse" id="#{Type}">
64
+ EOS
65
+ @data.each do |file, frameable, title|
66
+ case frameable
67
+ when "yes"; url_ref = _main(file) # remote, frameable
68
+ when "no"; url_ref = _blank(file) # remote, not frameable
69
+ end
70
+ anchor = %[<a #{url_ref}>#{title}</a>]
71
+ wrapper = %[<li class="list-group-item">#{anchor}</li>]
72
+ f.puts wrapper
73
+ end
74
+ f.puts <<-EOS
75
+ </div>
76
+ </div>
77
+ </div>
78
+ EOS
79
+ end
10
80
  end
11
81
 
12
82
  def edit_menu
@@ -4,8 +4,11 @@
4
4
 
5
5
  class ::RuneBlog::Widget
6
6
  class Pages
7
+ Type = "pages"
8
+
7
9
  def initialize(repo)
8
10
  @blog = repo
11
+ @datafile = "list.data"
9
12
  end
10
13
 
11
14
  def build
@@ -15,8 +18,59 @@ class ::RuneBlog::Widget
15
18
  dest = child.sub(/.lt3$/, ".html")
16
19
  xlate src: child, dst: dest # , debug: true
17
20
  end
18
- # build mainfile
19
- # build cardfile
21
+ @lines = File.readlines(@datafile)
22
+ write_main
23
+ write_card
24
+ end
25
+
26
+ def write_main
27
+ @data = @lines.map! {|x| x.chomp.split(/, */, 3) }
28
+ css = "* { font-family: verdana }"
29
+ card_title = "Pages" # FIXME
30
+ File.open("#{Type}-main.html", "w") do |f|
31
+ _html_body(f, css) do
32
+ f.puts "<h1>#{card_title}</h1><br><hr>"
33
+ url_ref = nil
34
+ @data.each do |url, frameable, title|
35
+ url_ref = (frameable == "yes") ? "href = '#{url}'" : _blank(url)
36
+ css = "color: #8888FF; text-decoration: none; font-size: 21px" # ; font-family: verdana"
37
+ f.puts %[<a style="#{css}" #{url_ref}>#{title}</a> <br>]
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+ def write_card
44
+ tag = Type
45
+ url = :widgets/tag/tag+"-main.html"
46
+ card_title = "Pages" # FIXME
47
+ cardfile = "#{Type}-card"
48
+ File.open("#{cardfile}.html", "w") do |f|
49
+ f.puts <<-EOS
50
+ <div class="card mb-3">
51
+ <div class="card-body">
52
+ <h5 class="card-title">
53
+ <button type="button" class="btn btn-primary" data-toggle="collapse" data-target="##{tag}">+</button>
54
+ <a href="javascript: void(0)"
55
+ onclick="javascript:open_main('#{url}')"
56
+ style="text-decoration: none; color: black"> #{card_title}</a>
57
+ </h5>
58
+ <div class="collapse" id="#{tag}">
59
+ EOS
60
+ @data.each do |url2, frameable, title|
61
+ main_ref = %[href="javascript: void(0)" onclick="javascript:open_main('#{url2}')"]
62
+ tab_ref = %[href="#{url2}"]
63
+ url_ref = (frameable == "yes") ? main_ref : tab_ref
64
+ anchor = %[<a #{url_ref}>#{title}</a>]
65
+ wrapper = %[<li class="list-group-item">#{anchor}</li>]
66
+ f.puts wrapper
67
+ end
68
+ f.puts <<-EOS
69
+ </div>
70
+ </div>
71
+ </div>
72
+ EOS
73
+ end
20
74
  end
21
75
 
22
76
  def edit_menu
@@ -5,6 +5,7 @@ class ::RuneBlog::Widget
5
5
  def initialize(repo)
6
6
  @blog = repo
7
7
  @self = "pinned"
8
+ @datafile = "list.data"
8
9
  end
9
10
 
10
11
  def _html_body(file, css = nil) # FIXME
@@ -23,7 +24,7 @@ end
23
24
  @tmp = File.new("/tmp/debug-out", "w")
24
25
  posts = nil
25
26
  Dir.chdir(@blog.root/:posts) { posts = Dir["*"] }
26
- lines = File.readlines("list.data")
27
+ lines = File.exist?(@datafile) ? File.readlines(@datafile) : []
27
28
  hash = {}
28
29
  @links = []
29
30
  lines.each do |x|
@@ -109,9 +109,13 @@ def banner # still experimental
109
109
  file = "banner/#{enum.next}"
110
110
  _out "<td colspan=#{span}>" + File.read(file) + "</td>"
111
111
  when "navbar"
112
+ dir = @blog.root/:views/@blog.view/"themes/standard/navbar/"
113
+ xlate cwd: dir, src: "navbar.lt3", dst: "navbar.html" # , debug: true
112
114
  file = "navbar/navbar.html"
113
115
  _out "<td colspan=#{span}><div style='text-align: center'>" + File.read(file) + "</div></td>"
114
116
  when "vnavbar"
117
+ dir = @blog.root/:views/@blog.view/"themes/standard/navbar/"
118
+ xlate cwd: dir, src: "vnavbar.lt3", dst: "vnavbar.html" # , debug: true
115
119
  file = "navbar/vnavbar.html"
116
120
  _out "<td colspan=#{span}>" + File.read(file) + "</td>"
117
121
  when "//"
@@ -465,7 +469,7 @@ def sidebar
465
469
 
466
470
  code = _load_local(tag)
467
471
  if code
468
- if ["pages", "links", "pinned"].include? tag
472
+ if ["news", "pages", "links", "pinned"].include? tag
469
473
  Dir.chdir(wtag) do
470
474
  widget = code.new(@blog)
471
475
  widget.build
@@ -664,32 +668,34 @@ def _custom_navbar(orient = :horiz)
664
668
  extra = ""
665
669
  extra = "navbar-expand-lg" if orient == :horiz
666
670
 
667
- open = <<-HTML
671
+ start = <<-HTML
672
+ <!-- FIXME weird bug here!!! -->
668
673
  <nav class="navbar #{extra} navbar-light bg-light">
669
674
  <ul class="navbar-nav mr-auto">
670
675
  HTML
671
- close = <<-HTML
676
+ finish = <<-HTML
672
677
  </ul>
673
678
  </nav>
674
679
  HTML
675
680
 
676
- html_file = @blog.root/:views/@blog.view/:themes/:standard/:navbar/"navbar.html"
677
- output = File.new(@blog.root/:views/@blog.view/:themes/:standard/:navbar/"navbar.html", "w")
678
- output.puts open
679
- lines = _body
681
+ navdir = @blog.root/:views/@blog.view/:themes/:standard/:navbar
682
+ html_file = navdir/"navbar.html"
683
+ output = File.new(navdir/"navbar.html", "w")
684
+ output.puts start
685
+ lines = _body.to_a
680
686
  lines = [" index Home"] + lines unless _args.include?("nohome")
681
687
  lines.each do |line|
682
688
  basename, cdata = line.chomp.strip.split(" ", 2)
683
- full = :navbar/basename+".html"
689
+ full = :navdir/basename+".html"
684
690
  href_main = _main(full)
685
691
  if basename == "index" # special case
686
692
  output.puts %[<li class="nav-item active"> <a class="nav-link" href="index.html">#{cdata}<span class="sr-only">(current)</span></a> </li>]
687
693
  else
688
- xlate cwd: "navbar", src: basename, dst: vdir/"remote/navbar"/basename+".html" # , debug: true
694
+ xlate cwd: navdir, src: basename, dst: vdir/"remote/navbar"/basename+".html" # , debug: true
689
695
  output.puts %[<li class="nav-item"> <a class="nav-link" #{href_main}>#{cdata}</a> </li>]
690
696
  end
691
697
  end
692
- output.puts close
698
+ output.puts finish
693
699
  end
694
700
 
695
701
  def _old_navbar
@@ -9,12 +9,12 @@ class RuneBlog::Post
9
9
 
10
10
  include RuneBlog::Helpers
11
11
 
12
- def self.files(num, root)
13
- log!(enter: __method__, args: [num, root], level: 3)
14
- files = ::Find.find(root).to_a
15
- result = files.grep(/#{prefix(num)}-/)
16
- result
17
- end
12
+ # def self.files(num, root)
13
+ # log!(enter: __method__, args: [num, root], level: 3)
14
+ # files = ::Find.find(root).to_a
15
+ # result = files.grep(/#{prefix(num)}-/)
16
+ # result
17
+ # end
18
18
 
19
19
  def self.load(post)
20
20
  log!(enter: __method__, args: [post], level: 3)
@@ -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.57"
5
+ VERSION = "0.2.58"
6
6
 
7
7
  path = Gem.find_files("runeblog").grep(/runeblog-/).first
8
8
  Path = File.dirname(path)
@@ -78,7 +78,7 @@ x.generate_view("around_austin")
78
78
  debug("-- change_view: #{bold('around_austin')}")
79
79
  x.change_view("around_austin") # 1 2 7 8 9
80
80
 
81
- make_post(x, "What's at Stubbs...", <<-EXCERPT, <<-BODY, [])
81
+ make_post(x, "What's at Stubbs...", <<-EXCERPT, <<-BODY)
82
82
  Stubbs has been around for longer than civilization.
83
83
  EXCERPT
84
84
  That's a good thing. But their music isn't always the greatest.
@@ -87,6 +87,7 @@ BODY
87
87
  make_post(x, "The new amphitheatre is overrated", <<-EXCERPT, <<-BODY)
88
88
  It used to be that all major concerts played the Erwin Center.
89
89
  EXCERPT
90
+ .pin around_austin
90
91
  Now, depending on what you consider "major," blah blah blah...
91
92
  BODY
92
93
 
@@ -137,7 +138,7 @@ EXCERPT
137
138
  This is about Sabine St, blah blah lorem ipsum dolor...
138
139
  BODY
139
140
 
140
- make_post(x, "Remember Modest Mouse?", <<-EXCERPT, <<-BODY, [])
141
+ make_post(x, "Remember Modest Mouse?", <<-EXCERPT, <<-BODY)
141
142
  They date to the 90s or before.
142
143
  EXCERPT
143
144
  But I first heard of them
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.57
4
+ version: 0.2.58
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-29 00:00:00.000000000 Z
11
+ date: 2019-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: livetext
@@ -91,6 +91,7 @@ files:
91
91
  - empty_view/themes/standard/navbar/contact.lt3
92
92
  - empty_view/themes/standard/navbar/faq.lt3
93
93
  - empty_view/themes/standard/navbar/navbar.lt3
94
+ - empty_view/themes/standard/navbar/vnavbar.lt3
94
95
  - empty_view/themes/standard/post/generate.lt3
95
96
  - empty_view/themes/standard/post/head.lt3
96
97
  - empty_view/themes/standard/post/index.lt3