cyberweb 0.8.17 → 0.9.31

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of cyberweb might be problematic. Click here for more details.

Files changed (419) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +274 -86
  3. data/cyberweb.gemspec +0 -3
  4. data/doc/README.gen +273 -85
  5. data/doc/todo/todo_for_the_cyberweb_project.md +100 -99
  6. data/examples/advanced/draw_circle/draw_circle.cgi +2 -2
  7. data/examples/advanced/simple_calculator.cgi +4 -4
  8. data/examples/css/animated_dodecahedron_example/animated_dodecahedron_example.html +107 -0
  9. data/examples/css/animated_police_box/animated_police_box.html +639 -0
  10. data/examples/css/animated_solar_system/animated_solar_system.html +168 -0
  11. data/examples/css/animated_solar_system/css/styles.css +1592 -0
  12. data/examples/css/animated_solar_system/img/bg-glow.png +0 -0
  13. data/examples/css/animated_solar_system/img/bg-stars.png +0 -0
  14. data/examples/css/animated_solar_system/img/p-earth.png +0 -0
  15. data/examples/css/animated_solar_system/img/p-jupiter.png +0 -0
  16. data/examples/css/animated_solar_system/img/p-mars.png +0 -0
  17. data/examples/css/animated_solar_system/img/p-mercury.png +0 -0
  18. data/examples/css/animated_solar_system/img/p-neptune.png +0 -0
  19. data/examples/css/animated_solar_system/img/p-saturn.png +0 -0
  20. data/examples/css/animated_solar_system/img/p-uranus.png +0 -0
  21. data/examples/css/animated_solar_system/img/p-venus.png +0 -0
  22. data/examples/css/animated_solar_system/img/sun.png +0 -0
  23. data/examples/css/animated_solar_system/js/jquery.min.js +4 -0
  24. data/examples/css/animated_solar_system/js/scripts.js +42 -0
  25. data/examples/css/animated_solar_system/js/scripts.min.js +1 -0
  26. data/examples/css/dozing_bird_example/dozing_bird_example.html +358 -0
  27. data/examples/css/planet_earth_is_rotating/planet_earth_is_rotating.html +130 -0
  28. data/examples/css/simpler_css_clock/simpler_css_clock.html +125 -0
  29. data/examples/html/{href_examples.html → href_examples/href_examples.html} +5 -2
  30. data/examples/html/href_in_pre_tag/href_in_pre_tag.html +39 -0
  31. data/examples/javascript_and_jquery/toggle_visibility_of_elements/toggle_visibility_of_elements.html +35 -0
  32. data/examples/simple/toggle_visibility_example/toggle_visibility_example.cgi +36 -0
  33. data/images/cyberweb_theme.png +0 -0
  34. data/lib/cyberweb/base/misc.rb +20 -13
  35. data/lib/cyberweb/cascading_style_sheets/border.css +61 -49
  36. data/lib/cyberweb/cascading_style_sheets/default.css +17 -8
  37. data/lib/cyberweb/cascading_style_sheets/fonts.css +6 -2
  38. data/lib/cyberweb/cascading_style_sheets/glow_effects.css +5 -5
  39. data/lib/cyberweb/cascading_style_sheets/hover.css +13 -5
  40. data/lib/cyberweb/cascading_style_sheets/margin.css +3 -0
  41. data/lib/cyberweb/cmd/README.md +2 -0
  42. data/lib/cyberweb/cmd/cmd.rb +601 -0
  43. data/lib/cyberweb/constants/constants.rb +16 -0
  44. data/lib/cyberweb/generator/cgi.rb +2 -2
  45. data/lib/cyberweb/html_tags/textarea.rb +54 -23
  46. data/lib/cyberweb/images/standard_images/ADMIN.png +0 -0
  47. data/lib/cyberweb/images/standard_images/AMBULANZ.png +0 -0
  48. data/lib/cyberweb/images/standard_images/ANGRY_SMILEY.png +0 -0
  49. data/lib/cyberweb/images/standard_images/APPROVE.png +0 -0
  50. data/lib/cyberweb/images/standard_images/ARROW_LEFT.png +0 -0
  51. data/lib/cyberweb/images/standard_images/ARROW_RIGHT.png +0 -0
  52. data/lib/cyberweb/images/standard_images/ARROW_TOOLTIP.gif +0 -0
  53. data/lib/cyberweb/images/standard_images/AUSRUFUNGSZEICHEN.png +0 -0
  54. data/lib/cyberweb/images/standard_images/AUSRUFUNGSZEICHEN2.png +0 -0
  55. data/lib/cyberweb/images/standard_images/AUSRUFUNGSZEICHEN3.png +0 -0
  56. data/lib/cyberweb/images/standard_images/AUSRUFUNGSZEICHEN4.png +0 -0
  57. data/lib/cyberweb/images/standard_images/AUSTRIA_FAHNE.jpg +0 -0
  58. data/lib/cyberweb/images/standard_images/AWARD.png +0 -0
  59. data/lib/cyberweb/images/standard_images/AXE.png +0 -0
  60. data/lib/cyberweb/images/standard_images/BACKUP_IMAGE.png +0 -0
  61. data/lib/cyberweb/images/standard_images/BAGGER.png +0 -0
  62. data/lib/cyberweb/images/standard_images/BARS.gif +0 -0
  63. data/lib/cyberweb/images/standard_images/BEGINNER.jpg +0 -0
  64. data/lib/cyberweb/images/standard_images/BEWERTUNG_1.png +0 -0
  65. data/lib/cyberweb/images/standard_images/BEWERTUNG_2.png +0 -0
  66. data/lib/cyberweb/images/standard_images/BEWERTUNG_3.png +0 -0
  67. data/lib/cyberweb/images/standard_images/BEWERTUNG_4.png +0 -0
  68. data/lib/cyberweb/images/standard_images/BEWERTUNG_5.png +0 -0
  69. data/lib/cyberweb/images/standard_images/BEWERTUNG_6.png +0 -0
  70. data/lib/cyberweb/images/standard_images/BIG_STAR.png +0 -0
  71. data/lib/cyberweb/images/standard_images/BIKE.png +0 -0
  72. data/lib/cyberweb/images/standard_images/BIO.png +0 -0
  73. data/lib/cyberweb/images/standard_images/BIOS.gif +0 -0
  74. data/lib/cyberweb/images/standard_images/BLOB.png +0 -0
  75. data/lib/cyberweb/images/standard_images/BLOG.png +0 -0
  76. data/lib/cyberweb/images/standard_images/BLUEARROW.png +0 -0
  77. data/lib/cyberweb/images/standard_images/BLUE_HEAD.gif +0 -0
  78. data/lib/cyberweb/images/standard_images/BLUE_PILL.png +0 -0
  79. data/lib/cyberweb/images/standard_images/BLUME.png +0 -0
  80. data/lib/cyberweb/images/standard_images/BOHRER.png +0 -0
  81. data/lib/cyberweb/images/standard_images/BOOK_CLOSED.png +0 -0
  82. data/lib/cyberweb/images/standard_images/BOOK_OPENED.png +0 -0
  83. data/lib/cyberweb/images/standard_images/BUBBLE.png +0 -0
  84. data/lib/cyberweb/images/standard_images/BUECHER.jpg +0 -0
  85. data/lib/cyberweb/images/standard_images/BUERO_KLAMMER.png +0 -0
  86. data/lib/cyberweb/images/standard_images/BUSINESS.png +0 -0
  87. data/lib/cyberweb/images/standard_images/BUTTON1.gif +0 -0
  88. data/lib/cyberweb/images/standard_images/CAMERA.png +0 -0
  89. data/lib/cyberweb/images/standard_images/CAT.png +0 -0
  90. data/lib/cyberweb/images/standard_images/CAUTION.png +0 -0
  91. data/lib/cyberweb/images/standard_images/CHAOTIC_IMAGE.png +0 -0
  92. data/lib/cyberweb/images/standard_images/CHECKBOX_OFF.png +0 -0
  93. data/lib/cyberweb/images/standard_images/CHECKBOX_ON.png +0 -0
  94. data/lib/cyberweb/images/standard_images/CHEERING_PERSON.png +0 -0
  95. data/lib/cyberweb/images/standard_images/CLOSED.png +0 -0
  96. data/lib/cyberweb/images/standard_images/COMMAND_ICO.png +0 -0
  97. data/lib/cyberweb/images/standard_images/COMPLEX.png +0 -0
  98. data/lib/cyberweb/images/standard_images/COMPONENTS.png +0 -0
  99. data/lib/cyberweb/images/standard_images/COMPUTER.png +0 -0
  100. data/lib/cyberweb/images/standard_images/CONNECTED.png +0 -0
  101. data/lib/cyberweb/images/standard_images/CONTACT.png +0 -0
  102. data/lib/cyberweb/images/standard_images/COPY.png +0 -0
  103. data/lib/cyberweb/images/standard_images/CSS.png +0 -0
  104. data/lib/cyberweb/images/standard_images/CURSOR.png +0 -0
  105. data/lib/cyberweb/images/standard_images/CUTE_BUBBA.png +0 -0
  106. data/lib/cyberweb/images/standard_images/CUTE_MOUSE.png +0 -0
  107. data/lib/cyberweb/images/standard_images/DEVELOP.png +0 -0
  108. data/lib/cyberweb/images/standard_images/DIAMOND_SHELL.png +0 -0
  109. data/lib/cyberweb/images/standard_images/DIE_PERFEKTE_AUSBILDUNG.png +0 -0
  110. data/lib/cyberweb/images/standard_images/DOCUMENTATION.png +0 -0
  111. data/lib/cyberweb/images/standard_images/DOKUMENT.png +0 -0
  112. data/lib/cyberweb/images/standard_images/DOT_01.png +0 -0
  113. data/lib/cyberweb/images/standard_images/DOT_02.png +0 -0
  114. data/lib/cyberweb/images/standard_images/DOT_03.png +0 -0
  115. data/lib/cyberweb/images/standard_images/DOT_04.png +0 -0
  116. data/lib/cyberweb/images/standard_images/DOT_05.png +0 -0
  117. data/lib/cyberweb/images/standard_images/DOT_06.png +0 -0
  118. data/lib/cyberweb/images/standard_images/DOT_07.png +0 -0
  119. data/lib/cyberweb/images/standard_images/DOT_08.png +0 -0
  120. data/lib/cyberweb/images/standard_images/DOT_09.png +0 -0
  121. data/lib/cyberweb/images/standard_images/DOT_10.png +0 -0
  122. data/lib/cyberweb/images/standard_images/DOT_11.png +0 -0
  123. data/lib/cyberweb/images/standard_images/DOT_12.png +0 -0
  124. data/lib/cyberweb/images/standard_images/DOWNLOAD.png +0 -0
  125. data/lib/cyberweb/images/standard_images/DOWNLOAD2.png +0 -0
  126. data/lib/cyberweb/images/standard_images/DOWNLOAD_PACKAGE.png +0 -0
  127. data/lib/cyberweb/images/standard_images/DUCK.png +0 -0
  128. data/lib/cyberweb/images/standard_images/DUCKY.png +0 -0
  129. data/lib/cyberweb/images/standard_images/EINKAUFSKORB.png +0 -0
  130. data/lib/cyberweb/images/standard_images/EINKAUFSWAGEN.png +0 -0
  131. data/lib/cyberweb/images/standard_images/ELLIPSE.png +0 -0
  132. data/lib/cyberweb/images/standard_images/EMAIL_FANCY.png +0 -0
  133. data/lib/cyberweb/images/standard_images/EMAIL_FAVICON.png +0 -0
  134. data/lib/cyberweb/images/standard_images/EMAIL_FAVICON.xpm +176 -0
  135. data/lib/cyberweb/images/standard_images/ENGLISH.jpg +0 -0
  136. data/lib/cyberweb/images/standard_images/ERRORS.png +0 -0
  137. data/lib/cyberweb/images/standard_images/EURO.png +0 -0
  138. data/lib/cyberweb/images/standard_images/EVAL/01_STAR.png +0 -0
  139. data/lib/cyberweb/images/standard_images/EVAL/02_STAR.png +0 -0
  140. data/lib/cyberweb/images/standard_images/EVAL/03_STAR.png +0 -0
  141. data/lib/cyberweb/images/standard_images/EVAL/04_STAR.png +0 -0
  142. data/lib/cyberweb/images/standard_images/EVAL/05_STAR.png +0 -0
  143. data/lib/cyberweb/images/standard_images/EVAL/0x_STAR.png +0 -0
  144. data/lib/cyberweb/images/standard_images/EVAL/1x_STAR.png +0 -0
  145. data/lib/cyberweb/images/standard_images/EVAL/2x_STAR.png +0 -0
  146. data/lib/cyberweb/images/standard_images/EVAL/3x_STAR.png +0 -0
  147. data/lib/cyberweb/images/standard_images/EVAL/4x_STAR.png +0 -0
  148. data/lib/cyberweb/images/standard_images/EXTERNAL_LINK.png +0 -0
  149. data/lib/cyberweb/images/standard_images/EYE.png +0 -0
  150. data/lib/cyberweb/images/standard_images/FAQ.png +0 -0
  151. data/lib/cyberweb/images/standard_images/FERNGLAS.png +0 -0
  152. data/lib/cyberweb/images/standard_images/FLOWER_1.png +0 -0
  153. data/lib/cyberweb/images/standard_images/FLOWER_2.png +0 -0
  154. data/lib/cyberweb/images/standard_images/FLUGZEUG1.jpg +0 -0
  155. data/lib/cyberweb/images/standard_images/FOLDER.png +0 -0
  156. data/lib/cyberweb/images/standard_images/FORK.png +0 -0
  157. data/lib/cyberweb/images/standard_images/FORUM.png +0 -0
  158. data/lib/cyberweb/images/standard_images/FOTOAPPARAT.png +0 -0
  159. data/lib/cyberweb/images/standard_images/FOTO_FAVICON.png +0 -0
  160. data/lib/cyberweb/images/standard_images/FRAGEZEICHEN.jpg +0 -0
  161. data/lib/cyberweb/images/standard_images/FTP.png +0 -0
  162. data/lib/cyberweb/images/standard_images/FUNNY_ELEPHANT.png +0 -0
  163. data/lib/cyberweb/images/standard_images/FUSSBALL.png +0 -0
  164. data/lib/cyberweb/images/standard_images/F/303/204CHER.png +0 -0
  165. data/lib/cyberweb/images/standard_images/GATEWAY.png +0 -0
  166. data/lib/cyberweb/images/standard_images/GB.jpg +0 -0
  167. data/lib/cyberweb/images/standard_images/GENDER_ICON_FEMALE.png +0 -0
  168. data/lib/cyberweb/images/standard_images/GENDER_ICON_MALE.png +0 -0
  169. data/lib/cyberweb/images/standard_images/GERMANY_FLAG.png +0 -0
  170. data/lib/cyberweb/images/standard_images/GERSTE.png +0 -0
  171. data/lib/cyberweb/images/standard_images/GESCHENKBOX.png +0 -0
  172. data/lib/cyberweb/images/standard_images/GET_HELP.png +0 -0
  173. data/lib/cyberweb/images/standard_images/GITARRE.png +0 -0
  174. data/lib/cyberweb/images/standard_images/GOOGLE.png +0 -0
  175. data/lib/cyberweb/images/standard_images/GORILLA.gif +0 -0
  176. data/lib/cyberweb/images/standard_images/GOTHIC_SPACER.png +0 -0
  177. data/lib/cyberweb/images/standard_images/GRADIENT_FILL.gif +0 -0
  178. data/lib/cyberweb/images/standard_images/GRAFIK_SMALL.png +0 -0
  179. data/lib/cyberweb/images/standard_images/GRID_LAYOUT.gif +0 -0
  180. data/lib/cyberweb/images/standard_images/GRINSEN.jpg +0 -0
  181. data/lib/cyberweb/images/standard_images/GUN.png +0 -0
  182. data/lib/cyberweb/images/standard_images/HAKEN.png +0 -0
  183. data/lib/cyberweb/images/standard_images/HALLOWEEN.png +0 -0
  184. data/lib/cyberweb/images/standard_images/HAMMER.png +0 -0
  185. data/lib/cyberweb/images/standard_images/HANGING_MONKEY.png +0 -0
  186. data/lib/cyberweb/images/standard_images/HANG_MAN.png +0 -0
  187. data/lib/cyberweb/images/standard_images/HAPPY_BIRD.png +0 -0
  188. data/lib/cyberweb/images/standard_images/HAPPY_SMILEY.png +0 -0
  189. data/lib/cyberweb/images/standard_images/HDD_EMPTY.png +0 -0
  190. data/lib/cyberweb/images/standard_images/HDD_FULL.png +0 -0
  191. data/lib/cyberweb/images/standard_images/HDD_HALF.png +0 -0
  192. data/lib/cyberweb/images/standard_images/HDD_ONEFOURTH.png +0 -0
  193. data/lib/cyberweb/images/standard_images/HDD_THREEEIGHT.png +0 -0
  194. data/lib/cyberweb/images/standard_images/HDD_THREEFOURTH.png +0 -0
  195. data/lib/cyberweb/images/standard_images/HEART.png +0 -0
  196. data/lib/cyberweb/images/standard_images/HELP.png +0 -0
  197. data/lib/cyberweb/images/standard_images/HOME.gif +0 -0
  198. data/lib/cyberweb/images/standard_images/HONIG.jpg +0 -0
  199. data/lib/cyberweb/images/standard_images/HTML40.png +0 -0
  200. data/lib/cyberweb/images/standard_images/HUHN.gif +0 -0
  201. data/lib/cyberweb/images/standard_images/HUMAN.gif +0 -0
  202. data/lib/cyberweb/images/standard_images/ICONS_COLLECTION1.gif +0 -0
  203. data/lib/cyberweb/images/standard_images/ICONS_COLLECTION2.png +0 -0
  204. data/lib/cyberweb/images/standard_images/ICOSAHEDRON.jpg +0 -0
  205. data/lib/cyberweb/images/standard_images/IE.jpg +0 -0
  206. data/lib/cyberweb/images/standard_images/IMPORTANT_ARROW_LEFT.jpg +0 -0
  207. data/lib/cyberweb/images/standard_images/INTERNAL_LINKS.png +0 -0
  208. data/lib/cyberweb/images/standard_images/IPAD.png +0 -0
  209. data/lib/cyberweb/images/standard_images/ITEM.png +0 -0
  210. data/lib/cyberweb/images/standard_images/KAFFEE.png +0 -0
  211. data/lib/cyberweb/images/standard_images/KARMA.png +0 -0
  212. data/lib/cyberweb/images/standard_images/KEYS.png +0 -0
  213. data/lib/cyberweb/images/standard_images/KLEBSTOFF.png +0 -0
  214. data/lib/cyberweb/images/standard_images/KLEE_BLATT.png +0 -0
  215. data/lib/cyberweb/images/standard_images/KNIFE01.png +0 -0
  216. data/lib/cyberweb/images/standard_images/LARGER_COMPUTER.png +0 -0
  217. data/lib/cyberweb/images/standard_images/LCD.png +0 -0
  218. data/lib/cyberweb/images/standard_images/LEAF.png +0 -0
  219. data/lib/cyberweb/images/standard_images/LEAF2.png +0 -0
  220. data/lib/cyberweb/images/standard_images/LEFT_RIGHT_PFEIL.png +0 -0
  221. data/lib/cyberweb/images/standard_images/LENS.png +0 -0
  222. data/lib/cyberweb/images/standard_images/LEXIKON1.jpg +0 -0
  223. data/lib/cyberweb/images/standard_images/LOCK.png +0 -0
  224. data/lib/cyberweb/images/standard_images/LOSER.gif +0 -0
  225. data/lib/cyberweb/images/standard_images/LUPE.gif +0 -0
  226. data/lib/cyberweb/images/standard_images/MANTIS.png +0 -0
  227. data/lib/cyberweb/images/standard_images/MAXERL.png +0 -0
  228. data/lib/cyberweb/images/standard_images/MESSAGE_BOX_ERROR.png +0 -0
  229. data/lib/cyberweb/images/standard_images/MESSAGE_BOX_INFO.png +0 -0
  230. data/lib/cyberweb/images/standard_images/MESSAGE_BOX_SUCCESS.png +0 -0
  231. data/lib/cyberweb/images/standard_images/MESSAGE_BOX_WARNING.png +0 -0
  232. data/lib/cyberweb/images/standard_images/MICROSOFT.png +0 -0
  233. data/lib/cyberweb/images/standard_images/MINE.png +0 -0
  234. data/lib/cyberweb/images/standard_images/MINI_BAUM1.png +0 -0
  235. data/lib/cyberweb/images/standard_images/MINI_BAUM2.png +0 -0
  236. data/lib/cyberweb/images/standard_images/MINI_BAUM3.png +0 -0
  237. data/lib/cyberweb/images/standard_images/MINI_BAUM4.png +0 -0
  238. data/lib/cyberweb/images/standard_images/MINI_BAUM5.png +0 -0
  239. data/lib/cyberweb/images/standard_images/MINI_BAUM6.png +0 -0
  240. data/lib/cyberweb/images/standard_images/MINI_CUBE.png +0 -0
  241. data/lib/cyberweb/images/standard_images/MINI_DOT.png +0 -0
  242. data/lib/cyberweb/images/standard_images/MINUS.png +0 -0
  243. data/lib/cyberweb/images/standard_images/MONEY.png +0 -0
  244. data/lib/cyberweb/images/standard_images/MOUSE.png +0 -0
  245. data/lib/cyberweb/images/standard_images/MUSIK_NOTE.png +0 -0
  246. data/lib/cyberweb/images/standard_images/NAGEL.jpg +0 -0
  247. data/lib/cyberweb/images/standard_images/NASHORN.png +0 -0
  248. data/lib/cyberweb/images/standard_images/NEW.png +0 -0
  249. data/lib/cyberweb/images/standard_images/NEWS.png +0 -0
  250. data/lib/cyberweb/images/standard_images/NOBODY.png +0 -0
  251. data/lib/cyberweb/images/standard_images/NOTE.png +0 -0
  252. data/lib/cyberweb/images/standard_images/NOTEPAD.png +0 -0
  253. data/lib/cyberweb/images/standard_images/NOTIZ.png +0 -0
  254. data/lib/cyberweb/images/standard_images/NO_PATENTS.png +0 -0
  255. data/lib/cyberweb/images/standard_images/OBSOLETE.png +0 -0
  256. data/lib/cyberweb/images/standard_images/OFFICIAL_HOME.png +0 -0
  257. data/lib/cyberweb/images/standard_images/PDF.png +0 -0
  258. data/lib/cyberweb/images/standard_images/PERGAMENT_TILER1.jpg +0 -0
  259. data/lib/cyberweb/images/standard_images/PFEIL1.png +0 -0
  260. data/lib/cyberweb/images/standard_images/PFEIL10.png +0 -0
  261. data/lib/cyberweb/images/standard_images/PFEIL11.png +0 -0
  262. data/lib/cyberweb/images/standard_images/PFEIL12.png +0 -0
  263. data/lib/cyberweb/images/standard_images/PFEIL2.png +0 -0
  264. data/lib/cyberweb/images/standard_images/PFEIL3.png +0 -0
  265. data/lib/cyberweb/images/standard_images/PFEIL4.png +0 -0
  266. data/lib/cyberweb/images/standard_images/PFEIL5.png +0 -0
  267. data/lib/cyberweb/images/standard_images/PFEIL6.png +0 -0
  268. data/lib/cyberweb/images/standard_images/PFEIL6_red.png +0 -0
  269. data/lib/cyberweb/images/standard_images/PFEIL7.png +0 -0
  270. data/lib/cyberweb/images/standard_images/PFEIL8_OUT.png +0 -0
  271. data/lib/cyberweb/images/standard_images/PFEIL9.png +0 -0
  272. data/lib/cyberweb/images/standard_images/PFEIL_LINKS_OBEN.png +0 -0
  273. data/lib/cyberweb/images/standard_images/PFEIL_VERTICAL.png +0 -0
  274. data/lib/cyberweb/images/standard_images/PHONE.png +0 -0
  275. data/lib/cyberweb/images/standard_images/PHP_FORUM.jpg +0 -0
  276. data/lib/cyberweb/images/standard_images/PIN.png +0 -0
  277. data/lib/cyberweb/images/standard_images/PIN_POINTER_RED.png +0 -0
  278. data/lib/cyberweb/images/standard_images/PIPETTE.png +0 -0
  279. data/lib/cyberweb/images/standard_images/PLUS.png +0 -0
  280. data/lib/cyberweb/images/standard_images/POSAUNE.png +0 -0
  281. data/lib/cyberweb/images/standard_images/PRESENT.png +0 -0
  282. data/lib/cyberweb/images/standard_images/PRINT.png +0 -0
  283. data/lib/cyberweb/images/standard_images/PRINTER.png +0 -0
  284. data/lib/cyberweb/images/standard_images/PROTOKOLL.png +0 -0
  285. data/lib/cyberweb/images/standard_images/QUADRAT01.png +0 -0
  286. data/lib/cyberweb/images/standard_images/QUOTE.png +0 -0
  287. data/lib/cyberweb/images/standard_images/RADIO_ACTIVE.png +0 -0
  288. data/lib/cyberweb/images/standard_images/RAINBOW_CIRCLE.png +0 -0
  289. data/lib/cyberweb/images/standard_images/RED_PILL.png +0 -0
  290. data/lib/cyberweb/images/standard_images/RIP.png +0 -0
  291. data/lib/cyberweb/images/standard_images/ROBERT.png +0 -0
  292. data/lib/cyberweb/images/standard_images/ROCKET.png +0 -0
  293. data/lib/cyberweb/images/standard_images/ROSE.png +0 -0
  294. data/lib/cyberweb/images/standard_images/ROSE2.png +0 -0
  295. data/lib/cyberweb/images/standard_images/RUNNING.png +0 -0
  296. data/lib/cyberweb/images/standard_images/SAVE.png +0 -0
  297. data/lib/cyberweb/images/standard_images/SCANNER.png +0 -0
  298. data/lib/cyberweb/images/standard_images/SCHERE.png +0 -0
  299. data/lib/cyberweb/images/standard_images/SCHNEEMANN.png +0 -0
  300. data/lib/cyberweb/images/standard_images/SCISSORS.png +0 -0
  301. data/lib/cyberweb/images/standard_images/SHOPPING.png +0 -0
  302. data/lib/cyberweb/images/standard_images/SKULL.png +0 -0
  303. data/lib/cyberweb/images/standard_images/SMALL_CAT.png +0 -0
  304. data/lib/cyberweb/images/standard_images/SMALL_DOCUMENT.png +0 -0
  305. data/lib/cyberweb/images/standard_images/SMALL_HOUSE.png +0 -0
  306. data/lib/cyberweb/images/standard_images/SMALL_PLANE.png +0 -0
  307. data/lib/cyberweb/images/standard_images/SMILEY1.png +0 -0
  308. data/lib/cyberweb/images/standard_images/SMILEY2.png +0 -0
  309. data/lib/cyberweb/images/standard_images/SMILEY3.png +0 -0
  310. data/lib/cyberweb/images/standard_images/SMILEY4.png +0 -0
  311. data/lib/cyberweb/images/standard_images/SMILEY5.png +0 -0
  312. data/lib/cyberweb/images/standard_images/SNAIL.png +0 -0
  313. data/lib/cyberweb/images/standard_images/SNOWFLAKE.png +0 -0
  314. data/lib/cyberweb/images/standard_images/SPACER.png +0 -0
  315. data/lib/cyberweb/images/standard_images/SPECIAL_PFEIL.png +0 -0
  316. data/lib/cyberweb/images/standard_images/SPIDERMAN_HEAD.png +0 -0
  317. data/lib/cyberweb/images/standard_images/SPIRAL_CROSS.png +0 -0
  318. data/lib/cyberweb/images/standard_images/SPOON.png +0 -0
  319. data/lib/cyberweb/images/standard_images/SQUARE_BLACK.png +0 -0
  320. data/lib/cyberweb/images/standard_images/SQUARE_BLUE.png +0 -0
  321. data/lib/cyberweb/images/standard_images/SQUARE_CADETBLUE.png +0 -0
  322. data/lib/cyberweb/images/standard_images/SQUARE_CHAOS.png +0 -0
  323. data/lib/cyberweb/images/standard_images/SQUARE_DARKGOLDENROD.png +0 -0
  324. data/lib/cyberweb/images/standard_images/SQUARE_GREEN.png +0 -0
  325. data/lib/cyberweb/images/standard_images/SQUARE_GREY.png +0 -0
  326. data/lib/cyberweb/images/standard_images/SQUARE_RED.png +0 -0
  327. data/lib/cyberweb/images/standard_images/SQUARE_VIOLET.png +0 -0
  328. data/lib/cyberweb/images/standard_images/SQUARE_WHITE.png +0 -0
  329. data/lib/cyberweb/images/standard_images/SQUARE_YEL.png +0 -0
  330. data/lib/cyberweb/images/standard_images/STANDARDS_FAVICON.png +0 -0
  331. data/lib/cyberweb/images/standard_images/STAR.png +0 -0
  332. data/lib/cyberweb/images/standard_images/STAR_FANCY.png +0 -0
  333. data/lib/cyberweb/images/standard_images/STATUS_IN_PROGRESS.png +0 -0
  334. data/lib/cyberweb/images/standard_images/STD_COLOURS.png +0 -0
  335. data/lib/cyberweb/images/standard_images/SUN.png +0 -0
  336. data/lib/cyberweb/images/standard_images/SYMBOL_FRAU.png +0 -0
  337. data/lib/cyberweb/images/standard_images/SYMBOL_MANN.png +0 -0
  338. data/lib/cyberweb/images/standard_images/SYNC.png +0 -0
  339. data/lib/cyberweb/images/standard_images/TASCHENLAMPE.jpg +0 -0
  340. data/lib/cyberweb/images/standard_images/TASTATUR.png +0 -0
  341. data/lib/cyberweb/images/standard_images/TECHNICOLOR_TWIRL.png +0 -0
  342. data/lib/cyberweb/images/standard_images/TELEFON.png +0 -0
  343. data/lib/cyberweb/images/standard_images/TEST.bmp +0 -0
  344. data/lib/cyberweb/images/standard_images/TEUFELCHEN.png +0 -0
  345. data/lib/cyberweb/images/standard_images/THERMOMETER.png +0 -0
  346. data/lib/cyberweb/images/standard_images/THINKING_HUMAN.png +0 -0
  347. data/lib/cyberweb/images/standard_images/TODO.jpg +0 -0
  348. data/lib/cyberweb/images/standard_images/TODO.png +0 -0
  349. data/lib/cyberweb/images/standard_images/TOOLS.png +0 -0
  350. data/lib/cyberweb/images/standard_images/TRANSPORT.png +0 -0
  351. data/lib/cyberweb/images/standard_images/TRIANGLE.png +0 -0
  352. data/lib/cyberweb/images/standard_images/TURM.png +0 -0
  353. data/lib/cyberweb/images/standard_images/UHR.png +0 -0
  354. data/lib/cyberweb/images/standard_images/UPLOAD2.png +0 -0
  355. data/lib/cyberweb/images/standard_images/USB_CONNECTION_DEVICE.png +0 -0
  356. data/lib/cyberweb/images/standard_images/VALID_CSS.jpg +0 -0
  357. data/lib/cyberweb/images/standard_images/VALID_HTML.jpg +0 -0
  358. data/lib/cyberweb/images/standard_images/VIDEOCAMERA.png +0 -0
  359. data/lib/cyberweb/images/standard_images/VOGEL.png +0 -0
  360. data/lib/cyberweb/images/standard_images/VS_TCPA.gif +0 -0
  361. data/lib/cyberweb/images/standard_images/WARNSCHILD.png +0 -0
  362. data/lib/cyberweb/images/standard_images/WEBSERVER.png +0 -0
  363. data/lib/cyberweb/images/standard_images/WECKER.jpg +0 -0
  364. data/lib/cyberweb/images/standard_images/WINGS.png +0 -0
  365. data/lib/cyberweb/images/standard_images/WORD.png +0 -0
  366. data/lib/cyberweb/images/standard_images/WURZEL_ZEICHEN.png +0 -0
  367. data/lib/cyberweb/images/standard_images/YIN_YANG.png +0 -0
  368. data/lib/cyberweb/images/standard_images/Yin__Yang.gif +0 -0
  369. data/lib/cyberweb/images/standard_images/ZAHNRAD.png +0 -0
  370. data/lib/cyberweb/images/standard_images/ZAUBERHUT.png +0 -0
  371. data/lib/cyberweb/images/standard_images/ZITRONE.png +0 -0
  372. data/lib/cyberweb/images/standard_images/ZURUECK.jpg +0 -0
  373. data/lib/cyberweb/images/standard_images/blue_gallery.png +0 -0
  374. data/lib/cyberweb/images/standard_images/chk_off.png +0 -0
  375. data/lib/cyberweb/images/standard_images/chk_on.png +0 -0
  376. data/lib/cyberweb/images/standard_images/outdated.png +0 -0
  377. data/lib/cyberweb/images/standard_images/rdo_off.png +0 -0
  378. data/lib/cyberweb/images/standard_images/rdo_on.png +0 -0
  379. data/lib/cyberweb/images/standard_images/sneaky_ninja_face.png +0 -0
  380. data/lib/cyberweb/images/standard_images/standard_images.html +31644 -0
  381. data/lib/cyberweb/images/standard_images/text_editor.png +0 -0
  382. data/lib/cyberweb/images/standard_images/windows_key.png +0 -0
  383. data/lib/cyberweb/javascript/javascript_clock.rb +55 -12
  384. data/lib/cyberweb/javascript_code/custom_functions.js +73 -23
  385. data/lib/cyberweb/javascript_code/html_colours.js +9 -9
  386. data/lib/cyberweb/javascript_code/jquery/{jquery-3.6.1.js → jquery-3.6.3.js} +96 -12
  387. data/lib/cyberweb/predefined_and_freeform_methods/predefined_methods.rb +0 -112
  388. data/lib/cyberweb/project/project.rb +7 -0
  389. data/lib/cyberweb/requires/require_the_cyberweb_project.rb +3 -1
  390. data/lib/cyberweb/toplevel_methods/css.rb +3 -0
  391. data/lib/cyberweb/toplevel_methods/html_tables.rb +58 -29
  392. data/lib/cyberweb/toplevel_methods/internal_hash.rb +11 -138
  393. data/lib/cyberweb/toplevel_methods/misc.rb +37 -4
  394. data/lib/cyberweb/toplevel_methods/path.rb +8 -8
  395. data/lib/cyberweb/toplevel_methods/registered_ids.rb +4 -1
  396. data/lib/cyberweb/utility_scripts/images_to_html/constants.rb +63 -0
  397. data/lib/cyberweb/utility_scripts/images_to_html/images_to_html.rb +149 -164
  398. data/lib/cyberweb/utility_scripts/images_to_html/misc.rb +119 -0
  399. data/lib/cyberweb/version/version.rb +2 -2
  400. data/lib/cyberweb/web_images/array_listing_all_project_images.rb +1 -1
  401. data/lib/cyberweb/web_images/map_symbol_to_image_location.rb +16 -5
  402. data/lib/cyberweb/web_object/cmd.rb +257 -0
  403. data/lib/cyberweb/web_object/display_output_and_report.rb +99 -0
  404. data/lib/cyberweb/web_object/html_tags.rb +106 -98
  405. data/lib/cyberweb/web_object/images.rb +53 -36
  406. data/lib/cyberweb/web_object/javascript_and_jquery.rb +165 -51
  407. data/lib/cyberweb/web_object/link.rb +207 -34
  408. data/lib/cyberweb/web_object/misc.rb +1363 -1060
  409. data/lib/cyberweb/web_object/reset.rb +12 -10
  410. data/lib/cyberweb/web_object/roebe.rb +113 -0
  411. data/lib/cyberweb/web_object/web_object.rb +9 -4
  412. data/lib/cyberweb/yaml/js_files_to_load.yml +11 -3
  413. data/lib/cyberweb/yaml/project_configuration.yml +1 -1
  414. data/test/complex_tests/all_tests_in_one_page.cgi +12 -6
  415. data/test/javascript/testing_different_javascript_functions_available_in_the_cyberweb_project.cgi +27 -0
  416. data/test/javascript/testing_snowflakes.cgi +2 -2
  417. data/test/simple_tests/testing_p_default_versus_p_default_le.cgi +31 -0
  418. metadata +379 -15
  419. data/lib/cyberweb/javascript_code/jquery/jquery-3.6.0.js +0 -10881
