cyberweb 0.12.35 → 0.13.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +220 -124
- data/bin/cyberweb_sanitize +1 -1
- data/bin/images_from_this_webpage +1 -1
- data/doc/README.gen +209 -98
- data/doc/configuration/configuration.md +7 -4
- data/doc/todo/todo_for_the_cyberweb_project.md +123 -133
- data/examples/html/underlined_text_example/underlined_text_example.html +40 -0
- data/examples/misc/table_example.rb +19 -17
- data/examples/objectified/objectified_caesar_cipher.cgi +73 -0
- data/images/cyberweb_theme.png +0 -0
- data/lib/cyberweb/REST/constants.rb +1 -1
- data/lib/cyberweb/base/base.rb +19 -27
- data/lib/cyberweb/base_module/base_module/base_module.rb +31 -16
- data/lib/cyberweb/base_module/colours/colours.rb +0 -8
- data/lib/cyberweb/cascading_style_sheets/margin.css +4 -0
- data/lib/cyberweb/cascading_style_sheets/misc.css +15 -0
- data/lib/cyberweb/cgi/cookie.rb +160 -156
- data/lib/cyberweb/cgi/core.rb +7 -7
- data/lib/cyberweb/cgi/query_extension.rb +1 -1
- data/lib/cyberweb/cgi/session/memory_store.rb +1 -1
- data/lib/cyberweb/cgi/session/pstore.rb +2 -2
- data/lib/cyberweb/cgi/session.rb +1 -1
- data/lib/cyberweb/cgi/util.rb +4 -1
- data/lib/cyberweb/cmd/cmd.rb +12 -10
- data/lib/cyberweb/coloured_tags/coloured_tags.rb +1 -1
- data/lib/cyberweb/colours/colour_chart.rb +1 -2
- data/lib/cyberweb/colours/colours.rb +1 -1
- data/lib/cyberweb/commandline/commandline_interface.rb +1 -1
- data/lib/cyberweb/configuration/load_the_configuration.rb +3 -1
- data/lib/cyberweb/constants/http_status_codes.rb +4 -1
- data/lib/cyberweb/constants/misc.rb +8 -6
- data/lib/cyberweb/constants/registered_html_tags.rb +6 -5
- data/lib/cyberweb/constants/user_x.rb +7 -0
- data/lib/cyberweb/css_manager/css_manager.rb +5 -2
- data/lib/cyberweb/encoding/encoding.rb +1 -1
- data/lib/cyberweb/erb/test.rhtml +7 -2
- data/lib/cyberweb/experimental/html_template_powered_by_rack.rb +3 -1
- data/lib/cyberweb/foto_gallery/foto_gallery.rb +3 -0
- data/lib/cyberweb/generator/cgi.rb +1 -1
- data/lib/cyberweb/html_template/html_template.rb +383 -311
- data/lib/cyberweb/images/images.rb +2 -2
- data/lib/cyberweb/images/remove_this_substring_from_all_images.rb +5 -1
- data/lib/cyberweb/images/standard_images/standard_images.html +3 -4
- data/lib/cyberweb/information/README.md +2 -2
- data/lib/cyberweb/information/information.cgi +1 -1
- data/lib/cyberweb/javascript/dragula_collection.rb +4 -1
- data/lib/cyberweb/javascript/javascript_magic.rb +2 -2
- data/lib/cyberweb/javascript/on_click_change_opacity.rb +2 -1
- data/lib/cyberweb/javascript/popup.rb +8 -1
- data/lib/cyberweb/javascript/snoweffect.rb +5 -1
- data/lib/cyberweb/javascript_code/custom_functions.js +50 -32
- data/lib/cyberweb/objectified/html_tags/README.md +7 -9
- data/lib/cyberweb/objectified/html_tags/a.rb +62 -3
- data/lib/cyberweb/objectified/html_tags/abbr.rb +33 -3
- data/lib/cyberweb/objectified/html_tags/audio.rb +33 -3
- data/lib/cyberweb/objectified/html_tags/base.rb +661 -588
- data/lib/cyberweb/objectified/html_tags/blockquote.rb +33 -3
- data/lib/cyberweb/objectified/html_tags/body.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/button.rb +75 -5
- data/lib/cyberweb/objectified/html_tags/canvas.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/cite.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/div.rb +70 -7
- data/lib/cyberweb/objectified/html_tags/embed.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/fieldset.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/figure.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/form.rb +78 -3
- data/lib/cyberweb/objectified/html_tags/h1.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/h2.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/h3.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/h4.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/h5.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/h6.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/head.rb +34 -1
- data/lib/cyberweb/objectified/html_tags/i.rb +112 -0
- data/lib/cyberweb/objectified/html_tags/img.rb +65 -18
- data/lib/cyberweb/objectified/html_tags/input.rb +86 -2
- data/lib/cyberweb/objectified/html_tags/label.rb +103 -0
- data/lib/cyberweb/objectified/html_tags/legend.rb +129 -0
- data/lib/cyberweb/objectified/html_tags/li.rb +111 -0
- data/lib/cyberweb/objectified/html_tags/map.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/meta.rb +13 -2
- data/lib/cyberweb/objectified/html_tags/nav.rb +111 -0
- data/lib/cyberweb/objectified/html_tags/object.rb +33 -3
- data/lib/cyberweb/objectified/html_tags/ol.rb +127 -0
- data/lib/cyberweb/objectified/html_tags/p.rb +33 -3
- data/lib/cyberweb/objectified/html_tags/pre.rb +41 -4
- data/lib/cyberweb/objectified/html_tags/progress.rb +43 -3
- data/lib/cyberweb/objectified/html_tags/section.rb +116 -0
- data/lib/cyberweb/objectified/html_tags/select.rb +34 -1
- data/lib/cyberweb/objectified/html_tags/span.rb +64 -5
- data/lib/cyberweb/objectified/html_tags/style.rb +9 -2
- data/lib/cyberweb/objectified/html_tags/table.rb +137 -3
- data/lib/cyberweb/objectified/html_tags/td.rb +135 -0
- data/lib/cyberweb/objectified/html_tags/textarea.rb +37 -3
- data/lib/cyberweb/objectified/html_tags/th.rb +114 -0
- data/lib/cyberweb/objectified/html_tags/thead.rb +114 -0
- data/lib/cyberweb/objectified/html_tags/title.rb +10 -2
- data/lib/cyberweb/objectified/html_tags/tr.rb +110 -0
- data/lib/cyberweb/objectified/html_tags/ul.rb +45 -4
- data/lib/cyberweb/objectified/shorter_helper_methods/shorter_helper_methods.rb +67 -46
- data/lib/cyberweb/oop.rb +9 -0
- data/lib/cyberweb/predefined_and_freeform_methods/hash_registered_extra_tags.rb +2 -0
- data/lib/cyberweb/predefined_and_freeform_methods/header.rb +4 -1
- data/lib/cyberweb/project/project.rb +0 -4
- data/lib/cyberweb/requires/remove_html.rb +1 -1
- data/lib/cyberweb/requires/require_the_cyberweb_project.rb +1 -9
- data/lib/cyberweb/route_handler/module/route_handler_module.rb +2 -1
- data/lib/cyberweb/standalone_classes/all_css_classes.rb +5 -2
- data/lib/cyberweb/standalone_classes/calculator.rb +3 -1
- data/lib/cyberweb/toplevel_methods/audio.rb +3 -1
- data/lib/cyberweb/toplevel_methods/csv.rb +1 -1
- data/lib/cyberweb/toplevel_methods/frames.rb +11 -3
- data/lib/cyberweb/toplevel_methods/greek_letters/greek_letters.rb +3 -0
- data/lib/cyberweb/toplevel_methods/hfin.rb +5 -1
- data/lib/cyberweb/toplevel_methods/html_tags/README.md +8 -7
- data/lib/cyberweb/toplevel_methods/html_tags/html_tags.rb +4211 -2827
- data/lib/cyberweb/toplevel_methods/html_tags/table.rb +1202 -0
- data/lib/cyberweb/toplevel_methods/javascript.rb +9 -1
- data/lib/cyberweb/toplevel_methods/jquery.rb +1 -1
- data/lib/cyberweb/toplevel_methods/{log_directory.rb → log_directory_and_logging.rb} +36 -1
- data/lib/cyberweb/toplevel_methods/params.rb +11 -11
- data/lib/cyberweb/toplevel_methods/random.rb +4 -3
- data/lib/cyberweb/toplevel_methods/registered_ids.rb +3 -0
- data/lib/cyberweb/toplevel_methods/return_head_start.rb +1 -3
- data/lib/cyberweb/toplevel_methods/return_html_start.rb +1 -3
- data/lib/cyberweb/toplevel_methods/sanitize_url.rb +2 -1
- data/lib/cyberweb/toplevel_methods/server_base_directory.rb +0 -1
- data/lib/cyberweb/toplevel_methods/textile.rb +2 -1
- data/lib/cyberweb/toplevel_methods/{misc.rb → toplevel_methods.rb} +1446 -807
- data/lib/cyberweb/toplevel_methods/video.rb +21 -3
- data/lib/cyberweb/toplevel_methods/write_what_into.rb +2 -2
- data/lib/cyberweb/utility_scripts/autogenerate_drop_shadow_rules/autogenerate_drop_shadow_rules.rb +2 -4
- data/lib/cyberweb/utility_scripts/booklet/booklet.rb +0 -4
- data/lib/cyberweb/utility_scripts/download_all_images_from_this_website.rb +1 -1
- data/lib/cyberweb/utility_scripts/{download_balloon_css.rb → download_balloon_css/download_balloon_css.rb} +1 -1
- data/lib/cyberweb/utility_scripts/images_to_html/images_to_html.rb +3 -0
- data/lib/cyberweb/utility_scripts/obtain_files_and_directories_from_this_path/obtain_files_and_directories_from_this_path.rb +184 -72
- data/lib/cyberweb/utility_scripts/pdf_to_html/pdf_to_html.rb +161 -65
- data/lib/cyberweb/version/version.rb +2 -2
- data/lib/cyberweb/web_images/map_symbol_to_image_location.rb +13 -2
- data/lib/cyberweb/web_object/web_object.rb +65 -67
- data/lib/cyberweb/web_scraper/scrape_this_url.rb +3 -1
- data/lib/cyberweb/webmin/biology_server.cgi +1 -1
- data/lib/cyberweb/webmin/calculator.cgi +1 -1
- data/lib/cyberweb/webmin/colour_chart.cgi +1 -1
- data/lib/cyberweb/webmin/comments.cgi +2 -2
- data/lib/cyberweb/webmin/constants.rb +1 -1
- data/lib/cyberweb/webmin/dictionary.cgi +2 -2
- data/lib/cyberweb/webmin/simple_forum/index.cgi +2 -2
- data/lib/cyberweb/webmin/sys_info.cgi +3 -3
- data/lib/cyberweb/webmin/webforum.cgi +1 -1
- data/lib/cyberweb/yaml/registered_html_tags.yml +3 -1
- data/test/simple_tests/testing_return_dataset_without_any_comments.rb +1 -1
- metadata +23 -57
- data/lib/cyberweb/html_tags/README.md +0 -3
- data/lib/cyberweb/html_tags/a.rb +0 -67
- data/lib/cyberweb/html_tags/accesskey.rb +0 -25
- data/lib/cyberweb/html_tags/blockquote.rb +0 -56
- data/lib/cyberweb/html_tags/body.rb +0 -14
- data/lib/cyberweb/html_tags/br.rb +0 -19
- data/lib/cyberweb/html_tags/button.rb +0 -150
- data/lib/cyberweb/html_tags/canvas.rb +0 -59
- data/lib/cyberweb/html_tags/chtml.rb +0 -14
- data/lib/cyberweb/html_tags/div.rb +0 -170
- data/lib/cyberweb/html_tags/fieldset.rb +0 -69
- data/lib/cyberweb/html_tags/figure.rb +0 -72
- data/lib/cyberweb/html_tags/form.rb +0 -203
- data/lib/cyberweb/html_tags/h1.rb +0 -77
- data/lib/cyberweb/html_tags/h2.rb +0 -81
- data/lib/cyberweb/html_tags/h3.rb +0 -60
- data/lib/cyberweb/html_tags/h4.rb +0 -66
- data/lib/cyberweb/html_tags/h5.rb +0 -64
- data/lib/cyberweb/html_tags/h6.rb +0 -60
- data/lib/cyberweb/html_tags/hr.rb +0 -22
- data/lib/cyberweb/html_tags/html_tags.rb +0 -267
- data/lib/cyberweb/html_tags/i.rb +0 -52
- data/lib/cyberweb/html_tags/img.rb +0 -294
- data/lib/cyberweb/html_tags/input.rb +0 -354
- data/lib/cyberweb/html_tags/label.rb +0 -65
- data/lib/cyberweb/html_tags/legend.rb +0 -56
- data/lib/cyberweb/html_tags/li.rb +0 -67
- data/lib/cyberweb/html_tags/map.rb +0 -38
- data/lib/cyberweb/html_tags/nav.rb +0 -63
- data/lib/cyberweb/html_tags/object.rb +0 -57
- data/lib/cyberweb/html_tags/ol.rb +0 -57
- data/lib/cyberweb/html_tags/option.rb +0 -64
- data/lib/cyberweb/html_tags/p.rb +0 -88
- data/lib/cyberweb/html_tags/pre.rb +0 -162
- data/lib/cyberweb/html_tags/section.rb +0 -33
- data/lib/cyberweb/html_tags/select.rb +0 -104
- data/lib/cyberweb/html_tags/span.rb +0 -344
- data/lib/cyberweb/html_tags/strong.rb +0 -42
- data/lib/cyberweb/html_tags/table.rb +0 -284
- data/lib/cyberweb/html_tags/tbody.rb +0 -26
- data/lib/cyberweb/html_tags/td.rb +0 -212
- data/lib/cyberweb/html_tags/textarea.rb +0 -173
- data/lib/cyberweb/html_tags/th.rb +0 -70
- data/lib/cyberweb/html_tags/thead.rb +0 -41
- data/lib/cyberweb/html_tags/tr.rb +0 -99
- data/lib/cyberweb/html_tags/ul.rb +0 -51
- data/lib/cyberweb/requires/require_html_tags_files.rb +0 -23
- data/lib/cyberweb/toplevel_methods/logging.rb +0 -42
- data/lib/cyberweb/web_base/web_base.rb +0 -33
@@ -0,0 +1,114 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# === Cyberweb::Objectified::HtmlTags::Th
|
6
|
+
# =========================================================================== #
|
7
|
+
# require 'cyberweb/objectified/html_tags/th.rb'
|
8
|
+
# =========================================================================== #
|
9
|
+
require 'cyberweb/objectified/html_tags/base.rb'
|
10
|
+
|
11
|
+
module Cyberweb
|
12
|
+
|
13
|
+
module Objectified::HtmlTags
|
14
|
+
|
15
|
+
class Th < Cyberweb::Objectified::HtmlTags::Base # === Cyberweb::Objectified::HtmlTags::Th
|
16
|
+
|
17
|
+
# ========================================================================= #
|
18
|
+
# === @css_class
|
19
|
+
# ========================================================================= #
|
20
|
+
@css_class = nil
|
21
|
+
|
22
|
+
# ========================================================================= #
|
23
|
+
# === Cyberweb::Objectified::HtmlTags::Img.reset_css_class
|
24
|
+
# ========================================================================= #
|
25
|
+
def self.reset_css_class
|
26
|
+
@css_class = nil
|
27
|
+
end
|
28
|
+
|
29
|
+
# ========================================================================= #
|
30
|
+
# === Cyberweb::Objectified::HtmlTags::Img.clear
|
31
|
+
# ========================================================================= #
|
32
|
+
def self.clear
|
33
|
+
Img.set_css_class('')
|
34
|
+
end
|
35
|
+
|
36
|
+
# ========================================================================= #
|
37
|
+
# === Cyberweb::Objectified::HtmlTags::Img.set_css_class
|
38
|
+
# ========================================================================= #
|
39
|
+
def self.set_css_class(i = DEFAULT_CSS_CLASS)
|
40
|
+
@css_class = i
|
41
|
+
end
|
42
|
+
|
43
|
+
# ========================================================================= #
|
44
|
+
# === Cyberweb::Objectified::HtmlTags::Img.css_class?
|
45
|
+
# ========================================================================= #
|
46
|
+
def self.css_class?
|
47
|
+
@css_class
|
48
|
+
end
|
49
|
+
|
50
|
+
# ========================================================================= #
|
51
|
+
# === initialize
|
52
|
+
#
|
53
|
+
# Usage example:
|
54
|
+
#
|
55
|
+
# Cyberweb::Objectified::HtmlTags::Th.new(i)
|
56
|
+
#
|
57
|
+
# ========================================================================= #
|
58
|
+
def initialize(
|
59
|
+
use_this_text = '',
|
60
|
+
optional_css_class = Th.css_class?,
|
61
|
+
optional_id = nil,
|
62
|
+
optional_css_style = nil
|
63
|
+
)
|
64
|
+
try_to_register_this_tag(self)
|
65
|
+
reset
|
66
|
+
use_this_text = use_this_text.join(' ').strip if use_this_text.is_a? Array
|
67
|
+
set_content(use_this_text)
|
68
|
+
set_CSS_class(optional_css_class) if optional_css_class
|
69
|
+
set_id(optional_id) if optional_id
|
70
|
+
set_CSS_style(optional_css_style) if optional_css_style
|
71
|
+
end
|
72
|
+
|
73
|
+
# ========================================================================= #
|
74
|
+
# === reset
|
75
|
+
# ========================================================================= #
|
76
|
+
def reset
|
77
|
+
super()
|
78
|
+
end
|
79
|
+
|
80
|
+
# ========================================================================= #
|
81
|
+
# === rebuild_the_result
|
82
|
+
# ========================================================================= #
|
83
|
+
def rebuild_the_result
|
84
|
+
reset_the_result
|
85
|
+
consider_adding_the_pre_content
|
86
|
+
append_onto_the_result '<th'
|
87
|
+
batch_append_css_class_then_the_ID_and_then_the_css_style
|
88
|
+
append_onto_the_result ">\n"
|
89
|
+
append_onto_the_result content?.to_s
|
90
|
+
append_onto_the_result "\n</th>\n"
|
91
|
+
return raw_result?
|
92
|
+
end
|
93
|
+
|
94
|
+
end; end
|
95
|
+
|
96
|
+
# =========================================================================== #
|
97
|
+
# === Cyberweb::Objectified::HtmlTags::Th
|
98
|
+
# =========================================================================== #
|
99
|
+
Th = ::Cyberweb::Objectified::HtmlTags::Th
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
# =========================================================================== #
|
104
|
+
# Testing the <th> tag next:
|
105
|
+
# =========================================================================== #
|
106
|
+
if __FILE__ == $PROGRAM_NAME
|
107
|
+
alias e puts
|
108
|
+
# Testing the <th> tag next:
|
109
|
+
_ = Cyberweb::Objectified::HtmlTags::Th.new('Foo-bar')
|
110
|
+
_.id = 'test_th'
|
111
|
+
_.css_class = 'rounded_border_8px wid100 bblack2'
|
112
|
+
_.css_style = 'font-size: 3em'
|
113
|
+
e _
|
114
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# === Cyberweb::Objectified::HtmlTags::Thead
|
6
|
+
# =========================================================================== #
|
7
|
+
# require 'cyberweb/objectified/html_tags/thead.rb'
|
8
|
+
# x = Cyberweb::Objectified::HtmlTags::Thead.new
|
9
|
+
# =========================================================================== #
|
10
|
+
require 'cyberweb/objectified/html_tags/base.rb'
|
11
|
+
|
12
|
+
module Cyberweb
|
13
|
+
|
14
|
+
module Objectified::HtmlTags
|
15
|
+
|
16
|
+
class Thead < Cyberweb::Objectified::HtmlTags::Base # === Cyberweb::Objectified::HtmlTags::Thead
|
17
|
+
|
18
|
+
# ========================================================================= #
|
19
|
+
# === @css_class
|
20
|
+
# ========================================================================= #
|
21
|
+
@css_class = nil
|
22
|
+
|
23
|
+
# ========================================================================= #
|
24
|
+
# === Cyberweb::Objectified::HtmlTags::Thead.reset_css_class
|
25
|
+
# ========================================================================= #
|
26
|
+
def self.reset_css_class
|
27
|
+
@css_class = nil
|
28
|
+
end
|
29
|
+
|
30
|
+
# ========================================================================= #
|
31
|
+
# === Cyberweb::Objectified::HtmlTags::Thead.clear
|
32
|
+
# ========================================================================= #
|
33
|
+
def self.clear
|
34
|
+
Thead.set_css_class('')
|
35
|
+
end
|
36
|
+
|
37
|
+
# ========================================================================= #
|
38
|
+
# === Cyberweb::Objectified::HtmlTags::Thead.set_css_class
|
39
|
+
# ========================================================================= #
|
40
|
+
def self.set_css_class(i = DEFAULT_CSS_CLASS)
|
41
|
+
@css_class = i
|
42
|
+
end
|
43
|
+
|
44
|
+
# ========================================================================= #
|
45
|
+
# === Cyberweb::Objectified::HtmlTags::Thead.css_class?
|
46
|
+
# ========================================================================= #
|
47
|
+
def self.css_class?
|
48
|
+
@css_class
|
49
|
+
end
|
50
|
+
|
51
|
+
# ========================================================================= #
|
52
|
+
# === initialize
|
53
|
+
#
|
54
|
+
# Usage example:
|
55
|
+
#
|
56
|
+
# Cyberweb::Objectified::HtmlTags::Thead.new(i)
|
57
|
+
#
|
58
|
+
# ========================================================================= #
|
59
|
+
def initialize(
|
60
|
+
use_this_text = '',
|
61
|
+
optional_css_class = Thead.css_class?,
|
62
|
+
optional_id = nil,
|
63
|
+
optional_css_style = nil
|
64
|
+
)
|
65
|
+
try_to_register_this_tag(self)
|
66
|
+
reset
|
67
|
+
set_content(use_this_text) # This should be an Array really.
|
68
|
+
set_CSS_class(optional_css_class) if optional_css_class
|
69
|
+
set_id(optional_id) if optional_id
|
70
|
+
set_CSS_style(optional_css_style) if optional_css_style
|
71
|
+
end
|
72
|
+
|
73
|
+
# ========================================================================= #
|
74
|
+
# === reset
|
75
|
+
# ========================================================================= #
|
76
|
+
def reset
|
77
|
+
super()
|
78
|
+
end
|
79
|
+
|
80
|
+
# ========================================================================= #
|
81
|
+
# === rebuild_the_result
|
82
|
+
# ========================================================================= #
|
83
|
+
def rebuild_the_result
|
84
|
+
reset_the_result
|
85
|
+
consider_adding_the_pre_content
|
86
|
+
append_onto_the_result '<thead'
|
87
|
+
batch_append_css_class_then_the_ID_and_then_the_css_style
|
88
|
+
append_onto_the_result ">\n"
|
89
|
+
append_the_content
|
90
|
+
append_onto_the_result "</thead>\n"
|
91
|
+
return raw_result?
|
92
|
+
end
|
93
|
+
|
94
|
+
end; end
|
95
|
+
|
96
|
+
# =========================================================================== #
|
97
|
+
# === Cyberweb::Objectified::HtmlTags::Thead
|
98
|
+
# =========================================================================== #
|
99
|
+
Thead = ::Cyberweb::Objectified::HtmlTags::Thead
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
# =========================================================================== #
|
104
|
+
# Testing the <table> tag next:
|
105
|
+
# =========================================================================== #
|
106
|
+
if __FILE__ == $PROGRAM_NAME
|
107
|
+
# ========================================================================= #
|
108
|
+
# The code that follows next ist mostly test-code:
|
109
|
+
# ========================================================================= #
|
110
|
+
alias e puts
|
111
|
+
require 'colours/autoinclude'
|
112
|
+
_ = Cyberweb::Objectified::HtmlTags::Thead.new
|
113
|
+
e _
|
114
|
+
end
|
@@ -25,9 +25,10 @@ class Title < Cyberweb::Objectified::HtmlTags::Base # === Cyberweb::Objectified:
|
|
25
25
|
def initialize(
|
26
26
|
use_this_text = ''
|
27
27
|
)
|
28
|
-
|
28
|
+
try_to_register_this_tag(self)
|
29
29
|
reset
|
30
30
|
use_this_text = use_this_text.join(' ').strip if use_this_text.is_a? Array
|
31
|
+
set_content(use_this_text) if use_this_text
|
31
32
|
end
|
32
33
|
|
33
34
|
# ========================================================================= #
|
@@ -49,7 +50,14 @@ class Title < Cyberweb::Objectified::HtmlTags::Base # === Cyberweb::Objectified:
|
|
49
50
|
return raw_result?
|
50
51
|
end
|
51
52
|
|
52
|
-
end; end
|
53
|
+
end; end
|
54
|
+
|
55
|
+
# =========================================================================== #
|
56
|
+
# === Cyberweb::Objectified::HtmlTags::Title
|
57
|
+
# =========================================================================== #
|
58
|
+
Title = ::Cyberweb::Objectified::HtmlTags::Title
|
59
|
+
|
60
|
+
end
|
53
61
|
|
54
62
|
# =========================================================================== #
|
55
63
|
# Testing the <title> tag next:
|
@@ -0,0 +1,110 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# === Cyberweb::Objectified::HtmlTags::Tr
|
6
|
+
# =========================================================================== #
|
7
|
+
# require 'cyberweb/objectified/html_tags/tr.rb'
|
8
|
+
# =========================================================================== #
|
9
|
+
require 'cyberweb/objectified/html_tags/base.rb'
|
10
|
+
|
11
|
+
module Cyberweb
|
12
|
+
|
13
|
+
module Objectified::HtmlTags
|
14
|
+
|
15
|
+
class Tr < Cyberweb::Objectified::HtmlTags::Base # === Cyberweb::Objectified::HtmlTags::Tr
|
16
|
+
|
17
|
+
# ========================================================================= #
|
18
|
+
# === @css_class
|
19
|
+
# ========================================================================= #
|
20
|
+
@css_class = nil
|
21
|
+
|
22
|
+
# ========================================================================= #
|
23
|
+
# === Cyberweb::Objectified::HtmlTags::Tr.reset_css_class
|
24
|
+
# ========================================================================= #
|
25
|
+
def self.reset_css_class
|
26
|
+
@css_class = nil
|
27
|
+
end
|
28
|
+
|
29
|
+
# ========================================================================= #
|
30
|
+
# === Cyberweb::Objectified::HtmlTags::Tr.clear
|
31
|
+
# ========================================================================= #
|
32
|
+
def self.clear
|
33
|
+
Tr.set_css_class('')
|
34
|
+
end
|
35
|
+
|
36
|
+
# ========================================================================= #
|
37
|
+
# === Cyberweb::Objectified::HtmlTags::Tr.set_css_class
|
38
|
+
# ========================================================================= #
|
39
|
+
def self.set_css_class(i = DEFAULT_CSS_CLASS)
|
40
|
+
@css_class = i
|
41
|
+
end
|
42
|
+
|
43
|
+
# ========================================================================= #
|
44
|
+
# === Cyberweb::Objectified::HtmlTags::Tr.css_class?
|
45
|
+
# ========================================================================= #
|
46
|
+
def self.css_class?
|
47
|
+
@css_class
|
48
|
+
end
|
49
|
+
|
50
|
+
# ========================================================================= #
|
51
|
+
# === initialize
|
52
|
+
#
|
53
|
+
# Usage example:
|
54
|
+
#
|
55
|
+
# Cyberweb::Objectified::HtmlTags::Tr.new(i)
|
56
|
+
#
|
57
|
+
# ========================================================================= #
|
58
|
+
def initialize(
|
59
|
+
use_this_text = '',
|
60
|
+
optional_css_class = Tr.css_class?,
|
61
|
+
optional_id = nil,
|
62
|
+
optional_css_style = nil
|
63
|
+
)
|
64
|
+
try_to_register_this_tag(self)
|
65
|
+
reset
|
66
|
+
use_this_text = use_this_text.join(' ').strip if use_this_text.is_a? Array
|
67
|
+
set_content(use_this_text)
|
68
|
+
set_CSS_class(optional_css_class) if optional_css_class
|
69
|
+
set_id(optional_id) if optional_id
|
70
|
+
set_CSS_style(optional_css_style) if optional_css_style
|
71
|
+
end
|
72
|
+
|
73
|
+
# ========================================================================= #
|
74
|
+
# === reset
|
75
|
+
# ========================================================================= #
|
76
|
+
def reset
|
77
|
+
super()
|
78
|
+
end
|
79
|
+
|
80
|
+
# ========================================================================= #
|
81
|
+
# === rebuild_the_result
|
82
|
+
# ========================================================================= #
|
83
|
+
def rebuild_the_result
|
84
|
+
reset_the_result
|
85
|
+
consider_adding_the_script_entry_from_the_internal_hash
|
86
|
+
append_onto_the_result '<tr'
|
87
|
+
batch_append_css_class_then_the_ID_and_then_the_css_style
|
88
|
+
append_onto_the_result ">\n"
|
89
|
+
append_onto_the_result content?.to_s
|
90
|
+
append_onto_the_result "\n</tr>\n"
|
91
|
+
return raw_result?
|
92
|
+
end
|
93
|
+
|
94
|
+
end; end
|
95
|
+
|
96
|
+
Tr = ::Cyberweb::Objectified::HtmlTags::Tr
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
# =========================================================================== #
|
101
|
+
# Testing the <tr> tag next:
|
102
|
+
# =========================================================================== #
|
103
|
+
if __FILE__ == $PROGRAM_NAME
|
104
|
+
alias e puts
|
105
|
+
_ = Cyberweb::Objectified::HtmlTags::Tr.new("This is the content \n which is great")
|
106
|
+
_.id = 'test_tr'
|
107
|
+
_.css_class = 'rounded_border_8px wid100 bblack2'
|
108
|
+
_.css_style = 'font-size: 3em'
|
109
|
+
e _
|
110
|
+
end
|
@@ -14,6 +14,32 @@ module Objectified::HtmlTags
|
|
14
14
|
|
15
15
|
class Ul < Cyberweb::Objectified::HtmlTags::Base # === Cyberweb::Objectified::HtmlTags::Ul
|
16
16
|
|
17
|
+
# ========================================================================= #
|
18
|
+
# === @css_class
|
19
|
+
# ========================================================================= #
|
20
|
+
@css_class = nil
|
21
|
+
|
22
|
+
# ========================================================================= #
|
23
|
+
# === Cyberweb::Objectified::HtmlTags::Ul.reset_css_class
|
24
|
+
# ========================================================================= #
|
25
|
+
def self.reset_css_class
|
26
|
+
@css_class = nil
|
27
|
+
end
|
28
|
+
|
29
|
+
# ========================================================================= #
|
30
|
+
# === Cyberweb::Objectified::HtmlTags::Ul.set_css_class
|
31
|
+
# ========================================================================= #
|
32
|
+
def self.set_css_class(i = DEFAULT_CSS_CLASS)
|
33
|
+
@css_class = i
|
34
|
+
end
|
35
|
+
|
36
|
+
# ========================================================================= #
|
37
|
+
# === Cyberweb::Objectified::HtmlTags::Ul.css_class?
|
38
|
+
# ========================================================================= #
|
39
|
+
def self.css_class?
|
40
|
+
@css_class
|
41
|
+
end
|
42
|
+
|
17
43
|
# ========================================================================= #
|
18
44
|
# === initialize
|
19
45
|
#
|
@@ -24,11 +50,11 @@ class Ul < Cyberweb::Objectified::HtmlTags::Base # === Cyberweb::Objectified::Ht
|
|
24
50
|
# ========================================================================= #
|
25
51
|
def initialize(
|
26
52
|
use_this_text = '',
|
27
|
-
optional_css_class =
|
53
|
+
optional_css_class = Ul.css_class?,
|
28
54
|
optional_id = nil,
|
29
55
|
optional_css_style = nil
|
30
56
|
)
|
31
|
-
|
57
|
+
try_to_register_this_tag(self)
|
32
58
|
reset
|
33
59
|
set_content(use_this_text)
|
34
60
|
set_CSS_class(optional_css_class) if optional_css_class
|
@@ -62,7 +88,11 @@ class Ul < Cyberweb::Objectified::HtmlTags::Base # === Cyberweb::Objectified::Ht
|
|
62
88
|
return raw_result?
|
63
89
|
end
|
64
90
|
|
65
|
-
end; end
|
91
|
+
end; end
|
92
|
+
|
93
|
+
Ul = ::Cyberweb::Objectified::HtmlTags::Ul
|
94
|
+
|
95
|
+
end
|
66
96
|
|
67
97
|
# =========================================================================== #
|
68
98
|
# Testing the <ul> tag next:
|
@@ -79,7 +109,18 @@ if __FILE__ == $PROGRAM_NAME
|
|
79
109
|
'und ganz viel Käse, also Käse Käse Käse Käse Käse Käse
|
80
110
|
Käse Käse Käse Käse Käse Käse Käse Käse Käse Käse Käse Käse Käse
|
81
111
|
Käse Käse und nochmals Käse',
|
82
|
-
|
112
|
+
'Pilze'
|
113
|
+
]
|
114
|
+
)
|
115
|
+
e _
|
116
|
+
e
|
117
|
+
e 'Round 2, testing ... '
|
118
|
+
_ = Cyberweb::Objectified::HtmlTags::Ul.new(
|
119
|
+
[
|
120
|
+
'ham',
|
121
|
+
'and a lot of cheese cheese cheese cheese
|
122
|
+
cheese cheese cheese cheese',
|
123
|
+
'fungi'
|
83
124
|
]
|
84
125
|
)
|
85
126
|
e _
|
@@ -24,42 +24,27 @@ module Objectified
|
|
24
24
|
module ShorterHelperMethods # === Cyberweb::Objectified::ShorterHelperMethods
|
25
25
|
|
26
26
|
# ========================================================================= #
|
27
|
-
# ===
|
27
|
+
# === html_input
|
28
|
+
#
|
29
|
+
# The alias "entry" is derived from GUI toolkits such as gtk calling
|
30
|
+
# the user-input element Gtk::Entry.
|
28
31
|
# ========================================================================= #
|
29
|
-
def
|
30
|
-
|
31
|
-
optional_css_class =
|
32
|
+
def html_input(
|
33
|
+
use_this_text = ARGV,
|
34
|
+
optional_css_class = Input.css_class?,
|
32
35
|
optional_id = nil,
|
33
|
-
optional_css_style = nil
|
34
|
-
&block
|
35
|
-
)
|
36
|
-
return Cyberweb::Objectified::HtmlTags::Div.new(
|
37
|
-
i,
|
38
|
-
optional_css_class,
|
39
|
-
optional_id,
|
40
|
-
optional_css_style,
|
41
|
-
&block
|
42
|
-
)
|
43
|
-
end; alias oop_div html_div # === oop_div
|
44
|
-
|
45
|
-
# ========================================================================= #
|
46
|
-
# === html_span
|
47
|
-
# ========================================================================= #
|
48
|
-
def html_span(
|
49
|
-
i = ARGV,
|
50
|
-
optional_css_class = nil,
|
51
|
-
optional_id = nil,
|
52
|
-
optional_css_style = nil,
|
53
|
-
&block
|
36
|
+
optional_css_style = nil
|
54
37
|
)
|
55
|
-
|
56
|
-
|
38
|
+
_ = Cyberweb::Objectified::HtmlTags::Input.new(
|
39
|
+
use_this_text,
|
57
40
|
optional_css_class,
|
58
41
|
optional_id,
|
59
|
-
optional_css_style
|
60
|
-
&block
|
42
|
+
optional_css_style
|
61
43
|
)
|
62
|
-
|
44
|
+
return _
|
45
|
+
end; alias entry html_input # === entry
|
46
|
+
alias oop_input html_input # === oop_input
|
47
|
+
alias oop_entry html_input # === oop_entry
|
63
48
|
|
64
49
|
# ========================================================================= #
|
65
50
|
# === last_tag?
|
@@ -340,14 +325,24 @@ module ShorterHelperMethods # === Cyberweb::Objectified::ShorterHelperMethods
|
|
340
325
|
|
341
326
|
# ========================================================================= #
|
342
327
|
# === html_button
|
328
|
+
#
|
329
|
+
# Usage example:
|
330
|
+
#
|
331
|
+
# button1 = oop_button('Click me', id: 'test_button')
|
332
|
+
#
|
343
333
|
# ========================================================================= #
|
344
|
-
def html_button(
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
return Cyberweb::Objectified::HtmlTags::Button.new(
|
334
|
+
def html_button(
|
335
|
+
use_this_text = '',
|
336
|
+
optional_css_class = Button.css_class?,
|
337
|
+
optional_id = nil,
|
338
|
+
optional_css_style = nil
|
339
|
+
)
|
340
|
+
return Cyberweb::Objectified::HtmlTags::Button.new(
|
341
|
+
use_this_text,
|
342
|
+
optional_css_class,
|
343
|
+
optional_id,
|
344
|
+
optional_css_style
|
345
|
+
)
|
351
346
|
end; alias oop_button html_button # === oop_button
|
352
347
|
|
353
348
|
# ========================================================================= #
|
@@ -406,16 +401,42 @@ module ShorterHelperMethods # === Cyberweb::Objectified::ShorterHelperMethods
|
|
406
401
|
alias oop_submit html_submit # === oop_submit
|
407
402
|
|
408
403
|
# ========================================================================= #
|
409
|
-
# ===
|
410
|
-
#
|
411
|
-
# The alias "entry" is derived from GUI toolkits such as gtk calling
|
412
|
-
# the user-input element Gtk::Entry.
|
404
|
+
# === html_div
|
413
405
|
# ========================================================================= #
|
414
|
-
def
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
406
|
+
def html_div(
|
407
|
+
i = ARGV,
|
408
|
+
optional_css_class = nil,
|
409
|
+
optional_id = nil,
|
410
|
+
optional_css_style = nil,
|
411
|
+
&block
|
412
|
+
)
|
413
|
+
return Cyberweb::Objectified::HtmlTags::Div.new(
|
414
|
+
i,
|
415
|
+
optional_css_class,
|
416
|
+
optional_id,
|
417
|
+
optional_css_style,
|
418
|
+
&block
|
419
|
+
)
|
420
|
+
end; alias oop_div html_div # === oop_div
|
421
|
+
|
422
|
+
# ========================================================================= #
|
423
|
+
# === html_span
|
424
|
+
# ========================================================================= #
|
425
|
+
def html_span(
|
426
|
+
i = ARGV,
|
427
|
+
optional_css_class = nil,
|
428
|
+
optional_id = nil,
|
429
|
+
optional_css_style = nil,
|
430
|
+
&block
|
431
|
+
)
|
432
|
+
return Cyberweb::Objectified::HtmlTags::Span.new(
|
433
|
+
i,
|
434
|
+
optional_css_class,
|
435
|
+
optional_id,
|
436
|
+
optional_css_style,
|
437
|
+
&block
|
438
|
+
)
|
439
|
+
end; alias oop_span html_span # === oop_span
|
419
440
|
|
420
441
|
# ========================================================================= #
|
421
442
|
# === Cyberweb::Objectified::ShorterHelperMethods.alias_towards_the_registered_html_tags
|
data/lib/cyberweb/oop.rb
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'cyberweb/oop.rb'
|
6
|
+
# =========================================================================== #
|
7
|
+
require 'cyberweb'
|
8
|
+
|
9
|
+
include Cyberweb::Objectified::ShorterHelperMethods
|
@@ -16,10 +16,12 @@ module PredefinedMethods # === Cyberweb::PredefinedMethods
|
|
16
16
|
# This is used only for ruby and php so far.
|
17
17
|
# ========================================================================= #
|
18
18
|
@hash_registered_extra_tags = {}
|
19
|
+
|
19
20
|
# ========================================================================= #
|
20
21
|
# === :ruby
|
21
22
|
# ========================================================================= #
|
22
23
|
@hash_registered_extra_tags[:ruby] = 'BO crimson FS1_2em'
|
24
|
+
|
23
25
|
# ========================================================================= #
|
24
26
|
# === :php
|
25
27
|
# ========================================================================= #
|
@@ -40,7 +40,7 @@ class Header # === Cyberweb::PredefinedMethods::Header
|
|
40
40
|
# === Cyberweb::Header.run
|
41
41
|
# ========================================================================= #
|
42
42
|
def self.run(i)
|
43
|
-
send
|
43
|
+
send(@size, i.to_s) # Invoke .send(@size) here.
|
44
44
|
end
|
45
45
|
|
46
46
|
# ========================================================================= #
|
@@ -53,10 +53,13 @@ class Header # === Cyberweb::PredefinedMethods::Header
|
|
53
53
|
# ========================================================================= #
|
54
54
|
def self.size=(i = 1)
|
55
55
|
case i # Easier to work on Integers.
|
56
|
+
# === h1
|
56
57
|
when 0, 1, 'h1'
|
57
58
|
i = :h1
|
59
|
+
# === h2
|
58
60
|
when 2, 'h2'
|
59
61
|
i = :h2
|
62
|
+
# === h3
|
60
63
|
when 3, 'h3'
|
61
64
|
i = :h3
|
62
65
|
when 4, 'h4'
|
@@ -71,10 +71,6 @@ if __FILE__ == $PROGRAM_NAME
|
|
71
71
|
e Cyberweb::PROJECT_BASE_DIRECTORY
|
72
72
|
e Cyberweb.project_base_directory?
|
73
73
|
e
|
74
|
-
e "The absolute project's base directory is at:"
|
75
|
-
e
|
76
|
-
e " #{Cyberweb::ABSOLUTE_PROJECT_BASE_DIRECTORY}"
|
77
|
-
e
|
78
74
|
e 'The yaml directory of the cyberweb-project can be found at:'
|
79
75
|
e
|
80
76
|
e " #{Cyberweb.yaml_directory?}"
|
@@ -6,4 +6,4 @@
|
|
6
6
|
# =========================================================================== #
|
7
7
|
# require 'cyberweb/requires/remove_html.rb'
|
8
8
|
# =========================================================================== #
|
9
|
-
require 'cyberweb/toplevel_methods/
|
9
|
+
require 'cyberweb/toplevel_methods/toplevel_methods.rb'
|
@@ -84,11 +84,6 @@ require 'cyberweb/requires/require_yaml.rb'
|
|
84
84
|
require 'cyberweb/predefined_and_freeform_methods/predefined_methods.rb'
|
85
85
|
Cyberweb.enable_predefined_methods # Call it at once. This will do "include ::Cyberweb::PredefinedMethods"
|
86
86
|
|
87
|
-
# =========================================================================== #
|
88
|
-
# Load up the WebBase class next.
|
89
|
-
# =========================================================================== #
|
90
|
-
require 'cyberweb/web_base/web_base.rb'
|
91
|
-
|
92
87
|
# =========================================================================== #
|
93
88
|
# Pull in web_object/mouse/ specific components next.
|
94
89
|
# =========================================================================== #
|
@@ -115,9 +110,6 @@ Cyberweb.require_toplevel_methods_files
|
|
115
110
|
require 'cyberweb/requires/require_generators.rb'
|
116
111
|
Cyberweb.require_generators
|
117
112
|
|
118
|
-
require 'cyberweb/requires/require_html_tags_files.rb'
|
119
|
-
Cyberweb.require_html_tags_files
|
120
|
-
|
121
113
|
# =========================================================================== #
|
122
114
|
# Pull in the web-images:
|
123
115
|
# =========================================================================== #
|
@@ -133,7 +125,7 @@ require 'cyberweb/predefined_and_freeform_methods/header.rb'
|
|
133
125
|
# =========================================================================== #
|
134
126
|
require 'cyberweb/requires/require_cgi.rb'
|
135
127
|
|
136
|
-
require 'cyberweb/toplevel_methods/
|
128
|
+
require 'cyberweb/toplevel_methods/toplevel_methods.rb'
|
137
129
|
require 'cyberweb/html_template/html_template.rb'
|
138
130
|
|
139
131
|
# =========================================================================== #
|