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
data/doc/README.gen
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
ADD_TIME_STAMP
|
1
|
+
DEFAULT_HEADER
|
3
2
|
|
4
3
|
<img src="https://i.imgur.com/aC4YzSk.png" style="margin-left: 1.2em">
|
5
4
|
|
@@ -36,7 +35,7 @@ In PHP this is not easily possible, because the syntax is more rigid.
|
|
36
35
|
Thus, at the least in regards to the syntax, ruby is better than
|
37
36
|
PHP - more flexibility syntax-wise is available to ruby users than
|
38
37
|
is for PHP users. This flexibility helps a <b>lot</b> when writing
|
39
|
-
more dynamic, and more
|
38
|
+
more dynamic, and more succinct, code.
|
40
39
|
|
41
40
|
During that **transition phase**, from **php** to **ruby**, the cyberweb
|
42
41
|
project was renamed several times as well - first to **web_foundation**,
|
@@ -883,6 +882,33 @@ useful for short header-entries, such as "Goals" or
|
|
883
882
|
functionality purely exists due to convenience - I wanted
|
884
883
|
to quickly generate the default id entry for a sitemap.
|
885
884
|
|
885
|
+
Note that at the least h2_id() has been improved a bit,
|
886
|
+
directly and indirectly, in <b>January 2023</b>.
|
887
|
+
|
888
|
+
Specifically the following is now valid:
|
889
|
+
|
890
|
+
h2_id('Stickstofffixierung - eine symbiotische Beziehung, als '\
|
891
|
+
'Teil des Stickstoffkreislaufs') { :clickable_image }
|
892
|
+
|
893
|
+
So, what does this do?
|
894
|
+
|
895
|
+
First, as normal, it will "autogenerate" the corresponding
|
896
|
+
ID entry, via the newly created method .sanitize_this_id().
|
897
|
+
I intend to re-use this method for all other parts of the
|
898
|
+
cyberweb gem that require autogeneration of valid ID tags.
|
899
|
+
|
900
|
+
But, even more importantly than that, the block and the
|
901
|
+
Symbol called :clickable_image, will now add an image
|
902
|
+
(a small dot) to the left side of this header. This image
|
903
|
+
is clickable by the user. If the user clicks on that dot,
|
904
|
+
he/she will be re-directed to that specific header as
|
905
|
+
intralink. In other words: this functionality allows us
|
906
|
+
to "tag" any paragraph as intralink, by clicking on it.
|
907
|
+
|
908
|
+
I needed this functionality for many different local
|
909
|
+
websites, so I thought it was more useful if it is made
|
910
|
+
a proper method as-is.
|
911
|
+
|
886
912
|
## Redirecting to another page
|
887
913
|
|
888
914
|
You can combine BeautifulUrl, and Cyberweb, to redirect
|
@@ -1896,18 +1922,6 @@ fine. If they want to contribute code, that's fine - and if they
|
|
1896
1922
|
don't want to, that's fine as well, as far as the cyberweb
|
1897
1923
|
project is concerned.
|
1898
1924
|
|
1899
|
-
## Simple JavaScript Calculator
|
1900
|
-
|
1901
|
-
Use:
|
1902
|
-
|
1903
|
-
add_simple_javascript_calculator
|
1904
|
-
|
1905
|
-
You may need to style the input-tag a bit.
|
1906
|
-
|
1907
|
-
See the following file for a working example:
|
1908
|
-
|
1909
|
-
cyberweb/examples/advanced/simple_calculator.cgi
|
1910
|
-
|
1911
1925
|
## Drag and drop support in general and drag-and-drop support via Dragula
|
1912
1926
|
|
1913
1927
|
Via the new attribute **draggable="true"** it is possible to drag any
|
@@ -2671,20 +2685,6 @@ look at the **repackage gem** to find out how this is done.
|
|
2671
2685
|
Documentation is missing in this regard, but will be added over
|
2672
2686
|
the next weeks slowly.
|
2673
2687
|
|
2674
|
-
## JavaScript variables
|
2675
|
-
|
2676
|
-
The variables in JavaScript are by default global. You can make
|
2677
|
-
them local if you attach the **var** keyword to them.
|
2678
|
-
|
2679
|
-
You can also define several variables in one go, via:
|
2680
|
-
|
2681
|
-
var message = "hi",
|
2682
|
-
found = false,
|
2683
|
-
age = 29;
|
2684
|
-
|
2685
|
-
The keyword **let** has the lowest scope, even less than when
|
2686
|
-
compared to **var**.
|
2687
|
-
|
2688
2688
|
## Including CSS into a webpage
|
2689
2689
|
|
2690
2690
|
If you want to include CSS into a webpage, use the following HTML tag:
|
@@ -3727,23 +3727,6 @@ image at hand if you want it to "lose" colours (for display
|
|
3727
3727
|
purposes only; of course nothing is lost in the image as
|
3728
3728
|
such, only the display of said image is modified via CSS).
|
3729
3729
|
|
3730
|
-
## The progress bar in HTML5
|
3731
|
-
|
3732
|
-
You can use a progressbar to indicate progress based on
|
3733
|
-
percentage values. This is described here in detail:
|
3734
|
-
|
3735
|
-
https://css-tricks.com/html5-progress-element/
|
3736
|
-
|
3737
|
-
In cyberweb you can use:
|
3738
|
-
|
3739
|
-
progress
|
3740
|
-
progress('35 / 100') # 35%
|
3741
|
-
|
3742
|
-
At a later time we may add some javascript to indicate
|
3743
|
-
a counter-progress. Right now (as of February 2022)
|
3744
|
-
this is not possible though, so this part has to come
|
3745
|
-
at a later time.
|
3746
|
-
|
3747
3730
|
## Converting from a .html page to a cyberweb-object
|
3748
3731
|
|
3749
3732
|
The file **bin/html_to_cyberweb_converter** can be used
|
@@ -3888,90 +3871,6 @@ of boilerplate code, which I think is useful in its own right.
|
|
3888
3871
|
Future changes may even simplify this further, but for now
|
3889
3872
|
<b>let's keep it simple</b>.
|
3890
3873
|
|
3891
|
-
## Working with HTML forms, including creating input-buttons in such a form field
|
3892
|
-
|
3893
|
-
<form>
|
3894
|
-
<input type="button" class="BG_GRAYSTD bblack1" value="Default" name="foo" onClick="test1(this.form)">
|
3895
|
-
</form>
|
3896
|
-
|
3897
|
-
<form>
|
3898
|
-
<input class="BG_GRAYSTD bblack1" type="button" value="Default" name="foo" onClick="test1(this.form)">
|
3899
|
-
</form>
|
3900
|
-
|
3901
|
-
You can style ‹input> fields with a different background colour
|
3902
|
-
upon a mouse-focus event.
|
3903
|
-
|
3904
|
-
Examples for this would be:
|
3905
|
-
|
3906
|
-
input :text, 'Hello world!', :focus_with_salmon_background
|
3907
|
-
input :text, 'Hello World!', :focus_with_salmon_background, :select_on_click
|
3908
|
-
|
3909
|
-
View the file at **cyberweb/examples/simple/input_example_with_coloured_focus.cgi**
|
3910
|
-
to see this work in action.
|
3911
|
-
|
3912
|
-
You can modify the ‹input> tag within that via css by using:
|
3913
|
-
|
3914
|
-
input.view_css {}
|
3915
|
-
|
3916
|
-
Note that ‹input type="text"> only works for a single line of
|
3917
|
-
user input. If you would like to have the user work via multiple
|
3918
|
-
lines then you have to use the ‹textarea> tag instead.
|
3919
|
-
There may be work-arounds, such as giving the text-input the
|
3920
|
-
<b>word-break: break-word;</b> attribute, but this may not work
|
3921
|
-
on every browser.
|
3922
|
-
|
3923
|
-
Some shortcuts exist within the Cyberweb project. For instance,
|
3924
|
-
rather than do:
|
3925
|
-
|
3926
|
-
input :checkbox
|
3927
|
-
|
3928
|
-
You can do:
|
3929
|
-
|
3930
|
-
input_checkbox
|
3931
|
-
|
3932
|
-
Same with submit and other variants:
|
3933
|
-
|
3934
|
-
input_submit
|
3935
|
-
input_radio
|
3936
|
-
|
3937
|
-
This may not be a huge improvement, but I wanted to offer
|
3938
|
-
it in the event that some users like to avoid using the
|
3939
|
-
<b>:</b> for the symbol.
|
3940
|
-
|
3941
|
-
Combining a label and input-text is possible via Cyberweb
|
3942
|
-
too. Examples:
|
3943
|
-
|
3944
|
-
label_and_input_text :foobar
|
3945
|
-
label_and_input_text id: :foobar
|
3946
|
-
label_and_input_text id: :foobar, :br
|
3947
|
-
label_and_input_text id: :foobar, :linebreak
|
3948
|
-
label_and_input_text id: :foobar, :middle_break
|
3949
|
-
label_and_input_text :fname, 'First name:'
|
3950
|
-
|
3951
|
-
The last variant is essentially the same as this in HTML:
|
3952
|
-
|
3953
|
-
<label for="fname">First name:</label><br>
|
3954
|
-
<input type="text" id="fname" name="fname"><br>
|
3955
|
-
|
3956
|
-
If you have a need or use case to use a checked checkbox
|
3957
|
-
then you can use a variant such as this:
|
3958
|
-
|
3959
|
-
checked_checkbox name: 'valid_ninja'
|
3960
|
-
|
3961
|
-
It may be important to specify the name parameter, as
|
3962
|
-
shown above; otherwise it can be omitted.
|
3963
|
-
|
3964
|
-
This checked checkbox looks about like this:
|
3965
|
-
|
3966
|
-
<img src="https://i.imgur.com/Fn0GasM.png" style="margin: 1em">
|
3967
|
-
|
3968
|
-
## Use image-checkbox (on and off)
|
3969
|
-
|
3970
|
-
Examples:
|
3971
|
-
|
3972
|
-
show_image_checkbox :on, 'posab','top:10em;right:18%'
|
3973
|
-
show_image_checkbox :off, 'posab','top:10em;right:18%'
|
3974
|
-
|
3975
3874
|
## The CSS class called select_everything
|
3976
3875
|
|
3977
3876
|
This document already mentioned how to use JavaScript to select
|
@@ -4438,10 +4337,11 @@ the border via border-color then this will default to <b>black</b>.
|
|
4438
4337
|
|
4439
4338
|
## Cyberweb::HtmlTemplate
|
4440
4339
|
|
4441
|
-
class **Cyberweb::HtmlTemplate** can be used to
|
4340
|
+
class **Cyberweb::HtmlTemplate** can be used to describe (and ultimately
|
4341
|
+
generate) a .html file - that is, to fill this class with HTML
|
4442
4342
|
specific content.
|
4443
4343
|
|
4444
|
-
Let's show a specific example how this may be used:
|
4344
|
+
Let's show a specific example how this may be used first:
|
4445
4345
|
|
4446
4346
|
require 'cyberweb/requires/require_the_html_template.rb' # This is the recommended way to require class HtmlTemplate.
|
4447
4347
|
|
@@ -4455,7 +4355,7 @@ Let's show a specific example how this may be used:
|
|
4455
4355
|
This would represent a "full" HTML page, as a String.
|
4456
4356
|
|
4457
4357
|
It is possible, since as of **18.06.2021**, to pass **CSS classes**
|
4458
|
-
into this, via
|
4358
|
+
into this class, via the entry called <b>css_classes</b>:
|
4459
4359
|
|
4460
4360
|
css_classes:
|
4461
4361
|
|
@@ -4463,19 +4363,19 @@ For example, passing 'darkblue' to that key means that the CSS
|
|
4463
4363
|
class 'darkblue' will be made available, which ultimately comes
|
4464
4364
|
down to <b>color: darkblue</b>.
|
4465
4365
|
|
4466
|
-
|
4467
|
-
that
|
4468
|
-
Cyberweb::HtmlTemplate
|
4366
|
+
This functionality was necessary in order to pull in only the CSS
|
4367
|
+
classes that are used on a particular web-page generated or
|
4368
|
+
represented by class <b>Cyberweb::HtmlTemplate</b>.
|
4469
4369
|
|
4470
|
-
Various additional entries are available. For example, if
|
4471
|
-
|
4472
|
-
|
4370
|
+
Various additional entries are available. For example, if you want
|
4371
|
+
to modify the css-style in use for the body tag then you can
|
4372
|
+
simply use the following variant:
|
4473
4373
|
|
4474
4374
|
body_css_style: 'background-color:#DFD1FF'
|
4475
4375
|
|
4476
|
-
In the long run the goal here is to extend class
|
4477
|
-
in such a way that all html-generation used
|
4478
|
-
Cyberweb project can be handled by it.
|
4376
|
+
In the long run the goal here is to <b>extend</b> class
|
4377
|
+
HtmlTemplate in such a way that all html-generation used
|
4378
|
+
within the Cyberweb project can be handled by it.
|
4479
4379
|
|
4480
4380
|
You can also pass ad-hoc CSS style into it. Example:
|
4481
4381
|
|
@@ -4678,6 +4578,29 @@ This would yield the following Array:
|
|
4678
4578
|
"https://www.projectaon.org/en/xhtml/lw/02fotw/right.png"
|
4679
4579
|
]
|
4680
4580
|
|
4581
|
+
## Examples distributed in the cyberweb project
|
4582
|
+
|
4583
|
+
This subsection has a few noteworthy points to make about
|
4584
|
+
examples distributed in the cyberweb project.
|
4585
|
+
|
4586
|
+
You can find these examples under the directory called
|
4587
|
+
<b>examples/</b> - easy to remember.
|
4588
|
+
|
4589
|
+
You can find plain HTML examples, and examples that
|
4590
|
+
use JavaScript and CSS. Additionally some examples
|
4591
|
+
stored as .cgi files are distributed as well, to
|
4592
|
+
demonstrate how the cyberweb project works. I recommend
|
4593
|
+
that you have a look at the simple examples first,
|
4594
|
+
without .cgi, unless you already know HTML/CSS/JavaScript,
|
4595
|
+
and then transition into the .cgi files. That should make
|
4596
|
+
it a bit easier to understand what is going on.
|
4597
|
+
|
4598
|
+
You may find that these examples sort of follow a specific
|
4599
|
+
style, more or less. For instance, I tend to name all
|
4600
|
+
animations with a trailing <b>_animation</b> tag. That
|
4601
|
+
helps me identify which animations exist more easily
|
4602
|
+
so.
|
4603
|
+
|
4681
4604
|
## JavaScript support in the cyberweb project
|
4682
4605
|
|
4683
4606
|
### JavaScript for-in and for-of loops:
|
@@ -4826,6 +4749,183 @@ Example:
|
|
4826
4749
|
|
4827
4750
|
<script src="path/foobar.js" async></script>
|
4828
4751
|
|
4752
|
+
### JavaScript variables
|
4753
|
+
|
4754
|
+
The variables in JavaScript are by default global. You can make
|
4755
|
+
them local if you attach the **var** keyword to them.
|
4756
|
+
|
4757
|
+
You can also define several variables in one go, via:
|
4758
|
+
|
4759
|
+
var message = "hi",
|
4760
|
+
found = false,
|
4761
|
+
age = 29;
|
4762
|
+
|
4763
|
+
The keyword **let** has the lowest scope, even less than when
|
4764
|
+
compared to **var**.
|
4765
|
+
|
4766
|
+
### Simple JavaScript Calculator
|
4767
|
+
|
4768
|
+
Use:
|
4769
|
+
|
4770
|
+
add_simple_javascript_calculator
|
4771
|
+
|
4772
|
+
You may need to style the input-tag a bit.
|
4773
|
+
|
4774
|
+
See the following file for a working example:
|
4775
|
+
|
4776
|
+
cyberweb/examples/advanced/simple_calculator.cgi
|
4777
|
+
|
4778
|
+
## Showing a fancy CSS keyboard
|
4779
|
+
|
4780
|
+
If you use Cyberweb::WebObject then a fancy CSS keyboard
|
4781
|
+
can be shown. The method to do this is called:
|
4782
|
+
|
4783
|
+
show_the_keyboard
|
4784
|
+
|
4785
|
+
Right now this is not too terribly useful, but I can imagine
|
4786
|
+
that this could serve as the basis to add an ad-hoc keyboard
|
4787
|
+
to a website, such as for smartphone users.
|
4788
|
+
|
4789
|
+
## The progress bar in HTML5
|
4790
|
+
|
4791
|
+
You can use a <b>progressbar</b> to indicate progress based on
|
4792
|
+
percentage values. This is described here in more detail:
|
4793
|
+
|
4794
|
+
https://css-tricks.com/html5-progress-element/
|
4795
|
+
|
4796
|
+
In cyberweb you can use the following API to indicate this:
|
4797
|
+
|
4798
|
+
progress
|
4799
|
+
progress('35 / 100') # this will display 35%
|
4800
|
+
|
4801
|
+
At a later time some javascript code may be added to indicate
|
4802
|
+
a counter-progress. Right now (as of <b>February 2022</b>)
|
4803
|
+
this is not possible though, so this part has to come at
|
4804
|
+
a later time.
|
4805
|
+
|
4806
|
+
The raw HTML code would look like this, for 35%:
|
4807
|
+
|
4808
|
+
<progress max="100" value="35"></progress>
|
4809
|
+
|
4810
|
+
If you want to style the progressbar then you have to use
|
4811
|
+
CSS. This can then be done via the <b>progress[value]</b>
|
4812
|
+
selector.
|
4813
|
+
|
4814
|
+
Example for this:
|
4815
|
+
|
4816
|
+
progress[value] {
|
4817
|
+
/* Reset the default appearance */
|
4818
|
+
-webkit-appearance: none;
|
4819
|
+
appearance: none;
|
4820
|
+
width: 250px;
|
4821
|
+
height: 20px;
|
4822
|
+
}
|
4823
|
+
|
4824
|
+
## Working with HTML forms, including creating input-buttons in such a form field
|
4825
|
+
|
4826
|
+
<form>
|
4827
|
+
<input type="button" class="BG_GRAYSTD bblack1" value="Default" name="foo" onClick="test1(this.form)">
|
4828
|
+
</form>
|
4829
|
+
|
4830
|
+
<form>
|
4831
|
+
<input class="BG_GRAYSTD bblack1" type="button" value="Default" name="foo" onClick="test1(this.form)">
|
4832
|
+
</form>
|
4833
|
+
|
4834
|
+
You can style ‹input> fields with a different background colour
|
4835
|
+
upon a mouse-focus event.
|
4836
|
+
|
4837
|
+
Examples for this would be:
|
4838
|
+
|
4839
|
+
input :text, 'Hello world!', :focus_with_salmon_background
|
4840
|
+
input :text, 'Hello World!', :focus_with_salmon_background, :select_on_click
|
4841
|
+
|
4842
|
+
View the file at **cyberweb/examples/simple/input_example_with_coloured_focus.cgi**
|
4843
|
+
to see this work in action.
|
4844
|
+
|
4845
|
+
You can modify the ‹input> tag within that via css by using:
|
4846
|
+
|
4847
|
+
input.view_css {}
|
4848
|
+
|
4849
|
+
Note that ‹input type="text"> only works for a single line of
|
4850
|
+
user input. If you would like to have the user work via multiple
|
4851
|
+
lines then you have to use the ‹textarea> tag instead.
|
4852
|
+
There may be work-arounds, such as giving the text-input the
|
4853
|
+
<b>word-break: break-word;</b> attribute, but this may not work
|
4854
|
+
on every browser.
|
4855
|
+
|
4856
|
+
Some shortcuts exist within the Cyberweb project. For instance,
|
4857
|
+
rather than do:
|
4858
|
+
|
4859
|
+
input :checkbox
|
4860
|
+
|
4861
|
+
You can do:
|
4862
|
+
|
4863
|
+
input_checkbox
|
4864
|
+
|
4865
|
+
Same with submit and other variants:
|
4866
|
+
|
4867
|
+
input_submit
|
4868
|
+
input_radio
|
4869
|
+
|
4870
|
+
This may not be a huge improvement, but I wanted to offer it in
|
4871
|
+
the event that some users like to avoid using the <b>:</b> for
|
4872
|
+
the symbol.
|
4873
|
+
|
4874
|
+
Combining a label and input-text is possible via Cyberweb
|
4875
|
+
too. Examples:
|
4876
|
+
|
4877
|
+
label_and_input_text :foobar
|
4878
|
+
label_and_input_text id: :foobar
|
4879
|
+
label_and_input_text id: :foobar, :br
|
4880
|
+
label_and_input_text id: :foobar, :linebreak
|
4881
|
+
label_and_input_text id: :foobar, :middle_break
|
4882
|
+
label_and_input_text :fname, 'First name:'
|
4883
|
+
|
4884
|
+
The last variant is essentially the same as this in HTML:
|
4885
|
+
|
4886
|
+
<label for="fname">First name:</label><br>
|
4887
|
+
<input type="text" id="fname" name="fname"><br>
|
4888
|
+
|
4889
|
+
If you have a need or use case to use a checked checkbox
|
4890
|
+
then you can use a variant such as this:
|
4891
|
+
|
4892
|
+
checked_checkbox name: 'valid_ninja'
|
4893
|
+
|
4894
|
+
It may be important to specify the name parameter, as
|
4895
|
+
shown above; otherwise it can be omitted.
|
4896
|
+
|
4897
|
+
This <b>checked checkbox</b> looks about like this:
|
4898
|
+
|
4899
|
+
<img src="https://i.imgur.com/Fn0GasM.png" style="margin: 1em">
|
4900
|
+
|
4901
|
+
## Use image-checkbox (on and off)
|
4902
|
+
|
4903
|
+
Examples:
|
4904
|
+
|
4905
|
+
show_image_checkbox :on, 'posab','top:10em;right:18%'
|
4906
|
+
show_image_checkbox :off, 'posab','top:10em;right:18%'
|
4907
|
+
|
4908
|
+
## Science links
|
4909
|
+
|
4910
|
+
This is only useful for me and my home system. I have
|
4911
|
+
a few different science-specific subpages.
|
4912
|
+
|
4913
|
+
I can then link to these via:
|
4914
|
+
|
4915
|
+
science_links
|
4916
|
+
|
4917
|
+
This is quite plain, though, so I tend to add small
|
4918
|
+
images via:
|
4919
|
+
|
4920
|
+
science_links {{ use_this_image: dot109? }}
|
4921
|
+
|
4922
|
+
Other images could be supplied as well.
|
4923
|
+
|
4924
|
+
(Note that while this paragraph is for my own home system,
|
4925
|
+
the above could eventually be repurposed for other
|
4926
|
+
users too, if they have a bunch of external links
|
4927
|
+
they want to display on their homepage as well.
|
4928
|
+
I'll think about this for a while.)
|
4829
4929
|
## Useful quotes when designing websites and web-apps
|
4830
4930
|
|
4831
4931
|
The following subsection collects a few <b>interesting statements</b> -
|
@@ -1,3 +1,16 @@
|
|
1
|
+
--------------------------------------------------------------------------------
|
2
|
+
add a method:
|
3
|
+
|
4
|
+
p_default_li {
|
5
|
+
}
|
6
|
+
^^^ this will make use of "le" rather than "e".
|
7
|
+
|
8
|
+
we need a simple way to achieve this.
|
9
|
+
^^^ add class
|
10
|
+
|
11
|
+
RenderOrDisplay
|
12
|
+
^^^ add that class and test it ...
|
13
|
+
|
1
14
|
--------------------------------------------------------------------------------
|
2
15
|
(1) → add a simple and documented way to convert from csv into
|
3
16
|
table format
|
@@ -0,0 +1,149 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# http://localhost/programming/ruby/src/cyberweb/examples/advanced/animated_colourful_border/animated_colourful_border.cgi
|
6
|
+
# =========================================================================== #
|
7
|
+
require 'cyberweb/autoinclude'
|
8
|
+
|
9
|
+
english('Animated colourful border') {
|
10
|
+
autoextend
|
11
|
+
ruby_favicon
|
12
|
+
default_template '
|
13
|
+
|
14
|
+
body {
|
15
|
+
background-color: #060C1F;
|
16
|
+
font-family: "Almarai", sans-serif;
|
17
|
+
}
|
18
|
+
|
19
|
+
.wrapper_for_the_animated_colourful_border {
|
20
|
+
width: 800px;
|
21
|
+
-ms-flex-wrap: wrap;
|
22
|
+
flex-wrap: wrap;
|
23
|
+
justify-content: center;
|
24
|
+
overflow: hidden;
|
25
|
+
}
|
26
|
+
|
27
|
+
.main_div_for_the_gradient_shadow_animation {
|
28
|
+
position: relative;
|
29
|
+
margin: 10px;
|
30
|
+
background-color: transparent;
|
31
|
+
}
|
32
|
+
|
33
|
+
.div_for_the_gradient_shadow_animation::before {
|
34
|
+
content: '';
|
35
|
+
position: absolute;
|
36
|
+
left: 0;
|
37
|
+
top: 0;
|
38
|
+
width: 100%;
|
39
|
+
height: 100%;
|
40
|
+
-webkit-box-shadow: 0 0 17px 3px #ffff01,0 0 4px 2px #ffff01;
|
41
|
+
box-shadow: 0 0 17px 3px #ffff01,0 0 4px 2px #ffff01;
|
42
|
+
z-index: -1;
|
43
|
+
-webkit-animation-name: gradient_shadow_with_changing_colours_animation;
|
44
|
+
animation-name: gradient_shadow_with_changing_colours_animation;
|
45
|
+
-webkit-animation-timing-function: ease;
|
46
|
+
animation-timing-function: ease;
|
47
|
+
-webkit-animation-duration: 6s;
|
48
|
+
animation-duration: 6s;
|
49
|
+
-webkit-animation-iteration-count: infinite;
|
50
|
+
animation-iteration-count: infinite;
|
51
|
+
border-radius: 5px;
|
52
|
+
-webkit-border-radius: 5px;
|
53
|
+
-moz-border-radius: 5px;
|
54
|
+
-ms-border-radius: 5px;
|
55
|
+
-o-border-radius: 5px;
|
56
|
+
}
|
57
|
+
|
58
|
+
.header_for_the_gradient_shadow_animation {
|
59
|
+
font-size: 50px;
|
60
|
+
margin: 0;
|
61
|
+
position: relative;
|
62
|
+
z-index: 3;
|
63
|
+
padding: 20px;
|
64
|
+
background-color: #060C1F;
|
65
|
+
color: #fff;
|
66
|
+
border-radius: 5px;
|
67
|
+
-webkit-border-radius: 5px;
|
68
|
+
-moz-border-radius: 5px;
|
69
|
+
-ms-border-radius: 5px;
|
70
|
+
-o-border-radius: 5px;
|
71
|
+
}
|
72
|
+
|
73
|
+
@-webkit-keyframes gradient_shadow_with_changing_colours_animation {
|
74
|
+
0% {
|
75
|
+
-webkit-box-shadow: 0 0 17px 3px #C586C0,0 0 4px 2px #C586C0;
|
76
|
+
box-shadow: 0 0 17px 3px #C586C0,0 0 4px 2px #C586C0;
|
77
|
+
}
|
78
|
+
20% {
|
79
|
+
-webkit-box-shadow: 0 0 17px 3px #0ff,0 0 4px 2px #0ff;
|
80
|
+
box-shadow: 0 0 17px 3px #0ff,0 0 4px 2px #0ff;
|
81
|
+
}
|
82
|
+
40% {
|
83
|
+
-webkit-box-shadow: 0 0 17px 3px #0f0,0 0 4px 2px #0f0;
|
84
|
+
box-shadow: 0 0 17px 3px #0f0,0 0 4px 2px #0f0;
|
85
|
+
}
|
86
|
+
60% {
|
87
|
+
-webkit-box-shadow: 0 0 17px 3px #ffff01,0 0 4px 2px #ffff01;
|
88
|
+
box-shadow: 0 0 17px 3px #ffff01,0 0 4px 2px #ffff01;
|
89
|
+
}
|
90
|
+
80% {
|
91
|
+
-webkit-box-shadow: 0 0 17px 3px #f00,0 0 4px 2px #f00;
|
92
|
+
box-shadow: 0 0 17px 3px #f00,0 0 4px 2px #f00;
|
93
|
+
}
|
94
|
+
100% {
|
95
|
+
-webkit-box-shadow: 0 0 17px 3px #C586C0,0 0 4px 2px #C586C0;
|
96
|
+
box-shadow: 0 0 17px 3px #C586C0,0 0 4px 2px #C586C0;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
@keyframes gradient_shadow_with_changing_colours_animation {
|
101
|
+
0% {
|
102
|
+
-webkit-box-shadow: 0 0 17px 3px #C586C0,0 0 4px 2px #C586C0;
|
103
|
+
box-shadow: 0 0 17px 3px #C586C0,0 0 4px 2px #C586C0;
|
104
|
+
}
|
105
|
+
20% {
|
106
|
+
-webkit-box-shadow: 0 0 17px 3px #0ff,0 0 4px 2px #0ff;
|
107
|
+
box-shadow: 0 0 17px 3px #0ff,0 0 4px 2px #0ff;
|
108
|
+
}
|
109
|
+
40% {
|
110
|
+
-webkit-box-shadow: 0 0 17px 3px #0f0,0 0 4px 2px #0f0;
|
111
|
+
box-shadow: 0 0 17px 3px #0f0,0 0 4px 2px #0f0;
|
112
|
+
}
|
113
|
+
60% {
|
114
|
+
-webkit-box-shadow: 0 0 17px 3px #ffff01,0 0 4px 2px #ffff01;
|
115
|
+
box-shadow: 0 0 17px 3px #ffff01,0 0 4px 2px #ffff01;
|
116
|
+
}
|
117
|
+
80% {
|
118
|
+
-webkit-box-shadow: 0 0 17px 3px #f00,0 0 4px 2px #f00;
|
119
|
+
box-shadow: 0 0 17px 3px #f00,0 0 4px 2px #f00;
|
120
|
+
}
|
121
|
+
100% {
|
122
|
+
-webkit-box-shadow: 0 0 17px 3px #C586C0,0 0 4px 2px #C586C0;
|
123
|
+
box-shadow: 0 0 17px 3px #C586C0,0 0 4px 2px #C586C0;
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
'
|
128
|
+
body_css_class 'mar0px s2px padt2px VERDANAs'
|
129
|
+
body_css_style 'background-color: #d3d2d1;'
|
130
|
+
font_size '1.1em'
|
131
|
+
no_jquery
|
132
|
+
|
133
|
+
doc('mar0px s1em') {
|
134
|
+
ee '<div class="wrapper_for_the_animated_colourful_border">
|
135
|
+
<div class="main_div_for_the_gradient_shadow_animation div_for_the_gradient_shadow_animation">
|
136
|
+
<h1 class="header_for_the_gradient_shadow_animation" style="color: #FFFFE0">
|
137
|
+
This is a test sentence.
|
138
|
+
</h1>
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
<div class="wrapper_for_the_animated_colourful_border">
|
142
|
+
<div class="main_div_for_the_gradient_shadow_animation div_for_the_gradient_shadow_animation">
|
143
|
+
<h1 class="header_for_the_gradient_shadow_animation" style="color: #FFFFE0">
|
144
|
+
This is a test sentence.
|
145
|
+
</h1>
|
146
|
+
</div>
|
147
|
+
</div>'
|
148
|
+
|
149
|
+
}}
|