html_tags 0.1.120

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 html_tags might be problematic. Click here for more details.

Files changed (86) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +110 -0
  3. data/USAGE.md +17 -0
  4. data/doc/README.gen +69 -0
  5. data/html_tags.gemspec +53 -0
  6. data/lib/html_tags/array_registered_html_tags.rb +125 -0
  7. data/lib/html_tags/autoinclude.rb +2 -0
  8. data/lib/html_tags/autoinclude_base_module.rb +7 -0
  9. data/lib/html_tags/base/README.md +3 -0
  10. data/lib/html_tags/base/base.rb +11 -0
  11. data/lib/html_tags/base/base_module.rb +224 -0
  12. data/lib/html_tags/base/prototype.rb +19 -0
  13. data/lib/html_tags/checks.rb +58 -0
  14. data/lib/html_tags/closing_tag/closing_tag.rb +76 -0
  15. data/lib/html_tags/constants/array_strip_newlines.rb +14 -0
  16. data/lib/html_tags/constants/misc.rb +21 -0
  17. data/lib/html_tags/constants.rb +26 -0
  18. data/lib/html_tags/html_closing_tags.rb +36 -0
  19. data/lib/html_tags/html_comment.rb +29 -0
  20. data/lib/html_tags/html_tags.rb +131 -0
  21. data/lib/html_tags/html_tags_constants.rb +14 -0
  22. data/lib/html_tags/individual_tags/a.rb +524 -0
  23. data/lib/html_tags/individual_tags/abbr.rb +44 -0
  24. data/lib/html_tags/individual_tags/audio.rb +32 -0
  25. data/lib/html_tags/individual_tags/b.rb +22 -0
  26. data/lib/html_tags/individual_tags/blockquote.rb +19 -0
  27. data/lib/html_tags/individual_tags/body.rb +19 -0
  28. data/lib/html_tags/individual_tags/br.rb +28 -0
  29. data/lib/html_tags/individual_tags/button.rb +30 -0
  30. data/lib/html_tags/individual_tags/canvas.rb +19 -0
  31. data/lib/html_tags/individual_tags/details.rb +69 -0
  32. data/lib/html_tags/individual_tags/div.rb +51 -0
  33. data/lib/html_tags/individual_tags/figure.rb +39 -0
  34. data/lib/html_tags/individual_tags/footer.rb +26 -0
  35. data/lib/html_tags/individual_tags/form.rb +93 -0
  36. data/lib/html_tags/individual_tags/h1.rb +36 -0
  37. data/lib/html_tags/individual_tags/h2.rb +42 -0
  38. data/lib/html_tags/individual_tags/h3.rb +73 -0
  39. data/lib/html_tags/individual_tags/h4.rb +36 -0
  40. data/lib/html_tags/individual_tags/h5.rb +36 -0
  41. data/lib/html_tags/individual_tags/h6.rb +40 -0
  42. data/lib/html_tags/individual_tags/head.rb +36 -0
  43. data/lib/html_tags/individual_tags/header.rb +29 -0
  44. data/lib/html_tags/individual_tags/html.rb +61 -0
  45. data/lib/html_tags/individual_tags/i.rb +14 -0
  46. data/lib/html_tags/individual_tags/img.rb +135 -0
  47. data/lib/html_tags/individual_tags/input.rb +32 -0
  48. data/lib/html_tags/individual_tags/label.rb +43 -0
  49. data/lib/html_tags/individual_tags/legend.rb +14 -0
  50. data/lib/html_tags/individual_tags/li.rb +44 -0
  51. data/lib/html_tags/individual_tags/main.rb +29 -0
  52. data/lib/html_tags/individual_tags/nav.rb +14 -0
  53. data/lib/html_tags/individual_tags/object.rb +18 -0
  54. data/lib/html_tags/individual_tags/ol.rb +50 -0
  55. data/lib/html_tags/individual_tags/p.rb +50 -0
  56. data/lib/html_tags/individual_tags/pre.rb +16 -0
  57. data/lib/html_tags/individual_tags/span.rb +60 -0
  58. data/lib/html_tags/individual_tags/strong.rb +17 -0
  59. data/lib/html_tags/individual_tags/style.rb +29 -0
  60. data/lib/html_tags/individual_tags/table.rb +33 -0
  61. data/lib/html_tags/individual_tags/tbody.rb +19 -0
  62. data/lib/html_tags/individual_tags/td.rb +24 -0
  63. data/lib/html_tags/individual_tags/textarea.rb +46 -0
  64. data/lib/html_tags/individual_tags/th.rb +14 -0
  65. data/lib/html_tags/individual_tags/thead.rb +14 -0
  66. data/lib/html_tags/individual_tags/title.rb +18 -0
  67. data/lib/html_tags/individual_tags/tr.rb +20 -0
  68. data/lib/html_tags/individual_tags/ul.rb +23 -0
  69. data/lib/html_tags/individual_tags/video.rb +54 -0
  70. data/lib/html_tags/module.rb +5 -0
  71. data/lib/html_tags/opening_tag/opening_tag.rb +288 -0
  72. data/lib/html_tags/project/project_base_directory.rb +23 -0
  73. data/lib/html_tags/requires/require_the_html_tags_project.rb +9 -0
  74. data/lib/html_tags/requires/require_the_img_tag.rb +7 -0
  75. data/lib/html_tags/shared.rb +23 -0
  76. data/lib/html_tags/stag.rb +54 -0
  77. data/lib/html_tags/toplevel_methods/add.rb +22 -0
  78. data/lib/html_tags/toplevel_methods/full_output.rb +33 -0
  79. data/lib/html_tags/toplevel_methods/newline_or_empty.rb +21 -0
  80. data/lib/html_tags/toplevel_methods/strip_newlines.rb +27 -0
  81. data/lib/html_tags/version/version.rb +17 -0
  82. data/lib/html_tags/yaml/valid_tags_in_a_head_tag.yml +16 -0
  83. data/lib/html_tags.rb +5 -0
  84. data/test/testing_html_tags.rb +158 -0
  85. data/test/testing_the_a_tag.rb +113 -0
  86. metadata +141 -0
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'html_tags/individual_tags/br.rb'
6
+ # =========================================================================== #
7
+ require 'html_tags/toplevel_methods/add.rb'
8
+ require 'html_tags/closing_tag/closing_tag.rb'
9
+
10
+ module HtmlTags
11
+
12
+ # ========================================================================= #
13
+ # === HtmlTags.br
14
+ # ========================================================================= #
15
+ def self.br
16
+ return HtmlTags.add(
17
+ close(__method__)
18
+ )
19
+ end
20
+
21
+ # ========================================================================= #
22
+ # === br
23
+ # ========================================================================= #
24
+ def br
25
+ self.br
26
+ end
27
+
28
+ end
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ module HtmlTags
6
+
7
+ # ========================================================================= #
8
+ # === button
9
+ #
10
+ # This tag should yield something like:
11
+ #
12
+ # <button type="button">Click Me!</button>
13
+ #
14
+ # { { :value => i } }
15
+ # ========================================================================= #
16
+ def button(
17
+ i = '',
18
+ css_class = '',
19
+ the_id = '',
20
+ css_style = '',
21
+ javascript = ''
22
+ )
23
+ return HtmlTags.add(
24
+ opening_tag(__method__, css_class, the_id, css_style, javascript)+
25
+ i.to_s+
26
+ close(__method__)
27
+ )
28
+ end
29
+
30
+ end
@@ -0,0 +1,19 @@
1
+ module HtmlTags
2
+
3
+ # ========================================================================= #
4
+ # === canvas (canvas tag)
5
+ # ========================================================================= #
6
+ def canvas(
7
+ i = '',
8
+ css_class = '',
9
+ the_id = '',
10
+ css_style = ''
11
+ )
12
+ return HtmlTags.add(
13
+ opening_tag(__method__, css_class, the_id, css_style)+
14
+ i.to_s+
15
+ close(__method__)
16
+ )
17
+ end
18
+
19
+ end
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'html_tags/individual_tags/details.rb'
6
+ # =========================================================================== #
7
+ module HtmlTags
8
+
9
+ require 'html_tags/opening_tag/opening_tag.rb'
10
+ require 'html_tags/toplevel_methods/add.rb'
11
+
12
+ # ========================================================================= #
13
+ # === HtmlTags.details
14
+ # ========================================================================= #
15
+ def self.details(
16
+ i = '',
17
+ css_class = '',
18
+ the_id = '',
19
+ css_style = '',
20
+ optional_javascript = '',
21
+ &block
22
+ )
23
+ # ======================================================================= #
24
+ # === Handle Hashes first
25
+ # ======================================================================= #
26
+ if css_class.is_a? Hash
27
+ # ===================================================================== #
28
+ # === :css_style
29
+ # ===================================================================== #
30
+ if css_class.has_key? :css_style
31
+ css_style = css_class.delete(:css_style)
32
+ if css_class.is_a?(Hash) and css_class.empty?
33
+ css_class = ''
34
+ end
35
+ end
36
+ end
37
+ content = i.to_s.dup
38
+ if block_given?
39
+ content << yield.to_s
40
+ end
41
+ return HtmlTags.add(
42
+ opening_tag(__method__, css_class, the_id, css_style, optional_javascript)+
43
+ content+
44
+ close(__method__)
45
+ )
46
+ end
47
+
48
+ # ========================================================================= #
49
+ # === details
50
+ # ========================================================================= #
51
+ def details(
52
+ i = '',
53
+ css_class = '',
54
+ the_id = '',
55
+ css_style = '',
56
+ optional_javascript = '',
57
+ &block
58
+ )
59
+ return HtmlTags.details(
60
+ i,
61
+ css_class,
62
+ the_id,
63
+ css_style,
64
+ javascript_code,
65
+ &block
66
+ )
67
+ end
68
+
69
+ end
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ module HtmlTags
6
+
7
+ # ========================================================================= #
8
+ # === div
9
+ #
10
+ # This method will make a html <div> tag.
11
+ #
12
+ # Invocation example:
13
+ #
14
+ # HtmlTags.div(i = '', css_class = '', the_id = '', css_style = '')
15
+ #
16
+ # ========================================================================= #
17
+ def div(
18
+ i = '',
19
+ css_class = '',
20
+ the_id = '',
21
+ css_style = '',
22
+ javascript = nil
23
+ )
24
+ if i.is_a? Hash
25
+ # ===================================================================== #
26
+ # Next support elements such as:
27
+ # div(css_class: 'default') {
28
+ # ===================================================================== #
29
+ if i.has_key? :css_class
30
+ css_class = i.delete(:css_class)
31
+ end
32
+ if i.has_key? :id
33
+ the_id = i.delete(:id)
34
+ end
35
+ if i.has_key? :css_style
36
+ css_style = i.delete(:css_style)
37
+ end
38
+ i = '' # For now, we remove this.
39
+ end
40
+ result = opening_tag(__method__, css_class, the_id, css_style)
41
+ # ======================================================================= #
42
+ # === Handle blocks next
43
+ # ======================================================================= #
44
+ result << yield.to_s if block_given?
45
+ result << i # Add the content here.
46
+ result << close(__method__)
47
+ result << "\n"
48
+ HtmlTags.add(result)
49
+ end
50
+
51
+ end
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # Documentation for the <figure> tag can be viewed here:
6
+ #
7
+ # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure
8
+ #
9
+ # The HTML <figure> Element represents self-contained content, frequently
10
+ # with a caption (<figcaption>), and is typically referenced as a single
11
+ # unit. While it is related to the main flow, its position is independent
12
+ # of the main flow.
13
+ #
14
+ # Usually this is an image, an illustration, a diagram, a code snippet, or
15
+ # a schema that is referenced in the main text, but that can be moved to
16
+ # another page or to an appendix without affecting the main flow.
17
+ # =========================================================================== #
18
+ module HtmlTags
19
+
20
+ # ========================================================================= #
21
+ # === figure
22
+ #
23
+ # To test this, try:
24
+ #
25
+ # include HtmlTags; figure '<img src="/home/x/DATA/IMG/FOTOS/CATS/03.09.2003_Babykatze.jpg" alt="An awesome picture">
26
+ # <figcaption>Aisha ist noch immer müde, und sehr, sehr satt.</figcaption>'
27
+ #
28
+ # ========================================================================= #
29
+ def figure(
30
+ i = '', css_class = '', the_id = '', css_style = ''
31
+ )
32
+ return HtmlTags.add(
33
+ opening_tag(__method__, css_class, the_id, css_style)+
34
+ i.to_s+
35
+ close(__method__)
36
+ )
37
+ end
38
+
39
+ end
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ module HtmlTags
6
+
7
+ # ========================================================================= #
8
+ # === footer
9
+ #
10
+ # This is for the <footer> tag, HTML5.
11
+ # ========================================================================= #
12
+ def footer(
13
+ i = '', css_class = '', the_id = '', css_style = '', &block
14
+ )
15
+ content = i.to_s
16
+ if block_given?
17
+ content = content.to_s+yield.to_s
18
+ end
19
+ return HtmlTags.add(
20
+ opening_tag(__method__, css_class, the_id, css_style)+
21
+ content+
22
+ close(__method__)
23
+ )
24
+ end
25
+
26
+ end
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ module HtmlTags
6
+
7
+ # ========================================================================= #
8
+ # === form
9
+ #
10
+ # This method will generate a HTML <form> tag, ultimately. The form tag
11
+ # is used for user-generated content, such as during a POST action
12
+ # during a HTTP communication.
13
+ #
14
+ # The HTML <form> element only supports GET and POST as available actions.
15
+ #
16
+ # Do note that a <form> tag is a bit more complicated than, say,
17
+ # a <div> tag or a <p> tag, because we may need to attach additional
18
+ # information towards the <form> tag, such as "id", "name" or "action"
19
+ # entries.
20
+ #
21
+ # Invocation examples:
22
+ #
23
+ # form(css_style: 'margin-left:2em; margin-top:2px'){
24
+ # form(action: 'bla.cgi', name: 'some_name', css_style: 'margin-left:2em; margin-top:2px'){
25
+ #
26
+ # ========================================================================= #
27
+ def form(
28
+ i = '',
29
+ css_class = '',
30
+ the_id = '',
31
+ css_style = '',
32
+ &block
33
+ )
34
+ # ======================================================================= #
35
+ # === Handle Hashes as input given
36
+ # ======================================================================= #
37
+ if i.is_a? Hash
38
+ # ===================================================================== #
39
+ # === :action
40
+ #
41
+ # :action is presently not implemented.
42
+ # ===================================================================== #
43
+ # if i.has_key? :action
44
+ # end
45
+ # ===================================================================== #
46
+ # === :css_style
47
+ # ===================================================================== #
48
+ if i.has_key? :css_style
49
+ css_style = i.delete(:css_style)
50
+ end
51
+ end
52
+ the_opening_tag = opening_tag(
53
+ __method__, css_class, the_id, css_style
54
+ )
55
+ # ======================================================================= #
56
+ # Next, add ad-hoc support for "id", "name" and "action".
57
+ # ======================================================================= #
58
+ if i.is_a? Hash
59
+ if i.has_key? :id
60
+ the_opening_tag[the_opening_tag.index('>'),0] = ' id="'+i.delete(:id).to_s+'"'
61
+ end
62
+ if i.has_key? :action
63
+ the_opening_tag[the_opening_tag.index('>'),0] = ' action="'+i.delete(:action).to_s+'"'
64
+ end
65
+ if i.has_key? :name
66
+ the_opening_tag[the_opening_tag.index('>'),0] = ' name="'+i.delete(:name).to_s+'"'
67
+ end
68
+ if i.has_key? :method
69
+ the_opening_tag[the_opening_tag.index('>'),0] = ' method="'+i.delete(:method).to_s+'"'
70
+ end
71
+ # ===================================================================== #
72
+ # Finally, if that hash is empty, turn it into an empty String.
73
+ # ===================================================================== #
74
+ if i.is_a?(Hash) and i.empty?
75
+ i = ''.dup
76
+ end
77
+ end
78
+ # ======================================================================= #
79
+ # Past the next step, the variable `i` will be guaranted to be a String.
80
+ # ======================================================================= #
81
+ i = i.to_s
82
+ if block_given?
83
+ yielded = "#{yield}"
84
+ i << yielded
85
+ end
86
+ return HtmlTags.add(
87
+ the_opening_tag+
88
+ i+
89
+ close(__method__)
90
+ )
91
+ end
92
+
93
+ end
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'html_tags/individual_tags/h1.rb'
6
+ # =========================================================================== #
7
+ module HtmlTags
8
+
9
+ require 'html_tags/opening_tag/opening_tag.rb'
10
+ require 'html_tags/toplevel_methods/add.rb'
11
+
12
+ # ========================================================================= #
13
+ # === HtmlTags.h1
14
+ # ========================================================================= #
15
+ def self.h1(
16
+ i = '', css_class = '', the_id = '', css_style = '', javascript_code = ''
17
+ )
18
+ return HtmlTags.add(
19
+ opening_tag(__method__, css_class, the_id, css_style, javascript_code)+
20
+ i.to_s+
21
+ close(__method__)
22
+ )
23
+ end
24
+
25
+ # ========================================================================= #
26
+ # === h1
27
+ # ========================================================================= #
28
+ def h1(
29
+ i = '', css_class = '', the_id = '', css_style = '', javascript_code = ''
30
+ )
31
+ return HtmlTags.h1(
32
+ i, css_class, the_id, css_style, javascript_code
33
+ )
34
+ end
35
+
36
+ end
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'html_tags/individual_tags/h2.rb'
6
+ # =========================================================================== #
7
+ module HtmlTags
8
+
9
+ require 'html_tags/opening_tag/opening_tag.rb'
10
+ require 'html_tags/toplevel_methods/add.rb'
11
+
12
+ # ========================================================================= #
13
+ # === HtmlTags.h2 (h2 tag)
14
+ #
15
+ # This method will ultimately generate a <h2></h2> tag.
16
+ # ========================================================================= #
17
+ def self.h2(
18
+ i = '',
19
+ css_class = '',
20
+ the_id = '',
21
+ css_style = '',
22
+ javascript_code = ''
23
+ )
24
+ return HtmlTags.add(
25
+ opening_tag(__method__, css_class, the_id, css_style, javascript_code)+
26
+ i.to_s+
27
+ close(__method__)
28
+ )
29
+ end
30
+
31
+ # ========================================================================= #
32
+ # === h2
33
+ # ========================================================================= #
34
+ def h2(
35
+ i = '', css_class = '', the_id = '', css_style = '', javascript_code = ''
36
+ )
37
+ return HtmlTags.h2(
38
+ i, css_class, the_id, css_style, javascript_code
39
+ )
40
+ end
41
+
42
+ end
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'html_tags/individual_tags/h3.rb'
6
+ # =========================================================================== #
7
+ module HtmlTags
8
+
9
+ require 'html_tags/opening_tag/opening_tag.rb'
10
+ require 'html_tags/toplevel_methods/add.rb'
11
+
12
+ # ========================================================================= #
13
+ # === HtmlTags.h3
14
+ #
15
+ # To test this method, try:
16
+ #
17
+ # HtmlTags.h3(text, css_class, the_id, css_style, javascript = ''); n
18
+ #
19
+ # Keep in mind that this method can be used like this:
20
+ #
21
+ # h3('Hello world!', css_style: 'margin-top: 2px')
22
+ #
23
+ # ========================================================================= #
24
+ def self.h3(
25
+ i = '',
26
+ css_class = '',
27
+ the_id = '',
28
+ css_style = '',
29
+ optional_javascript = '',
30
+ &block
31
+ )
32
+ # ======================================================================= #
33
+ # === Handle Hashes first
34
+ # ======================================================================= #
35
+ if css_class.is_a? Hash
36
+ # ===================================================================== #
37
+ # === :css_style
38
+ # ===================================================================== #
39
+ if css_class.has_key? :css_style
40
+ css_style = css_class.delete(:css_style)
41
+ if css_class.is_a?(Hash) and css_class.empty?
42
+ css_class = ''
43
+ end
44
+ end
45
+ end
46
+ content = i.to_s
47
+ if block_given?
48
+ content << yield.to_s
49
+ end
50
+ return HtmlTags.add(
51
+ opening_tag(__method__, css_class, the_id, css_style, optional_javascript)+
52
+ content+
53
+ close(__method__)
54
+ )
55
+ end
56
+
57
+ # ========================================================================= #
58
+ # === h3
59
+ # ========================================================================= #
60
+ def h3(
61
+ i = '',
62
+ css_class = '',
63
+ the_id = '',
64
+ css_style = '',
65
+ optional_javascript = '',
66
+ &block
67
+ )
68
+ return HtmlTags.h3(
69
+ i, css_class, the_id, css_style, javascript_code, &block
70
+ )
71
+ end
72
+
73
+ end
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'html_tags/individual_tags/h4.rb'
6
+ # =========================================================================== #
7
+ module HtmlTags
8
+
9
+ require 'html_tags/opening_tag/opening_tag.rb'
10
+ require 'html_tags/toplevel_methods/add.rb'
11
+
12
+ # ========================================================================= #
13
+ # === HtmlTags.h4
14
+ # ========================================================================= #
15
+ def self.h4(
16
+ i = '', css_class = '', the_id = '', css_style = '', javascript_code = ''
17
+ )
18
+ return HtmlTags.add(
19
+ opening_tag(__method__, css_class, the_id, css_style, javascript_code)+
20
+ i.to_s+
21
+ close(__method__)
22
+ )
23
+ end
24
+
25
+ # ========================================================================= #
26
+ # === h4
27
+ # ========================================================================= #
28
+ def h4(
29
+ i = '', css_class = '', the_id = '', css_style = '', javascript_code = ''
30
+ )
31
+ return HtmlTags.h4(
32
+ i, css_class, the_id, css_style, javascript_code
33
+ )
34
+ end
35
+
36
+ end
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'html_tags/individual_tags/h5.rb'
6
+ # =========================================================================== #
7
+ module HtmlTags
8
+
9
+ require 'html_tags/opening_tag/opening_tag.rb'
10
+ require 'html_tags/toplevel_methods/add.rb'
11
+
12
+ # ========================================================================= #
13
+ # === HtmlTags.h5
14
+ # ========================================================================= #
15
+ def self.h5(
16
+ i = '', css_class = '', the_id = '', css_style = '', javascript_code = ''
17
+ )
18
+ return HtmlTags.add(
19
+ opening_tag(__method__, css_class, the_id, css_style, javascript_code)+
20
+ i.to_s+
21
+ close(__method__)
22
+ )
23
+ end
24
+
25
+ # ========================================================================= #
26
+ # === h5
27
+ # ========================================================================= #
28
+ def h5(
29
+ i = '', css_class = '', the_id = '', css_style = '', javascript_code = ''
30
+ )
31
+ return HtmlTags.h5(
32
+ i, css_class, the_id, css_style, javascript_code
33
+ )
34
+ end
35
+
36
+ end
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'html_tags/individual_tags/h6.rb'
6
+ # =========================================================================== #
7
+ module HtmlTags
8
+
9
+ require 'html_tags/opening_tag/opening_tag.rb'
10
+ require 'html_tags/toplevel_methods/add.rb'
11
+
12
+ # ========================================================================= #
13
+ # === HtmlTags.h6
14
+ # ========================================================================= #
15
+ def self.h6(
16
+ i = '',
17
+ css_class = '',
18
+ the_id = '',
19
+ css_style = '',
20
+ javascript_code = ''
21
+ )
22
+ return HtmlTags.add(
23
+ opening_tag(__method__, css_class, the_id, css_style, javascript_code)+
24
+ i.to_s+
25
+ close(__method__)
26
+ )
27
+ end
28
+
29
+ # ========================================================================= #
30
+ # === h6
31
+ # ========================================================================= #
32
+ def h6(
33
+ i = '', css_class = '', the_id = '', css_style = '', javascript_code = ''
34
+ )
35
+ return HtmlTags.h6(
36
+ i, css_class, the_id, css_style, javascript_code
37
+ )
38
+ end
39
+
40
+ end
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ module HtmlTags
6
+
7
+ require 'html_tags/opening_tag/opening_tag.rb'
8
+ require 'html_tags/toplevel_methods/add.rb'
9
+
10
+ # ========================================================================= #
11
+ # === HtmlTags.head
12
+ # ========================================================================= #
13
+ def self.head(
14
+ i = ''
15
+ )
16
+ if block_given?
17
+ return HtmlTags.add(
18
+ opening_tag(__method__)+i+yield+close(__method__)
19
+ )
20
+ else # Simplified variant.
21
+ return HtmlTags.add(
22
+ opening_tag(__method__)
23
+ )
24
+ end
25
+ end
26
+
27
+ # ========================================================================= #
28
+ # === head
29
+ #
30
+ # This will create an opening tag.
31
+ # ========================================================================= #
32
+ def head(i = '')
33
+ HtmlTags.head(i)
34
+ end
35
+
36
+ end