@@ -11,6 +11,7 @@ module Cyberweb
11
11
  class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
12
12
 
13
13
  require 'cyberweb/web_object/effects.rb'
14
+ require 'cyberweb/web_object/roebe.rb'
14
15
  require 'cyberweb/javascript/javascript_helper/javascript_helper.rb'
15
16
  require 'cyberweb/modules/css_style.rb'
16
17
  require 'cyberweb/utility_scripts/obtain_css_rules.rb'
@@ -22,112 +23,26 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
22
23
  rescue LoadError; end
23
24
 
24
25
  # ========================================================================= #
25
- # === sanitize_this_id
26
- #
27
- # This method can be used to sanitize the given input, for further use
28
- # as a HTML id. A few assumptions will be made for input that is
29
- # passed to this method; but, even aside from these assumptions, the
30
- # most important point for this method is that it can be consistently
31
- # used/re-used.
32
- # ========================================================================= #
33
- def sanitize_this_id(i)
34
- return ::Cyberweb.sanitize_this_id(i)
35
- end
36
-
37
- # ========================================================================= #
38
- # === dot109?
39
- #
40
- # This simply wraps over dot() with a default value and default CSS.
41
- # ========================================================================= #
42
- def dot109?
43
- string_dot(109, 'marr10px')
44
- end
45
-
46
- # ========================================================================= #
47
- # === clickable_image_as_string?
48
- # ========================================================================= #
49
- def clickable_image_as_string?
50
- _ = clickable_image?
51
- # ======================================================================= #
52
- # === Handle Symbols next
53
- #
54
- # Symbols have to be expanded towards their local path.
55
- # ======================================================================= #
56
- if _.is_a? Symbol
57
- _ = map_symbol_to_image_location(_) # Now we have the real path.
58
- _.prepend(prepend_path_to_the_images?.dup)
59
- _ = '<img src="'+_+'" class="marr10px">'
60
- end
61
- return _.to_s # Must guarantee that it is a String.
62
- end
63
-
64
- # ========================================================================= #
65
- # === clickable_image?
66
- #
67
- # This must stay a simpler getter - no sanitizing is allowed.
68
- # ========================================================================= #
69
- def clickable_image?
70
- @internal_hash[:clickable_image]
71
- end
72
-
73
- # ========================================================================= #
74
- # === map_symbol_to_image_location
75
- # ========================================================================= #
76
- def map_symbol_to_image_location(i)
77
- return ::Cyberweb::WebImages.map_symbol_to_image_location(i)
78
- end
79
-
80
- # ========================================================================= #
81
- # === set_clickable_image
82
- # ========================================================================= #
83
- def set_clickable_image(i)
84
- @internal_hash[:clickable_image] = i
85
- end
86
-
87
- require 'cyberweb/toplevel_methods/dot.rb'
88
- # ========================================================================= #
89
- # === string_dot
90
- #
91
- # This variant will return a String. The regular dot() method on the
92
- # other hand will append that String onto the resulting webpage
93
- # content, as-is.
94
- # ========================================================================= #
95
- def string_dot(
96
- i = 108,
97
- optional_css_class = '',
98
- optional_the_id = '',
99
- optional_css_style = ''
100
- )
101
- _ = sg(
102
- "dot#{i}".to_sym,
103
- optional_css_class,
104
- optional_the_id,
105
- optional_css_style
106
- )
107
- return _
108
- end; alias dot string_dot # === dot (dot tag)
109
-
110
- # ========================================================================= #
111
- # === h1_id_clickable
26
+ # === UNICODE_PLUS_MINUS
112
27
  # ========================================================================= #
