cyberweb 0.4.174 → 0.5.225
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 +1782 -405
- data/bin/cyberweb_sanitize +10 -0
- data/bin/download_webpage +7 -0
- data/bin/html_to_cyberweb_converter +7 -0
- data/cyberweb.gemspec +25 -25
- data/doc/README.gen +1745 -383
- data/doc/USAGE.md +16 -16
- data/doc/{AUTHORS.md → authors.md} +0 -0
- data/doc/configuration/configuration.md +3 -1
- data/doc/deprecations.md +13 -7
- data/doc/{DOCUMENTATION_FOR_CYBERSPRAWL.md → documentation_for_cybersprawl.md} +7 -4
- data/doc/future_design_goals.md +33 -0
- data/doc/html_characters.md +7 -7
- data/doc/{JQUERY.md → jquery/jquery.md} +20 -12
- data/doc/{MOUSE.md → mouse.md} +1 -9
- data/doc/{RENDER_WEB_BASE.md → render_web_base.md} +11 -4
- data/doc/todo/todo_for_the_cyberweb_project.md +791 -0
- data/examples/advanced/animated_css_example/animated_css_example.html +47 -0
- data/examples/advanced/animated_submarine/animated_submarine.html +511 -0
- data/examples/advanced/animated_windmill/animated_windmill.html +468 -0
- data/examples/advanced/delayed_update_of_the_body_via_javascript.cgi +8 -5
- data/examples/advanced/draw_circle/draw_circle.cgi +36 -0
- data/examples/advanced/drop_shadow_examples.cgi +37 -0
- data/examples/advanced/games/snake/food.png +0 -0
- data/examples/advanced/games/snake/ground.png +0 -0
- data/examples/advanced/games/snake/snake.cgi +28 -0
- data/examples/advanced/games/tetris/tetris.cgi +7 -0
- data/examples/advanced/games/tetris/tetris.rb +17 -0
- data/examples/advanced/games/tetris/tetris.sinatra +58 -0
- data/examples/advanced/games/tic-tac-toe/tic-tac-toe.cgi +123 -0
- data/examples/advanced/get_some_coffee/get_some_coffee.html +293 -0
- data/examples/advanced/glow_on_hover_example/glow_on_hover_example.cgi +27 -0
- data/examples/advanced/hybrid_experiment.cgi +34 -12
- data/examples/advanced/images/global_css_rules_for_the_images.cgi +32 -0
- data/examples/advanced/larger_image_on_mouse_over_example.cgi +2 -2
- data/examples/advanced/no_right_click.cgi +4 -3
- data/examples/advanced/{objectified_html_tags.cgi → objectified_html_tags/objectified_html_tags.cgi} +12 -3
- data/examples/advanced/objectified_html_tags/testing_objectified_html_tags_with_the_webobject.cgi +28 -0
- data/examples/advanced/random_glow_effects.cgi +34 -0
- data/examples/advanced/select_everything_example/select_everything_example.cgi +25 -0
- data/examples/advanced/simple_calculator.cgi +13 -21
- data/examples/advanced/simple_form_example.cgi +11 -11
- data/examples/advanced/traffic_light/traffic_light.html +163 -0
- data/examples/advanced/weather_animation/weather_animation.html +560 -0
- data/examples/css/animated_3D_cube_example/animated_3D_cube_example.html +265 -0
- data/examples/css/animated_bird_example/animated_bird_example.html +207 -0
- data/examples/css/animated_desk_example/animated_desk_example.html +120 -0
- data/examples/css/animated_dog_example/animated_dog_example.html +432 -0
- data/examples/css/animated_submit_button.html +190 -0
- data/examples/css/animated_text_colour_change/animated_text_colour_change.html +41 -0
- data/examples/css/blue_border.html +3 -1
- data/examples/css/border_image_example/border_image_example.html +40 -0
- data/examples/css/box_shadow/box_shadow_example.html +18 -0
- data/examples/css/christmas_snow_globe_animation.html +596 -0
- data/examples/css/css_border_spacing_example.html +5 -5
- data/examples/css/css_bubbles.html +3 -1
- data/examples/css/css_checkboxes_example/css_checkboxes_example.html +110 -0
- data/examples/css/css_drag_and_drop.html +1 -5
- data/examples/css/css_grid_feline_style/css_grid_feline_style.html +161 -0
- data/examples/css/css_neon_glow_effects.html +1 -1
- data/examples/css/css_rotate_these_words.html +83 -0
- data/examples/css/css_text_decoration_example.html +7 -7
- data/examples/css/css_thermometer/css_thermometer.html +91 -0
- data/examples/css/{css_tooltip.html → css_tooltip/css_tooltip.html} +8 -6
- data/examples/css/css_typewriter_example/css_typewriter_example.html +226 -0
- data/examples/css/cyberweb_animated_logo/cyberweb_animated_logo.html +179 -0
- data/examples/css/daily_coffee/daily_coffee.html +1110 -0
- data/examples/css/different_colour_on_selected_text/different_colour_on_selected_text.html +31 -0
- data/examples/css/differentially_glowing_text_example/differentially_glowing_text_example.html +82 -0
- data/examples/css/fade_in_and_fade_out_effect.html +2 -2
- data/examples/css/flying_birds_example/flying_birds_example.html +171 -0
- data/examples/css/folding_cards_example/folding_cards_example.html +624 -0
- data/examples/css/font_size_examples.html +7 -5
- data/examples/css/glowing_on_hover_animation/glowing_on_hover_animation.html +90 -0
- data/examples/css/grow_example.html +31 -0
- data/examples/css/happy_toaster_example/happy_toaster_example.html +830 -0
- data/examples/css/landing_on_mars_animation/landing_on_mars_animation.html +374 -0
- data/examples/css/letter_spacing_example.cgi +18 -14
- data/examples/css/lighthouse_example/lighthouse_example.html +1161 -0
- data/examples/css/{meter_example.html → meter_example/meter_example.html} +0 -0
- data/examples/css/motorcycle_on_the_go/motorcycle_on_the_go.html +227 -0
- data/examples/css/on_hover_glow_effect/on_hover_glow_effect.html +50 -0
- data/examples/css/on_mouse_button_pressed.html +6 -4
- data/examples/css/our_solar_system/our_solar_system.html +441 -0
- data/examples/css/outline/outline_versus_border_example.html +57 -0
- data/examples/css/polaroid_card_effect_example/polaroid_card_effect_example.html +130 -0
- data/examples/css/responsive_image_gallery/responsive_image_gallery.html +97 -0
- data/examples/css/rotating_DNA/rotating_DNA.html +626 -0
- data/examples/css/rotating_sphere_example/rotating_sphere_example.html +112 -0
- data/examples/css/scale_example.html +4 -5
- data/examples/css/shadow_example_in_CSS/shadow_example_in_CSS.cgi +62 -0
- data/examples/css/shaking_shapes_example.html +133 -0
- data/examples/css/simple_stars_example/simple_stars_example.html +27 -0
- data/examples/css/slide_checkbox_example/slide_checkbox_example.html +564 -0
- data/examples/css/speak_bubble_quote_example/speak_bubble_quote_example.html +109 -0
- data/examples/css/speedy_truck_example/speedy_truck_example.html +168 -0
- data/examples/css/{sticky_div_example.html → sticky_div_example/sticky_div_example.html} +0 -0
- data/examples/css/stitched_div.html +9 -0
- data/examples/css/sun_and_clouds_animation/sun_and_clouds_animation.html +292 -0
- data/examples/css/talking_candles_example/talking_candles_example.html +550 -0
- data/examples/css/text_decoration_underline_example/text_decoration_underline_example.html +62 -0
- data/examples/css/this_is_a_cat/this_is_a_cat.html +219 -0
- data/examples/css/three_dots_indicating_page_loading.html +65 -0
- data/examples/css/user_select_example/user_select_example.html +24 -0
- data/examples/css/walking_cat/walking_cat.html +128 -0
- data/examples/css/water_wave_text_animation_effect/water_wave_text_animation_effect.html +86 -0
- data/examples/csv/README.md +2 -1
- data/examples/flip_card_example/flip_card_example.html +10 -3
- data/examples/games/README.md +3 -0
- data/examples/games/snake/images/food.png +0 -0
- data/examples/games/snake/images/ground.png +0 -0
- data/examples/games/snake/snake.html +16 -0
- data/examples/games/snake/snake.js +117 -0
- data/examples/games/tetris/smaller_tetris_game.html +518 -0
- data/examples/games/tetris/tetris.html +461 -0
- data/examples/games/tic-tac-toe/index.js +125 -0
- data/examples/games/tic-tac-toe/style.css +79 -0
- data/examples/games/tic-tac-toe/tic-tac-toe.html +39 -0
- data/examples/html/MathML/001_show_a_simple_quadratic_equation.html +22 -0
- data/examples/html/MathML/002_simple_equation.html +7 -0
- data/examples/html/MathML/003_function_of_example.html +17 -0
- data/examples/html/MathML/README.md +2 -0
- data/examples/html/abbr_example.html +2 -5
- data/examples/html/accordion/README.md +1 -0
- data/examples/html/accordion/accordion.html +56 -0
- data/examples/html/base64_image_example.html +8 -5
- data/examples/html/buttons_example.html +133 -0
- data/examples/html/canvas_drawing_example.html +54 -0
- data/examples/html/colour_wheel.html +441 -442
- data/examples/html/column_width_example.html +2 -2
- data/examples/html/custom_cursor.html +8 -5
- data/examples/html/cyberweb_logo/README.md +2 -0
- data/examples/html/cyberweb_logo/cyberweb_logo.html +11 -0
- data/examples/html/draggable_paragraph.html +1 -2
- data/examples/html/email_popup_example/email_popup_example.html +175 -0
- data/examples/html/fieldset_example.html +3 -1
- data/examples/html/font_examples/README.md +1 -0
- data/examples/html/font_examples/chancery_text.html +19 -0
- data/examples/html/font_examples/fantasy_text.html +19 -0
- data/examples/html/font_examples/georgia_text.html +19 -0
- data/examples/html/font_size_example/font_size_example.html +85 -0
- data/examples/html/glyph_example.html +0 -1
- data/examples/html/grayscale_filter_example/grayscale_filter_example.html +15 -0
- data/examples/html/html_links_example.html +61 -0
- data/examples/html/html_slider/html_slider.html +39 -0
- data/examples/html/input_autofocus_example.html +11 -7
- data/examples/html/input_placeholder_example.html +15 -0
- data/examples/html/larger_image_on_mouse_over_example.html +1 -1
- data/examples/html/ordered_and_unordered_bulletsin.html +4 -2
- data/examples/html/play_video_example.html +3 -2
- data/examples/html/remote_image_example.html +8 -2
- data/examples/html/select_everything_on_mouse_click_event.html +38 -0
- data/examples/html/selected_text_appears_in_another_colour_example.html +34 -0
- data/examples/html/send_email_hyperlink/send_email_hyperlink.html +8 -0
- data/examples/html/simple_unordered_list.html +3 -0
- data/examples/html/spinner_example/spinner.html +79 -0
- data/examples/html/table_with_header_example.html +26 -13
- data/examples/html/test_mkv_codec/test_mkv_codec.html +11 -0
- data/examples/html/two_columns_flex_example.html +4 -1
- data/examples/{javascript → javascript_and_jquery}/README.md +0 -0
- data/examples/{javascript → javascript_and_jquery}/arrays/arrays_example_in_javascript.html +0 -0
- data/examples/javascript_and_jquery/autocomplete_on_an_input_field/autocomplete_on_an_input_field.html +295 -0
- data/examples/javascript_and_jquery/change_the_background_colour_dynamically/change_the_background_colour_dynamically.html +41 -0
- data/examples/{javascript → javascript_and_jquery}/delay_example/delay_example.html +0 -0
- data/examples/{javascript → javascript_and_jquery}/drag_support/drag_support.html +0 -0
- data/examples/javascript_and_jquery/jquery_bubbling_header/bubbling_header.html +109 -0
- data/examples/{javascript → javascript_and_jquery}/jquery_drag_and_drop/drag_and_drop_image_example.html +0 -0
- data/examples/javascript_and_jquery/jquery_showcase/README.md +6 -0
- data/examples/javascript_and_jquery/jquery_showcase/jquery_001.cgi +23 -0
- data/examples/javascript_and_jquery/jquery_showcase/jquery_002.cgi +34 -0
- data/examples/javascript_and_jquery/jquery_showcase/jquery_003.cgi +24 -0
- data/examples/javascript_and_jquery/jquery_showcase/jquery_004.cgi +34 -0
- data/examples/javascript_and_jquery/on_change_event/on_change_event.html +29 -0
- data/examples/javascript_and_jquery/on_click_colour_change/on_click_colour_change.html +31 -0
- data/examples/javascript_and_jquery/on_click_display_random_number/on_click_display_random_number.html +43 -0
- data/examples/{javascript → javascript_and_jquery}/on_click_event_hello_world/on_click_event_hello_world.html +0 -0
- data/examples/javascript_and_jquery/on_mouse_wheel_event/on_mouse_wheel_event.html +37 -0
- data/examples/javascript_and_jquery/read_the_content_of_a_local_file/read_the_content_of_a_local_file.html +35 -0
- data/examples/{javascript → javascript_and_jquery}/rgb_to_hex/rgb_to_hex.html +0 -0
- data/examples/{javascript → javascript_and_jquery}/screen_resolution/screen_resolution.html +2 -1
- data/examples/{javascript → javascript_and_jquery}/select_everything/select_everything.html +1 -1
- data/examples/javascript_and_jquery/vue/README.md +1 -0
- data/examples/javascript_and_jquery/vue/showcasing_vue.html +80 -0
- data/examples/{javascript → javascript_and_jquery}/write_into_a_file/write_into_a_file.html +0 -0
- data/examples/rack/example_with_html_template.rb +5 -4
- data/examples/rack/example_with_rack_and_cyberweb_showing_how_to_use_images.rb +3 -2
- data/examples/rack/hello_world_example_with_rack.rb +3 -2
- data/examples/rack/lobster.rb +7 -5
- data/examples/rack/rack_env.rb +3 -3
- data/examples/{show_greek_letters.rb → show_greek_letters/show_greek_letters.rb} +0 -0
- data/examples/simple/input_example_with_coloured_focus.cgi +32 -0
- data/examples/simple/input_type_examples.cgi +51 -0
- data/examples/simple/on_click_event_hello_world.cgi +5 -5
- data/examples/simple/rotate_these_words.cgi +90 -0
- data/examples/{example1.rb → simple/show_how_to_set_a_title.rb} +0 -0
- data/examples/simple/simple_gradient.cgi +57 -0
- data/images/cyberweb_favicon.png +0 -0
- data/images/cyberweb_logo.png +0 -0
- data/images/cyberweb_theme.png +0 -0
- data/lib/cyberweb/REST/README.md +7 -0
- data/lib/cyberweb/REST/base/accept_entry.rb +94 -0
- data/lib/cyberweb/REST/base/application.rb +37 -0
- data/lib/cyberweb/REST/base/bad_request.rb +10 -0
- data/lib/cyberweb/REST/base/base.rb +1131 -0
- data/lib/cyberweb/REST/base/common_logger.rb +35 -0
- data/lib/cyberweb/REST/base/delegator.rb +75 -0
- data/lib/cyberweb/REST/base/error.rb +8 -0
- data/lib/cyberweb/REST/base/extended_rack.rb +66 -0
- data/lib/cyberweb/REST/base/helpers/helpers.rb +473 -0
- data/lib/cyberweb/REST/base/helpers/stream.rb +75 -0
- data/lib/cyberweb/REST/base/mime_type_entry.rb +67 -0
- data/lib/cyberweb/{constants/file_constants.rb → REST/base/not_found.rb} +10 -5
- data/lib/cyberweb/REST/base/request.rb +145 -0
- data/lib/cyberweb/REST/base/response.rb +94 -0
- data/lib/cyberweb/REST/base/templates/templates.rb +208 -0
- data/lib/cyberweb/REST/base/wrapper.rb +28 -0
- data/lib/cyberweb/{constants/nl.rb → REST/constants.rb} +8 -9
- data/lib/cyberweb/REST/main.rb +109 -0
- data/lib/cyberweb/REST/show_exceptions.rb +396 -0
- data/lib/cyberweb/and_sinatra_base.rb +0 -0
- data/lib/cyberweb/autoinclude.rb +0 -0
- data/lib/cyberweb/autoinclude_webobject.rb +0 -0
- data/lib/cyberweb/base/base.rb +9 -2
- data/lib/cyberweb/base/colours.rb +8 -6
- data/lib/cyberweb/base/constants.rb +8 -0
- data/lib/cyberweb/base/misc.rb +140 -53
- data/lib/cyberweb/base/save_file.rb +3 -0
- data/lib/cyberweb/base_module/base_module.rb +79 -0
- data/lib/cyberweb/cascading_style_sheets/admonition.css +0 -0
- data/lib/cyberweb/cascading_style_sheets/balloon.css +0 -0
- data/lib/cyberweb/cascading_style_sheets/border.css +107 -41
- data/lib/cyberweb/cascading_style_sheets/code.css +0 -0
- data/lib/cyberweb/cascading_style_sheets/colours.css +46 -23
- data/lib/cyberweb/cascading_style_sheets/css_reset.css +59 -0
- data/lib/cyberweb/cascading_style_sheets/cursors.css +14 -0
- data/lib/cyberweb/cascading_style_sheets/custom/animated_bike.css +199 -0
- data/lib/cyberweb/cascading_style_sheets/default.css +171 -136
- data/lib/cyberweb/cascading_style_sheets/div.css +18 -4
- data/lib/cyberweb/cascading_style_sheets/drop_shadow.css +154 -0
- data/lib/cyberweb/cascading_style_sheets/error_404_css_class.css +26 -0
- data/lib/cyberweb/cascading_style_sheets/fonts.css +60 -39
- data/lib/cyberweb/cascading_style_sheets/glow_effects.css +69 -0
- data/lib/cyberweb/cascading_style_sheets/gradient_effects.css +5 -0
- data/lib/cyberweb/cascading_style_sheets/hover.css +4212 -0
- data/lib/cyberweb/cascading_style_sheets/links.css +8 -8
- data/lib/cyberweb/cascading_style_sheets/margin.css +195 -178
- data/lib/cyberweb/cascading_style_sheets/menu.css +0 -0
- data/lib/cyberweb/cascading_style_sheets/message_boxes.css +0 -0
- data/lib/cyberweb/cascading_style_sheets/misc.css +51 -11
- data/lib/cyberweb/cascading_style_sheets/popup.css +0 -0
- data/lib/cyberweb/cascading_style_sheets/rpg.css +0 -0
- data/lib/cyberweb/cascading_style_sheets/ruby_regexes.css +12 -0
- data/lib/cyberweb/cascading_style_sheets/shapes.css +59 -0
- data/lib/cyberweb/cascading_style_sheets/template2.css +0 -0
- data/lib/cyberweb/cascading_style_sheets/text_shadow.css +21 -0
- data/lib/cyberweb/cascading_style_sheets/tooltip.css +0 -0
- data/lib/cyberweb/cgi/constants.rb +1 -2
- data/lib/cyberweb/cgi/exceptions.rb +1 -1
- data/lib/cyberweb/coloured_tags/coloured_tags.rb +1 -1
- data/lib/cyberweb/colours/colour_chart.rb +10 -56
- data/lib/cyberweb/colours/colours.rb +149 -4
- data/lib/cyberweb/commandline/commandline_interface.rb +13 -8
- data/lib/cyberweb/configuration/load_the_configuration_file.rb +1 -1
- data/lib/cyberweb/constants/constants.rb +592 -2
- data/lib/cyberweb/controller/{webobject_controller.rb → controller.rb} +1 -1
- data/lib/cyberweb/css_manager/css_manager.rb +237 -0
- data/lib/cyberweb/databases/sqlite.rb +56 -0
- data/lib/cyberweb/debug/debug.rb +1 -1
- data/lib/cyberweb/encoding/encoding.rb +11 -0
- data/lib/cyberweb/erb/test.rhtml +0 -0
- data/lib/cyberweb/erb/test_template.erb +0 -0
- data/lib/cyberweb/evaluate_from_the_same_named_file_then_serve.rb +1 -1
- data/lib/cyberweb/favicon/favicon.rb +8 -7
- data/lib/cyberweb/forum/README.md +4 -0
- data/lib/cyberweb/foto_gallery/foto_gallery.rb +158 -0
- data/lib/cyberweb/generator/README.md +2 -2
- data/lib/cyberweb/generator/cgi.rb +22 -9
- data/lib/cyberweb/generator/static_webpage.rb +22 -12
- data/lib/cyberweb/html_tags/README.md +3 -3
- data/lib/cyberweb/html_tags/button.rb +10 -2
- data/lib/cyberweb/html_tags/h2.rb +6 -4
- data/lib/cyberweb/html_tags/html_tags.rb +17 -1
- data/lib/cyberweb/html_tags/input.rb +10 -5
- data/lib/cyberweb/html_tags/legend.rb +1 -1
- data/lib/cyberweb/html_tags/span.rb +10 -2
- data/lib/cyberweb/html_tags/table.rb +30 -19
- data/lib/cyberweb/html_template/html_template.rb +248 -85
- data/lib/cyberweb/images/embed_this_image.rb +3 -1
- data/lib/cyberweb/images/images.rb +2 -2
- data/lib/cyberweb/images/is_image.rb +2 -1
- data/lib/cyberweb/images/path_to_images.rb +2 -1
- data/lib/cyberweb/images/remove_this_substring_from_all_images.rb +1 -1
- data/lib/cyberweb/images/standalone_drag_and_drop_this_image.rb +3 -3
- data/lib/cyberweb/images/string_image.rb +6 -3
- data/lib/cyberweb/images_base64_encoded/404_ERROR.png.md +1 -0
- data/lib/cyberweb/images_base64_encoded/AUSRUFUNGSZEICHEN.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/BLUEARROW.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/BUBBLE.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/CAT.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/CAUTION.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/CHEERING_PERSON.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/CURSOR.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/DOT_01.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/DUCKY.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/ELEPHANT.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/HALLOWEEN.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/HANGING_MONKEY.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/LENS.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/README.md +0 -0
- data/lib/cyberweb/images_base64_encoded/SIX_SIDED_DICE.png.md +1 -0
- data/lib/cyberweb/images_base64_encoded/TU_WIEN_LOGO.png.md +0 -0
- data/lib/cyberweb/images_base64_encoded/VOGEL.png.md +0 -0
- data/lib/cyberweb/javascript/drag_and_drop.rb +17 -14
- data/lib/cyberweb/javascript/javascript.rb +79 -34
- data/lib/cyberweb/javascript/javascript_clock.rb +50 -14
- data/lib/cyberweb/javascript/javascript_helper/javascript_helper.rb +59 -0
- data/lib/cyberweb/javascript/jquery.rb +9 -5
- data/lib/cyberweb/javascript/on_click_change_opacity.rb +5 -1
- data/lib/cyberweb/javascript/on_click_hide.rb +2 -0
- data/lib/cyberweb/javascript/popup.rb +5 -2
- data/lib/cyberweb/javascript/resize.rb +4 -1
- data/lib/cyberweb/javascript_code/README.md +1 -1
- data/lib/cyberweb/javascript_code/custom_functions.js +51 -25
- data/lib/cyberweb/javascript_code/disable_right_click.js +5 -0
- data/lib/cyberweb/javascript_code/games/snake.js +113 -0
- data/lib/cyberweb/javascript_code/games/tetris.js +491 -0
- data/lib/cyberweb/javascript_code/games/tic-tac-toe.js +125 -0
- data/lib/cyberweb/javascript_code/html_colours.js +161 -0
- data/lib/cyberweb/javascript_code/jquery/jquery-3.6.1.js +10909 -0
- data/lib/cyberweb/javascript_code/select_everything_on_mouse_click_event.js +23 -0
- data/lib/cyberweb/javascript_code/simple_calculator.js +3 -3
- data/lib/cyberweb/javascript_code/simulate_a_dice.js +20 -0
- data/lib/cyberweb/javascript_code/sleep.js +3 -0
- data/lib/cyberweb/mouse/mouse.rb +4 -1
- data/lib/cyberweb/objectified/html_tags/README.md +13 -0
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/a.rb +17 -35
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/abbr.rb +18 -9
- data/lib/cyberweb/objectified/html_tags/base.rb +960 -0
- data/lib/cyberweb/objectified/html_tags/blockquote.rb +106 -0
- data/lib/cyberweb/{objectified_html_tags/span.rb → objectified/html_tags/body.rb} +25 -20
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/button.rb +26 -34
- data/lib/cyberweb/objectified/html_tags/canvas.rb +202 -0
- data/lib/cyberweb/objectified/html_tags/cite.rb +103 -0
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/combobox.rb +26 -34
- data/lib/cyberweb/objectified/html_tags/div.rb +155 -0
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/embed.rb +18 -33
- data/lib/cyberweb/objectified/html_tags/fieldset.rb +107 -0
- data/lib/cyberweb/objectified/html_tags/figure.rb +152 -0
- data/lib/cyberweb/objectified/html_tags/form.rb +155 -0
- data/lib/cyberweb/objectified/html_tags/h1.rb +176 -0
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/h2.rb +32 -40
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/h3.rb +30 -42
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/h4.rb +30 -42
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/h5.rb +31 -40
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/h6.rb +31 -41
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/hbox.rb +12 -10
- data/lib/cyberweb/objectified/html_tags/head.rb +126 -0
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/img.rb +47 -32
- data/lib/cyberweb/objectified/html_tags/include_objectified_html_tags.rb +49 -0
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/input.rb +50 -51
- data/lib/cyberweb/objectified/html_tags/map.rb +107 -0
- data/lib/cyberweb/{objectified_html_tags/div.rb → objectified/html_tags/meta.rb} +36 -47
- data/lib/cyberweb/{objectified_html_tags/h1.rb → objectified/html_tags/object.rb} +34 -42
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/p.rb +17 -32
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/pre.rb +28 -34
- data/lib/cyberweb/{objectified_html_tags/table.rb → objectified/html_tags/progress.rb} +99 -94
- data/lib/cyberweb/objectified/html_tags/span.rb +103 -0
- data/lib/cyberweb/objectified/html_tags/table.rb +257 -0
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/textarea.rb +25 -36
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/title.rb +11 -17
- data/lib/cyberweb/{objectified_html_tags/form.rb → objectified/html_tags/ul.rb} +45 -42
- data/lib/cyberweb/{objectified_html_tags → objectified/html_tags}/window.rb +15 -10
- data/lib/cyberweb/objectified/mask/README.md +8 -0
- data/lib/cyberweb/objectified/mask/compatibility_to_html_tags.rb +40 -0
- data/lib/cyberweb/objectified/mask/mask.rb +490 -0
- data/lib/cyberweb/objectified/web_object/README.md +4 -0
- data/lib/cyberweb/objectified/web_object/web_object.rb +119 -0
- data/lib/cyberweb/predefined_and_freeform_methods/frage.rb +4 -2
- data/lib/cyberweb/predefined_and_freeform_methods/freeform_methods.rb +30 -19
- data/lib/cyberweb/predefined_and_freeform_methods/hash_registered_extra_tags.rb +6 -0
- data/lib/cyberweb/predefined_and_freeform_methods/header.rb +2 -0
- data/lib/cyberweb/predefined_and_freeform_methods/predefined_methods.rb +10 -175
- data/lib/cyberweb/project/project.rb +9 -4
- data/lib/cyberweb/rack/request.rb +11 -11
- data/lib/cyberweb/raw_images/404.png +0 -0
- data/lib/cyberweb/raw_images/500.png +0 -0
- data/lib/cyberweb/raw_images/README.md +2 -0
- data/lib/cyberweb/raw_images/a_dice.png +0 -0
- data/lib/cyberweb/raw_images/food.png +0 -0
- data/lib/cyberweb/raw_images/ground.png +0 -0
- data/lib/cyberweb/requires/require_generators.rb +1 -1
- data/lib/cyberweb/requires/require_html_tags_files.rb +1 -1
- data/lib/cyberweb/requires/require_javascript_files.rb +1 -1
- data/lib/cyberweb/requires/require_objectified_html_tags_files.rb +29 -3
- data/lib/cyberweb/requires/require_the_constants.rb +3 -1
- data/lib/cyberweb/requires/require_the_cyberweb_project.rb +12 -31
- data/lib/cyberweb/requires/require_the_toplevel_methods_files.rb +1 -1
- data/lib/cyberweb/requires/require_web_object_files.rb +1 -1
- data/lib/cyberweb/requires/require_yaml.rb +3 -3
- data/lib/cyberweb/rest +1 -0
- data/lib/cyberweb/route_handler/class_based_test.rb +43 -0
- data/lib/cyberweb/route_handler/module/misc.rb +108 -0
- data/lib/cyberweb/route_handler/module/route_handler_module.rb +215 -0
- data/lib/cyberweb/route_handler/module/verbs.rb +53 -0
- data/lib/cyberweb/route_handler/route_handler.rb +56 -0
- data/lib/cyberweb/route_handler/test.rb +43 -0
- data/lib/cyberweb/{constants/array_predefined_constants.rb → sinatra/base/set_use_this_port.rb} +16 -9
- data/lib/cyberweb/sinatra/base/use_this_port.rb +40 -0
- data/lib/cyberweb/sinatra/base.rb +51 -36
- data/lib/cyberweb/sinatra/custom_extensions.rb +39 -14
- data/lib/cyberweb/standalone_classes/all_css_classes.rb +1 -1
- data/lib/cyberweb/standalone_classes/calculator.rb +7 -1
- data/lib/cyberweb/standalone_classes/correct_image_entries_in_html_file.rb +12 -7
- data/lib/cyberweb/standalone_classes/turn_html_into_cyberweb.rb +13 -11
- data/lib/cyberweb/svg/standalone/README.md +2 -0
- data/lib/cyberweb/svg/standalone/amusement_park.svg +738 -0
- data/lib/cyberweb/svg/svg.cgi +2 -3
- data/lib/cyberweb/toplevel_methods/a.rb +2 -1
- data/lib/cyberweb/toplevel_methods/anmerkung.rb +3 -0
- data/lib/cyberweb/toplevel_methods/audio.rb +1 -1
- data/lib/cyberweb/toplevel_methods/bold.rb +9 -3
- data/lib/cyberweb/toplevel_methods/charsets.rb +17 -13
- data/lib/cyberweb/toplevel_methods/consider_serving_the_web_object.rb +3 -3
- data/lib/cyberweb/toplevel_methods/css.rb +719 -25
- data/lib/cyberweb/{csv → toplevel_methods}/csv.rb +5 -3
- data/lib/cyberweb/{constants/roebe.rb → toplevel_methods/custom_error_page.rb} +10 -10
- data/lib/cyberweb/toplevel_methods/{date.rb → date_and_time.rb} +23 -10
- data/lib/cyberweb/toplevel_methods/disable.rb +7 -3
- data/lib/cyberweb/toplevel_methods/dot.rb +2 -2
- data/lib/cyberweb/toplevel_methods/download_webpage.rb +41 -3
- data/lib/cyberweb/toplevel_methods/edit_configuration_file.rb +1 -1
- data/lib/cyberweb/toplevel_methods/fields.rb +2 -0
- data/lib/cyberweb/toplevel_methods/filename.rb +3 -1
- data/lib/cyberweb/toplevel_methods/frames.rb +0 -2
- data/lib/cyberweb/toplevel_methods/google.rb +52 -0
- data/lib/cyberweb/{html_codes → toplevel_methods}/greek_letters.rb +22 -1
- data/lib/cyberweb/toplevel_methods/hardware_information.rb +2 -1
- data/lib/cyberweb/{help → toplevel_methods}/help.rb +3 -2
- data/lib/cyberweb/toplevel_methods/html_comment.rb +2 -2
- data/lib/cyberweb/toplevel_methods/html_tables.rb +401 -266
- data/lib/cyberweb/toplevel_methods/internal_hash.rb +173 -0
- data/lib/cyberweb/{io → toplevel_methods}/io.rb +1 -1
- data/lib/cyberweb/toplevel_methods/javascript.rb +42 -0
- data/lib/cyberweb/toplevel_methods/jquery.rb +8 -0
- data/lib/cyberweb/toplevel_methods/last_modified.rb +4 -0
- data/lib/cyberweb/toplevel_methods/links.rb +23 -7
- data/lib/cyberweb/toplevel_methods/listing.rb +2 -1
- data/lib/cyberweb/toplevel_methods/localhost.rb +3 -0
- data/lib/cyberweb/toplevel_methods/markdown.rb +3 -2
- data/lib/cyberweb/toplevel_methods/mathml.rb +5 -3
- data/lib/cyberweb/toplevel_methods/message_boxes.rb +6 -2
- data/lib/cyberweb/toplevel_methods/misc.rb +531 -79
- data/lib/cyberweb/toplevel_methods/padlem_and_marlem.rb +3 -0
- data/lib/cyberweb/toplevel_methods/path.rb +6 -1
- data/lib/cyberweb/toplevel_methods/pdf.rb +1 -1
- data/lib/cyberweb/toplevel_methods/process_content.rb +4 -7
- data/lib/cyberweb/toplevel_methods/progress.rb +6 -2
- data/lib/cyberweb/toplevel_methods/quote.rb +7 -1
- data/lib/cyberweb/toplevel_methods/random.rb +4 -1
- data/lib/cyberweb/toplevel_methods/rds.rb +14 -6
- data/lib/cyberweb/toplevel_methods/read_and_display.rb +3 -2
- data/lib/cyberweb/toplevel_methods/return_head_start.rb +1 -1
- data/lib/cyberweb/toplevel_methods/return_html_fin.rb +6 -3
- data/lib/cyberweb/toplevel_methods/return_html_header.rb +8 -3
- data/lib/cyberweb/toplevel_methods/return_html_start.rb +7 -2
- data/lib/cyberweb/toplevel_methods/return_meta_collection.rb +15 -4
- data/lib/cyberweb/toplevel_methods/return_pwd.rb +4 -0
- data/lib/cyberweb/toplevel_methods/return_strict_doctype.rb +8 -7
- data/lib/cyberweb/toplevel_methods/roebe.rb +6 -0
- data/lib/cyberweb/toplevel_methods/s2.rb +3 -1
- data/lib/cyberweb/toplevel_methods/sanitize_url.rb +7 -5
- data/lib/cyberweb/toplevel_methods/sbr.rb +7 -7
- data/lib/cyberweb/toplevel_methods/server_base_directory.rb +7 -3
- data/lib/cyberweb/toplevel_methods/show_and_display.rb +15 -15
- data/lib/cyberweb/toplevel_methods/show_configuration.rb +2 -2
- data/lib/cyberweb/toplevel_methods/spacer.rb +5 -2
- data/lib/cyberweb/toplevel_methods/svg.rb +62 -4
- data/lib/cyberweb/toplevel_methods/tag.rb +8 -2
- data/lib/cyberweb/toplevel_methods/temp_directory.rb +2 -2
- data/lib/cyberweb/toplevel_methods/textile.rb +2 -2
- data/lib/cyberweb/toplevel_methods/title.rb +14 -2
- data/lib/cyberweb/toplevel_methods/video.rb +3 -4
- data/lib/cyberweb/toplevel_methods/write_what_into.rb +2 -0
- data/lib/cyberweb/utility_scripts/README.md +3 -4
- data/lib/cyberweb/utility_scripts/autogenerate_drop_shadow_rules/autogenerate_drop_shadow_rules.rb +71 -0
- data/lib/cyberweb/utility_scripts/create_standalone_html_page.rb +223 -0
- data/lib/cyberweb/utility_scripts/download_all_images_from_this_website.rb +143 -0
- data/lib/cyberweb/utility_scripts/download_balloon_css.rb +1 -1
- data/lib/cyberweb/utility_scripts/fix_incorrect_links_to_locally_existing_images_in_this_file.rb +142 -0
- data/lib/cyberweb/utility_scripts/html_to_cyberweb_converter.rb +235 -0
- data/lib/cyberweb/utility_scripts/images_to_html/images_to_html.rb +878 -0
- data/lib/cyberweb/utility_scripts/images_to_html/misc.rb +62 -0
- data/lib/cyberweb/utility_scripts/new_tags.rb +105 -0
- data/lib/cyberweb/utility_scripts/simple_index/README.md +9 -0
- data/lib/cyberweb/utility_scripts/simple_index/simple_index.rb +149 -0
- data/lib/cyberweb/version/version.rb +2 -2
- data/lib/cyberweb/vue/README.md +2 -0
- data/lib/cyberweb/vue/vue.rb +91 -0
- data/lib/cyberweb/web_images/array_listing_all_project_images.rb +1 -1
- data/lib/cyberweb/web_images/map_symbol_to_image_location.rb +60 -4
- data/lib/cyberweb/web_images/web_images.rb +37 -20
- data/lib/cyberweb/{constants/array_images.rb → web_object/display_output_and_report.rb} +11 -10
- data/lib/cyberweb/web_object/english.rb +55 -0
- data/lib/cyberweb/web_object/favicon.rb +103 -22
- data/lib/cyberweb/web_object/html_tags.rb +1433 -0
- data/lib/cyberweb/web_object/images.rb +428 -398
- data/lib/cyberweb/web_object/{javascript.rb → javascript_and_jquery.rb} +174 -276
- data/lib/cyberweb/web_object/{links.rb → link.rb} +185 -83
- data/lib/cyberweb/web_object/misc.rb +3934 -3928
- data/lib/cyberweb/web_object/reset.rb +153 -67
- data/lib/cyberweb/web_object/run.rb +1 -1
- data/lib/cyberweb/web_object/web_object.rb +3690 -49
- data/lib/cyberweb/web_scraper/scrape_this_url.rb +4 -2
- data/lib/cyberweb/webmin/biology_server.cgi +14 -15
- data/lib/cyberweb/webmin/calculator.cgi +2 -2
- data/lib/cyberweb/webmin/colour_chart.cgi +4 -5
- data/lib/cyberweb/webmin/comments.cgi +8 -7
- data/lib/cyberweb/webmin/comments_data +0 -0
- data/lib/cyberweb/webmin/constants.rb +1 -2
- data/lib/cyberweb/webmin/dictionary.cgi +3 -4
- data/lib/cyberweb/webmin/sys_info.cgi +1 -2
- data/lib/cyberweb/webmin/webforum.cgi +1 -2
- data/lib/cyberweb/webmin/webmin.cgi +2 -3
- data/lib/cyberweb/yaml/autogenerated_system_settings.yml +10 -10
- data/lib/cyberweb/yaml/custom_tags.yml +1 -1
- data/lib/cyberweb/yaml/html5_global_attributes.yml +5 -1
- data/lib/cyberweb/yaml/html_tag_legend.yml +2 -0
- data/lib/cyberweb/yaml/http_status_codes.yml +4 -1
- data/lib/cyberweb/yaml/load_these_yaml_files_by_default.yml +29 -0
- data/lib/cyberweb/yaml/project_configuration.yml +42 -31
- data/lib/cyberweb/yaml/video_attributes.yml +2 -0
- data/lib/cyberweb/yaml/web_images.yml +1 -1
- data/test/REST/simple.rb +7 -0
- data/test/complex_tests/simple_sinatra_example_using_cyberweb/simple.rb +1 -1
- data/test/complex_tests/sinatra_or_cyberweb/sinatra_or_cyberweb.cgi +1 -1
- data/test/complex_tests/sinatra_or_cyberweb/sinatra_or_cyberweb.rb +4 -4
- data/test/complex_tests/sinatra_or_cyberweb/sinatra_or_cyberweb.sinatra +1 -2
- data/test/complex_tests/testing_frames.cgi +3 -5
- data/test/complex_tests/testing_objectified_html_tags/testing_objectified_html_tags.html +28 -0
- data/test/complex_tests/testing_objectified_html_tags/testing_objectified_html_tags.rb +175 -0
- data/test/complex_tests/testing_style_variants/show_coloured_boxes.cgi +11 -7
- data/test/complex_tests/testing_tables.cgi +3 -3
- data/test/complex_tests/testing_the_cyberweb_shell.rb +2 -0
- data/test/complex_tests/testing_web_object.rb +5 -2
- data/test/css/README.md +4 -3
- data/test/css/return_the_content_of_these_css_classes.rb +5 -1
- data/test/css/test_hover_css/test_hover_css.cgi +59 -0
- data/test/css/test_ordered_list/test_ordered_list.cgi +31 -0
- data/test/css/testing_css_effects.cgi +3 -4
- data/test/css/testing_css_masking.cgi +3 -4
- data/test/hello_world/hello_world.cgi +6 -4
- data/test/html_template/html_template.rb +15 -0
- data/test/javascript/testing_custom_functions.js +24 -0
- data/test/javascript/testing_drag_and_drop_support.cgi +1 -1
- data/test/javascript/testing_on_click_change_opacity.cgi +4 -5
- data/test/javascript/testing_snowflakes.cgi +2 -2
- data/test/simple_tests/ad-hoc-test.cgi +5 -2
- data/test/simple_tests/cgi/hello_world_with_cyberweb.cgi +14 -0
- data/test/simple_tests/commandline_tests.rb +21 -15
- data/test/simple_tests/display_this_file.cgi +2 -2
- data/test/simple_tests/simple_html_example.cgi +2 -1
- data/test/simple_tests/simple_html_test_page/simple_html_test_page.html +20 -0
- data/test/simple_tests/simple_status_page.cgi +2 -2
- data/test/simple_tests/string_s2_test.rb +5 -0
- data/test/simple_tests/test_simple_string_as_input.rb +3 -1
- data/test/simple_tests/testing_base64_images.cgi +3 -4
- data/test/simple_tests/testing_checkboxes.cgi +22 -0
- data/test/simple_tests/testing_dragging_an_image.cgi +5 -6
- data/test/simple_tests/testing_editable_text.cgi +2 -3
- data/test/simple_tests/testing_email.cgi +6 -7
- data/test/simple_tests/testing_embedding_a_pdf_file.cgi +5 -5
- data/test/simple_tests/testing_google_charts.cgi +3 -3
- data/test/simple_tests/testing_html_forms.cgi +3 -3
- data/test/simple_tests/testing_html_template.rb +2 -0
- data/test/simple_tests/testing_popup_div.cgi +2 -3
- data/test/simple_tests/testing_return_dataset_without_any_comments.rb +3 -1
- data/test/simple_tests/testing_the_cap_box.cgi +3 -4
- data/test/simple_tests/testing_the_div_tag.cgi +3 -4
- data/test/simple_tests/testing_the_headers_tag.cgi +3 -4
- data/test/simple_tests/testing_the_html_colours.cgi +2 -3
- data/test/simple_tests/testing_the_info_box.cgi +2 -3
- data/test/simple_tests/testing_the_li_tag.cgi +2 -1
- data/test/simple_tests/testing_the_s2_method.rb +6 -1
- data/test/simple_tests/testing_the_select_tag.cgi +16 -8
- data/test/simple_tests/testing_the_span_tag.cgi +2 -3
- data/test/simple_tests/testing_web_images.rb +4 -2
- data/test/testing_html_tags/button_example.cgi +6 -7
- metadata +345 -151
- data/doc/CONVENTIONS.md +0 -7
- data/doc/CYBERWEB_TUTORIAL.cgi +0 -43
- data/doc/FUTURE_DESIGN_GOAL_CONSIDERATIONS.md +0 -13
- data/doc/todo/TODO_FOR_THE_CYBERWEB_PROJECT.md +0 -1089
- data/examples/css/shadow_example_in_CSS.cgi +0 -30
- data/lib/cyberweb/charts/README.md +0 -2
- data/lib/cyberweb/charts/google_charts.rb +0 -51
- data/lib/cyberweb/colours/random_colour.rb +0 -28
- data/lib/cyberweb/colours/sanitize_for_colours.rb +0 -95
- data/lib/cyberweb/constants/array_local_css_files.rb +0 -35
- data/lib/cyberweb/constants/configuration_file.rb +0 -33
- data/lib/cyberweb/constants/http_status_codes.rb +0 -42
- data/lib/cyberweb/constants/project_constants.rb +0 -99
- data/lib/cyberweb/constants/standalone_constants.rb +0 -309
- data/lib/cyberweb/csv/README.md +0 -2
- data/lib/cyberweb/generator/webpage_for_images.rb +0 -553
- data/lib/cyberweb/html_codes/README.md +0 -15
- data/lib/cyberweb/images/real/README.md +0 -6
- data/lib/cyberweb/io/README.md +0 -1
- data/lib/cyberweb/javascript/scroll.rb +0 -17
- data/lib/cyberweb/objectified_html_tags/README.md +0 -8
- data/lib/cyberweb/objectified_html_tags/base.rb +0 -376
- data/lib/cyberweb/predefined_and_freeform_methods/hash_css_class_to_use.rb +0 -55
- data/lib/cyberweb/requires/require_charts.rb +0 -20
- data/lib/cyberweb/web_object/css.rb +0 -627
- data/lib/cyberweb/web_object/evaluate.rb +0 -126
- data/lib/cyberweb/web_object/html_related_tags.rb +0 -320
- data/lib/cyberweb/web_object/initialize.rb +0 -51
- data/lib/cyberweb/web_object/input_related_functionality.rb +0 -414
- data/lib/cyberweb/web_object/languages.rb +0 -172
- data/lib/cyberweb/web_object/params.rb +0 -289
- data/lib/cyberweb/web_object/sinatra_related_functionality.rb +0 -30
- data/lib/cyberweb/web_object/sitemap.rb +0 -176
- data/lib/cyberweb/web_object/table.rb +0 -378
- data/test/complex_tests/testing_objectified_html_tags.rb +0 -82
- data/test/javascript/testing_cheerleader_javascript.cgi +0 -0
@@ -18,11 +18,76 @@ module Cyberweb
|
|
18
18
|
require 'cyberweb/toplevel_methods/css.rb'
|
19
19
|
|
20
20
|
# ========================================================================= #
|
21
|
-
# === Cyberweb.
|
21
|
+
# === Cyberweb.string_table3
|
22
22
|
#
|
23
23
|
# This returns the string form of a <table> tag.
|
24
24
|
# ========================================================================= #
|
25
|
-
def self.
|
25
|
+
def self.string_table3(
|
26
|
+
css_class = '',
|
27
|
+
id = '',
|
28
|
+
css_style = '',
|
29
|
+
*content,
|
30
|
+
&block
|
31
|
+
)
|
32
|
+
content = content.flatten.compact # Make it more useful to our case.
|
33
|
+
# ======================================================================= #
|
34
|
+
# === Handle blocks next
|
35
|
+
# ======================================================================= #
|
36
|
+
if block_given?
|
37
|
+
yielded = yield
|
38
|
+
if yielded.is_a? Hash
|
39
|
+
# =================================================================== #
|
40
|
+
# === :read_in_this_file
|
41
|
+
# =================================================================== #
|
42
|
+
if yielded.has_key?(:read_in_this_file)
|
43
|
+
this_file = yielded.delete(:read_in_this_file)
|
44
|
+
if File.exist? this_file
|
45
|
+
content = File.readlines(this_file, encoding: 'UTF-8')
|
46
|
+
# =============================================================== #
|
47
|
+
# === :split_at
|
48
|
+
# =============================================================== #
|
49
|
+
if yielded.has_key?(:split_at)
|
50
|
+
split_at = yielded.delete(:split_at)
|
51
|
+
content.map! {|entry|
|
52
|
+
entry = entry.split(split_at) if entry.include?('|')
|
53
|
+
entry
|
54
|
+
}
|
55
|
+
content.flatten!
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
_ = '<table'.dup
|
62
|
+
_ << return_css_class(css_class)
|
63
|
+
_ << return_the_id(id)
|
64
|
+
_ << return_css_style(css_style)
|
65
|
+
_ << '>'
|
66
|
+
_ << "\n"
|
67
|
+
content.each_with_index { |item, index|
|
68
|
+
if index % 3 == 0
|
69
|
+
_ << '<tr>'+N+' <td>'+item+'</td>'+N
|
70
|
+
elsif index % 3 == 2
|
71
|
+
_ << ' <td>'+item+'</td>'+N+'</tr>'+N
|
72
|
+
else
|
73
|
+
_ << ' <td>'+item+'</td>'+N+N
|
74
|
+
end
|
75
|
+
}
|
76
|
+
_ << ::Cyberweb.string_ctable.to_s
|
77
|
+
end
|
78
|
+
|
79
|
+
# ========================================================================= #
|
80
|
+
# === Cyberweb.string_table2
|
81
|
+
#
|
82
|
+
# This returns the string form of a <table> tag.
|
83
|
+
#
|
84
|
+
# Arguments to this method could look like this:
|
85
|
+
#
|
86
|
+
# Cyberweb.string_table2('mars1em') { an_array_here } # To pass an array as the main dataset.
|
87
|
+
# Cyberweb.string_table2('mars1em') { [1,2,3,4,5,6] } # ^^^ as stated above
|
88
|
+
#
|
89
|
+
# ========================================================================= #
|
90
|
+
def self.string_table2(
|
26
91
|
css_class = '',
|
27
92
|
id = '',
|
28
93
|
css_style = '',
|
@@ -35,6 +100,28 @@ module Cyberweb
|
|
35
100
|
# ======================================================================= #
|
36
101
|
if block_given?
|
37
102
|
yielded = yield
|
103
|
+
if yielded.is_a? Hash
|
104
|
+
# =================================================================== #
|
105
|
+
# === :read_in_this_file
|
106
|
+
# =================================================================== #
|
107
|
+
if yielded.has_key?(:read_in_this_file)
|
108
|
+
this_file = yielded.delete(:read_in_this_file)
|
109
|
+
if File.exist? this_file
|
110
|
+
content = File.readlines(this_file, encoding: 'UTF-8')
|
111
|
+
# =============================================================== #
|
112
|
+
# === :split_at
|
113
|
+
# =============================================================== #
|
114
|
+
if yielded.has_key?(:split_at)
|
115
|
+
split_at = yielded.delete(:split_at)
|
116
|
+
content.map! {|entry|
|
117
|
+
entry = entry.split(split_at) if entry.include?('|')
|
118
|
+
entry
|
119
|
+
}
|
120
|
+
content.flatten!
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
38
125
|
# ===================================================================== #
|
39
126
|
# If content is empty then we will replace the content with the
|
40
127
|
# value of the passed block next.
|
@@ -43,38 +130,317 @@ module Cyberweb
|
|
43
130
|
content = yielded
|
44
131
|
end
|
45
132
|
end
|
133
|
+
css_class = css_class.to_s
|
134
|
+
|
46
135
|
_ = '<table'.dup
|
47
136
|
_ << return_css_class(css_class)
|
48
137
|
_ << return_the_id(id)
|
49
|
-
_ << return_css_style(css_style)
|
138
|
+
_ << return_css_style(css_style)
|
50
139
|
_ << '>'
|
51
140
|
_ << "\n"
|
52
141
|
content.each_with_index { |item, index|
|
53
|
-
|
54
|
-
|
142
|
+
if index % 2 == 0
|
143
|
+
_ << '<tr>'+N+' <td>'+item.to_s+'</td>'+N
|
144
|
+
else
|
145
|
+
_ << " <td>#{item}</td>#{N}</tr>#{N}"
|
146
|
+
end
|
147
|
+
}
|
148
|
+
_ << ::Cyberweb.string_ctable.to_s
|
149
|
+
return _
|
150
|
+
end; self.instance_eval { alias string_table string_table2 } # === Cyberweb.string_table
|
151
|
+
|
152
|
+
# ========================================================================= #
|
153
|
+
# === Cyberweb.string_table2_with_heading
|
154
|
+
#
|
155
|
+
# This variant makes use of two header-entries, via the <th> tag of the
|
156
|
+
# given table. The first two arguments passed into the content variable,
|
157
|
+
# which starts at argument #4, will become the table header.
|
158
|
+
# ========================================================================= #
|
159
|
+
def self.string_table2_with_heading(
|
160
|
+
css_class = '',
|
161
|
+
id = '',
|
162
|
+
css_style = '',
|
163
|
+
*content,
|
164
|
+
&block
|
165
|
+
)
|
166
|
+
content = content.flatten.compact # Make it more useful to our case.
|
167
|
+
# ======================================================================= #
|
168
|
+
# === Handle blocks next
|
169
|
+
# ======================================================================= #
|
170
|
+
if block_given?
|
171
|
+
yielded = yield
|
172
|
+
# ===================================================================== #
|
173
|
+
# If content is empty then we will replace the content with the
|
174
|
+
# value of the passed block next.
|
175
|
+
# ===================================================================== #
|
176
|
+
if content.empty? and !yielded.empty?
|
177
|
+
content = yielded
|
178
|
+
end
|
179
|
+
end
|
180
|
+
_ = '<table'.dup
|
181
|
+
_ << return_css_class(css_class)
|
182
|
+
_ << return_the_id(id)
|
183
|
+
_ << return_css_style(css_style)
|
184
|
+
_ << '>'
|
185
|
+
_ << "\n"
|
186
|
+
first_header = content.shift
|
187
|
+
_ << '<tr>
|
188
|
+
<th>'+first_header.to_s+'</th>'
|
189
|
+
second_header = content.shift
|
190
|
+
_ << '<th>'+second_header.to_s+'</th></tr>'
|
191
|
+
content.each_with_index { |item, index|
|
192
|
+
case index % 2
|
55
193
|
when 0
|
56
194
|
_ << '<tr>'+N+' <td>'+item+'</td>'+N
|
57
195
|
else
|
58
|
-
_ << ' <td>'+item+'</td>'+N
|
59
|
-
|
196
|
+
_ << ' <td>'+item+'</td>'+N+'</tr>'+N
|
197
|
+
end
|
198
|
+
}
|
199
|
+
_ << ::Cyberweb.string_ctable.to_s
|
200
|
+
end
|
201
|
+
|
202
|
+
# ========================================================================= #
|
203
|
+
# === Cyberweb.string_table4_with_heading
|
204
|
+
# ========================================================================= #
|
205
|
+
def self.string_table4_with_heading(
|
206
|
+
css_class = '',
|
207
|
+
id = '',
|
208
|
+
css_style = '',
|
209
|
+
*content
|
210
|
+
)
|
211
|
+
content = content.flatten.compact # Make it more useful to our case.
|
212
|
+
_ = '<table'.dup
|
213
|
+
_ << return_css_class(css_class)
|
214
|
+
_ << return_the_id(id)
|
215
|
+
_ << return_css_style(css_style)
|
216
|
+
_ << '>'
|
217
|
+
_ << "\n"
|
218
|
+
first_header = content.shift
|
219
|
+
_ << '<tr>
|
220
|
+
<th>'+first_header.to_s+'</th>'
|
221
|
+
second_header = content.shift
|
222
|
+
_ << "<th>#{second_header}</th>#{N}"
|
223
|
+
third_header = content.shift
|
224
|
+
_ << "<th>#{third_header}</th>#{N}"
|
225
|
+
fourth_header = content.shift
|
226
|
+
_ << "<th>#{fourth_header}</th>#{N}"
|
227
|
+
content.each_with_index { |item, index|
|
228
|
+
td_tag = '<td>'
|
229
|
+
if item.to_s.start_with? '#ALIGN_RIGHT#'
|
230
|
+
td_tag = '<td align="right">'
|
231
|
+
item = item.to_s.sub(/#ALIGN_RIGHT#/,'')
|
232
|
+
end
|
233
|
+
case index % 4
|
234
|
+
when 0 # New row.
|
235
|
+
_ << '<tr>'+N+' '+td_tag+item+'</td>'+N
|
236
|
+
when 3 # End row.
|
237
|
+
_ << N+' '+td_tag+item+'</td>'+N+'</tr>'
|
238
|
+
else # else it is a simple td-entry.
|
239
|
+
_ << ' '+td_tag+item+'</td>'+N
|
240
|
+
end
|
241
|
+
}
|
242
|
+
_ << ::Cyberweb.string_ctable.to_s
|
243
|
+
end
|
244
|
+
|
245
|
+
# ========================================================================= #
|
246
|
+
# === table4_with_heading
|
247
|
+
# ========================================================================= #
|
248
|
+
def table4_with_heading(
|
249
|
+
css_class = '',
|
250
|
+
id = '',
|
251
|
+
css_style = '',
|
252
|
+
*content,
|
253
|
+
&block
|
254
|
+
)
|
255
|
+
addnl(
|
256
|
+
Cyberweb.string_table4_with_heading(
|
257
|
+
css_class, id, css_style, *content, &block
|
258
|
+
)
|
259
|
+
)
|
260
|
+
end
|
261
|
+
|
262
|
+
# ========================================================================= #
|
263
|
+
# === table4
|
264
|
+
# ========================================================================= #
|
265
|
+
def table4(
|
266
|
+
css_class = '',
|
267
|
+
id = '',
|
268
|
+
css_style = '',
|
269
|
+
*content,
|
270
|
+
&block
|
271
|
+
)
|
272
|
+
customized_table(
|
273
|
+
4, css_class, id, css_style, *content, &block
|
274
|
+
)
|
275
|
+
end
|
276
|
+
|
277
|
+
# ========================================================================= #
|
278
|
+
# === Cyberweb.string_table5_with_heading
|
279
|
+
# ========================================================================= #
|
280
|
+
def self.string_table5_with_heading(
|
281
|
+
css_class = '',
|
282
|
+
id = '',
|
283
|
+
css_style = '',
|
284
|
+
*content
|
285
|
+
)
|
286
|
+
content = content.flatten.compact # Make it more useful to our case.
|
287
|
+
_ = '<table'.dup
|
288
|
+
_ << return_css_class(css_class)
|
289
|
+
_ << return_the_id(id)
|
290
|
+
_ << return_css_style(css_style)
|
291
|
+
_ << '>'
|
292
|
+
_ << "\n"
|
293
|
+
first_header = content.shift
|
294
|
+
_ << '<tr>
|
295
|
+
<th>'+first_header.to_s+'</th>'
|
296
|
+
second_header = content.shift
|
297
|
+
_ << "<th>#{second_header}</th>#{N}"
|
298
|
+
third_header = content.shift
|
299
|
+
_ << "<th>#{third_header}</th>#{N}"
|
300
|
+
fourth_header = content.shift
|
301
|
+
_ << "<th>#{fourth_header}</th>#{N}"
|
302
|
+
fifth_header = content.shift
|
303
|
+
_ << "<th>#{fifth_header}</th></tr>"
|
304
|
+
content.each_with_index { |item, index|
|
305
|
+
td_tag = '<td>'
|
306
|
+
if item.to_s.start_with? '#ALIGN_RIGHT#'
|
307
|
+
td_tag = '<td align="right">'
|
308
|
+
item = item.to_s.sub(/#ALIGN_RIGHT#/,'')
|
309
|
+
end
|
310
|
+
case index % 5
|
311
|
+
when 0 # New row.
|
312
|
+
_ << '<tr>'+N+' '+td_tag+item+'</td>'+N
|
313
|
+
when 4 # End row.
|
314
|
+
_ << N+' '+td_tag+item+'</td>'+N+'</tr>'
|
315
|
+
else # else it is a simple td-entry.
|
316
|
+
_ << ' '+td_tag+item+'</td>'+N
|
317
|
+
end
|
318
|
+
}
|
319
|
+
_ << ::Cyberweb.string_ctable.to_s
|
320
|
+
end
|
321
|
+
|
322
|
+
# ========================================================================= #
|
323
|
+
# === Cyberweb.string_table11_with_heading
|
324
|
+
# ========================================================================= #
|
325
|
+
def self.string_table11_with_heading(
|
326
|
+
css_class = '',
|
327
|
+
id = '',
|
328
|
+
css_style = '',
|
329
|
+
*content
|
330
|
+
)
|
331
|
+
content = content.flatten.compact # Make it more useful to our case.
|
332
|
+
_ = '<table'.dup
|
333
|
+
_ << return_css_class(css_class)
|
334
|
+
_ << return_the_id(id)
|
335
|
+
_ << return_css_style(css_style)
|
336
|
+
_ << '>'
|
337
|
+
_ << "\n"
|
338
|
+
first_header = content.shift
|
339
|
+
_ << '<tr>
|
340
|
+
<th>'+first_header.to_s+'</th>'
|
341
|
+
second_header = content.shift
|
342
|
+
_ << "<th>#{second_header}</th>#{N}"
|
343
|
+
third_header = content.shift
|
344
|
+
_ << "<th>#{third_header}</th>#{N}"
|
345
|
+
fourth_header = content.shift
|
346
|
+
_ << "<th>#{fourth_header}</th>#{N}"
|
347
|
+
fifth_header = content.shift
|
348
|
+
_ << "<th>#{fifth_header}</th>#{N}"
|
349
|
+
header_six = content.shift
|
350
|
+
_ << "<th>#{header_six}</th>#{N}"
|
351
|
+
header_seven = content.shift
|
352
|
+
_ << "<th>#{header_seven}</th>#{N}"
|
353
|
+
header_eight = content.shift
|
354
|
+
_ << "<th>#{header_eight}</th>#{N}"
|
355
|
+
header_nine = content.shift
|
356
|
+
_ << "<th>#{header_nine}</th>#{N}"
|
357
|
+
header_ten = content.shift
|
358
|
+
_ << "<th>#{header_ten}</th>#{N}"
|
359
|
+
header_eleven = content.shift
|
360
|
+
_ << "<th>#{header_eleven}</th></tr>"
|
361
|
+
content.each_with_index { |item, index|
|
362
|
+
td_tag = '<td>'
|
363
|
+
if item.to_s.start_with? '#ALIGN_RIGHT#'
|
364
|
+
td_tag = '<td align="right">'
|
365
|
+
item = item.to_s.sub(/#ALIGN_RIGHT#/,'')
|
366
|
+
end
|
367
|
+
case index % 11
|
368
|
+
when 0 # New row.
|
369
|
+
_ << '<tr>'+N+' '+td_tag+item+'</td>'+N
|
370
|
+
when 10 # End row.
|
371
|
+
_ << N+' '+td_tag+item+'</td>'+N+'</tr>'
|
372
|
+
else # else it is a simple td-entry.
|
373
|
+
_ << ' '+td_tag+item+'</td>'+N
|
374
|
+
end
|
375
|
+
}
|
376
|
+
_ << ::Cyberweb.string_ctable.to_s
|
377
|
+
end
|
378
|
+
|
379
|
+
# ========================================================================= #
|
380
|
+
# === Cyberweb.string_table12_with_heading
|
381
|
+
# ========================================================================= #
|
382
|
+
def self.string_table12_with_heading(
|
383
|
+
css_class = '',
|
384
|
+
id = '',
|
385
|
+
css_style = '',
|
386
|
+
*content
|
387
|
+
)
|
388
|
+
content = content.flatten.compact # Make it more useful to our case.
|
389
|
+
_ = '<table'.dup
|
390
|
+
_ << return_css_class(css_class)
|
391
|
+
_ << return_the_id(id)
|
392
|
+
_ << return_css_style(css_style)
|
393
|
+
_ << '>'
|
394
|
+
_ << "\n"
|
395
|
+
first_header = content.shift
|
396
|
+
_ << '<tr>
|
397
|
+
<th>'+first_header.to_s+'</th>'
|
398
|
+
second_header = content.shift
|
399
|
+
_ << "<th>#{second_header}</th>#{N}"
|
400
|
+
third_header = content.shift
|
401
|
+
_ << "<th>#{third_header}</th>#{N}"
|
402
|
+
fourth_header = content.shift
|
403
|
+
_ << "<th>#{fourth_header}</th>#{N}"
|
404
|
+
fifth_header = content.shift
|
405
|
+
_ << "<th>#{fifth_header}</th>#{N}"
|
406
|
+
header_six = content.shift
|
407
|
+
_ << "<th>#{header_six}</th>#{N}"
|
408
|
+
header_seven = content.shift
|
409
|
+
_ << "<th>#{header_seven}</th>#{N}"
|
410
|
+
header_eight = content.shift
|
411
|
+
_ << "<th>#{header_eight}</th>#{N}"
|
412
|
+
header_nine = content.shift
|
413
|
+
_ << "<th>#{header_nine}</th>#{N}"
|
414
|
+
header_ten = content.shift
|
415
|
+
_ << "<th>#{header_ten}</th>#{N}"
|
416
|
+
header_eleven = content.shift
|
417
|
+
_ << "<th>#{header_eleven}</th>#{N}"
|
418
|
+
header_twelve = content.shift
|
419
|
+
_ << "<th>#{header_twelve}</th></tr>"
|
420
|
+
content.each_with_index { |item, index|
|
421
|
+
td_tag = '<td>'
|
422
|
+
if item.to_s.start_with? '#ALIGN_RIGHT#'
|
423
|
+
td_tag = '<td align="right">'
|
424
|
+
item = item.to_s.sub(/#ALIGN_RIGHT#/,'')
|
425
|
+
end
|
426
|
+
case index % 12
|
427
|
+
when 0 # New row.
|
428
|
+
_ << '<tr>'+N+' '+td_tag+item+'</td>'+N
|
429
|
+
when 11 # End row.
|
430
|
+
_ << N+' '+td_tag+item+'</td>'+N+'</tr>'
|
431
|
+
else # else it is a simple td-entry.
|
432
|
+
_ << ' '+td_tag+item+'</td>'+N
|
60
433
|
end
|
61
434
|
}
|
62
435
|
_ << ::Cyberweb.string_ctable.to_s
|
63
|
-
return _
|
64
436
|
end
|
65
437
|
|
66
438
|
# ========================================================================= #
|
67
|
-
# === Cyberweb.
|
439
|
+
# === Cyberweb.string_table4
|
68
440
|
#
|
69
441
|
# This returns the string form of a <table> tag.
|
70
|
-
#
|
71
|
-
# Arguments to this method could look like this:
|
72
|
-
#
|
73
|
-
# Cyberweb.string_table2('mars1em') { an_array_here } # To pass an array as the main dataset.
|
74
|
-
# Cyberweb.string_table2('mars1em') { [1,2,3,4,5,6] } # ^^^ as stated above
|
75
|
-
#
|
76
442
|
# ========================================================================= #
|
77
|
-
def self.
|
443
|
+
def self.string_table4(
|
78
444
|
css_class = '',
|
79
445
|
id = '',
|
80
446
|
css_style = '',
|
@@ -95,24 +461,25 @@ module Cyberweb
|
|
95
461
|
content = yielded
|
96
462
|
end
|
97
463
|
end
|
98
|
-
css_class = css_class.to_s
|
99
|
-
|
100
464
|
_ = '<table'.dup
|
101
465
|
_ << return_css_class(css_class)
|
102
466
|
_ << return_the_id(id)
|
103
|
-
_ << return_css_style(css_style)
|
467
|
+
_ << return_css_style(css_style) unless css_style.empty?
|
104
468
|
_ << '>'
|
105
469
|
_ << "\n"
|
106
470
|
content.each_with_index { |item, index|
|
107
|
-
|
108
|
-
|
471
|
+
position = (index % 4)
|
472
|
+
case position
|
473
|
+
when 0
|
474
|
+
_ << '<tr>'+N+' <td>'+item+'</td>'+N
|
109
475
|
else
|
110
|
-
_ << " <td>#{item}</td>#{N}
|
476
|
+
_ << " <td>#{item}</td>#{N}"
|
477
|
+
_ << '</tr>'+N if position == 3
|
111
478
|
end
|
112
479
|
}
|
113
480
|
_ << ::Cyberweb.string_ctable.to_s
|
114
481
|
return _
|
115
|
-
end
|
482
|
+
end
|
116
483
|
|
117
484
|
# ========================================================================= #
|
118
485
|
# === Cyberweb.string_table7
|
@@ -134,7 +501,7 @@ module Cyberweb
|
|
134
501
|
result = index % 7
|
135
502
|
_ << '<tr>'+N if result == 0 # 0 means to add a '<tr>' tag first.
|
136
503
|
# when 0, 1, 2, 3, 4, 5, 6
|
137
|
-
_ <<
|
504
|
+
_ << "<td>#{item}</td>#{N}"
|
138
505
|
_ << '</tr>'+N if result == 6 # This must be 1 less.
|
139
506
|
}
|
140
507
|
_ << ::Cyberweb.string_ctable.to_s
|
@@ -170,21 +537,6 @@ module Cyberweb
|
|
170
537
|
return _
|
171
538
|
end
|
172
539
|
|
173
|
-
# ========================================================================= #
|
174
|
-
# === table4
|
175
|
-
# ========================================================================= #
|
176
|
-
def table4(
|
177
|
-
css_class = '',
|
178
|
-
id = '',
|
179
|
-
css_style = '',
|
180
|
-
*content,
|
181
|
-
&block
|
182
|
-
)
|
183
|
-
customized_table(
|
184
|
-
4, css_class, id, css_style, *content, &block
|
185
|
-
)
|
186
|
-
end
|
187
|
-
|
188
540
|
# ========================================================================= #
|
189
541
|
# === customized_table (customized_table tag)
|
190
542
|
#
|
@@ -267,41 +619,13 @@ module Cyberweb
|
|
267
619
|
css_class = '',
|
268
620
|
id = '',
|
269
621
|
css_style = '',
|
270
|
-
*content
|
622
|
+
*content,
|
623
|
+
&block
|
271
624
|
)
|
272
625
|
::Cyberweb.string_table3(
|
273
|
-
css_class, id, css_style, *content
|
274
|
-
|
275
|
-
end
|
276
|
-
|
277
|
-
# ========================================================================= #
|
278
|
-
# === Cyberweb.string_table3
|
279
|
-
#
|
280
|
-
# This returns the string form of a <table> tag.
|
281
|
-
# ========================================================================= #
|
282
|
-
def self.string_table3(
|
283
|
-
css_class = '',
|
284
|
-
id = '',
|
285
|
-
css_style = '',
|
286
|
-
*content
|
626
|
+
css_class, id, css_style, *content,
|
627
|
+
&block
|
287
628
|
)
|
288
|
-
content = content.flatten.compact # Make it more useful to our case.
|
289
|
-
_ = '<table'.dup
|
290
|
-
_ << return_css_class(css_class)
|
291
|
-
_ << return_the_id(id)
|
292
|
-
_ << return_css_style(css_style)
|
293
|
-
_ << '>'
|
294
|
-
_ << "\n"
|
295
|
-
content.each_with_index { |item, index|
|
296
|
-
if index % 3 == 0
|
297
|
-
_ << '<tr>'+N+' <td>'+item+'</td>'+N
|
298
|
-
elsif index % 3 == 2
|
299
|
-
_ << ' <td>'+item+'</td>'+N+'</tr>'+N
|
300
|
-
else
|
301
|
-
_ << ' <td>'+item+'</td>'+N+N
|
302
|
-
end
|
303
|
-
}
|
304
|
-
_ << ::Cyberweb.string_ctable.to_s
|
305
629
|
end
|
306
630
|
|
307
631
|
# ========================================================================= #
|
@@ -378,7 +702,8 @@ module Cyberweb
|
|
378
702
|
_ = ''.dup # Our return string. We will build it up next.
|
379
703
|
_ << '<table>'
|
380
704
|
yielded.each {|line|
|
381
|
-
_ << '<tr><td>'+
|
705
|
+
_ << '<tr><td>'+
|
706
|
+
line.join('</td><td>')+'</td></tr>'+N
|
382
707
|
}
|
383
708
|
_ << '</table>'
|
384
709
|
return _
|
@@ -391,7 +716,10 @@ module Cyberweb
|
|
391
716
|
# variable called :use_headers.
|
392
717
|
# ========================================================================= #
|
393
718
|
def table2_with_headers(
|
394
|
-
css_class = '',
|
719
|
+
css_class = '',
|
720
|
+
id = '',
|
721
|
+
css_style = '',
|
722
|
+
*content
|
395
723
|
)
|
396
724
|
customized_table(
|
397
725
|
2, css_class, id, css_style, *content
|
@@ -570,63 +898,6 @@ module Cyberweb
|
|
570
898
|
::Cyberweb.string_table11_with_heading(css_class, id, css_style, *content)
|
571
899
|
end
|
572
900
|
|
573
|
-
# ========================================================================= #
|
574
|
-
# === Cyberweb.string_table11_with_heading
|
575
|
-
# ========================================================================= #
|
576
|
-
def self.string_table11_with_heading(
|
577
|
-
css_class = '',
|
578
|
-
id = '',
|
579
|
-
css_style = '',
|
580
|
-
*content
|
581
|
-
)
|
582
|
-
content = content.flatten.compact # Make it more useful to our case.
|
583
|
-
_ = '<table'.dup
|
584
|
-
_ << return_css_class(css_class)
|
585
|
-
_ << return_the_id(id)
|
586
|
-
_ << return_css_style(css_style)
|
587
|
-
_ << '>'
|
588
|
-
_ << "\n"
|
589
|
-
first_header = content.shift
|
590
|
-
_ << '<tr>
|
591
|
-
<th>'+first_header.to_s+'</th>'
|
592
|
-
second_header = content.shift
|
593
|
-
_ << "<th>#{second_header}</th>"
|
594
|
-
third_header = content.shift
|
595
|
-
_ << "<th>#{third_header}</th>"
|
596
|
-
fourth_header = content.shift
|
597
|
-
_ << "<th>#{fourth_header}</th>"
|
598
|
-
fifth_header = content.shift
|
599
|
-
_ << "<th>#{fifth_header}</th>"
|
600
|
-
header_six = content.shift
|
601
|
-
_ << "<th>#{header_six}</th>"
|
602
|
-
header_seven = content.shift
|
603
|
-
_ << "<th>#{header_seven}</th>"
|
604
|
-
header_eight = content.shift
|
605
|
-
_ << "<th>#{header_eight}</th>"
|
606
|
-
header_nine = content.shift
|
607
|
-
_ << "<th>#{header_nine}</th>"
|
608
|
-
header_ten = content.shift
|
609
|
-
_ << "<th>#{header_ten}</th>"
|
610
|
-
header_eleven = content.shift
|
611
|
-
_ << "<th>#{header_eleven}</th></tr>"
|
612
|
-
content.each_with_index { |item, index|
|
613
|
-
td_tag = '<td>'
|
614
|
-
if item.to_s.start_with? '#ALIGN_RIGHT#'
|
615
|
-
td_tag = '<td align="right">'
|
616
|
-
item = item.to_s.sub(/#ALIGN_RIGHT#/,'')
|
617
|
-
end
|
618
|
-
case index % 11
|
619
|
-
when 0 # New row.
|
620
|
-
_ << '<tr>'+N+' '+td_tag+item+'</td>'+N
|
621
|
-
when 10 # End row.
|
622
|
-
_ << N+' '+td_tag+item+'</td>'+N+'</tr>'
|
623
|
-
else # else it is a simple td-entry.
|
624
|
-
_ << ' '+td_tag+item+'</td>'+N
|
625
|
-
end
|
626
|
-
}
|
627
|
-
_ << ::Cyberweb.string_ctable.to_s
|
628
|
-
end
|
629
|
-
|
630
901
|
# ========================================================================= #
|
631
902
|
# === string_table12_with_heading
|
632
903
|
# ========================================================================= #
|
@@ -641,65 +912,6 @@ module Cyberweb
|
|
641
912
|
)
|
642
913
|
end
|
643
914
|
|
644
|
-
# ========================================================================= #
|
645
|
-
# === Cyberweb.string_table12_with_heading
|
646
|
-
# ========================================================================= #
|
647
|
-
def self.string_table12_with_heading(
|
648
|
-
css_class = '',
|
649
|
-
id = '',
|
650
|
-
css_style = '',
|
651
|
-
*content
|
652
|
-
)
|
653
|
-
content = content.flatten.compact # Make it more useful to our case.
|
654
|
-
_ = '<table'.dup
|
655
|
-
_ << return_css_class(css_class)
|
656
|
-
_ << return_the_id(id)
|
657
|
-
_ << return_css_style(css_style)
|
658
|
-
_ << '>'
|
659
|
-
_ << "\n"
|
660
|
-
first_header = content.shift
|
661
|
-
_ << '<tr>
|
662
|
-
<th>'+first_header.to_s+'</th>'
|
663
|
-
second_header = content.shift
|
664
|
-
_ << "<th>#{second_header}</th>"
|
665
|
-
third_header = content.shift
|
666
|
-
_ << "<th>#{third_header}</th>"
|
667
|
-
fourth_header = content.shift
|
668
|
-
_ << "<th>#{fourth_header}</th>"
|
669
|
-
fifth_header = content.shift
|
670
|
-
_ << "<th>#{fifth_header}</th>"
|
671
|
-
header_six = content.shift
|
672
|
-
_ << "<th>#{header_six}</th>"
|
673
|
-
header_seven = content.shift
|
674
|
-
_ << "<th>#{header_seven}</th>"
|
675
|
-
header_eight = content.shift
|
676
|
-
_ << "<th>#{header_eight}</th>"
|
677
|
-
header_nine = content.shift
|
678
|
-
_ << "<th>#{header_nine}</th>"
|
679
|
-
header_ten = content.shift
|
680
|
-
_ << "<th>#{header_ten}</th>"
|
681
|
-
header_eleven = content.shift
|
682
|
-
_ << "<th>#{header_eleven}</th>"
|
683
|
-
header_twelve = content.shift
|
684
|
-
_ << "<th>#{header_twelve}</th></tr>"
|
685
|
-
content.each_with_index { |item, index|
|
686
|
-
td_tag = '<td>'
|
687
|
-
if item.to_s.start_with? '#ALIGN_RIGHT#'
|
688
|
-
td_tag = '<td align="right">'
|
689
|
-
item = item.to_s.sub(/#ALIGN_RIGHT#/,'')
|
690
|
-
end
|
691
|
-
case index % 12
|
692
|
-
when 0 # New row.
|
693
|
-
_ << '<tr>'+N+' '+td_tag+item+'</td>'+N
|
694
|
-
when 11 # End row.
|
695
|
-
_ << N+' '+td_tag+item+'</td>'+N+'</tr>'
|
696
|
-
else # else it is a simple td-entry.
|
697
|
-
_ << ' '+td_tag+item+'</td>'+N
|
698
|
-
end
|
699
|
-
}
|
700
|
-
_ << ::Cyberweb.string_ctable.to_s
|
701
|
-
end
|
702
|
-
|
703
915
|
# ========================================================================= #
|
704
916
|
# === string_table5_with_heading
|
705
917
|
# ========================================================================= #
|
@@ -712,51 +924,6 @@ module Cyberweb
|
|
712
924
|
::Cyberweb.string_table5_with_heading(css_class, id, css_style, *content)
|
713
925
|
end
|
714
926
|
|
715
|
-
# ========================================================================= #
|
716
|
-
# === Cyberweb.string_table5_with_heading
|
717
|
-
# ========================================================================= #
|
718
|
-
def self.string_table5_with_heading(
|
719
|
-
css_class = '',
|
720
|
-
id = '',
|
721
|
-
css_style = '',
|
722
|
-
*content
|
723
|
-
)
|
724
|
-
content = content.flatten.compact # Make it more useful to our case.
|
725
|
-
_ = '<table'.dup
|
726
|
-
_ << return_css_class(css_class)
|
727
|
-
_ << return_the_id(id)
|
728
|
-
_ << return_css_style(css_style)
|
729
|
-
_ << '>'
|
730
|
-
_ << "\n"
|
731
|
-
first_header = content.shift
|
732
|
-
_ << '<tr>
|
733
|
-
<th>'+first_header.to_s+'</th>'
|
734
|
-
second_header = content.shift
|
735
|
-
_ << "<th>#{second_header}</th>"
|
736
|
-
third_header = content.shift
|
737
|
-
_ << "<th>#{third_header}</th>"
|
738
|
-
fourth_header = content.shift
|
739
|
-
_ << "<th>#{fourth_header}</th>"
|
740
|
-
fifth_header = content.shift
|
741
|
-
_ << "<th>#{fifth_header}</th></tr>"
|
742
|
-
content.each_with_index { |item, index|
|
743
|
-
td_tag = '<td>'
|
744
|
-
if item.to_s.start_with? '#ALIGN_RIGHT#'
|
745
|
-
td_tag = '<td align="right">'
|
746
|
-
item = item.to_s.sub(/#ALIGN_RIGHT#/,'')
|
747
|
-
end
|
748
|
-
case index % 5
|
749
|
-
when 0 # New row.
|
750
|
-
_ << '<tr>'+N+' '+td_tag+item+'</td>'+N
|
751
|
-
when 4 # End row.
|
752
|
-
_ << N+' '+td_tag+item+'</td>'+N+'</tr>'
|
753
|
-
else # else it is a simple td-entry.
|
754
|
-
_ << ' '+td_tag+item+'</td>'+N
|
755
|
-
end
|
756
|
-
}
|
757
|
-
_ << ::Cyberweb.string_ctable.to_s
|
758
|
-
end
|
759
|
-
|
760
927
|
# ========================================================================= #
|
761
928
|
# === string_table2_with_heading
|
762
929
|
# ========================================================================= #
|
@@ -769,38 +936,6 @@ module Cyberweb
|
|
769
936
|
::Cyberweb.string_table2_with_heading(css_class, id, css_style, *content)
|
770
937
|
end
|
771
938
|
|
772
|
-
# ========================================================================= #
|
773
|
-
# === Cyberweb.string_table2_with_heading
|
774
|
-
# ========================================================================= #
|
775
|
-
def self.string_table2_with_heading(
|
776
|
-
css_class = '',
|
777
|
-
id = '',
|
778
|
-
css_style = '',
|
779
|
-
*content
|
780
|
-
)
|
781
|
-
content = content.flatten.compact # Make it more useful to our case.
|
782
|
-
_ = '<table'.dup
|
783
|
-
_ << return_css_class(css_class)
|
784
|
-
_ << return_the_id(id)
|
785
|
-
_ << return_css_style(css_style)
|
786
|
-
_ << '>'
|
787
|
-
_ << "\n"
|
788
|
-
first_header = content.shift
|
789
|
-
_ << '<tr>
|
790
|
-
<th>'+first_header.to_s+'</th>'
|
791
|
-
second_header = content.shift
|
792
|
-
_ << '<th>'+second_header.to_s+'</th></tr>'
|
793
|
-
content.each_with_index { |item, index|
|
794
|
-
case index % 2
|
795
|
-
when 0
|
796
|
-
_ << '<tr>'+N+' <td>'+item+'</td>'+N
|
797
|
-
else
|
798
|
-
_ << ' <td>'+item+'</td>'+N+'</tr>'+N
|
799
|
-
end
|
800
|
-
}
|
801
|
-
_ << ::Cyberweb.string_ctable.to_s
|
802
|
-
end
|
803
|
-
|
804
939
|
# ========================================================================= #
|
805
940
|
# === string_table4
|
806
941
|
#
|