cyberweb 0.9.31 → 0.9.32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cyberweb might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +33 -1
- data/doc/README.gen +32 -0
- data/lib/cyberweb/cascading_style_sheets/border.css +5 -0
- data/lib/cyberweb/toplevel_methods/video.rb +35 -35
- data/lib/cyberweb/version/version.rb +1 -1
- data/lib/cyberweb/web_object/misc.rb +73 -49
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f4d1e47564d6d150d4821177c8ebbef554c1f2121bfcc24e8c090505287fa6c
|
4
|
+
data.tar.gz: d94cfebaf634a15b7806bde3c2249e1d4e9ca292ca2ffdd30c15c4ae1d4648fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5e434a164462fa1dc82bfa8b5126465362b8bf6b612565bd0588f51a2862774f935b0f08fe5550ffda3dbc4d486eabe62f54853438aacce1d28a1847d803821
|
7
|
+
data.tar.gz: 2aab393fda028b2dcd29749aa4346967ef8a1c0e617862077c214b3c1ecfe40b7ed36d93da5811b77fca4125ac10b8955be46eaab1444a664db0b10f21acf2ee
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
[](https://www.ruby-lang.org/en/)
|
3
3
|
[](https://badge.fury.io/rb/cyberweb)
|
4
4
|
|
5
|
-
This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">
|
5
|
+
This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">19.03.2023</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">02:43:28</span> o'clock.
|
6
6
|
|
7
7
|
<img src="https://i.imgur.com/aC4YzSk.png" style="margin-left: 1.2em">
|
8
8
|
|
@@ -4347,6 +4347,38 @@ The following paragraph shows how you can use this:
|
|
4347
4347
|
Interestingly enough, if you do not specify a color for
|
4348
4348
|
the border via border-color then this will default to <b>black</b>.
|
4349
4349
|
|
4350
|
+
## The toplevel methods english() and german()
|
4351
|
+
|
4352
|
+
A couple of years ago these two toplevel methods were added. You may
|
4353
|
+
find some of my gems make use of these, when there is content that
|
4354
|
+
ought to be displayed on a website.
|
4355
|
+
|
4356
|
+
What do these two methods do, essentially?
|
4357
|
+
|
4358
|
+
They are mostly just a mnemonic reminder that the website that
|
4359
|
+
is shown to the user (visitor) is written in that particular
|
4360
|
+
language primarily. So, for most webpages, I prefer to use:
|
4361
|
+
|
4362
|
+
english() {
|
4363
|
+
}
|
4364
|
+
|
4365
|
+
Whereas for my local knowledge base I often tend to use german.
|
4366
|
+
|
4367
|
+
Sometimes I mix both languages in the same webpage, but I wanted
|
4368
|
+
to be able to selectively switch between languages too, as well
|
4369
|
+
as be able to indicate when content is in german rather than
|
4370
|
+
english. Thus, to satisfy these use cases, german() and
|
4371
|
+
english() are available.
|
4372
|
+
|
4373
|
+
An additional use case for these methods is that I can designate
|
4374
|
+
a specific title quickly - either manually, or by using something
|
4375
|
+
like:
|
4376
|
+
|
4377
|
+
german(:autotitle)
|
4378
|
+
|
4379
|
+
The symbol :autotitle here would mean that the cyberweb gem should
|
4380
|
+
try to infer the name of the page at hand based on its filename.
|
4381
|
+
|
4350
4382
|
## Cyberweb::HtmlTemplate
|
4351
4383
|
|
4352
4384
|
class **Cyberweb::HtmlTemplate** can be used to describe (and ultimately
|
data/doc/README.gen
CHANGED
@@ -4343,6 +4343,38 @@ The following paragraph shows how you can use this:
|
|
4343
4343
|
Interestingly enough, if you do not specify a color for
|
4344
4344
|
the border via border-color then this will default to <b>black</b>.
|
4345
4345
|
|
4346
|
+
## The toplevel methods english() and german()
|
4347
|
+
|
4348
|
+
A couple of years ago these two toplevel methods were added. You may
|
4349
|
+
find some of my gems make use of these, when there is content that
|
4350
|
+
ought to be displayed on a website.
|
4351
|
+
|
4352
|
+
What do these two methods do, essentially?
|
4353
|
+
|
4354
|
+
They are mostly just a mnemonic reminder that the website that
|
4355
|
+
is shown to the user (visitor) is written in that particular
|
4356
|
+
language primarily. So, for most webpages, I prefer to use:
|
4357
|
+
|
4358
|
+
english() {
|
4359
|
+
}
|
4360
|
+
|
4361
|
+
Whereas for my local knowledge base I often tend to use german.
|
4362
|
+
|
4363
|
+
Sometimes I mix both languages in the same webpage, but I wanted
|
4364
|
+
to be able to selectively switch between languages too, as well
|
4365
|
+
as be able to indicate when content is in german rather than
|
4366
|
+
english. Thus, to satisfy these use cases, german() and
|
4367
|
+
english() are available.
|
4368
|
+
|
4369
|
+
An additional use case for these methods is that I can designate
|
4370
|
+
a specific title quickly - either manually, or by using something
|
4371
|
+
like:
|
4372
|
+
|
4373
|
+
german(:autotitle)
|
4374
|
+
|
4375
|
+
The symbol :autotitle here would mean that the cyberweb gem should
|
4376
|
+
try to infer the name of the page at hand based on its filename.
|
4377
|
+
|
4346
4378
|
## Cyberweb::HtmlTemplate
|
4347
4379
|
|
4348
4380
|
class **Cyberweb::HtmlTemplate** can be used to describe (and ultimately
|
@@ -205,6 +205,7 @@
|
|
205
205
|
.rounded_bblack1,
|
206
206
|
.rounded_border1,
|
207
207
|
.rounded_black1,
|
208
|
+
.round_bblack1,
|
208
209
|
.round_black1 {
|
209
210
|
border: 1px solid black;
|
210
211
|
border-radius: 10px;
|
@@ -213,6 +214,7 @@
|
|
213
214
|
.rounded_bblack2,
|
214
215
|
.rounded_border2,
|
215
216
|
.rounded_black2,
|
217
|
+
.round_bblack2,
|
216
218
|
.round_black2 {
|
217
219
|
border: 2px solid black;
|
218
220
|
border-radius: 10px;
|
@@ -220,6 +222,7 @@
|
|
220
222
|
.rounded_bblack3,
|
221
223
|
.rounded_border3,
|
222
224
|
.rounded_black3,
|
225
|
+
.round_bblack3,
|
223
226
|
.round_black3 {
|
224
227
|
border: 3px solid black;
|
225
228
|
border-radius: 10px;
|
@@ -227,6 +230,7 @@
|
|
227
230
|
.rounded_bblack4,
|
228
231
|
.rounded_border4,
|
229
232
|
.rounded_black4,
|
233
|
+
.round_bblack4,
|
230
234
|
.round_black4 {
|
231
235
|
border: 4px solid black;
|
232
236
|
border-radius: 10px;
|
@@ -234,6 +238,7 @@
|
|
234
238
|
.rounded_bblack5,
|
235
239
|
.rounded_border5,
|
236
240
|
.rounded_black5,
|
241
|
+
.round_bblack5,
|
237
242
|
.round_black5 {
|
238
243
|
border: 5px solid black;
|
239
244
|
border-radius: 10px;
|
@@ -85,6 +85,41 @@ module Cyberweb
|
|
85
85
|
self.instance_eval { alias embed_video embed_youtube_video } # === Cyberweb.embed_video
|
86
86
|
self.instance_eval { alias embed_videos embed_youtube_video } # === Cyberweb.embed_videos
|
87
87
|
|
88
|
+
# ========================================================================= #
|
89
|
+
# === youtube_embedder
|
90
|
+
#
|
91
|
+
# Make use of Videtools project here, by delegating towards the
|
92
|
+
# YoutubeEmbedder class.
|
93
|
+
#
|
94
|
+
# Usage example:
|
95
|
+
#
|
96
|
+
# width: 550
|
97
|
+
#
|
98
|
+
# ========================================================================= #
|
99
|
+
def youtube_embedder(
|
100
|
+
url = 'https://www.youtube.com/watch?v=7L6uEstbd9Y',
|
101
|
+
width_of_video = DEFAULT_VIDEO_WIDTH,
|
102
|
+
height_of_video = DEFAULT_VIDEO_HEIGHT
|
103
|
+
)
|
104
|
+
if url.is_a? Array
|
105
|
+
url.each {|entry|
|
106
|
+
youtube_embedder(entry, width_of_video, height_of_video)
|
107
|
+
}
|
108
|
+
else
|
109
|
+
url = url.to_s
|
110
|
+
unless url.include? '/'
|
111
|
+
url[0,0] = 'http://www.youtube.com/watch?'
|
112
|
+
end
|
113
|
+
if Object.const_defined? :MultimediaParadise
|
114
|
+
_ = MultimediaParadise::YoutubeEmbedder.new(url, :dont_run_yet)
|
115
|
+
_.set_width width_of_video
|
116
|
+
_.set_height height_of_video
|
117
|
+
_.run
|
118
|
+
ee _.embedded_string? # Return the generated string here.
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
88
123
|
# ========================================================================= #
|
89
124
|
# === imdb_form
|
90
125
|
#
|
@@ -268,41 +303,6 @@ module Cyberweb
|
|
268
303
|
c :object
|
269
304
|
end
|
270
305
|
|
271
|
-
# ========================================================================= #
|
272
|
-
# === youtube_embedder
|
273
|
-
#
|
274
|
-
# Make use of Videtools project here, by delegating towards the
|
275
|
-
# YoutubeEmbedder class.
|
276
|
-
#
|
277
|
-
# Usage example:
|
278
|
-
#
|
279
|
-
# width: 550
|
280
|
-
#
|
281
|
-
# ========================================================================= #
|
282
|
-
def youtube_embedder(
|
283
|
-
url = 'https://www.youtube.com/watch?v=7L6uEstbd9Y',
|
284
|
-
width_of_video = DEFAULT_VIDEO_WIDTH,
|
285
|
-
height_of_video = DEFAULT_VIDEO_HEIGHT
|
286
|
-
)
|
287
|
-
if url.is_a? Array
|
288
|
-
url.each {|entry|
|
289
|
-
youtube_embedder(entry, width_of_video, height_of_video)
|
290
|
-
}
|
291
|
-
else
|
292
|
-
url = url.to_s
|
293
|
-
unless url.include? '/'
|
294
|
-
url[0,0] = 'http://www.youtube.com/watch?'
|
295
|
-
end
|
296
|
-
if Object.const_defined? :MultimediaParadise
|
297
|
-
_ = MultimediaParadise::YoutubeEmbedder.new(url, :dont_run_yet)
|
298
|
-
_.set_width width_of_video
|
299
|
-
_.set_height height_of_video
|
300
|
-
_.run
|
301
|
-
ee _.embedded_string? # Return the generated string here.
|
302
|
-
end
|
303
|
-
end
|
304
|
-
end
|
305
|
-
|
306
306
|
# ========================================================================= #
|
307
307
|
# === play_local_video_file
|
308
308
|
#
|
@@ -9,7 +9,7 @@ module Cyberweb
|
|
9
9
|
# ========================================================================= #
|
10
10
|
# === VERSION
|
11
11
|
# ========================================================================= #
|
12
|
-
VERSION = '0.9.
|
12
|
+
VERSION = '0.9.32'
|
13
13
|
|
14
14
|
# ========================================================================= #
|
15
15
|
# === LAST_UPDATE
|
@@ -70,15 +70,9 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
|
|
70
70
|
end
|
71
71
|
|
72
72
|
# ========================================================================= #
|
73
|
-
# ===
|
74
|
-
#
|
75
|
-
# This must be somewhat flexible, to allow for use cases such as:
|
76
|
-
#
|
77
|
-
# h2_id('Stickstofffixierung - eine symbiotische Beziehung, als '\
|
78
|
-
# 'Teil des Stickstoffkreislaufs') { :clickable_image }
|
79
|
-
#
|
73
|
+
# === h5_id
|
80
74
|
# ========================================================================= #
|
81
|
-
def
|
75
|
+
def h5_id(
|
82
76
|
i = '',
|
83
77
|
optional_css_class = '',
|
84
78
|
optional_the_id = '',
|
@@ -109,7 +103,7 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
|
|
109
103
|
"</a>#{i}"
|
110
104
|
end
|
111
105
|
end
|
112
|
-
|
106
|
+
h5(
|
113
107
|
i,
|
114
108
|
id: use_this_id,
|
115
109
|
css_class: optional_css_class,
|
@@ -117,6 +111,27 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
|
|
117
111
|
)
|
118
112
|
end
|
119
113
|
|
114
|
+
# ========================================================================= #
|
115
|
+
# === h5_id_clickable
|
116
|
+
# ========================================================================= #
|
117
|
+
def h5_id_clickable(
|
118
|
+
i = '',
|
119
|
+
optional_css_class = '',
|
120
|
+
optional_the_id = '',
|
121
|
+
optional_css_style = '',
|
122
|
+
optional_javascript = '',
|
123
|
+
&block
|
124
|
+
)
|
125
|
+
h5_id(
|
126
|
+
i,
|
127
|
+
optional_css_class,
|
128
|
+
optional_the_id,
|
129
|
+
optional_css_style,
|
130
|
+
optional_javascript
|
131
|
+
) { :clickable_image }
|
132
|
+
end; alias h5_fancy_id h5_id_clickable # === h5_fancy_id
|
133
|
+
alias h5_fid h5_id_clickable # === h5_fid
|
134
|
+
|
120
135
|
# ========================================================================= #
|
121
136
|
# === h1_id_clickable
|
122
137
|
# ========================================================================= #
|
@@ -139,6 +154,54 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
|
|
139
154
|
alias h1_fid h1_id_clickable # === h1_fid
|
140
155
|
alias clickable_h1 h1_id_clickable # === clickable_h1
|
141
156
|
|
157
|
+
# ========================================================================= #
|
158
|
+
# === h2_id
|
159
|
+
#
|
160
|
+
# This must be somewhat flexible, to allow for use cases such as:
|
161
|
+
#
|
162
|
+
# h2_id('Stickstofffixierung - eine symbiotische Beziehung, als '\
|
163
|
+
# 'Teil des Stickstoffkreislaufs') { :clickable_image }
|
164
|
+
#
|
165
|
+
# ========================================================================= #
|
166
|
+
def h2_id(
|
167
|
+
i = '',
|
168
|
+
optional_css_class = '',
|
169
|
+
optional_the_id = '',
|
170
|
+
optional_css_style = '',
|
171
|
+
optional_javascript = '',
|
172
|
+
&block
|
173
|
+
)
|
174
|
+
optional_the_id = optional_the_id.to_s
|
175
|
+
if optional_the_id.empty?
|
176
|
+
optional_the_id = i.dup
|
177
|
+
end
|
178
|
+
use_this_id = sanitize_this_id(optional_the_id)
|
179
|
+
# ======================================================================= #
|
180
|
+
# === Handle blocks next
|
181
|
+
# ======================================================================= #
|
182
|
+
if block_given?
|
183
|
+
yielded = yield
|
184
|
+
case yielded
|
185
|
+
# ===================================================================== #
|
186
|
+
# === :clickable_image
|
187
|
+
#
|
188
|
+
# The embedded image will be clickable, made possible via the
|
189
|
+
# a-tag.
|
190
|
+
# ===================================================================== #
|
191
|
+
when :clickable_image
|
192
|
+
i = "<a href=\"##{use_this_id}\">"+
|
193
|
+
clickable_image_as_string?+
|
194
|
+
"</a>#{i}"
|
195
|
+
end
|
196
|
+
end
|
197
|
+
h2(
|
198
|
+
i,
|
199
|
+
id: use_this_id,
|
200
|
+
css_class: optional_css_class,
|
201
|
+
css_style: optional_css_style
|
202
|
+
)
|
203
|
+
end
|
204
|
+
|
142
205
|
# ========================================================================= #
|
143
206
|
# === h2_id_clickable
|
144
207
|
# ========================================================================= #
|
@@ -1229,7 +1292,7 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
|
|
1229
1292
|
optional_css_style = '',
|
1230
1293
|
&block
|
1231
1294
|
)
|
1232
|
-
css_for_the_anmerkung_symbol = '
|
1295
|
+
css_for_the_anmerkung_symbol = 'marr10px'
|
1233
1296
|
if block_given?
|
1234
1297
|
yielded = yield
|
1235
1298
|
if yielded.is_a? Hash
|
@@ -1418,45 +1481,6 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
|
|
1418
1481
|
end; alias h3_fancy_id h3_id_clickable # === h3_fancy_id
|
1419
1482
|
alias h3_fid h3_id_clickable # === h3_fid
|
1420
1483
|
|
1421
|
-
# ========================================================================= #
|
1422
|
-
# === h5_id_clickable
|
1423
|
-
# ========================================================================= #
|
1424
|
-
def h5_id_clickable(
|
1425
|
-
i,
|
1426
|
-
optional_css_class = '',
|
1427
|
-
&block
|
1428
|
-
)
|
1429
|
-
h5_id(i, optional_css_class) { :clickable_image }
|
1430
|
-
end; alias h5_fancy_id h5_id_clickable # === h5_fancy_id
|
1431
|
-
alias h5_fid h5_id_clickable # === h5_fid
|
1432
|
-
|
1433
|
-
# ========================================================================= #
|
1434
|
-
# === h5_id
|
1435
|
-
# ========================================================================= #
|
1436
|
-
def h5_id(
|
1437
|
-
i,
|
1438
|
-
optional_css_class = '',
|
1439
|
-
&block
|
1440
|
-
)
|
1441
|
-
use_this_id = sanitize_this_id(i)
|
1442
|
-
# ======================================================================= #
|
1443
|
-
# === Handle blocks next
|
1444
|
-
# ======================================================================= #
|
1445
|
-
if block_given?
|
1446
|
-
yielded = yield
|
1447
|
-
case yielded
|
1448
|
-
# ===================================================================== #
|
1449
|
-
# === :clickable_image
|
1450
|
-
# ===================================================================== #
|
1451
|
-
when :clickable_image
|
1452
|
-
i = "<a href=\"##{use_this_id}\">"+
|
1453
|
-
dot109?+
|
1454
|
-
"</a>#{i}"
|
1455
|
-
end
|
1456
|
-
end
|
1457
|
-
h5(i, id: use_this_id, css_class: optional_css_class)
|
1458
|
-
end
|
1459
|
-
|
1460
1484
|
# ========================================================================= #
|
1461
1485
|
# === h6_id_clickable
|
1462
1486
|
# ========================================================================= #
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyberweb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert A. Heiler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colours
|
@@ -1299,7 +1299,7 @@ post_install_message: |2+
|
|
1299
1299
|
|
1300
1300
|
For more information, have a look at:
|
1301
1301
|
|
1302
|
-
https://www.rubydoc.info/gems/cyberweb/0.9.
|
1302
|
+
https://www.rubydoc.info/gems/cyberweb/0.9.32
|
1303
1303
|
|
1304
1304
|
rdoc_options: []
|
1305
1305
|
require_paths:
|