113
- def h1_id_clickable(
114
- i,
115
- optional_css_class = '',
116
- &block
117
- )
118
- h1_id(i, optional_css_class) { :clickable_image }
119
- end; alias h1_fancy_id h1_id_clickable # === h1_fancy_id
28
+ UNICODE_PLUS_MINUS = '±'
120
29
 
121
30
  # ========================================================================= #
122
31
  # === h1_id
123
32
  # ========================================================================= #
124
33
  def h1_id(
125
- i,
126
- optional_css_class = '',
34
+ i = '',
35
+ optional_css_class = '',
36
+ optional_the_id = '',
37
+ optional_css_style = '',
38
+ optional_javascript = '',
127
39
  &block
128
40
  )
129
- use_this_id = i.to_s.dup.downcase.tr(' ','_').delete(':(),').
130
- tr('-','_').squeeze('_')
41
+ optional_the_id = optional_the_id.to_s
42
+ if optional_the_id.empty?
43
+ optional_the_id = i.dup
44
+ end
45
+ use_this_id = sanitize_this_id(optional_the_id)
131
46
  # ======================================================================= #
132
47
  # === Handle blocks next
133
48
  # ======================================================================= #
@@ -136,6 +51,9 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
136
51
  case yielded
137
52
  # ===================================================================== #
138
53
  # === :clickable_image
54
+ #
55
+ # The embedded image will be clickable, made possible via the
56
+ # a-tag.
139
57
  # ===================================================================== #
140
58
  when :clickable_image
141
59
  i = "<a href=\"##{use_this_id}\">"+
@@ -143,20 +61,13 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
143
61
  "</a>#{i}"
144
62
  end
145
63
  end
