cyberweb 0.7.9 → 0.8.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cyberweb might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +242 -141
- data/cyberweb.gemspec +6 -6
- data/doc/README.gen +242 -142
- data/doc/todo/todo_for_the_cyberweb_project.md +13 -0
- data/examples/advanced/animated_colourful_border/animated_colourful_border.cgi +149 -0
- data/examples/advanced/no_right_click.cgi +1 -2
- data/examples/css/changing_border_colours_animation/changing_border_colours_animation.html +134 -0
- data/examples/css/editable_boxes_example/editable_boxes_example.html +75 -0
- data/examples/css/flexbox_example/flexbox_example.html +39 -0
- data/examples/css/keyboard_example/keyboard_example.html +238 -0
- data/examples/css/magic_card/magic_card.html +110 -0
- data/examples/css/overflow_example/overflow_example.html +125 -0
- data/examples/css/planet_example/planet_example.html +34 -0
- data/examples/css/progress_bar_examples/progress_bar_examples.html +316 -0
- data/examples/css/single_row_glow/single_row_glow.html +91 -0
- data/examples/css/slinky_animation/slinky_animation.html +292 -0
- data/examples/html/hbox_and_vbox_example.html +5 -5
- data/examples/javascript_and_jquery/all_in_one_example/all_in_one_example.cgi +38 -0
- data/lib/cyberweb/base/misc.rb +63 -25
- data/lib/cyberweb/cascading_style_sheets/border.css +61 -24
- data/lib/cyberweb/cascading_style_sheets/colours.css +2 -0
- data/lib/cyberweb/cascading_style_sheets/default.css +102 -89
- data/lib/cyberweb/cascading_style_sheets/glow_effects.css +36 -0
- data/lib/cyberweb/cascading_style_sheets/margin.css +11 -7
- data/lib/cyberweb/cascading_style_sheets/misc.css +7 -0
- data/lib/cyberweb/cascading_style_sheets/text_shadow.css +6 -1
- data/lib/cyberweb/generator/cgi.rb +9 -1
- data/lib/cyberweb/html_template/html_template.rb +7 -2
- data/lib/cyberweb/javascript_code/custom_functions.js +33 -2
- data/lib/cyberweb/javascript_code/math.js +0 -0
- data/lib/cyberweb/objectified/html_tags/progress.rb +8 -8
- data/lib/cyberweb/skeleton/README.md +2 -0
- data/lib/cyberweb/skeleton/html_keyboard.md +140 -0
- data/lib/cyberweb/toplevel_methods/is_an_image.rb +18 -0
- data/lib/cyberweb/toplevel_methods/listing.rb +2 -3
- data/lib/cyberweb/toplevel_methods/misc.rb +1 -57
- data/lib/cyberweb/toplevel_methods/registered_ids.rb +53 -37
- data/lib/cyberweb/toplevel_methods/sort_this_array_by_time.rb +65 -0
- data/lib/cyberweb/toplevel_methods/video.rb +32 -19
- data/lib/cyberweb/utility_scripts/images_to_html/images_to_html.rb +78 -49
- data/lib/cyberweb/utility_scripts/remove_this_image_from_that_webpage.rb +125 -0
- data/lib/cyberweb/version/version.rb +2 -2
- data/lib/cyberweb/web_images/map_symbol_to_image_location.rb +28 -8
- data/lib/cyberweb/web_object/effects.rb +19 -0
- data/lib/cyberweb/web_object/html_tags.rb +199 -196
- data/lib/cyberweb/web_object/images.rb +83 -26
- data/lib/cyberweb/web_object/misc.rb +1048 -529
- data/lib/cyberweb/web_object/reset.rb +47 -29
- data/lib/cyberweb/yaml/custom_tags.yml +2 -0
- metadata +52 -52
@@ -1,14 +1,16 @@
|
|
1
1
|
/*
|
2
2
|
* Filename: default.css
|
3
3
|
*
|
4
|
-
* This file used to be called STD.css until July 2020 when it was
|
5
|
-
* (and the content
|
4
|
+
* This file used to be called STD.css until July 2020 when it was
|
5
|
+
* finally renamed to default.css (and the old, original content
|
6
|
+
* was re-organized).
|
6
7
|
*
|
7
8
|
* Thus, this file is sort of the standard (STD) .css file, originally
|
8
|
-
* created in the year 2000 to standardize usage across my
|
9
|
+
* created in the year 2000 to standardize usage across my different
|
10
|
+
* webpages.
|
9
11
|
*
|
10
12
|
* SEPARATE style FROM CONTENT, PRESENTATION FROM STRUCTURE AND DESIGN
|
11
|
-
*
|
13
|
+
* from data.
|
12
14
|
*
|
13
15
|
* Please comment like this : * and /
|
14
16
|
*
|
@@ -30,6 +32,10 @@
|
|
30
32
|
|
31
33
|
/* This is the default CSS class. */
|
32
34
|
|
35
|
+
/*
|
36
|
+
|
37
|
+
The following CSS rules were removed in January 2023.
|
38
|
+
|
33
39
|
div { font-weight: normal; }
|
34
40
|
p { padding: 0px; }
|
35
41
|
|
@@ -42,6 +48,8 @@ li {
|
|
42
48
|
|
43
49
|
img {border:0px solid black;}
|
44
50
|
|
51
|
+
*/
|
52
|
+
|
45
53
|
.video_aspect_ratio {
|
46
54
|
aspect-ratio: 16 / 9;
|
47
55
|
}
|
@@ -345,86 +353,86 @@ img.center {
|
|
345
353
|
.left95px { left:95px }
|
346
354
|
.left96px { left:96px }
|
347
355
|
.left98px { left:98px }
|
348
|
-
.left100px{ left:100px}
|
349
|
-
.left110px{ left:110px}
|
350
|
-
.left120px{ left:120px}
|
351
|
-
.left150px{ left:150px}
|
352
|
-
.left180px{ left:180px}
|
353
|
-
.left190px{ left:190px}
|
354
|
-
.left195px{ left:195px}
|
355
|
-
.left197px{ left:197px}
|
356
|
-
.left198px{ left:198px}
|
357
|
-
.left200px{ left:200px}
|
358
|
-
.left205px{ left:205px}
|
359
|
-
.left210px{ left:210px}
|
360
|
-
.left275px{ left:275px}
|
361
|
-
.left280px{ left:280px}
|
362
|
-
.left286px{ left:286px}
|
363
|
-
.left291px{ left:291px}
|
364
|
-
.left295px{ left:295px}
|
365
|
-
.left300px{ left:300px}
|
366
|
-
.left301px{ left:301px}
|
367
|
-
.left320px{ left:320px}
|
368
|
-
.left360px{ left:360px}
|
369
|
-
.left380px{ left:380px}
|
370
|
-
.left385px{ left:385px}
|
371
|
-
.left400px{ left:400px}
|
372
|
-
.left420px{ left:420px}
|
373
|
-
.left450px{ left:450px}
|
374
|
-
.left460px{ left:460px}
|
375
|
-
.left480px{ left:480px}
|
376
|
-
.left490px{ left:490px}
|
377
|
-
.left500px{ left:500px}
|
378
|
-
.left520px{ left:520px}
|
379
|
-
.left540px{ left:540px}
|
380
|
-
.left560px{ left:560px}
|
381
|
-
.left580px{ left:580px}
|
382
|
-
.left590px{ left:590px}
|
383
|
-
.left595px{ left:595px}
|
384
|
-
.left600px{ left:600px}
|
385
|
-
.left605px{ left:605px}
|
386
|
-
.left610px{ left:610px}
|
387
|
-
.left620px{ left:620px}
|
388
|
-
.left630px{ left:630px}
|
389
|
-
.left640px{ left:640px}
|
390
|
-
.left650px{ left:650px}
|
391
|
-
.left680px{ left:680px}
|
392
|
-
.left690px{ left:690px}
|
393
|
-
.left700px{ left:700px}
|
394
|
-
.left705px{ left:705px}
|
395
|
-
.left706px{ left:706px}
|
396
|
-
.left707px{ left:707px}
|
397
|
-
.left708px{ left:708px}
|
398
|
-
.left740px{ left:740px}
|
399
|
-
.left790px{ left:790px}
|
400
|
-
.left800px{ left:800px}
|
401
|
-
.left810px{ left:810px}
|
402
|
-
.left820px{ left:820px}
|
403
|
-
.left856px{ left:856px}
|
404
|
-
.left875px{ left:875px}
|
405
|
-
.left880px{ left:880px}
|
406
|
-
.left896px{ left:896px}
|
407
|
-
.left900px{ left:900px}
|
408
|
-
.left905px{ left:905px}
|
409
|
-
.left910px{ left:910px}
|
410
|
-
.left920px{ left:920px}
|
411
|
-
.left950px{ left:950px}
|
412
|
-
.left-1em
|
413
|
-
.left0em
|
414
|
-
.left1em
|
415
|
-
.left2em
|
416
|
-
.left3em
|
417
|
-
.left4em
|
418
|
-
.left5em
|
419
|
-
.left6em
|
420
|
-
.left7em
|
421
|
-
.left8em
|
422
|
-
.left9em
|
423
|
-
.left10em
|
424
|
-
.left20em
|
425
|
-
.left30em
|
426
|
-
.left40em
|
427
|
-
.left50em
|
356
|
+
.left100px { left:100px}
|
357
|
+
.left110px { left:110px}
|
358
|
+
.left120px { left:120px}
|
359
|
+
.left150px { left:150px}
|
360
|
+
.left180px { left:180px}
|
361
|
+
.left190px { left:190px}
|
362
|
+
.left195px { left:195px}
|
363
|
+
.left197px { left:197px}
|
364
|
+
.left198px { left:198px}
|
365
|
+
.left200px { left:200px}
|
366
|
+
.left205px { left:205px}
|
367
|
+
.left210px { left:210px}
|
368
|
+
.left275px { left:275px}
|
369
|
+
.left280px { left:280px}
|
370
|
+
.left286px { left:286px}
|
371
|
+
.left291px { left:291px}
|
372
|
+
.left295px { left:295px}
|
373
|
+
.left300px { left:300px}
|
374
|
+
.left301px { left:301px}
|
375
|
+
.left320px { left:320px}
|
376
|
+
.left360px { left:360px}
|
377
|
+
.left380px { left:380px}
|
378
|
+
.left385px { left:385px}
|
379
|
+
.left400px { left:400px}
|
380
|
+
.left420px { left:420px}
|
381
|
+
.left450px { left:450px}
|
382
|
+
.left460px { left:460px}
|
383
|
+
.left480px { left:480px}
|
384
|
+
.left490px { left:490px}
|
385
|
+
.left500px { left:500px}
|
386
|
+
.left520px { left:520px}
|
387
|
+
.left540px { left:540px}
|
388
|
+
.left560px { left:560px}
|
389
|
+
.left580px { left:580px}
|
390
|
+
.left590px { left:590px}
|
391
|
+
.left595px { left:595px}
|
392
|
+
.left600px { left:600px}
|
393
|
+
.left605px { left:605px}
|
394
|
+
.left610px { left:610px}
|
395
|
+
.left620px { left:620px}
|
396
|
+
.left630px { left:630px}
|
397
|
+
.left640px { left:640px}
|
398
|
+
.left650px { left:650px}
|
399
|
+
.left680px { left:680px}
|
400
|
+
.left690px { left:690px}
|
401
|
+
.left700px { left:700px}
|
402
|
+
.left705px { left:705px}
|
403
|
+
.left706px { left:706px}
|
404
|
+
.left707px { left:707px}
|
405
|
+
.left708px { left:708px}
|
406
|
+
.left740px { left:740px}
|
407
|
+
.left790px { left:790px}
|
408
|
+
.left800px { left:800px}
|
409
|
+
.left810px { left:810px}
|
410
|
+
.left820px { left:820px}
|
411
|
+
.left856px { left:856px}
|
412
|
+
.left875px { left:875px}
|
413
|
+
.left880px { left:880px}
|
414
|
+
.left896px { left:896px}
|
415
|
+
.left900px { left:900px}
|
416
|
+
.left905px { left:905px}
|
417
|
+
.left910px { left:910px}
|
418
|
+
.left920px { left:920px}
|
419
|
+
.left950px { left:950px}
|
420
|
+
.left-1em { left:-1em}
|
421
|
+
.left0em { left: 0em}
|
422
|
+
.left1em { left: 1em}
|
423
|
+
.left2em { left: 2em}
|
424
|
+
.left3em { left: 3em}
|
425
|
+
.left4em { left: 4em}
|
426
|
+
.left5em { left: 5em}
|
427
|
+
.left6em { left: 6em}
|
428
|
+
.left7em { left: 7em}
|
429
|
+
.left8em { left: 8em}
|
430
|
+
.left9em { left: 9em}
|
431
|
+
.left10em { left:10em}
|
432
|
+
.left20em { left:20em}
|
433
|
+
.left30em { left:30em}
|
434
|
+
.left40em { left:40em}
|
435
|
+
.left50em { left:50em}
|
428
436
|
/* Z index tags, z-index tags */
|
429
437
|
.Z1 { z-index:1}
|
430
438
|
.Z2 { z-index:2}
|
@@ -589,7 +597,7 @@ img.center {
|
|
589
597
|
.wid2 {width: 2%}
|
590
598
|
.wid1 {width: 1%}
|
591
599
|
.wid0 {width: 0%}
|
592
|
-
.wid1000px{width:1000px}
|
600
|
+
.wid1000px {width:1000px}
|
593
601
|
.wid970px {width:970px}
|
594
602
|
.wid960px {width:960px}
|
595
603
|
.wid950px {width:950px}
|
@@ -1427,8 +1435,10 @@ img.center {
|
|
1427
1435
|
.LH20 {line-height:20% }
|
1428
1436
|
.LHN {line-height:normal}
|
1429
1437
|
|
1430
|
-
/* And similar to that, general definitions for differencies
|
1431
|
-
/* Note that a - means a , :-) So if there is something
|
1438
|
+
/* And similar to that, general definitions for differencies. */
|
1439
|
+
/* Note that a - means a , :-) So if there is something
|
1440
|
+
like 1-5em it is a class for 1.5em ind tags indent
|
1441
|
+
tags */
|
1432
1442
|
|
1433
1443
|
/* letter spacing tags, l-spacing tags, letter-spacing tags, let space tags */
|
1434
1444
|
.lspa1 { letter-spacing:1px }
|
@@ -1468,7 +1478,10 @@ img.center {
|
|
1468
1478
|
.wspa2em {word-spacing:2em }
|
1469
1479
|
.wspa3em {word-spacing:3em }
|
1470
1480
|
.wspa4em {word-spacing:4em }
|
1471
|
-
|
1481
|
+
|
1482
|
+
/*
|
1483
|
+
* text-transform: können Sie die Transformation bestimmen
|
1484
|
+
*/
|
1472
1485
|
.TTC {text-transform: capitalize}
|
1473
1486
|
.TTU {text-transform: uppercase}
|
1474
1487
|
.TTL {text-transform: lowercase}
|
@@ -1634,7 +1647,6 @@ input.blur {color: black;background-color:#FFFFCC;font-weight: normal;}
|
|
1634
1647
|
INPUT.dis { color:#FFFFFF;background-color:#0000CC;Width: 250px;}
|
1635
1648
|
INPUT.vis { color:#FFFFFF;background-color:#FF0000;Width: 250px;}
|
1636
1649
|
|
1637
|
-
|
1638
1650
|
/*
|
1639
1651
|
* We can center a page through this entry.
|
1640
1652
|
*/
|
@@ -1677,6 +1689,7 @@ hr.thick {
|
|
1677
1689
|
display: flex;
|
1678
1690
|
width: 100%;
|
1679
1691
|
}
|
1692
|
+
|
1680
1693
|
.flex-child {
|
1681
1694
|
flex: 0.1;
|
1682
1695
|
border: 2px solid yellow;
|
@@ -131,3 +131,39 @@
|
|
131
131
|
50% { background-position: 400% 0; }
|
132
132
|
100% { background-position: 0 0; }
|
133
133
|
}
|
134
|
+
|
135
|
+
|
136
|
+
/*
|
137
|
+
* The "Portland glow effect" is mostly just a little bit
|
138
|
+
* of glow effect that is similar to a neon-light.
|
139
|
+
*/
|
140
|
+
.portland_glow_effect {
|
141
|
+
text-transfrom: uppercase;
|
142
|
+
color: white;
|
143
|
+
font-size: 6em;
|
144
|
+
animation: neon_glow_animation 2s infinite alternate cubic-bezier(0.455, 0.03, 0.515, 0.955);
|
145
|
+
}
|
146
|
+
|
147
|
+
@keyframes neon_glow_animation {
|
148
|
+
0% {
|
149
|
+
text-shadow: 0 0 10px rgba(255, 255, 255, .8),
|
150
|
+
0 0 20px rgba(255, 255, 255, .8),
|
151
|
+
0 0 22px rgba(255, 255, 255, .8),
|
152
|
+
0 0 40px rgba(66, 220, 219, .8),
|
153
|
+
0 0 60px rgba(66, 220, 219, .8),
|
154
|
+
0 0 80px rgba(66, 220, 219, .5),
|
155
|
+
0 0 100px rgba(66, 220, 219, .5),
|
156
|
+
0 0 140px rgba(66, 220, 219, .5),
|
157
|
+
0 0 200px rgba(66, 220, 219, .5);
|
158
|
+
}
|
159
|
+
100% {
|
160
|
+
text-shadow: 0 0 2px rgba(255, 255, 255, .8),
|
161
|
+
0 0 8px rgba(255, 255, 255, .8),
|
162
|
+
0 0 10px rgba(255, 255, 255, .8),
|
163
|
+
0 0 20px rgba(66, 220, 219, .8),
|
164
|
+
0 0 30px rgba(66, 220, 219, .8),
|
165
|
+
0 0 40px rgba(66, 220, 219, .8),
|
166
|
+
0 0 50px rgba(66, 220, 219, .5),
|
167
|
+
0 0 80px rgba(66, 220, 219, .5);
|
168
|
+
}
|
169
|
+
}
|
@@ -468,13 +468,17 @@
|
|
468
468
|
.marl4_7em { margin-left: 4.7em }
|
469
469
|
.marl4_8em { margin-left: 4.8em }
|
470
470
|
.marl4_9em { margin-left: 4.9em }
|
471
|
-
.marl5em { margin-left: 5em
|
472
|
-
.marl5_5em { margin-left: 5.5em
|
473
|
-
.marl6em { margin-left: 6em
|
474
|
-
.marl6_5em { margin-left: 6.5em
|
475
|
-
.
|
476
|
-
.
|
477
|
-
.
|
471
|
+
.marl5em { margin-left: 5em; }
|
472
|
+
.marl5_5em { margin-left: 5.5em;}
|
473
|
+
.marl6em { margin-left: 6em; }
|
474
|
+
.marl6_5em { margin-left: 6.5em;}
|
475
|
+
.marl6_6em { margin-left: 6.6em;}
|
476
|
+
.marl6_7em { margin-left: 6.7em;}
|
477
|
+
.marl6_8em { margin-left: 6.8em;}
|
478
|
+
.marl6_9em { margin-left: 6.9em;}
|
479
|
+
.marl7em { margin-left: 7em; }
|
480
|
+
.marl8em { margin-left: 8em; }
|
481
|
+
.marl9em { margin-left: 9em; }
|
478
482
|
.marl10em { margin-left: 10em }
|
479
483
|
.marl11em { margin-left: 11em }
|
480
484
|
.marl12em { margin-left: 12em }
|
@@ -178,13 +178,21 @@ doc('#{USE_THESE_CSS_CLASSES_FOR_THE_MAIN_DIV_ELEMENT}') {
|
|
178
178
|
update_default_page_content # Need to update @default_page_content.
|
179
179
|
what = @default_page_content
|
180
180
|
into = i
|
181
|
-
write_what_into(what, into) #
|
181
|
+
write_what_into(what, into) # ← Create the file here.
|
182
182
|
opnn; e "Created file `#{sfile(into)}`."
|
183
|
+
# ======================================================================= #
|
184
|
+
# Run a chmod to ensure the file has the correct permission next.
|
185
|
+
# ======================================================================= #
|
186
|
+
FileUtils.chmod(0755, into) if File.exist?(into)
|
183
187
|
if is_on_roebe?
|
184
188
|
# ===================================================================== #
|
185
189
|
# Open it on my home system as well, via my main editor.
|
186
190
|
# ===================================================================== #
|
187
191
|
Esystem.esystem("#{MAIN_EDITOR_TO_USE} #{into} &")
|
192
|
+
begin
|
193
|
+
require 'open' unless Object.const_defined?(:Open)
|
194
|
+
rescue LoadError; end
|
195
|
+
Open.in_browser(into)
|
188
196
|
end
|
189
197
|
end
|
190
198
|
|
@@ -295,6 +295,11 @@ class HtmlTemplate < ::Cyberweb::Base # === Cyberweb::HtmlTemplate
|
|
295
295
|
# ======================================================================= #
|
296
296
|
if hash.has_key? :body
|
297
297
|
@internal_hash[:body] = hash.delete(:body)
|
298
|
+
# ======================================================================= #
|
299
|
+
# === :content
|
300
|
+
# ======================================================================= #
|
301
|
+
elsif hash.has_key? :content
|
302
|
+
@internal_hash[:body] = hash.delete(:content)
|
298
303
|
end
|
299
304
|
# ======================================================================= #
|
300
305
|
# === :css_classes
|
@@ -468,14 +473,14 @@ class HtmlTemplate < ::Cyberweb::Base # === Cyberweb::HtmlTemplate
|
|
468
473
|
# Obtain the various .css files next and store them in `css_content`:
|
469
474
|
# ===================================================================== #
|
470
475
|
Dir["#{project_base_dir?}cascading_style_sheets/*.css"].each {|entry|
|
471
|
-
css_content << File.read(entry)
|
476
|
+
css_content << "#{File.read(entry, encoding: 'UTF-8')}#{N}"
|
472
477
|
}
|
473
478
|
css_classes.each {|this_css_class|
|
474
479
|
# =================================================================== #
|
475
480
|
# See: https://rubular.com/r/7LUM1vaN45GDQ6
|
476
481
|
# =================================================================== #
|
477
482
|
use_this_regex =
|
478
|
-
/(\.#{this_css_class}).+{(.+)}$/
|
483
|
+
/(\.#{this_css_class}).+{(.+)}$/u # For unicode encoding.
|
479
484
|
css_content =~ use_this_regex
|
480
485
|
# ================================================================= #
|
481
486
|
# else, since as of December 2021, try to read in from a .css
|
@@ -1,8 +1,9 @@
|
|
1
1
|
/*
|
2
2
|
* === change_the_colour_to()
|
3
3
|
*
|
4
|
-
* Use this function to change the colour of the text at
|
5
|
-
*
|
4
|
+
* Use this function to change the colour of the text at hand.
|
5
|
+
*
|
6
|
+
* The id should be the second argument to this function.
|
6
7
|
*/
|
7
8
|
function change_the_colour_to(
|
8
9
|
this_colour,
|
@@ -291,3 +292,33 @@ function popup(i)
|
|
291
292
|
{
|
292
293
|
alert(i);
|
293
294
|
}
|
295
|
+
|
296
|
+
/*
|
297
|
+
* array_includes()
|
298
|
+
*
|
299
|
+
* This is a bit similar to ruby's array.include? check.
|
300
|
+
*
|
301
|
+
* Usage example:
|
302
|
+
*
|
303
|
+
* cars = ['BMW','AUDI','VOLVO']
|
304
|
+
* array_includes(cars, 'BMW')
|
305
|
+
*
|
306
|
+
*/
|
307
|
+
function array_includes(this_array, key_string) {
|
308
|
+
return this_array.includes(key_string);
|
309
|
+
}
|
310
|
+
/*
|
311
|
+
* pp()
|
312
|
+
*
|
313
|
+
* pretty_print "implementation", inspired by ruby.
|
314
|
+
*
|
315
|
+
* This uses the so called "spread operator" in JavaScript.
|
316
|
+
*
|
317
|
+
* Usage example:
|
318
|
+
*
|
319
|
+
* pp(['abc','def','ghi'])
|
320
|
+
*
|
321
|
+
*/
|
322
|
+
function pp(i) {
|
323
|
+
console.log(...i);
|
324
|
+
}
|
File without changes
|
@@ -127,14 +127,6 @@ class Progress < Base # === Cyberweb::Objectified::HtmlTags::Progress
|
|
127
127
|
@internal_hash[:max] = i.to_i
|
128
128
|
end; alias set_max max= # === set_max
|
129
129
|
|
130
|
-
# ========================================================================= #
|
131
|
-
# === value=
|
132
|
-
# ========================================================================= #
|
133
|
-
def value=(i)
|
134
|
-
@internal_hash[:value] = i.to_i
|
135
|
-
set_content(@internal_hash[:value].to_s+'%')
|
136
|
-
end; alias set_value value= # === set_value
|
137
|
-
|
138
130
|
# ========================================================================= #
|
139
131
|
# === parse_content
|
140
132
|
#
|
@@ -153,6 +145,14 @@ class Progress < Base # === Cyberweb::Objectified::HtmlTags::Progress
|
|
153
145
|
end
|
154
146
|
end
|
155
147
|
|
148
|
+
# ========================================================================= #
|
149
|
+
# === value=
|
150
|
+
# ========================================================================= #
|
151
|
+
def value=(i)
|
152
|
+
@internal_hash[:value] = i.to_i
|
153
|
+
set_content(@internal_hash[:value].to_s+'%')
|
154
|
+
end; alias set_value value= # === set_value
|
155
|
+
|
156
156
|
end; end; end
|
157
157
|
|
158
158
|
# =========================================================================== #
|
@@ -0,0 +1,140 @@
|
|
1
|
+
<div class="container_for_the_keyboard">
|
2
|
+
<div class="row_for_the_keyboard zero">
|
3
|
+
<button class="for_the_keyboard">Esc</button>
|
4
|
+
<button class="for_the_keyboard">F1</button>
|
5
|
+
<button class="for_the_keyboard">F2</button>
|
6
|
+
<button class="for_the_keyboard">F3</button>
|
7
|
+
<button class="for_the_keyboard">F4</button>
|
8
|
+
<button class="for_the_keyboard">F5</button>
|
9
|
+
<button class="for_the_keyboard">F6</button>
|
10
|
+
<button class="for_the_keyboard">F7</button>
|
11
|
+
<button class="for_the_keyboard">F8</button>
|
12
|
+
<button class="for_the_keyboard">F9</button>
|
13
|
+
<button class="for_the_keyboard">F10</button>
|
14
|
+
<button class="for_the_keyboard">F11</button>
|
15
|
+
<button class="for_the_keyboard">F12</button>
|
16
|
+
<button class="for_the_keyboard">Insect</button>
|
17
|
+
<button class="print_key for_the_keyboard">printScr</button>
|
18
|
+
<button class="for_the_keyboard">Delete</button>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div class="row_for_the_keyboard row_one">
|
22
|
+
<button onclick="on_key_pressed_event('~')" class="for_the_keyboard">~</button>
|
23
|
+
<button onclick="on_key_pressed_event('1')" class="for_the_keyboard">1</button>
|
24
|
+
<button onclick="on_key_pressed_event('2')" class="for_the_keyboard">2</button>
|
25
|
+
<button onclick="on_key_pressed_event('3')" class="for_the_keyboard">3</button>
|
26
|
+
<button onclick="on_key_pressed_event('4')" class="for_the_keyboard">4</button>
|
27
|
+
<button onclick="on_key_pressed_event('5')" class="for_the_keyboard">5</button>
|
28
|
+
<button onclick="on_key_pressed_event('6')" class="for_the_keyboard">6</button>
|
29
|
+
<button onclick="on_key_pressed_event('7')" class="for_the_keyboard">7</button>
|
30
|
+
<button onclick="on_key_pressed_event('8')" class="for_the_keyboard">8</button>
|
31
|
+
<button onclick="on_key_pressed_event('9')" class="for_the_keyboard">9</button>
|
32
|
+
<button onclick="on_key_pressed_event('0')" class="for_the_keyboard">0</button>
|
33
|
+
<button onclick="on_key_pressed_event('-')" class="for_the_keyboard">-</button>
|
34
|
+
<button onclick="on_key_pressed_event('=')" class="for_the_keyboard">=</button>
|
35
|
+
<button onclick="on_key_pressed_event('backspace_key')" class="backspace_key for_the_keyboard">Backspace</button>
|
36
|
+
<button onclick="on_key_pressed_event('home_key')" class="for_the_keyboard">Home</button>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div class="row_for_the_keyboard row_two">
|
40
|
+
<button onclick="on_key_pressed_event('tab_key')" class="tab_key for_the_keyboard">Tab</button>
|
41
|
+
<button onclick="on_key_pressed_event('q')" class="for_the_keyboard">Q</button>
|
42
|
+
<button onclick="on_key_pressed_event('w')" class="for_the_keyboard">W</button>
|
43
|
+
<button onclick="on_key_pressed_event('e')" class="for_the_keyboard">E</button>
|
44
|
+
<button onclick="on_key_pressed_event('r')" class="for_the_keyboard">R</button>
|
45
|
+
<button onclick="on_key_pressed_event('t')" class="for_the_keyboard">T</button>
|
46
|
+
<button onclick="on_key_pressed_event('y')" class="for_the_keyboard">Y</button>
|
47
|
+
<button onclick="on_key_pressed_event('u')" class="for_the_keyboard">U</button>
|
48
|
+
<button onclick="on_key_pressed_event('i')" class="for_the_keyboard">I</button>
|
49
|
+
<button onclick="on_key_pressed_event('o')" class="for_the_keyboard">O</button>
|
50
|
+
<button onclick="on_key_pressed_event('p')" class="for_the_keyboard">P</button>
|
51
|
+
<button onclick="on_key_pressed_event('{')" class="for_the_keyboard">{</button>
|
52
|
+
<button onclick="on_key_pressed_event('}')" class="for_the_keyboard">}</button>
|
53
|
+
<button onclick="on_key_pressed_event('\\')" class="slace_key for_the_keyboard">\</button>
|
54
|
+
<button onclick="on_key_pressed_event('page_up')" class="for_the_keyboard">Pg Up</button>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div class="row_for_the_keyboard row_three">
|
58
|
+
<button onclick="on_key_pressed_event('caps_lock')" class="caps_lock_key for_the_keyboard">Caps Lock</button>
|
59
|
+
<button onclick="on_key_pressed_event('a')" class="for_the_keyboard">A</button>
|
60
|
+
<button onclick="on_key_pressed_event('s')" class="for_the_keyboard">S</button>
|
61
|
+
<button onclick="on_key_pressed_event('d')" class="for_the_keyboard">D</button>
|
62
|
+
<button onclick="on_key_pressed_event('f')" class="for_the_keyboard">F</button>
|
63
|
+
<button onclick="on_key_pressed_event('g')" class="for_the_keyboard">G</button>
|
64
|
+
<button onclick="on_key_pressed_event('h')" class="for_the_keyboard">H</button>
|
65
|
+
<button onclick="on_key_pressed_event('i')" class="for_the_keyboard">I</button>
|
66
|
+
<button onclick="on_key_pressed_event('j')" class="for_the_keyboard">J</button>
|
67
|
+
<button onclick="on_key_pressed_event('k')" class="for_the_keyboard">K</button>
|
68
|
+
<button onclick="on_key_pressed_event('l')" class="for_the_keyboard">L</button>
|
69
|
+
<button onclick="on_key_pressed_event(';')" class="for_the_keyboard">;</button>
|
70
|
+
<button onclick="on_key_pressed_event('#')" class="for_the_keyboard">#</button>
|
71
|
+
<button onclick="on_key_pressed_event('enter_key')" class="enter_button for_the_keyboard">Enter</button>
|
72
|
+
<button onclick="on_key_pressed_event('page_down')" class="for_the_keyboard">Pg Dn</button>
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<div class="row_for_the_keyboard row_four">
|
76
|
+
<button onclick="on_key_pressed_event('shift')" class="shift_key for_the_keyboard">Shift</button>
|
77
|
+
<button onclick="on_key_pressed_event('z')" class="for_the_keyboard">Z</button>
|
78
|
+
<button onclick="on_key_pressed_event('x')" class="for_the_keyboard">X</button>
|
79
|
+
<button onclick="on_key_pressed_event('c')" class="for_the_keyboard">C</button>
|
80
|
+
<button onclick="on_key_pressed_event('v')" class="for_the_keyboard">V</button>
|
81
|
+
<button onclick="on_key_pressed_event('b')" class="for_the_keyboard">B</button>
|
82
|
+
<button onclick="on_key_pressed_event('n')" class="for_the_keyboard">N</button>
|
83
|
+
<button onclick="on_key_pressed_event('m')" class="for_the_keyboard">M</button>
|
84
|
+
<button onclick="on_key_pressed_event(',')" class="for_the_keyboard">,</button>
|
85
|
+
<button onclick="on_key_pressed_event('.')" class="for_the_keyboard">.</button>
|
86
|
+
<button onclick="on_key_pressed_event('=')" class="for_the_keyboard">?</button>
|
87
|
+
<button onclick="on_key_pressed_event('Shift')" class="shift_key for_the_keyboard">Shift</button>
|
88
|
+
<button onclick="on_key_pressed_event('↑')" class="for_the_keyboard">↑</button>
|
89
|
+
<button onclick="on_key_pressed_event('End')" class="for_the_keyboard">End</button>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div class="row_for_the_keyboard row_five">
|
93
|
+
<button onclick="on_key_pressed_event('ctrl_key')"class="last_row for_the_keyboard">Ctrl</button>
|
94
|
+
<button onclick="on_key_pressed_event('function_key')"class="last_row for_the_keyboard">Fn</button>
|
95
|
+
<button onclick="on_key_pressed_event('win_key')"class="last_row for_the_keyboard">Win</button>
|
96
|
+
<button onclick="on_key_pressed_event('alt_key')"class="last_row for_the_keyboard">Alt</button>
|
97
|
+
<button onclick="on_key_pressed_event('space_key')" class="for_the_keyboard space_key">space</button>
|
98
|
+
<button onclick="on_key_pressed_event('alt_key')" class="last_row for_the_keyboard">Alt</button>
|
99
|
+
<button onclick="on_key_pressed_event('fn_key')" class="last_row for_the_keyboard">Fn</button>
|
100
|
+
<button class="last_row for_the_keyboard">Ctrl</button>
|
101
|
+
<button class="last_row for_the_keyboard">←</button>
|
102
|
+
<button class="last_row for_the_keyboard">↓</button>
|
103
|
+
<button class="last_row for_the_keyboard">→</button>
|
104
|
+
</div>
|
105
|
+
|
106
|
+
</div>
|
107
|
+
|
108
|
+
<div style="margin-left: 8em; margin-top: 1em">
|
109
|
+
<label for="textarea_id"></label>
|
110
|
+
<textarea id="textarea_id" rows="12" cols="80" style="background-color: #d3d3d3">
|
111
|
+
</textarea>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<script>
|
115
|
+
|
116
|
+
function on_key_pressed_event(i) {
|
117
|
+
console.log(i)
|
118
|
+
old_value = document.getElementById('textarea_id').value
|
119
|
+
switch (i) {
|
120
|
+
case 'enter_key':
|
121
|
+
i = "\n"
|
122
|
+
break
|
123
|
+
case 'space_key':
|
124
|
+
i = ' '
|
125
|
+
break
|
126
|
+
case 'shift',
|
127
|
+
'caps_lock',
|
128
|
+
'shift':
|
129
|
+
i = ''
|
130
|
+
break
|
131
|
+
case 'backspace_key':
|
132
|
+
i = ''
|
133
|
+
old_value = old_value.slice(0, -1)
|
134
|
+
break
|
135
|
+
}
|
136
|
+
|
137
|
+
document.getElementById('textarea_id').value = old_value+i
|
138
|
+
/*alert(i);*/
|
139
|
+
}
|
140
|
+
</script>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'cyberweb/toplevel_methods/is_an_image.rb'
|
6
|
+
# =========================================================================== #
|
7
|
+
module Cyberweb
|
8
|
+
|
9
|
+
require 'cyberweb/constants/constants.rb'
|
10
|
+
|
11
|
+
# ========================================================================= #
|
12
|
+
# === Cyberweb.is_an_image_file?
|
13
|
+
# ========================================================================= #
|
14
|
+
def self.is_an_image_file?(i)
|
15
|
+
ARRAY_IMAGES.include?(File.extname(i).delete('.'))
|
16
|
+
end; self.instance_eval { alias is_an_image? is_an_image_file? } # === Cyberweb.is_an_image?
|
17
|
+
|
18
|
+
end
|
@@ -16,7 +16,7 @@ module Cyberweb
|
|
16
16
|
# ========================================================================= #
|
17
17
|
def self.listing_css_object
|
18
18
|
@listing_css_object
|
19
|
-
end
|
19
|
+
end; self.instance_eval { alias listing_css_object? listing_css_object } # === Cyberweb.listing_css_object?
|
20
20
|
|
21
21
|
# ========================================================================= #
|
22
22
|
# === Cyberweb.listing_css_object=
|
@@ -48,8 +48,7 @@ module Cyberweb
|
|
48
48
|
make_newline = true
|
49
49
|
)
|
50
50
|
s2 '(<b>'+return_counter+'</b>) <b>'+i+'</b>',
|
51
|
-
optional_css,
|
52
|
-
optional_id
|
51
|
+
optional_css, optional_id
|
53
52
|
br if make_newline
|
54
53
|
end; self.instance_eval { alias list listing } # === Cyberweb.list
|
55
54
|
self.instance_eval { alias count listing } # === Cyberweb.count (count tag)
|