146
- h1 i, id: use_this_id
147
- end
148
-
149
- # ========================================================================= #
150
- # === h2_id_clickable
151
- # ========================================================================= #
152
- def h2_id_clickable(
64
+ h1(
153
65
  i,
154
- optional_css_class = '',
155
- optional_id = nil,
156
- &block
66
+ id: use_this_id,
67
+ css_class: optional_css_class,
68
+ css_style: optional_css_style
157
69
  )
158
- h2_id(i, optional_css_class, optional_id) { :clickable_image }
159
- end; alias h2_fancy_id h2_id_clickable # === h2_fancy_id
70
+ end
160
71
 
161
72
  # ========================================================================= #
162
73
  # === h2_id
@@ -168,16 +79,18 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
168
79
  #
169
80
  # ========================================================================= #
170
81
  def h2_id(
171
- i,
172
- optional_css_class = '',
173
- optional_id = nil,
82
+ i = '',
83
+ optional_css_class = '',
84
+ optional_the_id = '',
85
+ optional_css_style = '',
86
+ optional_javascript = '',
174
87
  &block
175
88
  )
176
- if optional_id and !optional_id.empty?
177
- use_this_id = sanitize_this_id(optional_id)
178
- else
179
- use_this_id = sanitize_this_id(i)
89
+ optional_the_id = optional_the_id.to_s
90
+ if optional_the_id.empty?
91
+ optional_the_id = i.dup
180
92
  end
93
+ use_this_id = sanitize_this_id(optional_the_id)
181
94
  # ======================================================================= #
182
95
  # === Handle blocks next
183
96
  # ======================================================================= #
@@ -186,6 +99,9 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
186
99
  case yielded
187
100
  # ===================================================================== #
188
101
  # === :clickable_image
102
+ #
103
+ # The embedded image will be clickable, made possible via the
104
+ # a-tag.
189
105
  # ===================================================================== #
190
106
  when :clickable_image
191
107
  i = "<a href=\"##{use_this_id}\">"+
@@ -193,84 +109,1314 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
193
109
  "</a>#{i}"
194
110
  end
195
111
  end
196
- h2 i, id: use_this_id, css_class: optional_css_class
112
+ h2(
113
+ i,
114
+ id: use_this_id,
115
+ css_class: optional_css_class,
116
+ css_style: optional_css_style
117
+ )
197
118
  end
198
119
 
199
120
  # ========================================================================= #
200
- # === h3_id_clickable
121
+ # === h1_id_clickable
201
122
  # ========================================================================= #
202
- def h3_id_clickable(
123
+ def h1_id_clickable(
124
+ i = '',
125
+ optional_css_class = '',
126
+ optional_the_id = '',
127
+ optional_css_style = '',
128
+ optional_javascript = '',
129
+ &block
130
+ )
131
+ h1_id(
203
132
  i,
204
- optional_css_class = '',
133
+ optional_css_class,
134
+ optional_the_id,
135
+ optional_css_style,
136
+ optional_javascript
137
+ ) { :clickable_image }
138
+ end; alias h1_fancy_id h1_id_clickable # === h1_fancy_id
139
+ alias h1_fid h1_id_clickable # === h1_fid
140
+ alias clickable_h1 h1_id_clickable # === clickable_h1
141
+
142
+ # ========================================================================= #
143
+ # === h2_id_clickable
144
+ # ========================================================================= #
145
+ def h2_id_clickable(
146
+ i = '',
147
+ optional_css_class = '',
148
+ optional_the_id = '',
149
+ optional_css_style = '',
150
+ optional_javascript = '',
205
151
  &block
206
152
  )
207
- h3_id(i, optional_css_class) { :clickable_image }
208
- end; alias h3_fancy_id h3_id_clickable # === h3_fancy_id
153
+ h2_id(
154
+ i,
155
+ optional_css_class,
156
+ optional_the_id,
157
+ optional_css_style,
158
+ optional_javascript
159
+ ) { :clickable_image }
160
+ end; alias h2_fancy_id h2_id_clickable # === h2_fancy_id
161
+ alias h2_fid h2_id_clickable # === h2_fid
162
+ alias clickable_h2 h2_id_clickable # === clickable_h2
209
163
 
210
164
  # ========================================================================= #
211
- # === h3_id
165
+ # === cheader_h1
212
166
  # ========================================================================= #
213
- def h3_id(
167
+ def cheader_h1(
168
+ i = '',
169
+ optional_css_class = '',
170
+ optional_the_id = '',
171
+ optional_css_style = '',
172
+ optional_javascript = '',
173
+ use_fancy_id = false,
174
+ &block
175
+ )
176
+ hash = {}
177
+ yielded = nil
178
+ yielded = yield if block_given?
179
+ hash.update(yielded) if yielded # First update the hash.
180
+ # ======================================================================= #
181
+ # === :clickable
182
+ # ======================================================================= #
183
+ unless hash.has_key? :clickable
184
+ hash[:clickable] = true
185
+ end
186
+ # ======================================================================= #
187
+ # Assign the tag to use to h1 in the next line:
188
+ # ======================================================================= #
189
+ hash[:use_this_tag] = __method__.to_s.split('_').last.to_sym
190
+ header(
214
191
  i,
215
- optional_css_class = '',
192
+ optional_css_class,
193
+ optional_the_id,
194
+ optional_css_style,
195
+ optional_javascript,
196
+ use_fancy_id
197
+ ) { hash }
198
+ end
199
+
200
+ # ========================================================================= #
201
+ # === cheader_h2
202
+ # ========================================================================= #
203
+ def cheader_h2(
204
+ i = '',
205
+ optional_css_class = '',
206
+ optional_the_id = '',
207
+ optional_css_style = '',
208
+ optional_javascript = '',
209
+ use_fancy_id = false,
216
210
  &block
217
211
  )
218
- use_this_id = sanitize_this_id(i)
212
+ hash = {}
213
+ yielded = nil
214
+ yielded = yield if block_given?
215
+ hash.update(yielded) if yielded # First update the hash.
219
216
  # ======================================================================= #
220
- # === Handle blocks next
217
+ # === :clickable
221
218
  # ======================================================================= #
222
- if block_given?
223
- yielded = yield
224
- case yielded
225
- # ===================================================================== #
226
- # === :clickable_image
227
- # ===================================================================== #
228
- when :clickable_image
229
- i = "<a href=\"##{use_this_id}\">"+
230
- dot109?+
231
- "</a>#{i}"
232
- end
219
+ unless hash.has_key? :clickable
220
+ hash[:clickable] = true
221
+ end
222
+ # ======================================================================= #
223
+ # Assign the tag to use to h1 in the next line:
224
+ # ======================================================================= #
225
+ hash[:use_this_tag] = __method__.to_s.split('_').last.to_sym
226
+ header(
227
+ i,
228
+ optional_css_class,
229
+ optional_the_id,
230
+ optional_css_style,
231
+ optional_javascript,
232
+ use_fancy_id
233
+ ) { hash }
234
+ end; alias clickable_h2 cheader_h2 # === clickable_h2
235
+
236
+ # ========================================================================= #
237
+ # === cheader_h3
238
+ # ========================================================================= #
239
+ def cheader_h3(
240
+ i = '',
241
+ optional_css_class = '',
242
+ optional_the_id = '',
243
+ optional_css_style = '',
244
+ optional_javascript = '',
245
+ use_fancy_id = false,
246
+ &block
247
+ )
248
+ hash = {}
249
+ yielded = nil
250
+ yielded = yield if block_given?
251
+ hash.update(yielded) if yielded # First update the hash.
252
+ # ======================================================================= #
253
+ # === :clickable
254
+ # ======================================================================= #
255
+ unless hash.has_key? :clickable
256
+ hash[:clickable] = true
257
+ end
258
+ # ======================================================================= #
259
+ # Assign the tag to use to h1 in the next line:
260
+ # ======================================================================= #
261
+ hash[:use_this_tag] = __method__.to_s.split('_').last.to_sym
262
+ header(
263
+ i,
264
+ optional_css_class,
265
+ optional_the_id,
266
+ optional_css_style,
267
+ optional_javascript,
268
+ use_fancy_id
269
+ ) { hash }
270
+ end
271
+
272
+ # ========================================================================= #
273
+ # === cheader_h4
274
+ # ========================================================================= #
275
+ def cheader_h4(
276
+ i = '',
277
+ optional_css_class = '',
278
+ optional_the_id = '',
279
+ optional_css_style = '',
280
+ optional_javascript = '',
281
+ use_fancy_id = false,
282
+ &block
283
+ )
284
+ hash = {}
285
+ yielded = nil
286
+ yielded = yield if block_given?
287
+ hash.update(yielded) if yielded # First update the hash.
288
+ # ======================================================================= #
289
+ # === :clickable
290
+ # ======================================================================= #
291
+ unless hash.has_key? :clickable
292
+ hash[:clickable] = true
233
293
  end
234
- h3 i, id: use_this_id
294
+ # ======================================================================= #
295
+ # Assign the tag to use to h1 in the next line:
296
+ # ======================================================================= #
297
+ hash[:use_this_tag] = __method__.to_s.split('_').last.to_sym
298
+ header(
299
+ i,
300
+ optional_css_class,
301
+ optional_the_id,
302
+ optional_css_style,
303
+ optional_javascript,
304
+ use_fancy_id
305
+ ) { hash }
306
+ end
307
+
308
+ # ========================================================================= #
309
+ # === cheader_h5
310
+ # ========================================================================= #
311
+ def cheader_h5(
312
+ i = '',
313
+ optional_css_class = '',
314
+ optional_the_id = '',
315
+ optional_css_style = '',
316
+ optional_javascript = '',
317
+ use_fancy_id = false,
318
+ &block
319
+ )
320
+ hash = {}
321
+ yielded = nil
322
+ yielded = yield if block_given?
323
+ hash.update(yielded) if yielded # First update the hash.
324
+ # ======================================================================= #
325
+ # === :clickable
326
+ # ======================================================================= #
327
+ unless hash.has_key? :clickable
328
+ hash[:clickable] = true
329
+ end
330
+ # ======================================================================= #
331
+ # Assign the tag to use to h1 in the next line:
332
+ # ======================================================================= #
333
+ hash[:use_this_tag] = __method__.to_s.split('_').last.to_sym
334
+ header(
335
+ i,
336
+ optional_css_class,
337
+ optional_the_id,
338
+ optional_css_style,
339
+ optional_javascript,
340
+ use_fancy_id
341
+ ) { hash }
342
+ end
343
+
344
+ # ========================================================================= #
345
+ # === cheader_h6
346
+ # ========================================================================= #
347
+ def cheader_h6(
348
+ i = '',
349
+ optional_css_class = '',
350
+ optional_the_id = '',
351
+ optional_css_style = '',
352
+ optional_javascript = '',
353
+ use_fancy_id = false,
354
+ &block
355
+ )
356
+ hash = {}
357
+ yielded = nil
358
+ yielded = yield if block_given?
359
+ hash.update(yielded) if yielded # First update the hash.
360
+ # ======================================================================= #
361
+ # === :clickable
362
+ # ======================================================================= #
363
+ unless hash.has_key? :clickable
364
+ hash[:clickable] = true
365
+ end
366
+ # ======================================================================= #
367
+ # Assign the tag to use to h1 in the next line:
368
+ # ======================================================================= #
369
+ hash[:use_this_tag] = __method__.to_s.split('_').last.to_sym
370
+ header(
371
+ i,
372
+ optional_css_class,
373
+ optional_the_id,
374
+ optional_css_style,
375
+ optional_javascript,
376
+ use_fancy_id
377
+ ) { hash }
378
+ end
379
+
380
+ # ========================================================================= #
381
+ # === h4_id
382
+ # ========================================================================= #
383
+ def h4_id(
384
+ i = '',
385
+ optional_css_class = '',
386
+ optional_the_id = '',
387
+ optional_css_style = '',
388
+ optional_javascript = '',
389
+ &block
390
+ )
391
+ optional_the_id = optional_the_id.to_s
392
+ if optional_the_id.empty?
393
+ optional_the_id = i.dup
394
+ end
395
+ use_this_id = sanitize_this_id(optional_the_id)
396
+ # ======================================================================= #
397
+ # === Handle blocks next
398
+ # ======================================================================= #
399
+ if block_given?
400
+ yielded = yield
401
+ case yielded
402
+ # ===================================================================== #
403
+ # === :clickable_image
404
+ #
405
+ # The embedded image will be clickable, made possible via the
406
+ # a-tag.
407
+ # ===================================================================== #
408
+ when :clickable_image
409
+ i = "<a href=\"##{use_this_id}\">"+
410
+ clickable_image_as_string?+
411
+ "</a>#{i}"
412
+ end
413
+ end
414
+ h4(
415
+ i,
416
+ id: use_this_id,
417
+ css_class: optional_css_class,
418
+ css_style: optional_css_style
419
+ )
420
+ end
421
+
422
+ # ========================================================================= #
423
+ # === h4_id_clickable
424
+ # ========================================================================= #
425
+ def h4_id_clickable(
426
+ i = '',
427
+ optional_css_class = '',
428
+ optional_the_id = '',
429
+ optional_css_style = '',
430
+ optional_javascript = '',
431
+ use_fancy_id = false,
432
+ &block
433
+ )
434
+ h4_id(
435
+ i,
436
+ optional_css_class,
437
+ optional_the_id,
438
+ optional_css_style,
439
+ optional_javascript
440
+ ) { :clickable_image }
441
+ end; alias h4_fancy_id h4_id_clickable # === h4_fancy_id
442
+ alias h4_fid h4_id_clickable # === h4_fid
443
+
444
+ # ========================================================================= #
445
+ # === header
446
+ #
447
+ # This is a variant for h1() essentially, by default.
448
+ #
449
+ # It can be used via modifications such as:
450
+ #
451
+ # header('foobar') { :clickable }
452
+ #
453
+ # ========================================================================= #
454
+ def header(
455
+ i = '',
456
+ optional_css_class = '',
457
+ optional_the_id = '',
458
+ optional_css_style = '',
459
+ optional_javascript = '',
460
+ use_fancy_id = false,
461
+ &block
462
+ )
463
+ use_this_tag = :h1
464
+ # ======================================================================= #
465
+ # === Handle blocks first
466
+ # ======================================================================= #
467
+ if block_given?
468
+ yielded = yield
469
+ if yielded.is_a? Hash
470
+ # =================================================================== #
471
+ # === :clickable
472
+ # =================================================================== #
473
+ if yielded.has_key? :clickable
474
+ use_fancy_id = yielded.delete(:clickable)
475
+ # =================================================================== #
476
+ # === :fancy_id
477
+ # =================================================================== #
478
+ elsif yielded.has_key? :fancy_id
479
+ use_fancy_id = yielded.delete(:fancy_id)
480
+ end
481
+ # =================================================================== #
482
+ # === :use_this_tag
483
+ # =================================================================== #
484
+ if yielded.has_key? :use_this_tag
485
+ use_this_tag = yielded.delete(:use_this_tag)
486
+ end
487
+ else
488
+ case yielded
489
+ # =================================================================== #
490
+ # === :fancy_id
491
+ # =================================================================== #
492
+ when :fancy_id,
493
+ :clickable
494
+ use_fancy_id = true
495
+ end
496
+ end
497
+ end
498
+ if optional_the_id.empty?
499
+ # ===================================================================== #
500
+ # Determine the id next:
501
+ # ===================================================================== #
502
+ optional_the_id = ::Cyberweb.remove_html(i).tr(' ','_')
503
+ end
504
+ if use_fancy_id
505
+ method_name = "#{use_this_tag}_fancy_id".to_sym # For instance, h1_fancy_id().
506
+ send(method_name,
507
+ i,
508
+ optional_css_class,
509
+ optional_the_id,
510
+ optional_css_style,
511
+ optional_javascript
512
+ )
513
+ else
514
+ send(
515
+ use_this_tag,
516
+ i,
517
+ optional_css_class,
518
+ optional_the_id,
519
+ optional_css_style,
520
+ optional_javascript
521
+ )
522
+ end
523
+ @internal_hash[:register_ids] << register_this_id(optional_the_id) # optional_the_id
524
+ end
525
+
526
+ # ========================================================================= #
527
+ # === clickable_header
528
+ #
529
+ # The idea for this method is to make a "clickable" header, that is,
530
+ # a h-tag that has an icon (a small image) on the left side. The
531
+ # user can only click on that icon, though, not the whole header.
532
+ #
533
+ # Upon clicking on that icon an intralink is used, a "jumper" link.
534
+ # ========================================================================= #
535
+ def clickable_header(
536
+ i = '',
537
+ optional_css_class = '',
538
+ optional_the_id = '',
539
+ optional_css_style = '',
540
+ optional_javascript = '',
541
+ &block
542
+ )
543
+ header(
544
+ i,
545
+ optional_css_class,
546
+ optional_the_id,
547
+ optional_css_style,
548
+ optional_javascript
549
+ ) { :clickable }
550
+ end; alias cheader clickable_header # === cheader
551
+ alias clickable_h1 clickable_header # === clickable_h1
552
+
553
+ # ========================================================================= #
554
+ # === unicode_plus_minus
555
+ # ========================================================================= #
556
+ def unicode_plus_minus
557
+ UNICODE_PLUS_MINUS
558
+ end
559
+
560
+ # ========================================================================= #
561
+ # === clickable_image_as_string?
562
+ # ========================================================================= #
563
+ def clickable_image_as_string?
564
+ _ = clickable_image? # First get a reference.
565
+ # ======================================================================= #
566
+ # === Handle Symbols next
567
+ #
568
+ # Symbols have to be expanded towards their local path.
569
+ # ======================================================================= #
570
+ if _.is_a? Symbol
571
+ _ = map_symbol_to_image_location(_) # Now we have the real path.
572
+ if _.start_with? '/usr/lib/ruby/'
573
+ # =================================================================== #
574
+ # This can clearly not work, so we must rewrite the whole
575
+ # line to ad-hoc fit to a roebe layout of the filesystem.
576
+ # Clearly this will only work on my home system, but I am
577
+ # the only one using this right now anyway.
578
+ # =================================================================== #
579
+ input_target = ruby_sitelib_dir?
580
+ replacement_target = relative_path?+'programming/ruby/src/cyberweb/lib/'
581
+ _.gsub!(
582
+ Regexp.new(input_target),
583
+ replacement_target
584
+ )
585
+ else
586
+ unless _.start_with? 'images/standard_images/'
587
+ _.prepend(prepend_path_to_the_images?.dup)
588
+ end
589
+ end
590
+ _ = '<img src="'+_+'" class="marr10px">'
591
+ end
592
+ return _.to_s # Must guarantee that it is a String.
593
+ end
594
+
595
+ # ========================================================================= #
596
+ # === h3_id
597
+ # ========================================================================= #
598
+ def h3_id(
599
+ i,
600
+ optional_css_class = '',
601
+ &block
602
+ )
603
+ use_this_id = sanitize_this_id(i)
604
+ # ======================================================================= #
605
+ # === Handle blocks next
606
+ # ======================================================================= #
607
+ if block_given?
608
+ yielded = yield
609
+ case yielded
610
+ # ===================================================================== #
611
+ # === :clickable_image
612
+ # ===================================================================== #
613
+ when :clickable_image
614
+ i = "<a href=\"##{use_this_id}\">"+
615
+ dot109?+
616
+ "</a>#{i}"
617
+ end
618
+ end
619
+ h3(i, id: use_this_id, css_class: optional_css_class)
620
+ end
621
+
622
+ # ========================================================================= #
623
+ # === div_default_le
624
+ # ========================================================================= #
625
+ def div_default_le(
626
+ optional_css_class = '',
627
+ the_id = '',
628
+ optional_css_style = '',
629
+ &block
630
+ )
631
+ # ======================================================================= #
632
+ # === Handle Hashes
633
+ #
634
+ # Next handle Hashes given to this method
635
+ # ======================================================================= #
636
+ if optional_css_class.is_a? Hash
637
+ # ===================================================================== #
638
+ # === :id
639
+ # ===================================================================== #
640
+ if optional_css_class.has_key? :id
641
+ the_id = optional_css_class.delete(:id)
642
+ # ===================================================================== #
643
+ # === :the_id
644
+ # ===================================================================== #
645
+ elsif optional_css_class.has_key? :the_id
646
+ the_id = optional_css_class.delete(:the_id)
647
+ end
648
+ # ===================================================================== #
649
+ # === :css_style
650
+ # ===================================================================== #
651
+ if optional_css_class.has_key? :css_style
652
+ optional_css_style = optional_css_class.delete(:css_style)
653
+ end
654
+ if optional_css_class.is_a?(Hash) and optional_css_class.empty?
655
+ optional_css_class = ''
656
+ end
657
+ end
658
+ if the_id.is_a? Hash
659
+ # ===================================================================== #
660
+ # === :id
661
+ # ===================================================================== #
662
+ if the_id.has_key? :id
663
+ the_id = the_id.delete(:id)
664
+ end
665
+ end
666
+ optional_css_class = optional_css_class.to_s.dup
667
+ optional_css_class.prepend('default ') # Make it the first argument.
668
+ div(
669
+ optional_css_class.strip,
670
+ the_id,
671
+ optional_css_style,
672
+ &block
673
+ )
674
+ end
675
+
676
+ # ========================================================================= #
677
+ # === p_default_le
678
+ #
679
+ # This method is basically like p_default(), but it makes all output
680
+ # within that method make use of le() rather than e(). The idea here
681
+ # is that you can get padded (indented) output "for free" for a
682
+ # given paragraph.
683
+ #
684
+ # Example input:
685
+ #
686
+ # p_default_le('mart2em', id: 'the_idea_behind_the_chaos_cell') {}
687
+ #
688
+ # ========================================================================= #
689
+ def p_default_le(
690
+ optional_css_class = '',
691
+ the_id = '',
692
+ optional_css_style = '',
693
+ &block
694
+ )
695
+ # ======================================================================= #
696
+ # === Handle Hashes
697
+ #
698
+ # Next handle Hashes given to this method
699
+ # ======================================================================= #
700
+ if optional_css_class.is_a? Hash
701
+ # ===================================================================== #
702
+ # === :id
703
+ # ===================================================================== #
704
+ if optional_css_class.has_key? :id
705
+ the_id = optional_css_class.delete(:id)
706
+ # ===================================================================== #
707
+ # === :the_id
708
+ # ===================================================================== #
709
+ elsif optional_css_class.has_key? :the_id
710
+ the_id = optional_css_class.delete(:the_id)
711
+ end
712
+ # ===================================================================== #
713
+ # === :css_style
714
+ # ===================================================================== #
715
+ if optional_css_class.has_key? :css_style
716
+ optional_css_style = optional_css_class.delete(:css_style)
717
+ end
718
+ if optional_css_class.is_a?(Hash) and optional_css_class.empty?
719
+ optional_css_class = ''
720
+ end
721
+ end
722
+ if the_id.is_a? Hash
723
+ # ===================================================================== #
724
+ # === :id
725
+ # ===================================================================== #
726
+ if the_id.has_key? :id
727
+ the_id = the_id.delete(:id)
728
+ end
729
+ end
730
+ optional_css_class = optional_css_class.to_s.dup
731
+ optional_css_class.prepend('default ') # Make it the first argument.
732
+ p(
733
+ optional_css_class.strip,
734
+ the_id,
735
+ optional_css_style,
736
+ &block
737
+ )
738
+ end
739
+
740
+ # ========================================================================= #
741
+ # === javascript_drag_and_drop
742
+ # ========================================================================= #
743
+ def javascript_drag_and_drop(
744
+ i, use_jquery = use_jquery?
745
+ )
746
+ if use_jquery
747
+ make_this_id_draggable(i)
748
+ end
749
+ end; alias add_javascript_drag javascript_drag_and_drop # === add_javascript_drag
750
+ alias drag javascript_drag_and_drop # === drag
751
+ alias drag_this javascript_drag_and_drop # === drag_this
752
+ alias drag_this_id javascript_drag_and_drop # === drag_this_id
753
+ alias drag_for javascript_drag_and_drop # === drag_for
754
+ alias drag_it javascript_drag_and_drop # === drag_it
755
+ alias drag_textarea javascript_drag_and_drop # === drag_textarea
756
+ alias drag_and_drop javascript_drag_and_drop # === drag_and_drop
757
+ alias drag_n_drop javascript_drag_and_drop # === drag_n_drop
758
+ alias drag_drop javascript_drag_and_drop # === drag_drop
759
+ alias enable_drag_for javascript_drag_and_drop # === enable_drag_for
760
+
761
+ # ========================================================================= #
762
+ # === mars2em
763
+ # ========================================================================= #
764
+ def mars2em(i = '')
765
+ e(i, 'mars2em')
766
+ end
767
+
768
+ # ========================================================================= #
769
+ # === mars1em
770
+ # ========================================================================= #
771
+ def mars1em(i = '')
772
+ e(i, 'mars1em')
773
+ end
774
+
775
+ # ========================================================================= #
776
+ # === table6
777
+ # ========================================================================= #
778
+ def table6(
779
+ css_class = '',
780
+ id = '',
781
+ css_style = '',
782
+ *content,
783
+ &block
784
+ )
785
+ addn(
786
+ string_table6(
787
+ css_class,
788
+ id,
789
+ css_style,
790
+ content,
791
+ &block
792
+ )
793
+ )
794
+ end
795
+
796
+ # ========================================================================= #
797
+ # === table3
798
+ # ========================================================================= #
799
+ def table3(
800
+ css_class = '',
801
+ id = '',
802
+ css_style = '',
803
+ *content,
804
+ &block
805
+ )
806
+ addn(
807
+ string_table3(
808
+ css_class,
809
+ id,
810
+ css_style,
811
+ content,
812
+ &block
813
+ )
814
+ )
815
+ end
816
+
817
+ # ========================================================================= #
818
+ # === string_table6
819
+ # ========================================================================= #
820
+ def string_table6(
821
+ css_class = '',
822
+ id = '',
823
+ css_style = '',
824
+ *content
825
+ )
826
+ ::Cyberweb.string_table6(
827
+ css_class,
828
+ id,
829
+ css_style,
830
+ content
831
+ )
832
+ end
833
+
834
+ # ========================================================================= #
835
+ # === string_table5
836
+ # ========================================================================= #
837
+ def string_table5(
838
+ css_class = '',
839
+ id = '',
840
+ css_style = '',
841
+ *content
842
+ )
843
+ # ======================================================================= #
844
+ # To test, try:
845
+ #
846
+ # puts ::Cyberweb.string_table5('','','',%w( ah asjhk avshvasjkh vajhksavjhk avsjhvashkjavs ))
847
+ #
848
+ # ======================================================================= #
849
+ ::Cyberweb.string_table5(
850
+ css_class, id, css_style, content
851
+ )
852
+ end
853
+
854
+ # ========================================================================= #
855
+ # === table2
856
+ #
857
+ # This variant maks a two-elements-per-row HTML table.
858
+ #
859
+ # The last variable is the content; keep it even, if possible, e. g
860
+ # 2 elements or 4 or 6 and so forth.
861
+ # ========================================================================= #
862
+ def table2(
863
+ css_class = '',
864
+ id = '',
865
+ css_style = '',
866
+ *content,
867
+ &block
868
+ )
869
+ addn(
870
+ string_table2(
871
+ css_class,
872
+ id,
873
+ css_style,
874
+ content.flatten,
875
+ &block
876
+ )
877
+ )
878
+ end
879
+
880
+ # ========================================================================= #
881
+ # === eesentence
882
+ # ========================================================================= #
883
+ def eesentence(
884
+ i, optional_css_class = ''
885
+ )
886
+ if optional_css_class and optional_css_class.empty?
887
+ ee sentence(i)
888
+ else
889
+ espan sentence(i), optional_css_class
890
+ end
891
+ end; alias eequote eesentence # === eequote
892
+
893
+ # ========================================================================= #
894
+ # === esentence
895
+ # ========================================================================= #
896
+ def esentence(
897
+ i, optional_css_class = ''
898
+ )
899
+ eesentence(i, optional_css_class)
900
+ br # This variant always ensure that br() will be called.
901
+ end; alias equote esentence # === equote
902
+
903
+ # ========================================================================= #
904
+ # === sanitize_this_id
905
+ #
906
+ # This method can be used to sanitize the given input, for further use
907
+ # as a HTML id. A few assumptions will be made for input that is
908
+ # passed to this method; but, even aside from these assumptions, the
909
+ # most important point for this method is that it can be consistently
910
+ # used/re-used.
911
+ # ========================================================================= #
912
+ def sanitize_this_id(i)
913
+ return ::Cyberweb.sanitize_this_id(i)
914
+ end
915
+
916
+ # ========================================================================= #
917
+ # === arrow_right?
918
+ # ========================================================================= #
919
+ def arrow_right?
920
+ ::Cyberweb.right_arrow
921
+ end; alias arrow_right arrow_right? # === arrow_right
922
+ alias rarrow arrow_right? # === rarrow
923
+ alias rarrow? arrow_right? # === rarrow?
924
+
925
+ # ========================================================================= #
926
+ # === l2emb
927
+ #
928
+ # This method simply combines l2() with br().
929
+ # ========================================================================= #
930
+ def l2emb(
931
+ i = '',
932
+ optional_css_class = ''
933
+ )
934
+ l2(i, optional_css_class)
935
+ br
936
+ end; alias l2br l2emb # === l2br
937
+ alias l2embr l2emb # === l2embr
938
+ alias lem2 l2emb # === lem2
939
+ alias lembre2 l2emb # === lembre2
940
+ alias padl2embr l2emb # === padl2embr
941
+ alias le2 l2emb # === le2
942
+ alias lem2br l2emb # === lem2br
943
+ alias le2em l2emb # === le2em
944
+
945
+ # ========================================================================= #
946
+ # === clickable_image?
947
+ #
948
+ # This must stay a simpler getter - no sanitizing is allowed.
949
+ # ========================================================================= #
950
+ def clickable_image?
951
+ @internal_hash[:clickable_image]
952
+ end
953
+
954
+ # ========================================================================= #
955
+ # === sitelibdir?
956
+ # ========================================================================= #
957
+ def sitelibdir?
958
+ return RbConfig::CONFIG['sitelibdir'].to_s+'/'
959
+ end
960
+
961
+ # ========================================================================= #
962
+ # === consider_autoclosing_the_head_tag
963
+ #
964
+ # This method will also append the javascript code.
965
+ # ========================================================================= #
966
+ def consider_autoclosing_the_head_tag(
967
+ main_string = main_string?
968
+ )
969
+ unless main_string.include?('<title>')
970
+ # ===================================================================== #
971
+ # Add the title here.
972
+ # ===================================================================== #
973
+ add_the_title_to_the_webobject
974
+ end
975
+ unless main_string.include? '</head>'
976
+ # ===================================================================== #
977
+ # Add all CSS files next:
978
+ # ===================================================================== #
979
+ add_all_local_css_files
980
+ append_newline
981
+ # ===================================================================== #
982
+ # The following is experimental as of April 2011.
983
+ # In June 2014 it was moved into the <head> tag.
984
+ #
985
+ # The code will append the default javascript code.
986
+ # ===================================================================== #
987
+ append(return_default_javascript)
988
+ # ===================================================================== #
989
+ # === Use Jquery
990
+ #
991
+ # Load jquery if the config tells us to do so. This has to happen
992
+ # within the <head> tag.
993
+ # ===================================================================== #
994
+ if use_jquery?
995
+ append_jquery_string
996
+ end
997
+ # ===================================================================== #
998
+ # === Dragula
999
+ #
1000
+ # Whether we will use dragula or not. If yes then we will add the
1001
+ # dragula.js script.
1002
+ # ===================================================================== #
1003
+ if use_dragula?
1004
+ append_path_to_dragula_js_file
1005
+ web_object_config?['use_dragula_for_these_tags'].each {|entry|
1006
+ append add_dragula_drag_for(entry) # For ul elements.
1007
+ }
1008
+ end
1009
+ # ===================================================================== #
1010
+ # Last but not least, append the default javascript code, as-is.
1011
+ # ===================================================================== #
1012
+ append("#{javascript?}#{NL}")
1013
+ addnl("\n</head>\n")
1014
+ end
1015
+ end
1016
+
1017
+ # ========================================================================= #
1018
+ # === build_up_the_html_string (main tag)
1019
+ #
1020
+ # This method will build the main string, that is - the one which is
1021
+ # stored in the instance variable called @string_that_is_to_be_served.
1022
+ #
1023
+ # This method here may also be called from the method serve_webpage()
1024
+ # for us.
1025
+ #
1026
+ # This method is just about the most important method for class
1027
+ # Cyberweb::WebObject.
1028
+ # ========================================================================= #
1029
+ def build_up_the_html_string
1030
+ reset_the_main_string # We have to empty our String at build-up start.
1031
+ prepend_doc_type
1032
+ # ======================================================================= #
1033
+ # Next, open up the <head> tag. We will also add the meta-collection.
1034
+ # ======================================================================= #
1035
+ append_html_header_to_the_head_open_tag
1036
+ append_the_meta_collection
1037
+ append_newline # Add a newline before the title.
1038
+ append_title
1039
+ append_data_from_remote_css_urls
1040
+ # append_default_css_files # ← Add the default .css files here.
1041
+ # ======================================================================= #
1042
+ # Append the CSS next.
1043
+ # ======================================================================= #
1044
+ # append @css_style
1045
+ # append @array_css_files.sort.join(N) unless @array_css_files.empty?
1046
+ # ======================================================================= #
1047
+ # A few more newlines, to also pad the favicon String.
1048
+ # ======================================================================= #
1049
+ append_newline
1050
+ append_newline
1051
+ # ======================================================================= #
1052
+ # Next, close the head tag.
1053
+ # ======================================================================= #
1054
+ append_chead_tag
1055
+ append_newline # Add add another newline after the </head> tag.
1056
+ # ======================================================================= #
1057
+ # Append the body-tag next.
1058
+ # ======================================================================= #
1059
+ if use_body_tag?
1060
+ append string_body_start(body_css_class?,
1061
+ body_the_id?,
1062
+ body_css_style?,
1063
+ body_javascript?) #, javascript_in_body)
1064
+ end
1065
+ append_frame_string # <- This is usually just an empty String.
1066
+ # ======================================================================= #
1067
+ # Also determine the amount of lines.
1068
+ # ======================================================================= #
1069
+ set_n_total_lines
1070
+ # ======================================================================= #
1071
+ # The next line is commented out because we may not always want
1072
+ # to close the <body> and <html> tag too early.
1073
+ # ======================================================================= #
1074
+ # append_cbody_and_chtml_tags
1075
+ # @internal_hash[:html_string] << "</html>\n"
1076
+ end; alias rebuild_the_HTML_string build_up_the_html_string # === rebuild_the_HTML_string
1077
+ alias rebuild_main_string build_up_the_html_string # === rebuild_main_string
1078
+ alias rebuild_the_main_string build_up_the_html_string # === rebuild_the_main_string
1079
+
1080
+ # ========================================================================= #
1081
+ # === doc_skeleton (main tag)
1082
+ #
1083
+ # This method has been specifically created to allow support of
1084
+ # .md (markdown) files in different languages - either german
1085
+ # or english.
1086
+ #
1087
+ # This method may also be called via a Symbol, such as:
1088
+ #
1089
+ # doc_skeleton(:english_or_german)
1090
+ #
1091
+ # ========================================================================= #
1092
+ def doc_skeleton(this_file)
1093
+ if this_file.is_a? Symbol
1094
+ case this_file
1095
+ # ===================================================================== #
1096
+ # === :english_or_german
1097
+ #
1098
+ # This will default to german.
1099
+ # ===================================================================== #
1100
+ when :english_or_german
1101
+ this_file = filename_without_extension?+'_german.md' # 'luft_german.md'
1102
+ end
1103
+ end
1104
+ # ======================================================================= #
1105
+ # Next, check for arguments given to the .cgi file at hand.
1106
+ # ======================================================================= #
1107
+ parameters_as_string = parameters_as_string?
1108
+ case parameters_as_string
1109
+ # ======================================================================= #
1110
+ # === use_english
1111
+ #
1112
+ # This can be invoked via:
1113
+ #
1114
+ # http://localhost/programming/ruby/src/roebe/lib/roebe/www/luft/luft.cgi?english
1115
+ #
1116
+ # ======================================================================= #
1117
+ when /use_english/,
1118
+ /english$/
1119
+ this_file = filename_without_extension?+'_english.md'
1120
+ # ======================================================================= #
1121
+ # === use_german
1122
+ # ======================================================================= #
1123
+ when /use_german/,
1124
+ /german$/
1125
+ this_file = filename_without_extension?+'_german.md'
1126
+ end
1127
+ if this_file and File.exist?(this_file)
1128
+ file_content = File.read(this_file, encoding: 'utf-8')
1129
+ dataset = remove_comments_from_this_string(file_content)
1130
+ eval(dataset)
1131
+ # ===================================================================== #
1132
+ # Next simply evaluate it.
1133
+ # ===================================================================== #
1134
+ else
1135
+ no_file_exists_at(this_file)
1136
+ end
1137
+ end
1138
+
1139
+ # ========================================================================= #
1140
+ # === p_default
1141
+ #
1142
+ # This is similar to p(), but the implicit CSS class 'default' will be
1143
+ # used.
1144
+ # ========================================================================= #
1145
+ def p_default(
1146
+ optional_css_class = '',
1147
+ the_id = '',
1148
+ optional_css_style = '',
1149
+ &block
1150
+ )
1151
+ if optional_css_class.is_a? Hash
1152
+ # ===================================================================== #
1153
+ # === :id
1154
+ # ===================================================================== #
1155
+ if optional_css_class.has_key? :id
1156
+ the_id = optional_css_class.delete(:id)
1157
+ end
1158
+ # ===================================================================== #
1159
+ # === :css_style
1160
+ # ===================================================================== #
1161
+ if optional_css_class.has_key? :css_style
1162
+ optional_css_style = optional_css_class.delete(:css_style)
1163
+ end
1164
+ if optional_css_class.is_a?(Hash) and optional_css_class.empty?
1165
+ optional_css_class = ''
1166
+ end
1167
+ end
1168
+ optional_css_class = optional_css_class.to_s.dup
1169
+ optional_css_class.prepend('default ') # Make it the first argument.
1170
+ p(
1171
+ optional_css_class.strip,
1172
+ the_id,
1173
+ optional_css_style,
1174
+ &block
1175
+ )
1176
+ end
1177
+
1178
+ # ========================================================================= #
1179
+ # === counter_li
1180
+ #
1181
+ # This method was added in June 2021.
1182
+ # ========================================================================= #
1183
+ def counter_li(
1184
+ i = '',
1185
+ optional_css_class = '',
1186
+ &block
1187
+ )
1188
+ @internal_hash[:listing_counter] += 1
1189
+ yielded = nil
1190
+ if block_given?
1191
+ yielded = yield
1192
+ end
1193
+ index = @internal_hash[:listing_counter].to_s
1194
+ case yielded
1195
+ # ======================================================================= #
1196
+ # === :counter_is_bold
1197
+ # ======================================================================= #
1198
+ when :counter_is_bold
1199
+ index = "<b>#{index}</b>"
1200
+ end
1201
+ e '('+index+') '+i.to_s,
1202
+ optional_css_class
1203
+ end; alias listing counter_li # === listing
1204
+ alias counter counter_li # === counter
1205
+
1206
+ # ========================================================================= #
1207
+ # === bold_counter
1208
+ #
1209
+ # This is identical to counter_li() - or, counter(), which is an alias,
1210
+ # anyway - except that the index that is shown, is shown in a bold way.
1211
+ # ========================================================================= #
1212
+ def bold_counter(
1213
+ i = '',
1214
+ optional_css_class = ''
1215
+ )
1216
+ counter(i, optional_css_class) { :counter_is_bold }
1217
+ end
1218
+
1219
+ # ========================================================================= #
1220
+ # === anm
1221
+ #
1222
+ # Note that "anm" is short for "anmerkung", which can roughly be
1223
+ # translated to mean "important annotation" in English.
1224
+ # ========================================================================= #
1225
+ def anm(
1226
+ i = '', # Should be an empty String.
1227
+ optional_css_class = '',
1228
+ optional_the_id = '',
1229
+ optional_css_style = '',
1230
+ &block
1231
+ )
1232
+ css_for_the_anmerkung_symbol = 'marr5px'
1233
+ if block_given?
1234
+ yielded = yield
1235
+ if yielded.is_a? Hash
1236
+ # =================================================================== #
1237
+ # === :outer_CSS
1238
+ #
1239
+ # This entry point allows the user to override the default CSS
1240
+ # for anm().
1241
+ # =================================================================== #
1242
+ if yielded.has_key? :outer_CSS
1243
+ css_for_the_anmerkung_symbol = yielded.delete(:outer_CSS)
1244
+ end
1245
+ end
1246
+ end
1247
+ anmerkung_symbol = sg(:anmerkung, css_for_the_anmerkung_symbol)
1248
+ addn(
1249
+ anmerkung_symbol+
1250
+ string_span(
1251
+ i, optional_css_class, optional_the_id, optional_css_style
1252
+ )
1253
+ )
1254
+ end; alias anmerkung anm # === anmerkung
1255
+
1256
+ # ========================================================================= #
1257
+ # === addnl (addnl tag)
1258
+ #
1259
+ # This will call add(), and decree that a newline is used. It will NOT
1260
+ # modify the given input at hand - only add() may modify the given
1261
+ # input at hand.
1262
+ # ========================================================================= #
1263
+ def addnl(
1264
+ i = "\n",
1265
+ optional_css_class = nil
1266
+ )
1267
+ # ======================================================================= #
1268
+ # We can not call .to_s in the next line because we may pass a Symbol
1269
+ # such as :br too.
1270
+ # ======================================================================= #
1271
+ add(i, optional_css_class, :use_a_newline) # Delegate towards add() here.
1272
+ end; alias add_with_newline addnl # === add_with_newline
1273
+ alias add_newline addnl # === add_newline
1274
+ alias addn addnl # === addn
1275
+ alias adnl addnl # === adnl
1276
+
1277
+ # ========================================================================= #
1278
+ # === add (add tag)
1279
+ #
1280
+ # This is the general append-method for whenever we seek to append
1281
+ # onto the main String (stored in @_) of this class.
1282
+ # ========================================================================= #
1283
+ def add(
1284
+ i, # The input here can be a Symbol as well.
1285
+ optional_css_class = nil,
1286
+ optional_entry_for_newline = nil
1287
+ )
1288
+ case i
1289
+ # ======================================================================= #
1290
+ # === :newline
1291
+ # ======================================================================= #
1292
+ when :newline,
1293
+ :use_a_newline
1294
+ i = NL
1295
+ # ======================================================================= #
1296
+ # === :body
1297
+ # ======================================================================= #
1298
+ when :body
1299
+ consider_autoclosing_the_head_tag
1300
+ i = return_body_tag(optional_css_class).dup
1301
+ # ======================================================================= #
1302
+ # === :content_type_plain
1303
+ # ======================================================================= #
1304
+ when :content_type_plain
1305
+ i = Cyberweb::CONTENT_TYPE_PLAIN
1306
+ end
1307
+ if i
1308
+ # ===================================================================== #
1309
+ # === Handle symbols next
1310
+ # ===================================================================== #
1311
+ if i.is_a? Symbol
1312
+ i = "<#{i}>".dup # Such as for :br aka <br>.
1313
+ elsif i.is_a? Numeric
1314
+ i = i.to_s.dup
1315
+ elsif i.respond_to?(:is_an_objectified_html_tag?) and
1316
+ i.is_an_objectified_html_tag?
1317
+ # =================================================================== #
1318
+ # This entry clause adds support for directly adding
1319
+ # Objectified::HtmlTags.
1320
+ # =================================================================== #
1321
+ i = i.string?
1322
+ end
1323
+ if i.is_a?(String) and i.frozen?
1324
+ i = i.dup
1325
+ end
1326
+ end
1327
+ if i.nil?
1328
+ i = ''.dup
1329
+ end
1330
+ case optional_entry_for_newline
1331
+ # ======================================================================= #
1332
+ # === :newline
1333
+ # ======================================================================= #
1334
+ when :newline,
1335
+ :use_a_newline
1336
+ i << "\n"
1337
+ end
1338
+ # ======================================================================= #
1339
+ # Avoid a frozen main string:
1340
+ # ======================================================================= #
1341
+ if @internal_hash[:html_string].frozen?
1342
+ @internal_hash[:html_string] = @internal_hash[:html_string].dup
1343
+ end
1344
+ append_raw << i
1345
+ end; alias append add # === append
1346
+ alias add_to_main_string add # === add_to_main_string
1347
+
1348
+ # ========================================================================= #
1349
+ # === append_raw
1350
+ #
1351
+ # This method is not allowed to do ANY modification to the given input.
1352
+ # ========================================================================= #
1353
+ def append_raw(i = '')
1354
+ @internal_hash[:html_string] << i
1355
+ end
1356
+
1357
+ # ========================================================================= #
1358
+ # === relative_path?
1359
+ #
1360
+ # This method attempts to return the correct, relative path to assets.
1361
+ #
1362
+ # We need to keep in mind that the .cgi file at hand may reside
1363
+ # in another subdirectory, such as /home/x/studium/, rather than
1364
+ # /home/x/data/.
1365
+ # ========================================================================= #
1366
+ def relative_path?
1367
+ @internal_hash[:relative_path]
1368
+ end
1369
+
1370
+ # ========================================================================= #
1371
+ # === dot109?
1372
+ #
1373
+ # This simply wraps over dot() with a default value and default CSS.
1374
+ # ========================================================================= #
1375
+ def dot109?
1376
+ string_dot(109, 'marr10px')
1377
+ end
1378
+
1379
+ # ========================================================================= #
1380
+ # === set_clickable_image
1381
+ # ========================================================================= #
1382
+ def set_clickable_image(i)
1383
+ @internal_hash[:clickable_image] = i
235
1384
  end
236
1385
 
1386
+ require 'cyberweb/toplevel_methods/dot.rb'
237
1387
  # ========================================================================= #
238
- # === h4_id_clickable
1388
+ # === string_dot
1389
+ #
1390
+ # This variant will return a String. The regular dot() method on the
1391
+ # other hand will append that String onto the resulting webpage
1392
+ # content, as-is.
239
1393
  # ========================================================================= #
240
- def h4_id_clickable(
241
- i,
1394
+ def string_dot(
1395
+ i = 108,
242
1396
  optional_css_class = '',
243
- &block
1397
+ optional_the_id = '',
1398
+ optional_css_style = ''
244
1399
  )
245
- h4_id(i, optional_css_class) { :clickable_image }
246
- end; alias h4_fancy_id h4_id_clickable # === h4_fancy_id
1400
+ _ = sg(
1401
+ "dot#{i}".to_sym,
1402
+ optional_css_class,
1403
+ optional_the_id,
1404
+ optional_css_style
1405
+ )
1406
+ return _
1407
+ end; alias dot string_dot # === dot (dot tag)
247
1408
 
248
1409
  # ========================================================================= #
249
- # === h4_id
1410
+ # === h3_id_clickable
250
1411
  # ========================================================================= #
251
- def h4_id(
1412
+ def h3_id_clickable(
252
1413
  i,
253
1414
  optional_css_class = '',
254
1415
  &block
255
1416
  )
256
- use_this_id = sanitize_this_id(i)
257
- # ======================================================================= #
258
- # === Handle blocks next
259
- # ======================================================================= #
260
- if block_given?
261
- yielded = yield
262
- case yielded
263
- # ===================================================================== #
264
- # === :clickable_image
265
- # ===================================================================== #
266
- when :clickable_image
267
- i = "<a href=\"##{use_this_id}\">"+
268
- dot109?+
269
- "</a>#{i}"
270
- end
271
- end
272
- h4 i, id: use_this_id
273
- end
1417
+ h3_id(i, optional_css_class) { :clickable_image }
1418
+ end; alias h3_fancy_id h3_id_clickable # === h3_fancy_id
1419
+ alias h3_fid h3_id_clickable # === h3_fid
274
1420
 
275
1421
  # ========================================================================= #
276
1422
  # === h5_id_clickable
@@ -282,6 +1428,7 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
282
1428
  )
283
1429
  h5_id(i, optional_css_class) { :clickable_image }
284
1430
  end; alias h5_fancy_id h5_id_clickable # === h5_fancy_id
1431
+ alias h5_fid h5_id_clickable # === h5_fid
285
1432
 
286
1433
  # ========================================================================= #
287
1434
  # === h5_id
@@ -307,7 +1454,7 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
307
1454
  "</a>#{i}"
308
1455
  end
309
1456
  end
310
- h5 i, id: use_this_id
1457
+ h5(i, id: use_this_id, css_class: optional_css_class)
311
1458
  end
312
1459
 
313
1460
  # ========================================================================= #
@@ -320,6 +1467,7 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
320
1467
  )
321
1468
  h6_id(i, optional_css_class) { :clickable_image }
322
1469
  end; alias h6_fancy_id h6_id_clickable # === h6_fancy_id
1470
+ alias h6_fid h6_id_clickable # === h6_fid
323
1471
 
324
1472
  # ========================================================================= #
325
1473
  # === h6_id
@@ -345,114 +1493,9 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
345
1493
  "</a>#{i}"
346
1494
  end
347
1495
  end
348
- h6 i, id: use_this_id
349
- end
350
-
351
- # ========================================================================= #
352
- # === p_default
353
- #
354
- # This is similar to p(), but the implicit CSS class 'default' will be
355
- # used.
356
- # ========================================================================= #
357
- def p_default(
358
- optional_css_class = '',
359
- the_id = '',
360
- optional_css_style = '',
361
- &block
362
- )
363
- if optional_css_class.is_a? Hash
364
- # ===================================================================== #
365
- # === :id
366
- # ===================================================================== #
367
- if optional_css_class.has_key? :id
368
- the_id = optional_css_class.delete(:id)
369
- end
370
- if optional_css_class.is_a?(Hash) and optional_css_class.empty?
371
- optional_css_class = ''
372
- end
373
- end
374
- optional_css_class = optional_css_class.to_s.dup
375
- optional_css_class.prepend('default ') # Make it the first argument.
376
- p(
377
- optional_css_class.strip,
378
- the_id,
379
- optional_css_style,
380
- &block
381
- )
1496
+ h6(i, id: use_this_id, css_class: optional_css_class)
382
1497
  end
383
1498
 
384
- # ========================================================================= #
385
- # === science_hyperlinks
386
- #
387
- # This method will add some of my default hyperlinks for local files,
388
- # in regards to science-related links/content.
389
- #
390
- # The first argument to this method can be additional entries that
391
- # the user may want to display.
392
- #
393
- # Different usage examples follow next:
394
- #
395
- # science_hyperlinks
396
- # science_hyperlinks { :use_unicode_right_arrows }
397
- # science_links {{ use_this_image: LINK_IMAGE }}
398
- #
399
- # ========================================================================= #
400
- def science_hyperlinks(
401
- additional_entries = nil,
402
- &block
403
- )
404
- array_science_entries = %w(
405
- local_cellbiology
406
- local_biochemistry
407
- local_chemistry
408
- local_genetics
409
- local_gene_expression
410
- local_microbiology
411
- local_biotechnology
412
- local_evolution
413
- )
414
- if additional_entries
415
- array_science_entries << [additional_entries]
416
- array_science_entries.flatten!
417
- array_science_entries.compact!
418
- end
419
- yielded = nil
420
- yielded = yield if block_given?
421
- array_science_entries.each {|this_local_link|
422
- this_local_link = BeautifulUrl.local_menu(this_local_link)
423
- short_name = File.basename(this_local_link).delete_suffix('.cgi').dup.
424
- tr('_',' ').
425
- sub(/local/,'')
426
- if yielded.is_a? Hash
427
- # =================================================================== #
428
- # === :use_this_image
429
- # =================================================================== #
430
- if yielded.has_key?(:use_this_image)
431
- use_this_image = yielded[:use_this_image]
432
- short_name = "#{use_this_image}#{short_name.strip}"
433
- end
434
- else
435
- case yielded
436
- # =================================================================== #
437
- # === pretty_image
438
- # =================================================================== #
439
- when :pretty_image
440
- short_name.prepend(dot109?)
441
- # =================================================================== #
442
- # === :use_unicode_right_arrows
443
- # =================================================================== #
444
- when :use_unicode_right_arrows
445
- short_name.prepend('→')
446
- end
447
- end
448
- abr_self(
449
- this_local_link,
450
- content: short_name
451
- )
452
- }
453
- end; alias add_science_links science_hyperlinks # === add_science_links
454
- alias science_links science_hyperlinks # === science_links
455
-
456
1499
  # ========================================================================= #
457
1500
  # === listing_css_object
458
1501
  # ========================================================================= #
@@ -460,22 +1503,6 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
460
1503
  ::Cyberweb.listing_css_object
461
1504
  end
462
1505
 
463
- # ========================================================================= #
464
- # === counter_li
465
- #
466
- # This method was added in June 2021.
467
- # ========================================================================= #
468
- def counter_li(
469
- i = '',
470
- optional_css_class = ''
471
- )
472
- @internal_hash[:listing_counter] += 1
473
- e '('+@internal_hash[:listing_counter].to_s+') '+
474
- i.to_s,
475
- optional_css_class
476
- end; alias listing counter_li # === listing
477
- alias counter counter_li # === counter
478
-
479
1506
  # ========================================================================= #
480
1507
  # === listing_css
481
1508
  # ========================================================================= #
@@ -497,33 +1524,6 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
497
1524
  @internal_hash[:listing_counter] = i
498
1525
  end
499
1526
 
500
- # ========================================================================= #
501
- # === cmd3
502
- # ========================================================================= #
503
- def cmd3(
504
- i = '',
505
- optional_css_class = ::Cyberweb.command3?
506
- )
507
- e(i, optional_css_class)
508
- end
509
-
510
- # ========================================================================= #
511
- # === l2emb
512
- # ========================================================================= #
513
- def l2emb(
514
- i = '',
515
- optional_css_class = ''
516
- )
517
- l2(i, optional_css_class)
518
- br
519
- end; alias l2br l2emb # === l2br
520
- alias l2embr l2emb # === l2embr
521
- alias lem2 l2emb # === lem2
522
- alias lembre2 l2emb # === lembre2
523
- alias padl2embr l2emb # === padl2embr
524
- alias le2 l2emb # === le2
525
- alias lem2br l2emb # === lem2br
526
-
527
1527
  # ========================================================================= #
528
1528
  # === l2
529
1529
  # ========================================================================= #
@@ -550,72 +1550,6 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
550
1550
  end; alias l2em l2 # === l2em
551
1551
  alias padl2em l2 # === padl2em
552
1552
 
553
- # ========================================================================= #
554
- # === string_link
555
- #
556
- # This method essentially creates a String representation of the HTML
557
- # <a> tag.
558
- #
559
- # Since as of April 2022 the method "slink" is now an alias to string_link;
560
- # it used to be an alias towards "def a()", but this was changed - the
561
- # word string_link more logically may refer to slink as its intrinsic
562
- # abbreviation.
563
- # ========================================================================= #
564
- def string_link(
565
- i = '',
566
- option_hash = {},
567
- &block
568
- )
569
- # ======================================================================= #
570
- # === Handle blocks given to this method next
571
- # ======================================================================= #
572
- if block_given?
573
- yielded = yield
574
- case yielded
575
- # ===================================================================== #
576
- # === :pretty
577
- # ===================================================================== #
578
- when :pretty
579
- option_hash[:remote_URL] = beautiful_url(i)
580
- end
581
- end
582
- if i.is_a?(Symbol)
583
- if i.start_with?('local_')
584
- i = BeautifulUrl.local_menu(i)
585
- else
586
- i = beautiful_url(i)
587
- # =================================================================== #
588
- # Also check if the second argument is a String. In this case we
589
- # must modify it. Example for input that fulfils this criterium:
590
- #
591
- # remote_link(:hydrogenase, 'Hydrogenase')+
592
- #
593
- # =================================================================== #
594
- if option_hash.is_a? String
595
- option_hash = { content: option_hash }
596
- end
597
- end
598
- end
599
- # ======================================================================= #
600
- # === Handle local entries for the "/home/x" directory layout.
601
- # ======================================================================= #
602
- if i.start_with? '/home/x'
603
- i = i.dup
604
- i.sub!(/\/home\/x\//, relative_path?)
605
- end
606
- i = rds(i.to_s.dup)
607
- # ======================================================================= #
608
- # Delegate onto HtmlTags.a().
609
- # ======================================================================= #
610
- return HtmlTags.a(
611
- i,
612
- option_hash
613
- )
614
- end; alias string_a string_link # === string_a
615
- alias string_href string_link # === string_href
616
- alias string_remote_link string_link # === string_remote_link
617
- alias slink string_link # === slink
618
-
619
1553
  # ========================================================================= #
620
1554
  # === return_progress
621
1555
  # ========================================================================= #
@@ -1130,34 +2064,6 @@ button.for_the_keyboard:active {
1130
2064
  return the_id # Always return it here.
1131
2065
  end; alias register_id register_this_id # === register_id
1132
2066
 
1133
- # ========================================================================= #
1134
- # === header
1135
- #
1136
- # This is a variant for h1() essentially.
1137
- # ========================================================================= #
1138
- def header(
1139
- i = '',
1140
- optional_css_class = '',
1141
- optional_the_id = '',
1142
- optional_css_style = '',
1143
- optional_javascript = ''
1144
- )
1145
- if optional_the_id.empty?
1146
- # ===================================================================== #
1147
- # Determine the id next:
1148
- # ===================================================================== #
1149
- optional_the_id = ::Cyberweb.remove_html(i).tr(' ','_')
1150
- end
1151
- h1(
1152
- i,
1153
- optional_css_class,
1154
- optional_the_id,
1155
- optional_css_style,
1156
- optional_javascript
1157
- )
1158
- @internal_hash[:register_ids] << register_this_id(optional_the_id) # optional_the_id
1159
- end
1160
-
1161
2067
  # ========================================================================= #
1162
2068
  # === internal_hash?
1163
2069
  # ========================================================================= #
@@ -1478,27 +2384,6 @@ button.for_the_keyboard:active {
1478
2384
  alias b1= set_body_css_class # === b1=
1479
2385
  alias b1 set_body_css_class # === b1
1480
2386
 
1481
- # ========================================================================= #
1482
- # === table3
1483
- # ========================================================================= #
1484
- def table3(
1485
- css_class = '',
1486
- id = '',
1487
- css_style = '',
1488
- *content,
1489
- &block
1490
- )
1491
- addn(
1492
- string_table3(
1493
- css_class,
1494
- id,
1495
- css_style,
1496
- content,
1497
- &block
1498
- )
1499
- )
1500
- end
1501
-
1502
2387
  # ========================================================================= #
1503
2388
  # === string_table3
1504
2389
  #
@@ -1677,39 +2562,13 @@ button.for_the_keyboard:active {
1677
2562
  *content,
1678
2563
  &block
1679
2564
  )
1680
- ::Cyberweb.string_table2(
1681
- css_class,
1682
- the_id,
1683
- css_style,
1684
- content,
1685
- &block
1686
- )
1687
- end
1688
-
1689
- # ========================================================================= #
1690
- # === table2
1691
- #
1692
- # This variant maks a two-elements-per-row HTML table.
1693
- #
1694
- # The last variable is the content; keep it even, if possible, e. g
1695
- # 2 elements or 4 or 6 and so forth.
1696
- # ========================================================================= #
1697
- def table2(
1698
- css_class = '',
1699
- id = '',
1700
- css_style = '',
1701
- *content,
1702
- &block
1703
- )
1704
- addn(
1705
- string_table2(
1706
- css_class,
1707
- id,
1708
- css_style,
1709
- content.flatten,
1710
- &block
1711
- )
1712
- )
2565
+ ::Cyberweb.string_table2(
2566
+ css_class,
2567
+ the_id,
2568
+ css_style,
2569
+ content,
2570
+ &block
2571
+ )
1713
2572
  end
1714
2573
 
1715
2574
  # ========================================================================= #
@@ -1720,7 +2579,7 @@ button.for_the_keyboard:active {
1720
2579
  )
1721
2580
  use_this_dataset.flatten!
1722
2581
  use_this_dataset.compact!
1723
- table2('pad0_5em','glossar') {{
2582
+ table2('pad0_5em pretty_table','glossar') {{
1724
2583
  with_this_data: use_this_dataset
1725
2584
  }}
1726
2585
  end; alias glossar glossar_table # === glossar
@@ -1805,13 +2664,6 @@ button.for_the_keyboard:active {
1805
2664
  )
1806
2665
  end
1807
2666
 
1808
- # ========================================================================= #
1809
- # === javascript?
1810
- # ========================================================================= #
1811
- def javascript?
1812
- @internal_hash[:javascript]
1813
- end
1814
-
1815
2667
  # ========================================================================= #
1816
2668
  # === logical_build_up
1817
2669
  #
@@ -1958,6 +2810,7 @@ button.for_the_keyboard:active {
1958
2810
  alias drag_n_drop drag_and_drop # === drag_n_drop
1959
2811
  alias drag_drop drag_and_drop # === drag_drop
1960
2812
  alias add_javascript_drag drag_and_drop # === add_javascript_drag
2813
+ alias draggy drag_and_drop # === draggy
1961
2814
 
1962
2815
  # ========================================================================= #
1963
2816
  # === update_the_body
@@ -2005,26 +2858,6 @@ document.body.innerHTML = "'+with_this_content+'"
2005
2858
  )
2006
2859
  end
2007
2860
 
2008
- # ========================================================================= #
2009
- # === string_table5
2010
- # ========================================================================= #
2011
- def string_table5(
2012
- css_class = '',
2013
- id = '',
2014
- css_style = '',
2015
- *content
2016
- )
2017
- # ======================================================================= #
2018
- # To test, try:
2019
- #
2020
- # puts ::Cyberweb.string_table5('','','',%w( ah asjhk avshvasjkh vajhksavjhk avsjhvashkjavs ))
2021
- #
2022
- # ======================================================================= #
2023
- ::Cyberweb.string_table5(
2024
- css_class, id, css_style, content
2025
- )
2026
- end
2027
-
2028
2861
  # ========================================================================= #
2029
2862
  # === parse_table
2030
2863
  # ========================================================================= #
@@ -2145,98 +2978,6 @@ EOF
2145
2978
  SaveFile.write_what_into(what, into)
2146
2979
  end
2147
2980
 
2148
- # ========================================================================= #
2149
- # === addnl (addnl tag)
2150
- #
2151
- # This will call add(), and decree that a newline is used. It will NOT
2152
- # modify the given input at hand - only add() may modify the given
2153
- # input at hand.
2154
- # ========================================================================= #
2155
- def addnl(
2156
- i = "\n",
2157
- optional_css_class = nil
2158
- )
2159
- # ======================================================================= #
2160
- # We can not call .to_s in the next line because we may pass a Symbol
2161
- # such as :br too.
2162
- # ======================================================================= #
2163
- add(i, optional_css_class, :use_a_newline) # Delegate towards add() here.
2164
- end; alias add_with_newline addnl # === add_with_newline
2165
- alias add_newline addnl # === add_newline
2166
- alias addn addnl # === addn
2167
- alias adnl addnl # === adnl
2168
-
2169
- # ========================================================================= #
2170
- # === add (add tag)
2171
- #
2172
- # This is the general append-method for whenever we seek to append
2173
- # onto the main String (stored in @_) of this class.
2174
- # ========================================================================= #
2175
- def add(
2176
- i, # The input here can be a Symbol as well.
2177
- optional_css_class = nil,
2178
- optional_entry_for_newline = nil
2179
- )
2180
- case i
2181
- # ======================================================================= #
2182
- # === :newline
2183
- # ======================================================================= #
2184
- when :newline,
2185
- :use_a_newline
2186
- i = NL
2187
- # ======================================================================= #
2188
- # === :body
2189
- # ======================================================================= #
2190
- when :body
2191
- consider_autoclosing_the_head_tag
2192
- i = return_body_tag(optional_css_class).dup
2193
- # ======================================================================= #
2194
- # === :content_type_plain
2195
- # ======================================================================= #
2196
- when :content_type_plain
2197
- i = Cyberweb::CONTENT_TYPE_PLAIN
2198
- end
2199
- if i
2200
- # ===================================================================== #
2201
- # === Handle symbols next
2202
- # ===================================================================== #
2203
- if i.is_a? Symbol
2204
- i = "<#{i}>".dup # Such as for :br aka <br>.
2205
- elsif i.is_a? Numeric
2206
- i = i.to_s.dup
2207
- elsif i.respond_to?(:is_an_objectified_html_tag?) and
2208
- i.is_an_objectified_html_tag?
2209
- # =================================================================== #
2210
- # This entry clause adds support for directly adding
2211
- # Objectified::HtmlTags.
2212
- # =================================================================== #
2213
- i = i.string?
2214
- end
2215
- if i.is_a?(String) and i.frozen?
2216
- i = i.dup
2217
- end
2218
- end
2219
- if i.nil?
2220
- i = ''.dup
2221
- end
2222
- case optional_entry_for_newline
2223
- # ======================================================================= #
2224
- # === :newline
2225
- # ======================================================================= #
2226
- when :newline,
2227
- :use_a_newline
2228
- i << "\n"
2229
- end
2230
- # ======================================================================= #
2231
- # Avoid a frozen main string:
2232
- # ======================================================================= #
2233
- if @internal_hash[:html_string].frozen?
2234
- @internal_hash[:html_string] = @internal_hash[:html_string].dup
2235
- end
2236
- @internal_hash[:html_string] << i
2237
- end; alias append add # === append
2238
- alias add_to_main_string add # === add_to_main_string
2239
-
2240
2981
  # ========================================================================= #
2241
2982
  # === german
2242
2983
  # ========================================================================= #
@@ -2407,23 +3148,6 @@ a:hover {
2407
3148
  alias smart_include attach_these_constants # === smart_include
2408
3149
  alias adhoc_include attach_these_constants # === adhoc_include
2409
3150
 
2410
- # ========================================================================= #
2411
- # === cmd1
2412
- # ========================================================================= #
2413
- def cmd1(
2414
- i = '',
2415
- optional_css_class = ::Cyberweb.command1?,
2416
- &block
2417
- )
2418
- if block_given? and (yield == :no_break)
2419
- ee(
2420
- string_span(i, optional_css_class)
2421
- )
2422
- else
2423
- e(i, optional_css_class)
2424
- end
2425
- end; alias cmd cmd1 # === cmd
2426
-
2427
3151
  # ========================================================================= #
2428
3152
  # === return_css_for_tetris
2429
3153
  #
@@ -2793,65 +3517,6 @@ a:hover {
2793
3517
  add_string_lateron
2794
3518
  end
2795
3519
 
2796
- # ========================================================================= #
2797
- # === doc_skeleton (main tag)
2798
- #
2799
- # This method has been specifically created to allow support of
2800
- # .md (markdown) files in different languages - either german
2801
- # or english.
2802
- #
2803
- # This method may also be called via a Symbol, such as:
2804
- #
2805
- # doc_skeleton(:english_or_german)
2806
- #
2807
- # ========================================================================= #
2808
- def doc_skeleton(this_file)
2809
- if this_file.is_a? Symbol
2810
- case this_file
2811
- # ===================================================================== #
2812
- # === :english_or_german
2813
- #
2814
- # This will default to german.
2815
- # ===================================================================== #
2816
- when :english_or_german
2817
- this_file = filename_without_extension?+'_german.md' # 'luft_german.md'
2818
- end
2819
- end
2820
- # ======================================================================= #
2821
- # Next, check for arguments given to the .cgi file at hand.
2822
- # ======================================================================= #
2823
- parameters_as_string = parameters_as_string?
2824
- case parameters_as_string
2825
- # ======================================================================= #
2826
- # === use_english
2827
- #
2828
- # This can be invoked via:
2829
- #
2830
- # http://localhost/programming/ruby/src/roebe/lib/roebe/www/luft/luft.cgi?english
2831
- #
2832
- # ======================================================================= #
2833
- when /use_english/,
2834
- /english$/
2835
- this_file = filename_without_extension?+'_english.md'
2836
- # ======================================================================= #
2837
- # === use_german
2838
- # ======================================================================= #
2839
- when /use_german/,
2840
- /german$/
2841
- this_file = filename_without_extension?+'_german.md'
2842
- end
2843
- if this_file and File.exist?(this_file)
2844
- file_content = File.read(this_file, encoding: 'utf-8')
2845
- dataset = remove_comments_from_this_string(file_content)
2846
- eval(dataset)
2847
- # ===================================================================== #
2848
- # Next simply evaluate it.
2849
- # ===================================================================== #
2850
- else
2851
- no_file_exists_at(this_file)
2852
- end
2853
- end
2854
-
2855
3520
  # ========================================================================= #
2856
3521
  # === created_when
2857
3522
  #
@@ -3091,7 +3756,7 @@ a:hover {
3091
3756
  alias css_style css_style # === css_style
3092
3757
  alias inline_css css_style # === inline_css
3093
3758
  alias append_to_css_style css_style # === append_to_css_style
3094
- alias append_this_css css_style # === append_this_css
3759
+ # alias append_this_css css_style # === append_this_css # This is now another wrapper, since 2023.
3095
3760
  alias add_css_style css_style # === add_css_style
3096
3761
 
3097
3762
  # ========================================================================= #
@@ -3181,8 +3846,8 @@ a:hover {
3181
3846
  addnl(
3182
3847
  result
3183
3848
  )
3184
- end; alias embed_pdf embed_this_pdf # === embed_pdf
3185
- alias add_pdf embed_this_pdf # === add_pdf
3849
+ end; alias add_pdf embed_this_pdf # === add_pdf
3850
+ alias embed_pdf embed_this_pdf # === embed_pdf
3186
3851
  alias embed_this_pdf_file embed_this_pdf # === embed_this_pdf_file
3187
3852
 
3188
3853
  # ========================================================================= #
@@ -3786,29 +4451,6 @@ a:hover {
3786
4451
  return _
3787
4452
  end
3788
4453
 
3789
- # ========================================================================= #
3790
- # === return_default_javascript
3791
- # ========================================================================= #
3792
- def return_default_javascript#(
3793
- # i = ::Cyberweb.converted_path_to_data # Disabled this line as of October 2022.
3794
- #)
3795
- #::Cyberweb.return_default_javascript(i)
3796
- _ = ''.dup
3797
- # path_to_use = ::Cyberweb.converted_path_to_project_base_dir
3798
- # path_to_use = ::Cyberweb.log_dir?+'javascript_code/'
3799
- path_to_use = ::Cyberweb.converted_path_to_the_directory_containing_the_copied_javascript_files
3800
- array = ARRAY_DEFAULT_JAVASCRIPT_LIBRARIES
3801
- _ = ''.dup # This String will be returned.
3802
- array.each {|entry|
3803
- full_path = "#{path_to_use}#{entry}".dup
3804
- _ << '<script src="'+full_path+'"'
3805
- _ = _.ljust(48)
3806
- _ << ' type="text/javascript"></script>'
3807
- _ << NL
3808
- }
3809
- return _
3810
- end
3811
-
3812
4454
  # ========================================================================= #
3813
4455
  # === table_padding=
3814
4456
  # ========================================================================= #
@@ -3985,110 +4627,38 @@ a:hover {
3985
4627
  def add_javascript_file(i)
3986
4628
  if i.is_a? Symbol
3987
4629
  case i
3988
- # ===================================================================== #
3989
- # === :simple_calculator
3990
- # ===================================================================== #
3991
- when :simple_calculator
3992
- i = File.absolute_path(
3993
- project_base_dir?+'javascript_code/simple_calculator.js'
3994
- )
3995
- end
3996
- if i and File.exist?(i)
3997
- i = File.read(i)
3998
- end
3999
- end
4000
- addnl(
4001
- "<script>\n"+
4002
- i.to_s+
4003
- "</script>\n"
4004
- )
4005
- end
4006
-
4007
- # ========================================================================= #
4008
- # === set_body_content
4009
- # ========================================================================= #
4010
- def set_body_content(i)
4011
- @internal_hash[:body_content] = i.to_s.dup
4012
- end
4013
-
4014
- # ========================================================================= #
4015
- # === body_content?
4016
- # ========================================================================= #
4017
- def body_content?
4018
- @internal_hash[:body_content]
4019
- end; alias body_string? body_content? # === body_string?
4020
-
4021
- # ========================================================================= #
4022
- # === cmd2
4023
- # ========================================================================= #
4024
- def cmd2(
4025
- i = '',
4026
- optional_css_class = ::Cyberweb.command2?
4027
- )
4028
- e(i, optional_css_class)
4029
- end
4030
-
4031
- # ========================================================================= #
4032
- # === cmd1_is
4033
- # ========================================================================= #
4034
- def cmd1_is(i)
4035
- Cyberweb.internal_hash?[:cmd1] = i
4036
- end; alias cmd_is cmd1_is # === cmd_is
4037
-
4038
- # ========================================================================= #
4039
- # === cmd2_is
4040
- # ========================================================================= #
4041
- def cmd2_is(i)
4042
- Cyberweb.internal_hash?[:cmd2] = i
4043
- end
4044
-
4045
- # ========================================================================= #
4046
- # === cmd3_is
4047
- # ========================================================================= #
4048
- def cmd3_is(i)
4049
- Cyberweb.internal_hash?[:cmd3] = i
4050
- end
4051
-
4052
- # ========================================================================= #
4053
- # === cmd_pre
4054
- # ========================================================================= #
4055
- def cmd_pre(i)
4056
- splitted = i.split(N)
4057
- splitted.each {|entry| cmd(entry) }
4058
- end; alias pre_cmd cmd_pre # === pre_cmd
4059
-
4060
- # ========================================================================= #
4061
- # === col_cmd
4062
- # ========================================================================= #
4063
- def col_cmd(
4064
- i = '',
4065
- optional_id = ''
4066
- )
4067
- ee(
4068
- i, ::Cyberweb.internal_hash?[:col_cmd], optional_id
4630
+ # ===================================================================== #
4631
+ # === :simple_calculator
4632
+ # ===================================================================== #
4633
+ when :simple_calculator
4634
+ i = File.absolute_path(
4635
+ project_base_dir?+'javascript_code/simple_calculator.js'
4636
+ )
4637
+ end
4638
+ if i and File.exist?(i)
4639
+ i = File.read(i)
4640
+ end
4641
+ end
4642
+ addnl(
4643
+ "<script>\n"+
4644
+ i.to_s+
4645
+ "</script>\n"
4069
4646
  )
4070
- end; alias col col_cmd # === col
4071
-
4072
- # ========================================================================= #
4073
- # === append_to_cmd1
4074
- # ========================================================================= #
4075
- def append_to_cmd1(i = '')
4076
- ::Cyberweb.append_to_cmd1(i)
4077
- end; alias append_cmd1 append_to_cmd1 # === append_cmd1
4647
+ end
4078
4648
 
4079
4649
  # ========================================================================= #
4080
- # === append_to_cmd2
4650
+ # === set_body_content
4081
4651
  # ========================================================================= #
4082
- def append_to_cmd2(i = '')
4083
- ::Cyberweb.append_to_cmd2(i)
4652
+ def set_body_content(i)
4653
+ @internal_hash[:body_content] = i.to_s.dup
4084
4654
  end
4085
-
4655
+
4086
4656
  # ========================================================================= #
4087
- # === append_to_cmd3
4657
+ # === body_content?
4088
4658
  # ========================================================================= #
4089
- def append_to_cmd3(i = '')
4090
- ::Cyberweb.append_to_cmd3(i)
4091
- end
4659
+ def body_content?
4660
+ @internal_hash[:body_content]
4661
+ end; alias body_string? body_content? # === body_string?
4092
4662
 
4093
4663
  # ========================================================================= #
4094
4664
  # === random_linear_gradient_background
@@ -4796,23 +5366,6 @@ SQL
4796
5366
  )
4797
5367
  end; alias eee espan_no_newline # === eee
4798
5368
 
4799
- # ========================================================================= #
4800
- # === anm
4801
- # ========================================================================= #
4802
- def anm(
4803
- i = '', # Should be an empty String.
4804
- optional_css_class = '',
4805
- optional_the_id = '',
4806
- optional_css_style = ''
4807
- )
4808
- addn(
4809
- sg(:anmerkung, 'marr5px')+
4810
- string_span(
4811
- i, optional_css_class, optional_the_id, optional_css_style
4812
- )
4813
- )
4814
- end; alias anmerkung anm # === anmerkung
4815
-
4816
5369
  require 'cyberweb/toplevel_methods/markdown.rb'
4817
5370
  # ========================================================================= #
4818
5371
  # === markdown
@@ -5257,41 +5810,6 @@ body {
5257
5810
  alias t= set_title # === t=
5258
5811
  alias title= set_title # === title= # <-- This alias here may be more popular than set_title().
5259
5812
 
5260
- # ========================================================================= #
5261
- # === check_for_links_markdown_file
5262
- #
5263
- # This method will check for a file called "links.md".
5264
- # ========================================================================= #
5265
- def check_for_links_markdown_file
5266
- _ = 'links.md'
5267
- # Also check for LINKS.md
5268
- unless File.exist? _
5269
- _ = 'LINKS.md'
5270
- end
5271
- if File.exist? _
5272
- use_this_css_class = ''.dup # A default value.
5273
- lines = File.readlines(_)
5274
- lines.each {|this_entry|
5275
- if this_entry.include? '# ' # Assume a "hidden" CSS class in this case.
5276
- splitted = this_entry.split('# ')
5277
- use_this_css_class = splitted.last.strip
5278
- this_entry = splitted.first
5279
- end
5280
- if this_entry.is_a?(String) and this_entry.start_with?(':')
5281
- this_entry = Cyberweb.sanitize_url(
5282
- this_entry.delete(':').to_sym
5283
- )
5284
- end
5285
- abr_self(
5286
- this_entry,
5287
- css_class: use_this_css_class
5288
- )
5289
- }
5290
- br # And one last trailing newline.
5291
- end
5292
- end; alias try_links_file check_for_links_markdown_file # === try_links_file
5293
- alias check_for_links_file check_for_links_markdown_file # === check_for_links_file
5294
-
5295
5813
  # ========================================================================= #
5296
5814
  # === do_use_exceptions
5297
5815
  # ========================================================================= #
@@ -5434,14 +5952,6 @@ body {
5434
5952
  @internal_hash[:mail]
5435
5953
  end; alias mail mail? # === mail
5436
5954
 
5437
- # ========================================================================= #
5438
- # === arrow_right?
5439
- # ========================================================================= #
5440
- def arrow_right?
5441
- ::Cyberweb.right_arrow
5442
- end; alias arrow_right arrow_right? # === arrow_right
5443
- alias rarrow arrow_right? # === rarrow
5444
-
5445
5955
  # ========================================================================= #
5446
5956
  # === show_this_svg
5447
5957
  # ========================================================================= #
@@ -5573,52 +6083,6 @@ body {
5573
6083
  return result
5574
6084
  end
5575
6085
 
5576
- # ========================================================================= #
5577
- # === e (e tag)
5578
- #
5579
- # This is essentially sbr(), which stands for "string span", and
5580
- # "breakline". It is like "puts" in regular ruby really, so a newline
5581
- # will be shown (registered onto the main string).
5582
- #
5583
- # Note that the method must be able to respond to more than one
5584
- # argument too.
5585
- #
5586
- # This method must be able to respond to the following code as well:
5587
- #
5588
- # e('This text should now be editable.') { :editable }
5589
- #
5590
- # ========================================================================= #
5591
- def e(
5592
- i = '',
5593
- optional_css_class = '',
5594
- optional_the_id = '',
5595
- optional_css_style = ''
5596
- )
5597
- _ = ''.dup
5598
- _ << string_s2(i, optional_css_class, optional_the_id, optional_css_style)
5599
- # ======================================================================= #
5600
- # Handle blocks next.
5601
- # ======================================================================= #
5602
- if block_given?
5603
- yielded = yield
5604
- case yielded
5605
- # ===================================================================== #
5606
- # === :editable
5607
- #
5608
- # This will also set spellcheck to false, because I find it to be
5609
- # very annoying otherwise.
5610
- # ===================================================================== #
5611
- when :editable
5612
- index = _.index('>')
5613
- _ = _.dup if _.frozen?
5614
- _[index,0] = ' contenteditable="true" spellcheck="false"'
5615
- end
5616
- end
5617
- addnl(_.dup)
5618
- br # And the <br> tag.
5619
- end; alias ebr e # === ebr
5620
- alias sbr e # === sbr
5621
-
5622
6086
  # ========================================================================= #
5623
6087
  # === return_dataset_without_any_comments
5624
6088
  #
@@ -7090,17 +7554,6 @@ body {
7090
7554
  )
7091
7555
  end; alias turn_into_html_id return_the_id # === turn_into_html_id
7092
7556
 
7093
- # ========================================================================= #
7094
- # === roebe_hardware
7095
- # ========================================================================= #
7096
- def roebe_hardware(
7097
- optional_css_class = 'mars1em steelblue BOLD'
7098
- )
7099
- abr :local_hardware,
7100
- content: :self,
7101
- css_class: optional_css_class
7102
- end
7103
-
7104
7557
  # ========================================================================= #
7105
7558
  # === close_head_then_open_body
7106
7559
  # ========================================================================= #
@@ -7834,27 +8287,6 @@ function simple_clock_timer() {
7834
8287
  return result
7835
8288
  end
7836
8289
 
7837
- # ========================================================================= #
7838
- # === javascript_drag_and_drop
7839
- # ========================================================================= #
7840
- def javascript_drag_and_drop(
7841
- i, use_jquery = use_jquery?
7842
- )
7843
- if use_jquery
7844
- make_this_id_draggable(i)
7845
- end
7846
- end; alias add_javascript_drag javascript_drag_and_drop # === add_javascript_drag
7847
- alias drag javascript_drag_and_drop # === drag
7848
- alias drag_this javascript_drag_and_drop # === drag_this
7849
- alias drag_this_id javascript_drag_and_drop # === drag_this_id
7850
- alias drag_for javascript_drag_and_drop # === drag_for
7851
- alias drag_it javascript_drag_and_drop # === drag_it
7852
- alias drag_textarea javascript_drag_and_drop # === drag_textarea
7853
- alias drag_and_drop javascript_drag_and_drop # === drag_and_drop
7854
- alias drag_n_drop javascript_drag_and_drop # === drag_n_drop
7855
- alias drag_drop javascript_drag_and_drop # === drag_drop
7856
- alias enable_drag_for javascript_drag_and_drop # === enable_drag_for
7857
-
7858
8290
  # ========================================================================= #
7859
8291
  # === add_dynamic_text_shadow
7860
8292
  # ========================================================================= #
@@ -7964,8 +8396,7 @@ function simple_clock_timer() {
7964
8396
  USAGE.md</b>.','marl5em'
7965
8397
  spacer
7966
8398
  end
7967
- else # Don't show the following regularly, only for debugging.
7968
- # e 'DEBUG: The dataset is ok.'
8399
+ # else # Don't show the following regularly, only for debugging.
7969
8400
  end
7970
8401
  end
7971
8402
  end
@@ -8112,7 +8543,8 @@ function simple_clock_timer() {
8112
8543
  )
8113
8544
  bold(i, optional_css_class, optional_the_id)
8114
8545
  br
8115
- end; alias bbr boldbr # === bbr
8546
+ end; alias bbr boldbr # === bbr
8547
+ alias ebold boldbr # === ebold
8116
8548
 
8117
8549
  # ========================================================================= #
8118
8550
  # === return_html_comment
@@ -8301,19 +8733,6 @@ function simple_clock_timer() {
8301
8733
  @internal_hash[:relative_path] = i
8302
8734
  end
8303
8735
 
8304
- # ========================================================================= #
8305
- # === relative_path?
8306
- #
8307
- # This method attempts to return the correct, relative path to assets.
8308
- #
8309
- # We need to keep in mind that the .cgi file at hand may reside
8310
- # in another subdirectory, such as /home/x/studium/, rather than
8311
- # /home/x/data/.
8312
- # ========================================================================= #
8313
- def relative_path?
8314
- @internal_hash[:relative_path]
8315
- end
8316
-
8317
8736
  # ========================================================================= #
8318
8737
  # === string_s2
8319
8738
  #
@@ -8371,20 +8790,6 @@ function simple_clock_timer() {
8371
8790
  alias string_espan string_s2 # === string_espan
8372
8791
  alias return_span string_s2 # === return_span
8373
8792
 
8374
- # ========================================================================= #
8375
- # === esentence
8376
- # ========================================================================= #
8377
- def esentence(
8378
- i, optional_css_class = ''
8379
- )
8380
- if optional_css_class and optional_css_class.empty?
8381
- e sentence(i)
8382
- else
8383
- espan sentence(i), optional_css_class
8384
- br
8385
- end
8386
- end; alias equote esentence # === equote
8387
-
8388
8793
  # ========================================================================= #
8389
8794
  # === equote_nobr
8390
8795
  # ========================================================================= #
@@ -8630,66 +9035,6 @@ function simple_clock_timer() {
8630
9035
  alias html_string? result? # === html_string?
8631
9036
  alias _ result? # === _
8632
9037
 
8633
- # ========================================================================= #
8634
- # === build_up_the_html_string (main tag)
8635
- #
8636
- # This method will build the main string, that is - the one which is
8637
- # stored in the instance variable called @string_that_is_to_be_served.
8638
- #
8639
- # The method here may also be called from the method serve_webpage()
8640
- # for us.
8641
- # ========================================================================= #
8642
- def build_up_the_html_string
8643
- reset_the_main_string # We have to empty our String at build-up start.
8644
- prepend_doc_type
8645
- # ======================================================================= #
8646
- # Next, open up the <head> tag. We will also add the meta-collection.
8647
- # ======================================================================= #
8648
- append_html_header_to_the_head_open_tag
8649
- append_the_meta_collection
8650
- append_newline # Add a newline before the title.
8651
- append_title
8652
- append_data_from_remote_css_urls
8653
- # append_default_css_files # ← Add the default .css files here.
8654
- # ======================================================================= #
8655
- # Append the CSS next.
8656
- # ======================================================================= #
8657
- # append @css_style
8658
- # append @array_css_files.sort.join(N) unless @array_css_files.empty?
8659
- # ======================================================================= #
8660
- # A few more newlines, to also pad the favicon String.
8661
- # ======================================================================= #
8662
- append_newline
8663
- append_newline
8664
- # ======================================================================= #
8665
- # Next, close the head tag.
8666
- # ======================================================================= #
8667
- append_chead_tag
8668
- append_newline # Add add another newline after the </head> tag.
8669
- # ======================================================================= #
8670
- # Append the body-tag next.
8671
- # ======================================================================= #
8672
- if use_body_tag?
8673
- append string_body_start(body_css_class?,
8674
- body_the_id?,
8675
- body_css_style?,
8676
- body_javascript?) #, javascript_in_body)
8677
- end
8678
- append_frame_string # <- This is usually just an empty String.
8679
- # ======================================================================= #
8680
- # Also determine the amount of lines.
8681
- # ======================================================================= #
8682
- set_n_total_lines
8683
- # ======================================================================= #
8684
- # The next line is commented out because we may not always want
8685
- # to close the <body> and <html> tag too early.
8686
- # ======================================================================= #
8687
- # append_cbody_and_chtml_tags
8688
- # @internal_hash[:html_string] << "</html>\n"
8689
- end; alias rebuild_the_HTML_string build_up_the_html_string # === rebuild_the_HTML_string
8690
- alias rebuild_main_string build_up_the_html_string # === rebuild_main_string
8691
- alias rebuild_the_main_string build_up_the_html_string # === rebuild_the_main_string
8692
-
8693
9038
  # ========================================================================= #
8694
9039
  # === css_style_or_no_style
8695
9040
  # ========================================================================= #
@@ -8823,55 +9168,6 @@ function simple_clock_timer() {
8823
9168
  end
8824
9169
  end
8825
9170
 
8826
- # ========================================================================= #
8827
- # === consider_autoclosing_the_head_tag
8828
- # ========================================================================= #
8829
- def consider_autoclosing_the_head_tag(
8830
- main_string = main_string?
8831
- )
8832
- unless main_string.include?('<title>')
8833
- # ===================================================================== #
8834
- # Add the title here.
8835
- # ===================================================================== #
8836
- add_the_title_to_the_webobject
8837
- end
8838
- unless main_string.include? '</head>'
8839
- # ===================================================================== #
8840
- # Add all CSS files next:
8841
- # ===================================================================== #
8842
- add_all_local_css_files
8843
- append_newline
8844
- # ===================================================================== #
8845
- # The following is experimental as of April 2011.
8846
- # In June 2014 it was moved into the <head> tag.
8847
- # ===================================================================== #
8848
- append(return_default_javascript)
8849
- # ===================================================================== #
8850
- # === Use Jquery
8851
- #
8852
- # Load jquery if the config tells us to do so. This has to happen
8853
- # within the <head> tag.
8854
- # ===================================================================== #
8855
- if use_jquery?
8856
- append_jquery_string
8857
- end
8858
- # ===================================================================== #
8859
- # === Dragula
8860
- #
8861
- # Whether we will use dragula or not. If yes then we will add the
8862
- # dragula.js script.
8863
- # ===================================================================== #
8864
- if use_dragula?
8865
- append_path_to_dragula_js_file
8866
- web_object_config?['use_dragula_for_these_tags'].each {|entry|
8867
- append add_dragula_drag_for(entry) # For ul elements.
8868
- }
8869
- end
8870
- append javascript?+NL
8871
- addnl("\n</head>\n")
8872
- end
8873
- end
8874
-
8875
9171
  # ========================================================================= #
8876
9172
  # === edot
8877
9173
  # ========================================================================= #
@@ -8967,6 +9263,13 @@ function simple_clock_timer() {
8967
9263
  string_dot(110, 'marr10px')
8968
9264
  end
8969
9265
 
9266
+ # ========================================================================= #
9267
+ # === map_symbol_to_image_location
9268
+ # ========================================================================= #
9269
+ def map_symbol_to_image_location(i)
9270
+ return ::Cyberweb::WebImages.map_symbol_to_image_location(i)
9271
+ end
9272
+
8970
9273
  # ========================================================================= #
8971
9274
  # === config?
8972
9275
  #