cyberweb 0.8.17 → 0.9.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (420) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +306 -86
  3. data/cyberweb.gemspec +0 -3
  4. data/doc/README.gen +305 -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 +66 -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/toplevel_methods/video.rb +35 -35
  397. data/lib/cyberweb/utility_scripts/images_to_html/constants.rb +63 -0
  398. data/lib/cyberweb/utility_scripts/images_to_html/images_to_html.rb +149 -164
  399. data/lib/cyberweb/utility_scripts/images_to_html/misc.rb +119 -0
  400. data/lib/cyberweb/version/version.rb +2 -2
  401. data/lib/cyberweb/web_images/array_listing_all_project_images.rb +1 -1
  402. data/lib/cyberweb/web_images/map_symbol_to_image_location.rb +16 -5
  403. data/lib/cyberweb/web_object/cmd.rb +257 -0
  404. data/lib/cyberweb/web_object/display_output_and_report.rb +99 -0
  405. data/lib/cyberweb/web_object/html_tags.rb +106 -98
  406. data/lib/cyberweb/web_object/images.rb +53 -36
  407. data/lib/cyberweb/web_object/javascript_and_jquery.rb +165 -51
  408. data/lib/cyberweb/web_object/link.rb +207 -34
  409. data/lib/cyberweb/web_object/misc.rb +1401 -1074
  410. data/lib/cyberweb/web_object/reset.rb +12 -10
  411. data/lib/cyberweb/web_object/roebe.rb +113 -0
  412. data/lib/cyberweb/web_object/web_object.rb +9 -4
  413. data/lib/cyberweb/yaml/js_files_to_load.yml +11 -3
  414. data/lib/cyberweb/yaml/project_configuration.yml +1 -1
  415. data/test/complex_tests/all_tests_in_one_page.cgi +12 -6
  416. data/test/javascript/testing_different_javascript_functions_available_in_the_cyberweb_project.cgi +27 -0
  417. data/test/javascript/testing_snowflakes.cgi +2 -2
  418. data/test/simple_tests/testing_p_default_versus_p_default_le.cgi +31 -0
  419. metadata +379 -15
  420. 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,68 @@ 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.
26
+ # === UNICODE_PLUS_MINUS
41
27
  # ========================================================================= #
42
- def dot109?
43
- string_dot(109, 'marr10px')
44
- end
28
+ UNICODE_PLUS_MINUS = '±'
45
29
 
46
30
  # ========================================================================= #
47
- # === clickable_image_as_string?
31
+ # === h1_id
48
32
  # ========================================================================= #
49
- def clickable_image_as_string?
50
- _ = clickable_image?
33
+ def h1_id(
34
+ i = '',
35
+ optional_css_class = '',
36
+ optional_the_id = '',
37
+ optional_css_style = '',
38
+ optional_javascript = '',
39
+ &block
40
+ )
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)
51
46
  # ======================================================================= #
52
- # === Handle Symbols next
53
- #
54
- # Symbols have to be expanded towards their local path.
47
+ # === Handle blocks next
55
48
  # ======================================================================= #
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">'
49
+ if block_given?
50
+ yielded = yield
51
+ case yielded
52
+ # ===================================================================== #
53
+ # === :clickable_image
54
+ #
55
+ # The embedded image will be clickable, made possible via the
56
+ # a-tag.
57
+ # ===================================================================== #
58
+ when :clickable_image
59
+ i = "<a href=\"##{use_this_id}\">"+
60
+ clickable_image_as_string?+
61
+ "</a>#{i}"
62
+ end
60
63
  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
112
- # ========================================================================= #
113
- def h1_id_clickable(
64
+ h1(
114
65
  i,
115
- optional_css_class = '',
116
- &block
66
+ id: use_this_id,
67
+ css_class: optional_css_class,
68
+ css_style: optional_css_style
117
69
  )
118
- h1_id(i, optional_css_class) { :clickable_image }
119
- end; alias h1_fancy_id h1_id_clickable # === h1_fancy_id
70
+ end
120
71
 
121
72
  # ========================================================================= #
122
- # === h1_id
73
+ # === h5_id
123
74
  # ========================================================================= #
124
- def h1_id(
125
- i,
126
- optional_css_class = '',
75
+ def h5_id(
76
+ i = '',
77
+ optional_css_class = '',
78
+ optional_the_id = '',
79
+ optional_css_style = '',
80
+ optional_javascript = '',
127
81
  &block
128
82
  )
129
- use_this_id = i.to_s.dup.downcase.tr(' ','_').delete(':(),').
130
- tr('-','_').squeeze('_')
83
+ optional_the_id = optional_the_id.to_s
84
+ if optional_the_id.empty?
85
+ optional_the_id = i.dup
86
+ end
87
+ use_this_id = sanitize_this_id(optional_the_id)
131
88
  # ======================================================================= #
132
89
  # === Handle blocks next
133
90
  # ======================================================================= #
@@ -136,6 +93,9 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
136
93
  case yielded
137
94
  # ===================================================================== #
138
95
  # === :clickable_image
96
+ #
97
+ # The embedded image will be clickable, made possible via the
98
+ # a-tag.
139
99
  # ===================================================================== #
140
100
  when :clickable_image
141
101
  i = "<a href=\"##{use_this_id}\">"+
@@ -143,20 +103,56 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
143
103
  "</a>#{i}"
144
104
  end
145
105
  end
146
- h1 i, id: use_this_id
106
+ h5(
107
+ i,
108
+ id: use_this_id,
109
+ css_class: optional_css_class,
110
+ css_style: optional_css_style
111
+ )
147
112
  end
148
113
 
149
114
  # ========================================================================= #
150
- # === h2_id_clickable
115
+ # === h5_id_clickable
151
116
  # ========================================================================= #
152
- def h2_id_clickable(
117
+ def h5_id_clickable(
118
+ i = '',
119
+ optional_css_class = '',
120
+ optional_the_id = '',
121
+ optional_css_style = '',
122
+ optional_javascript = '',
123
+ &block
124
+ )
125
+ h5_id(
153
126
  i,
154
- optional_css_class = '',
155
- optional_id = nil,
127
+ optional_css_class,
128
+ optional_the_id,
129
+ optional_css_style,
130
+ optional_javascript
131
+ ) { :clickable_image }
132
+ end; alias h5_fancy_id h5_id_clickable # === h5_fancy_id
133
+ alias h5_fid h5_id_clickable # === h5_fid
134
+
135
+ # ========================================================================= #
136
+ # === h1_id_clickable
137
+ # ========================================================================= #
138
+ def h1_id_clickable(
139
+ i = '',
140
+ optional_css_class = '',
141
+ optional_the_id = '',
142
+ optional_css_style = '',
143
+ optional_javascript = '',
156
144
  &block
157
145
  )
158
- h2_id(i, optional_css_class, optional_id) { :clickable_image }
159
- end; alias h2_fancy_id h2_id_clickable # === h2_fancy_id
146
+ h1_id(
147
+ i,
148
+ optional_css_class,
149
+ optional_the_id,
150
+ optional_css_style,
151
+ optional_javascript
152
+ ) { :clickable_image }
153
+ end; alias h1_fancy_id h1_id_clickable # === h1_fancy_id
154
+ alias h1_fid h1_id_clickable # === h1_fid
155
+ alias clickable_h1 h1_id_clickable # === clickable_h1
160
156
 
161
157
  # ========================================================================= #
162
158
  # === h2_id
@@ -168,16 +164,18 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
168
164
  #
169
165
  # ========================================================================= #
170
166
  def h2_id(
171
- i,
172
- optional_css_class = '',
173
- optional_id = nil,
167
+ i = '',
168
+ optional_css_class = '',
169
+ optional_the_id = '',
170
+ optional_css_style = '',
171
+ optional_javascript = '',
174
172
  &block
175
173
  )
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)
174
+ optional_the_id = optional_the_id.to_s
175
+ if optional_the_id.empty?
176
+ optional_the_id = i.dup
180
177
  end
178
+ use_this_id = sanitize_this_id(optional_the_id)
181
179
  # ======================================================================= #
182
180
  # === Handle blocks next
183
181
  # ======================================================================= #
@@ -186,6 +184,9 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
186
184
  case yielded
187
185
  # ===================================================================== #
188
186
  # === :clickable_image
187
+ #
188
+ # The embedded image will be clickable, made possible via the
189
+ # a-tag.
189
190
  # ===================================================================== #
190
191
  when :clickable_image
191
192
  i = "<a href=\"##{use_this_id}\">"+
@@ -193,122 +194,1292 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
193
194
  "</a>#{i}"
194
195
  end
195
196
  end
196
- h2 i, id: use_this_id, css_class: optional_css_class
197
+ h2(
198
+ i,
199
+ id: use_this_id,
200
+ css_class: optional_css_class,
201
+ css_style: optional_css_style
202
+ )
197
203
  end
198
204
 
199
205
  # ========================================================================= #
200
- # === h3_id_clickable
206
+ # === h2_id_clickable
201
207
  # ========================================================================= #
202
- def h3_id_clickable(
203
- i,
204
- optional_css_class = '',
208
+ def h2_id_clickable(
209
+ i = '',
210
+ optional_css_class = '',
211
+ optional_the_id = '',
212
+ optional_css_style = '',
213
+ optional_javascript = '',
205
214
  &block
206
215
  )
207
- h3_id(i, optional_css_class) { :clickable_image }
208
- end; alias h3_fancy_id h3_id_clickable # === h3_fancy_id
216
+ h2_id(
217
+ i,
218
+ optional_css_class,
219
+ optional_the_id,
220
+ optional_css_style,
221
+ optional_javascript
222
+ ) { :clickable_image }
223
+ end; alias h2_fancy_id h2_id_clickable # === h2_fancy_id
224
+ alias h2_fid h2_id_clickable # === h2_fid
225
+ alias clickable_h2 h2_id_clickable # === clickable_h2
209
226
 
210
227
  # ========================================================================= #
211
- # === h3_id
228
+ # === cheader_h1
212
229
  # ========================================================================= #
213
- def h3_id(
214
- i,
215
- optional_css_class = '',
230
+ def cheader_h1(
231
+ i = '',
232
+ optional_css_class = '',
233
+ optional_the_id = '',
234
+ optional_css_style = '',
235
+ optional_javascript = '',
236
+ use_fancy_id = false,
216
237
  &block
217
238
  )
218
- use_this_id = sanitize_this_id(i)
239
+ hash = {}
240
+ yielded = nil
241
+ yielded = yield if block_given?
242
+ hash.update(yielded) if yielded # First update the hash.
219
243
  # ======================================================================= #
220
- # === Handle blocks next
244
+ # === :clickable
221
245
  # ======================================================================= #
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
246
+ unless hash.has_key? :clickable
247
+ hash[:clickable] = true
233
248
  end
234
- h3 i, id: use_this_id
249
+ # ======================================================================= #
250
+ # Assign the tag to use to h1 in the next line:
251
+ # ======================================================================= #
252
+ hash[:use_this_tag] = __method__.to_s.split('_').last.to_sym
253
+ header(
254
+ i,
255
+ optional_css_class,
256
+ optional_the_id,
257
+ optional_css_style,
258
+ optional_javascript,
259
+ use_fancy_id
260
+ ) { hash }
235
261
  end
236
262
 
237
263
  # ========================================================================= #
238
- # === h4_id_clickable
264
+ # === cheader_h2
239
265
  # ========================================================================= #
240
- def h4_id_clickable(
241
- i,
242
- optional_css_class = '',
266
+ def cheader_h2(
267
+ i = '',
268
+ optional_css_class = '',
269
+ optional_the_id = '',
270
+ optional_css_style = '',
271
+ optional_javascript = '',
272
+ use_fancy_id = false,
243
273
  &block
244
274
  )
245
- h4_id(i, optional_css_class) { :clickable_image }
246
- end; alias h4_fancy_id h4_id_clickable # === h4_fancy_id
275
+ hash = {}
276
+ yielded = nil
277
+ yielded = yield if block_given?
278
+ hash.update(yielded) if yielded # First update the hash.
279
+ # ======================================================================= #
280
+ # === :clickable
281
+ # ======================================================================= #
282
+ unless hash.has_key? :clickable
283
+ hash[:clickable] = true
284
+ end
285
+ # ======================================================================= #
286
+ # Assign the tag to use to h1 in the next line:
287
+ # ======================================================================= #
288
+ hash[:use_this_tag] = __method__.to_s.split('_').last.to_sym
289
+ header(
290
+ i,
291
+ optional_css_class,
292
+ optional_the_id,
293
+ optional_css_style,
294
+ optional_javascript,
295
+ use_fancy_id
296
+ ) { hash }
297
+ end; alias clickable_h2 cheader_h2 # === clickable_h2
247
298
 
248
299
  # ========================================================================= #
249
- # === h4_id
300
+ # === cheader_h3
250
301
  # ========================================================================= #
251
- def h4_id(
252
- i,
253
- optional_css_class = '',
302
+ def cheader_h3(
303
+ i = '',
304
+ optional_css_class = '',
305
+ optional_the_id = '',
306
+ optional_css_style = '',
307
+ optional_javascript = '',
308
+ use_fancy_id = false,
254
309
  &block
255
310
  )
256
- use_this_id = sanitize_this_id(i)
311
+ hash = {}
312
+ yielded = nil
313
+ yielded = yield if block_given?
314
+ hash.update(yielded) if yielded # First update the hash.
257
315
  # ======================================================================= #
258
- # === Handle blocks next
316
+ # === :clickable
259
317
  # ======================================================================= #
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
318
+ unless hash.has_key? :clickable
319
+ hash[:clickable] = true
271
320
  end
272
- h4 i, id: use_this_id
321
+ # ======================================================================= #
322
+ # Assign the tag to use to h1 in the next line:
323
+ # ======================================================================= #
324
+ hash[:use_this_tag] = __method__.to_s.split('_').last.to_sym
325
+ header(
326
+ i,
327
+ optional_css_class,
328
+ optional_the_id,
329
+ optional_css_style,
330
+ optional_javascript,
331
+ use_fancy_id
332
+ ) { hash }
333
+ end
334
+
335
+ # ========================================================================= #
336
+ # === cheader_h4
337
+ # ========================================================================= #
338
+ def cheader_h4(
339
+ i = '',
340
+ optional_css_class = '',
341
+ optional_the_id = '',
342
+ optional_css_style = '',
343
+ optional_javascript = '',
344
+ use_fancy_id = false,
345
+ &block
346
+ )
347
+ hash = {}
348
+ yielded = nil
349
+ yielded = yield if block_given?
350
+ hash.update(yielded) if yielded # First update the hash.
351
+ # ======================================================================= #
352
+ # === :clickable
353
+ # ======================================================================= #
354
+ unless hash.has_key? :clickable
355
+ hash[:clickable] = true
356
+ end
357
+ # ======================================================================= #
358
+ # Assign the tag to use to h1 in the next line:
359
+ # ======================================================================= #
360
+ hash[:use_this_tag] = __method__.to_s.split('_').last.to_sym
361
+ header(
362
+ i,
363
+ optional_css_class,
364
+ optional_the_id,
365
+ optional_css_style,
366
+ optional_javascript,
367
+ use_fancy_id
368
+ ) { hash }
369
+ end
370
+
371
+ # ========================================================================= #
372
+ # === cheader_h5
373
+ # ========================================================================= #
374
+ def cheader_h5(
375
+ i = '',
376
+ optional_css_class = '',
377
+ optional_the_id = '',
378
+ optional_css_style = '',
379
+ optional_javascript = '',
380
+ use_fancy_id = false,
381
+ &block
382
+ )
383
+ hash = {}
384
+ yielded = nil
385
+ yielded = yield if block_given?
386
+ hash.update(yielded) if yielded # First update the hash.
387
+ # ======================================================================= #
388
+ # === :clickable
389
+ # ======================================================================= #
390
+ unless hash.has_key? :clickable
391
+ hash[:clickable] = true
392
+ end
393
+ # ======================================================================= #
394
+ # Assign the tag to use to h1 in the next line:
395
+ # ======================================================================= #
396
+ hash[:use_this_tag] = __method__.to_s.split('_').last.to_sym
397
+ header(
398
+ i,
399
+ optional_css_class,
400
+ optional_the_id,
401
+ optional_css_style,
402
+ optional_javascript,
403
+ use_fancy_id
404
+ ) { hash }
405
+ end
406
+
407
+ # ========================================================================= #
408
+ # === cheader_h6
409
+ # ========================================================================= #
410
+ def cheader_h6(
411
+ i = '',
412
+ optional_css_class = '',
413
+ optional_the_id = '',
414
+ optional_css_style = '',
415
+ optional_javascript = '',
416
+ use_fancy_id = false,
417
+ &block
418
+ )
419
+ hash = {}
420
+ yielded = nil
421
+ yielded = yield if block_given?
422
+ hash.update(yielded) if yielded # First update the hash.
423
+ # ======================================================================= #
424
+ # === :clickable
425
+ # ======================================================================= #
426
+ unless hash.has_key? :clickable
427
+ hash[:clickable] = true
428
+ end
429
+ # ======================================================================= #
430
+ # Assign the tag to use to h1 in the next line:
431
+ # ======================================================================= #
432
+ hash[:use_this_tag] = __method__.to_s.split('_').last.to_sym
433
+ header(
434
+ i,
435
+ optional_css_class,
436
+ optional_the_id,
437
+ optional_css_style,
438
+ optional_javascript,
439
+ use_fancy_id
440
+ ) { hash }
441
+ end
442
+
443
+ # ========================================================================= #
444
+ # === h4_id
445
+ # ========================================================================= #
446
+ def h4_id(
447
+ i = '',
448
+ optional_css_class = '',
449
+ optional_the_id = '',
450
+ optional_css_style = '',
451
+ optional_javascript = '',
452
+ &block
453
+ )
454
+ optional_the_id = optional_the_id.to_s
455
+ if optional_the_id.empty?
456
+ optional_the_id = i.dup
457
+ end
458
+ use_this_id = sanitize_this_id(optional_the_id)
459
+ # ======================================================================= #
460
+ # === Handle blocks next
461
+ # ======================================================================= #
462
+ if block_given?
463
+ yielded = yield
464
+ case yielded
465
+ # ===================================================================== #
466
+ # === :clickable_image
467
+ #
468
+ # The embedded image will be clickable, made possible via the
469
+ # a-tag.
470
+ # ===================================================================== #
471
+ when :clickable_image
472
+ i = "<a href=\"##{use_this_id}\">"+
473
+ clickable_image_as_string?+
474
+ "</a>#{i}"
475
+ end
476
+ end
477
+ h4(
478
+ i,
479
+ id: use_this_id,
480
+ css_class: optional_css_class,
481
+ css_style: optional_css_style
482
+ )
483
+ end
484
+
485
+ # ========================================================================= #
486
+ # === h4_id_clickable
487
+ # ========================================================================= #
488
+ def h4_id_clickable(
489
+ i = '',
490
+ optional_css_class = '',
491
+ optional_the_id = '',
492
+ optional_css_style = '',
493
+ optional_javascript = '',
494
+ use_fancy_id = false,
495
+ &block
496
+ )
497
+ h4_id(
498
+ i,
499
+ optional_css_class,
500
+ optional_the_id,
501
+ optional_css_style,
502
+ optional_javascript
503
+ ) { :clickable_image }
504
+ end; alias h4_fancy_id h4_id_clickable # === h4_fancy_id
505
+ alias h4_fid h4_id_clickable # === h4_fid
506
+
507
+ # ========================================================================= #
508
+ # === header
509
+ #
510
+ # This is a variant for h1() essentially, by default.
511
+ #
512
+ # It can be used via modifications such as:
513
+ #
514
+ # header('foobar') { :clickable }
515
+ #
516
+ # ========================================================================= #
517
+ def header(
518
+ i = '',
519
+ optional_css_class = '',
520
+ optional_the_id = '',
521
+ optional_css_style = '',
522
+ optional_javascript = '',
523
+ use_fancy_id = false,
524
+ &block
525
+ )
526
+ use_this_tag = :h1
527
+ # ======================================================================= #
528
+ # === Handle blocks first
529
+ # ======================================================================= #
530
+ if block_given?
531
+ yielded = yield
532
+ if yielded.is_a? Hash
533
+ # =================================================================== #
534
+ # === :clickable
535
+ # =================================================================== #
536
+ if yielded.has_key? :clickable
537
+ use_fancy_id = yielded.delete(:clickable)
538
+ # =================================================================== #
539
+ # === :fancy_id
540
+ # =================================================================== #
541
+ elsif yielded.has_key? :fancy_id
542
+ use_fancy_id = yielded.delete(:fancy_id)
543
+ end
544
+ # =================================================================== #
545
+ # === :use_this_tag
546
+ # =================================================================== #
547
+ if yielded.has_key? :use_this_tag
548
+ use_this_tag = yielded.delete(:use_this_tag)
549
+ end
550
+ else
551
+ case yielded
552
+ # =================================================================== #
553
+ # === :fancy_id
554
+ # =================================================================== #
555
+ when :fancy_id,
556
+ :clickable
557
+ use_fancy_id = true
558
+ end
559
+ end
560
+ end
561
+ if optional_the_id.empty?
562
+ # ===================================================================== #
563
+ # Determine the id next:
564
+ # ===================================================================== #
565
+ optional_the_id = ::Cyberweb.remove_html(i).tr(' ','_')
566
+ end
567
+ if use_fancy_id
568
+ method_name = "#{use_this_tag}_fancy_id".to_sym # For instance, h1_fancy_id().
569
+ send(method_name,
570
+ i,
571
+ optional_css_class,
572
+ optional_the_id,
573
+ optional_css_style,
574
+ optional_javascript
575
+ )
576
+ else
577
+ send(
578
+ use_this_tag,
579
+ i,
580
+ optional_css_class,
581
+ optional_the_id,
582
+ optional_css_style,
583
+ optional_javascript
584
+ )
585
+ end
586
+ @internal_hash[:register_ids] << register_this_id(optional_the_id) # optional_the_id
587
+ end
588
+
589
+ # ========================================================================= #
590
+ # === clickable_header
591
+ #
592
+ # The idea for this method is to make a "clickable" header, that is,
593
+ # a h-tag that has an icon (a small image) on the left side. The
594
+ # user can only click on that icon, though, not the whole header.
595
+ #
596
+ # Upon clicking on that icon an intralink is used, a "jumper" link.
597
+ # ========================================================================= #
598
+ def clickable_header(
599
+ i = '',
600
+ optional_css_class = '',
601
+ optional_the_id = '',
602
+ optional_css_style = '',
603
+ optional_javascript = '',
604
+ &block
605
+ )
606
+ header(
607
+ i,
608
+ optional_css_class,
609
+ optional_the_id,
610
+ optional_css_style,
611
+ optional_javascript
612
+ ) { :clickable }
613
+ end; alias cheader clickable_header # === cheader
614
+ alias clickable_h1 clickable_header # === clickable_h1
615
+
616
+ # ========================================================================= #
617
+ # === unicode_plus_minus
618
+ # ========================================================================= #
619
+ def unicode_plus_minus
620
+ UNICODE_PLUS_MINUS
621
+ end
622
+
623
+ # ========================================================================= #
624
+ # === clickable_image_as_string?
625
+ # ========================================================================= #
626
+ def clickable_image_as_string?
627
+ _ = clickable_image? # First get a reference.
628
+ # ======================================================================= #
629
+ # === Handle Symbols next
630
+ #
631
+ # Symbols have to be expanded towards their local path.
632
+ # ======================================================================= #
633
+ if _.is_a? Symbol
634
+ _ = map_symbol_to_image_location(_) # Now we have the real path.
635
+ if _.start_with? '/usr/lib/ruby/'
636
+ # =================================================================== #
637
+ # This can clearly not work, so we must rewrite the whole
638
+ # line to ad-hoc fit to a roebe layout of the filesystem.
639
+ # Clearly this will only work on my home system, but I am
640
+ # the only one using this right now anyway.
641
+ # =================================================================== #
642
+ input_target = ruby_sitelib_dir?
643
+ replacement_target = relative_path?+'programming/ruby/src/cyberweb/lib/'
644
+ _.gsub!(
645
+ Regexp.new(input_target),
646
+ replacement_target
647
+ )
648
+ else
649
+ unless _.start_with? 'images/standard_images/'
650
+ _.prepend(prepend_path_to_the_images?.dup)
651
+ end
652
+ end
653
+ _ = '<img src="'+_+'" class="marr10px">'
654
+ end
655
+ return _.to_s # Must guarantee that it is a String.
656
+ end
657
+
658
+ # ========================================================================= #
659
+ # === h3_id
660
+ # ========================================================================= #
661
+ def h3_id(
662
+ i,
663
+ optional_css_class = '',
664
+ &block
665
+ )
666
+ use_this_id = sanitize_this_id(i)
667
+ # ======================================================================= #
668
+ # === Handle blocks next
669
+ # ======================================================================= #
670
+ if block_given?
671
+ yielded = yield
672
+ case yielded
673
+ # ===================================================================== #
674
+ # === :clickable_image
675
+ # ===================================================================== #
676
+ when :clickable_image
677
+ i = "<a href=\"##{use_this_id}\">"+
678
+ dot109?+
679
+ "</a>#{i}"
680
+ end
681
+ end
682
+ h3(i, id: use_this_id, css_class: optional_css_class)
683
+ end
684
+
685
+ # ========================================================================= #
686
+ # === div_default_le
687
+ # ========================================================================= #
688
+ def div_default_le(
689
+ optional_css_class = '',
690
+ the_id = '',
691
+ optional_css_style = '',
692
+ &block
693
+ )
694
+ # ======================================================================= #
695
+ # === Handle Hashes
696
+ #
697
+ # Next handle Hashes given to this method
698
+ # ======================================================================= #
699
+ if optional_css_class.is_a? Hash
700
+ # ===================================================================== #
701
+ # === :id
702
+ # ===================================================================== #
703
+ if optional_css_class.has_key? :id
704
+ the_id = optional_css_class.delete(:id)
705
+ # ===================================================================== #
706
+ # === :the_id
707
+ # ===================================================================== #
708
+ elsif optional_css_class.has_key? :the_id
709
+ the_id = optional_css_class.delete(:the_id)
710
+ end
711
+ # ===================================================================== #
712
+ # === :css_style
713
+ # ===================================================================== #
714
+ if optional_css_class.has_key? :css_style
715
+ optional_css_style = optional_css_class.delete(:css_style)
716
+ end
717
+ if optional_css_class.is_a?(Hash) and optional_css_class.empty?
718
+ optional_css_class = ''
719
+ end
720
+ end
721
+ if the_id.is_a? Hash
722
+ # ===================================================================== #
723
+ # === :id
724
+ # ===================================================================== #
725
+ if the_id.has_key? :id
726
+ the_id = the_id.delete(:id)
727
+ end
728
+ end
729
+ optional_css_class = optional_css_class.to_s.dup
730
+ optional_css_class.prepend('default ') # Make it the first argument.
731
+ div(
732
+ optional_css_class.strip,
733
+ the_id,
734
+ optional_css_style,
735
+ &block
736
+ )
737
+ end
738
+
739
+ # ========================================================================= #
740
+ # === p_default_le
741
+ #
742
+ # This method is basically like p_default(), but it makes all output
743
+ # within that method make use of le() rather than e(). The idea here
744
+ # is that you can get padded (indented) output "for free" for a
745
+ # given paragraph.
746
+ #
747
+ # Example input:
748
+ #
749
+ # p_default_le('mart2em', id: 'the_idea_behind_the_chaos_cell') {}
750
+ #
751
+ # ========================================================================= #
752
+ def p_default_le(
753
+ optional_css_class = '',
754
+ the_id = '',
755
+ optional_css_style = '',
756
+ &block
757
+ )
758
+ # ======================================================================= #
759
+ # === Handle Hashes
760
+ #
761
+ # Next handle Hashes given to this method
762
+ # ======================================================================= #
763
+ if optional_css_class.is_a? Hash
764
+ # ===================================================================== #
765
+ # === :id
766
+ # ===================================================================== #
767
+ if optional_css_class.has_key? :id
768
+ the_id = optional_css_class.delete(:id)
769
+ # ===================================================================== #
770
+ # === :the_id
771
+ # ===================================================================== #
772
+ elsif optional_css_class.has_key? :the_id
773
+ the_id = optional_css_class.delete(:the_id)
774
+ end
775
+ # ===================================================================== #
776
+ # === :css_style
777
+ # ===================================================================== #
778
+ if optional_css_class.has_key? :css_style
779
+ optional_css_style = optional_css_class.delete(:css_style)
780
+ end
781
+ if optional_css_class.is_a?(Hash) and optional_css_class.empty?
782
+ optional_css_class = ''
783
+ end
784
+ end
785
+ if the_id.is_a? Hash
786
+ # ===================================================================== #
787
+ # === :id
788
+ # ===================================================================== #
789
+ if the_id.has_key? :id
790
+ the_id = the_id.delete(:id)
791
+ end
792
+ end
793
+ optional_css_class = optional_css_class.to_s.dup
794
+ optional_css_class.prepend('default ') # Make it the first argument.
795
+ p(
796
+ optional_css_class.strip,
797
+ the_id,
798
+ optional_css_style,
799
+ &block
800
+ )
801
+ end
802
+
803
+ # ========================================================================= #
804
+ # === javascript_drag_and_drop
805
+ # ========================================================================= #
806
+ def javascript_drag_and_drop(
807
+ i, use_jquery = use_jquery?
808
+ )
809
+ if use_jquery
810
+ make_this_id_draggable(i)
811
+ end
812
+ end; alias add_javascript_drag javascript_drag_and_drop # === add_javascript_drag
813
+ alias drag javascript_drag_and_drop # === drag
814
+ alias drag_this javascript_drag_and_drop # === drag_this
815
+ alias drag_this_id javascript_drag_and_drop # === drag_this_id
816
+ alias drag_for javascript_drag_and_drop # === drag_for
817
+ alias drag_it javascript_drag_and_drop # === drag_it
818
+ alias drag_textarea javascript_drag_and_drop # === drag_textarea
819
+ alias drag_and_drop javascript_drag_and_drop # === drag_and_drop
820
+ alias drag_n_drop javascript_drag_and_drop # === drag_n_drop
821
+ alias drag_drop javascript_drag_and_drop # === drag_drop
822
+ alias enable_drag_for javascript_drag_and_drop # === enable_drag_for
823
+
824
+ # ========================================================================= #
825
+ # === mars2em
826
+ # ========================================================================= #
827
+ def mars2em(i = '')
828
+ e(i, 'mars2em')
829
+ end
830
+
831
+ # ========================================================================= #
832
+ # === mars1em
833
+ # ========================================================================= #
834
+ def mars1em(i = '')
835
+ e(i, 'mars1em')
836
+ end
837
+
838
+ # ========================================================================= #
839
+ # === table6
840
+ # ========================================================================= #
841
+ def table6(
842
+ css_class = '',
843
+ id = '',
844
+ css_style = '',
845
+ *content,
846
+ &block
847
+ )
848
+ addn(
849
+ string_table6(
850
+ css_class,
851
+ id,
852
+ css_style,
853
+ content,
854
+ &block
855
+ )
856
+ )
857
+ end
858
+
859
+ # ========================================================================= #
860
+ # === table3
861
+ # ========================================================================= #
862
+ def table3(
863
+ css_class = '',
864
+ id = '',
865
+ css_style = '',
866
+ *content,
867
+ &block
868
+ )
869
+ addn(
870
+ string_table3(
871
+ css_class,
872
+ id,
873
+ css_style,
874
+ content,
875
+ &block
876
+ )
877
+ )
878
+ end
879
+
880
+ # ========================================================================= #
881
+ # === string_table6
882
+ # ========================================================================= #
883
+ def string_table6(
884
+ css_class = '',
885
+ id = '',
886
+ css_style = '',
887
+ *content
888
+ )
889
+ ::Cyberweb.string_table6(
890
+ css_class,
891
+ id,
892
+ css_style,
893
+ content
894
+ )
895
+ end
896
+
897
+ # ========================================================================= #
898
+ # === string_table5
899
+ # ========================================================================= #
900
+ def string_table5(
901
+ css_class = '',
902
+ id = '',
903
+ css_style = '',
904
+ *content
905
+ )
906
+ # ======================================================================= #
907
+ # To test, try:
908
+ #
909
+ # puts ::Cyberweb.string_table5('','','',%w( ah asjhk avshvasjkh vajhksavjhk avsjhvashkjavs ))
910
+ #
911
+ # ======================================================================= #
912
+ ::Cyberweb.string_table5(
913
+ css_class, id, css_style, content
914
+ )
915
+ end
916
+
917
+ # ========================================================================= #
918
+ # === table2
919
+ #
920
+ # This variant maks a two-elements-per-row HTML table.
921
+ #
922
+ # The last variable is the content; keep it even, if possible, e. g
923
+ # 2 elements or 4 or 6 and so forth.
924
+ # ========================================================================= #
925
+ def table2(
926
+ css_class = '',
927
+ id = '',
928
+ css_style = '',
929
+ *content,
930
+ &block
931
+ )
932
+ addn(
933
+ string_table2(
934
+ css_class,
935
+ id,
936
+ css_style,
937
+ content.flatten,
938
+ &block
939
+ )
940
+ )
941
+ end
942
+
943
+ # ========================================================================= #
944
+ # === eesentence
945
+ # ========================================================================= #
946
+ def eesentence(
947
+ i, optional_css_class = ''
948
+ )
949
+ if optional_css_class and optional_css_class.empty?
950
+ ee sentence(i)
951
+ else
952
+ espan sentence(i), optional_css_class
953
+ end
954
+ end; alias eequote eesentence # === eequote
955
+
956
+ # ========================================================================= #
957
+ # === esentence
958
+ # ========================================================================= #
959
+ def esentence(
960
+ i, optional_css_class = ''
961
+ )
962
+ eesentence(i, optional_css_class)
963
+ br # This variant always ensure that br() will be called.
964
+ end; alias equote esentence # === equote
965
+
966
+ # ========================================================================= #
967
+ # === sanitize_this_id
968
+ #
969
+ # This method can be used to sanitize the given input, for further use
970
+ # as a HTML id. A few assumptions will be made for input that is
971
+ # passed to this method; but, even aside from these assumptions, the
972
+ # most important point for this method is that it can be consistently
973
+ # used/re-used.
974
+ # ========================================================================= #
975
+ def sanitize_this_id(i)
976
+ return ::Cyberweb.sanitize_this_id(i)
977
+ end
978
+
979
+ # ========================================================================= #
980
+ # === arrow_right?
981
+ # ========================================================================= #
982
+ def arrow_right?
983
+ ::Cyberweb.right_arrow
984
+ end; alias arrow_right arrow_right? # === arrow_right
985
+ alias rarrow arrow_right? # === rarrow
986
+ alias rarrow? arrow_right? # === rarrow?
987
+
988
+ # ========================================================================= #
989
+ # === l2emb
990
+ #
991
+ # This method simply combines l2() with br().
992
+ # ========================================================================= #
993
+ def l2emb(
994
+ i = '',
995
+ optional_css_class = ''
996
+ )
997
+ l2(i, optional_css_class)
998
+ br
999
+ end; alias l2br l2emb # === l2br
1000
+ alias l2embr l2emb # === l2embr
1001
+ alias lem2 l2emb # === lem2
1002
+ alias lembre2 l2emb # === lembre2
1003
+ alias padl2embr l2emb # === padl2embr
1004
+ alias le2 l2emb # === le2
1005
+ alias lem2br l2emb # === lem2br
1006
+ alias le2em l2emb # === le2em
1007
+
1008
+ # ========================================================================= #
1009
+ # === clickable_image?
1010
+ #
1011
+ # This must stay a simpler getter - no sanitizing is allowed.
1012
+ # ========================================================================= #
1013
+ def clickable_image?
1014
+ @internal_hash[:clickable_image]
1015
+ end
1016
+
1017
+ # ========================================================================= #
1018
+ # === sitelibdir?
1019
+ # ========================================================================= #
1020
+ def sitelibdir?
1021
+ return RbConfig::CONFIG['sitelibdir'].to_s+'/'
1022
+ end
1023
+
1024
+ # ========================================================================= #
1025
+ # === consider_autoclosing_the_head_tag
1026
+ #
1027
+ # This method will also append the javascript code.
1028
+ # ========================================================================= #
1029
+ def consider_autoclosing_the_head_tag(
1030
+ main_string = main_string?
1031
+ )
1032
+ unless main_string.include?('<title>')
1033
+ # ===================================================================== #
1034
+ # Add the title here.
1035
+ # ===================================================================== #
1036
+ add_the_title_to_the_webobject
1037
+ end
1038
+ unless main_string.include? '</head>'
1039
+ # ===================================================================== #
1040
+ # Add all CSS files next:
1041
+ # ===================================================================== #
1042
+ add_all_local_css_files
1043
+ append_newline
1044
+ # ===================================================================== #
1045
+ # The following is experimental as of April 2011.
1046
+ # In June 2014 it was moved into the <head> tag.
1047
+ #
1048
+ # The code will append the default javascript code.
1049
+ # ===================================================================== #
1050
+ append(return_default_javascript)
1051
+ # ===================================================================== #
1052
+ # === Use Jquery
1053
+ #
1054
+ # Load jquery if the config tells us to do so. This has to happen
1055
+ # within the <head> tag.
1056
+ # ===================================================================== #
1057
+ if use_jquery?
1058
+ append_jquery_string
1059
+ end
1060
+ # ===================================================================== #
1061
+ # === Dragula
1062
+ #
1063
+ # Whether we will use dragula or not. If yes then we will add the
1064
+ # dragula.js script.
1065
+ # ===================================================================== #
1066
+ if use_dragula?
1067
+ append_path_to_dragula_js_file
1068
+ web_object_config?['use_dragula_for_these_tags'].each {|entry|
1069
+ append add_dragula_drag_for(entry) # For ul elements.
1070
+ }
1071
+ end
1072
+ # ===================================================================== #
1073
+ # Last but not least, append the default javascript code, as-is.
1074
+ # ===================================================================== #
1075
+ append("#{javascript?}#{NL}")
1076
+ addnl("\n</head>\n")
1077
+ end
1078
+ end
1079
+
1080
+ # ========================================================================= #
1081
+ # === build_up_the_html_string (main tag)
1082
+ #
1083
+ # This method will build the main string, that is - the one which is
1084
+ # stored in the instance variable called @string_that_is_to_be_served.
1085
+ #
1086
+ # This method here may also be called from the method serve_webpage()
1087
+ # for us.
1088
+ #
1089
+ # This method is just about the most important method for class
1090
+ # Cyberweb::WebObject.
1091
+ # ========================================================================= #
1092
+ def build_up_the_html_string
1093
+ reset_the_main_string # We have to empty our String at build-up start.
1094
+ prepend_doc_type
1095
+ # ======================================================================= #
1096
+ # Next, open up the <head> tag. We will also add the meta-collection.
1097
+ # ======================================================================= #
1098
+ append_html_header_to_the_head_open_tag
1099
+ append_the_meta_collection
1100
+ append_newline # Add a newline before the title.
1101
+ append_title
1102
+ append_data_from_remote_css_urls
1103
+ # append_default_css_files # ← Add the default .css files here.
1104
+ # ======================================================================= #
1105
+ # Append the CSS next.
1106
+ # ======================================================================= #
1107
+ # append @css_style
1108
+ # append @array_css_files.sort.join(N) unless @array_css_files.empty?
1109
+ # ======================================================================= #
1110
+ # A few more newlines, to also pad the favicon String.
1111
+ # ======================================================================= #
1112
+ append_newline
1113
+ append_newline
1114
+ # ======================================================================= #
1115
+ # Next, close the head tag.
1116
+ # ======================================================================= #
1117
+ append_chead_tag
1118
+ append_newline # Add add another newline after the </head> tag.
1119
+ # ======================================================================= #
1120
+ # Append the body-tag next.
1121
+ # ======================================================================= #
1122
+ if use_body_tag?
1123
+ append string_body_start(body_css_class?,
1124
+ body_the_id?,
1125
+ body_css_style?,
1126
+ body_javascript?) #, javascript_in_body)
1127
+ end
1128
+ append_frame_string # <- This is usually just an empty String.
1129
+ # ======================================================================= #
1130
+ # Also determine the amount of lines.
1131
+ # ======================================================================= #
1132
+ set_n_total_lines
1133
+ # ======================================================================= #
1134
+ # The next line is commented out because we may not always want
1135
+ # to close the <body> and <html> tag too early.
1136
+ # ======================================================================= #
1137
+ # append_cbody_and_chtml_tags
1138
+ # @internal_hash[:html_string] << "</html>\n"
1139
+ end; alias rebuild_the_HTML_string build_up_the_html_string # === rebuild_the_HTML_string
1140
+ alias rebuild_main_string build_up_the_html_string # === rebuild_main_string
1141
+ alias rebuild_the_main_string build_up_the_html_string # === rebuild_the_main_string
1142
+
1143
+ # ========================================================================= #
1144
+ # === doc_skeleton (main tag)
1145
+ #
1146
+ # This method has been specifically created to allow support of
1147
+ # .md (markdown) files in different languages - either german
1148
+ # or english.
1149
+ #
1150
+ # This method may also be called via a Symbol, such as:
1151
+ #
1152
+ # doc_skeleton(:english_or_german)
1153
+ #
1154
+ # ========================================================================= #
1155
+ def doc_skeleton(this_file)
1156
+ if this_file.is_a? Symbol
1157
+ case this_file
1158
+ # ===================================================================== #
1159
+ # === :english_or_german
1160
+ #
1161
+ # This will default to german.
1162
+ # ===================================================================== #
1163
+ when :english_or_german
1164
+ this_file = filename_without_extension?+'_german.md' # 'luft_german.md'
1165
+ end
1166
+ end
1167
+ # ======================================================================= #
1168
+ # Next, check for arguments given to the .cgi file at hand.
1169
+ # ======================================================================= #
1170
+ parameters_as_string = parameters_as_string?
1171
+ case parameters_as_string
1172
+ # ======================================================================= #
1173
+ # === use_english
1174
+ #
1175
+ # This can be invoked via:
1176
+ #
1177
+ # http://localhost/programming/ruby/src/roebe/lib/roebe/www/luft/luft.cgi?english
1178
+ #
1179
+ # ======================================================================= #
1180
+ when /use_english/,
1181
+ /english$/
1182
+ this_file = filename_without_extension?+'_english.md'
1183
+ # ======================================================================= #
1184
+ # === use_german
1185
+ # ======================================================================= #
1186
+ when /use_german/,
1187
+ /german$/
1188
+ this_file = filename_without_extension?+'_german.md'
1189
+ end
1190
+ if this_file and File.exist?(this_file)
1191
+ file_content = File.read(this_file, encoding: 'utf-8')
1192
+ dataset = remove_comments_from_this_string(file_content)
1193
+ eval(dataset)
1194
+ # ===================================================================== #
1195
+ # Next simply evaluate it.
1196
+ # ===================================================================== #
1197
+ else
1198
+ no_file_exists_at(this_file)
1199
+ end
1200
+ end
1201
+
1202
+ # ========================================================================= #
1203
+ # === p_default
1204
+ #
1205
+ # This is similar to p(), but the implicit CSS class 'default' will be
1206
+ # used.
1207
+ # ========================================================================= #
1208
+ def p_default(
1209
+ optional_css_class = '',
1210
+ the_id = '',
1211
+ optional_css_style = '',
1212
+ &block
1213
+ )
1214
+ if optional_css_class.is_a? Hash
1215
+ # ===================================================================== #
1216
+ # === :id
1217
+ # ===================================================================== #
1218
+ if optional_css_class.has_key? :id
1219
+ the_id = optional_css_class.delete(:id)
1220
+ end
1221
+ # ===================================================================== #
1222
+ # === :css_style
1223
+ # ===================================================================== #
1224
+ if optional_css_class.has_key? :css_style
1225
+ optional_css_style = optional_css_class.delete(:css_style)
1226
+ end
1227
+ if optional_css_class.is_a?(Hash) and optional_css_class.empty?
1228
+ optional_css_class = ''
1229
+ end
1230
+ end
1231
+ optional_css_class = optional_css_class.to_s.dup
1232
+ optional_css_class.prepend('default ') # Make it the first argument.
1233
+ p(
1234
+ optional_css_class.strip,
1235
+ the_id,
1236
+ optional_css_style,
1237
+ &block
1238
+ )
1239
+ end
1240
+
1241
+ # ========================================================================= #
1242
+ # === counter_li
1243
+ #
1244
+ # This method was added in June 2021.
1245
+ # ========================================================================= #
1246
+ def counter_li(
1247
+ i = '',
1248
+ optional_css_class = '',
1249
+ &block
1250
+ )
1251
+ @internal_hash[:listing_counter] += 1
1252
+ yielded = nil
1253
+ if block_given?
1254
+ yielded = yield
1255
+ end
1256
+ index = @internal_hash[:listing_counter].to_s
1257
+ case yielded
1258
+ # ======================================================================= #
1259
+ # === :counter_is_bold
1260
+ # ======================================================================= #
1261
+ when :counter_is_bold
1262
+ index = "<b>#{index}</b>"
1263
+ end
1264
+ e '('+index+') '+i.to_s,
1265
+ optional_css_class
1266
+ end; alias listing counter_li # === listing
1267
+ alias counter counter_li # === counter
1268
+
1269
+ # ========================================================================= #
1270
+ # === bold_counter
1271
+ #
1272
+ # This is identical to counter_li() - or, counter(), which is an alias,
1273
+ # anyway - except that the index that is shown, is shown in a bold way.
1274
+ # ========================================================================= #
1275
+ def bold_counter(
1276
+ i = '',
1277
+ optional_css_class = ''
1278
+ )
1279
+ counter(i, optional_css_class) { :counter_is_bold }
1280
+ end
1281
+
1282
+ # ========================================================================= #
1283
+ # === anm
1284
+ #
1285
+ # Note that "anm" is short for "anmerkung", which can roughly be
1286
+ # translated to mean "important annotation" in English.
1287
+ # ========================================================================= #
1288
+ def anm(
1289
+ i = '', # Should be an empty String.
1290
+ optional_css_class = '',
1291
+ optional_the_id = '',
1292
+ optional_css_style = '',
1293
+ &block
1294
+ )
1295
+ css_for_the_anmerkung_symbol = 'marr10px'
1296
+ if block_given?
1297
+ yielded = yield
1298
+ if yielded.is_a? Hash
1299
+ # =================================================================== #
1300
+ # === :outer_CSS
1301
+ #
1302
+ # This entry point allows the user to override the default CSS
1303
+ # for anm().
1304
+ # =================================================================== #
1305
+ if yielded.has_key? :outer_CSS
1306
+ css_for_the_anmerkung_symbol = yielded.delete(:outer_CSS)
1307
+ end
1308
+ end
1309
+ end
1310
+ anmerkung_symbol = sg(:anmerkung, css_for_the_anmerkung_symbol)
1311
+ addn(
1312
+ anmerkung_symbol+
1313
+ string_span(
1314
+ i, optional_css_class, optional_the_id, optional_css_style
1315
+ )
1316
+ )
1317
+ end; alias anmerkung anm # === anmerkung
1318
+
1319
+ # ========================================================================= #
1320
+ # === addnl (addnl tag)
1321
+ #
1322
+ # This will call add(), and decree that a newline is used. It will NOT
1323
+ # modify the given input at hand - only add() may modify the given
1324
+ # input at hand.
1325
+ # ========================================================================= #
1326
+ def addnl(
1327
+ i = "\n",
1328
+ optional_css_class = nil
1329
+ )
1330
+ # ======================================================================= #
1331
+ # We can not call .to_s in the next line because we may pass a Symbol
1332
+ # such as :br too.
1333
+ # ======================================================================= #
1334
+ add(i, optional_css_class, :use_a_newline) # Delegate towards add() here.
1335
+ end; alias add_with_newline addnl # === add_with_newline
1336
+ alias add_newline addnl # === add_newline
1337
+ alias addn addnl # === addn
1338
+ alias adnl addnl # === adnl
1339
+
1340
+ # ========================================================================= #
1341
+ # === add (add tag)
1342
+ #
1343
+ # This is the general append-method for whenever we seek to append
1344
+ # onto the main String (stored in @_) of this class.
1345
+ # ========================================================================= #
1346
+ def add(
1347
+ i, # The input here can be a Symbol as well.
1348
+ optional_css_class = nil,
1349
+ optional_entry_for_newline = nil
1350
+ )
1351
+ case i
1352
+ # ======================================================================= #
1353
+ # === :newline
1354
+ # ======================================================================= #
1355
+ when :newline,
1356
+ :use_a_newline
1357
+ i = NL
1358
+ # ======================================================================= #
1359
+ # === :body
1360
+ # ======================================================================= #
1361
+ when :body
1362
+ consider_autoclosing_the_head_tag
1363
+ i = return_body_tag(optional_css_class).dup
1364
+ # ======================================================================= #
1365
+ # === :content_type_plain
1366
+ # ======================================================================= #
1367
+ when :content_type_plain
1368
+ i = Cyberweb::CONTENT_TYPE_PLAIN
1369
+ end
1370
+ if i
1371
+ # ===================================================================== #
1372
+ # === Handle symbols next
1373
+ # ===================================================================== #
1374
+ if i.is_a? Symbol
1375
+ i = "<#{i}>".dup # Such as for :br aka <br>.
1376
+ elsif i.is_a? Numeric
1377
+ i = i.to_s.dup
1378
+ elsif i.respond_to?(:is_an_objectified_html_tag?) and
1379
+ i.is_an_objectified_html_tag?
1380
+ # =================================================================== #
1381
+ # This entry clause adds support for directly adding
1382
+ # Objectified::HtmlTags.
1383
+ # =================================================================== #
1384
+ i = i.string?
1385
+ end
1386
+ if i.is_a?(String) and i.frozen?
1387
+ i = i.dup
1388
+ end
1389
+ end
1390
+ if i.nil?
1391
+ i = ''.dup
1392
+ end
1393
+ case optional_entry_for_newline
1394
+ # ======================================================================= #
1395
+ # === :newline
1396
+ # ======================================================================= #
1397
+ when :newline,
1398
+ :use_a_newline
1399
+ i << "\n"
1400
+ end
1401
+ # ======================================================================= #
1402
+ # Avoid a frozen main string:
1403
+ # ======================================================================= #
1404
+ if @internal_hash[:html_string].frozen?
1405
+ @internal_hash[:html_string] = @internal_hash[:html_string].dup
1406
+ end
1407
+ append_raw << i
1408
+ end; alias append add # === append
1409
+ alias add_to_main_string add # === add_to_main_string
1410
+
1411
+ # ========================================================================= #
1412
+ # === append_raw
1413
+ #
1414
+ # This method is not allowed to do ANY modification to the given input.
1415
+ # ========================================================================= #
1416
+ def append_raw(i = '')
1417
+ @internal_hash[:html_string] << i
1418
+ end
1419
+
1420
+ # ========================================================================= #
1421
+ # === relative_path?
1422
+ #
1423
+ # This method attempts to return the correct, relative path to assets.
1424
+ #
1425
+ # We need to keep in mind that the .cgi file at hand may reside
1426
+ # in another subdirectory, such as /home/x/studium/, rather than
1427
+ # /home/x/data/.
1428
+ # ========================================================================= #
1429
+ def relative_path?
1430
+ @internal_hash[:relative_path]
1431
+ end
1432
+
1433
+ # ========================================================================= #
1434
+ # === dot109?
1435
+ #
1436
+ # This simply wraps over dot() with a default value and default CSS.
1437
+ # ========================================================================= #
1438
+ def dot109?
1439
+ string_dot(109, 'marr10px')
1440
+ end
1441
+
1442
+ # ========================================================================= #
1443
+ # === set_clickable_image
1444
+ # ========================================================================= #
1445
+ def set_clickable_image(i)
1446
+ @internal_hash[:clickable_image] = i
273
1447
  end
274
1448
 
1449
+ require 'cyberweb/toplevel_methods/dot.rb'
275
1450
  # ========================================================================= #
276
- # === h5_id_clickable
1451
+ # === string_dot
1452
+ #
1453
+ # This variant will return a String. The regular dot() method on the
1454
+ # other hand will append that String onto the resulting webpage
1455
+ # content, as-is.
277
1456
  # ========================================================================= #
278
- def h5_id_clickable(
279
- i,
1457
+ def string_dot(
1458
+ i = 108,
280
1459
  optional_css_class = '',
281
- &block
1460
+ optional_the_id = '',
1461
+ optional_css_style = ''
282
1462
  )
283
- h5_id(i, optional_css_class) { :clickable_image }
284
- end; alias h5_fancy_id h5_id_clickable # === h5_fancy_id
1463
+ _ = sg(
1464
+ "dot#{i}".to_sym,
1465
+ optional_css_class,
1466
+ optional_the_id,
1467
+ optional_css_style
1468
+ )
1469
+ return _
1470
+ end; alias dot string_dot # === dot (dot tag)
285
1471
 
286
1472
  # ========================================================================= #
287
- # === h5_id
1473
+ # === h3_id_clickable
288
1474
  # ========================================================================= #
289
- def h5_id(
1475
+ def h3_id_clickable(
290
1476
  i,
291
1477
  optional_css_class = '',
292
1478
  &block
293
1479
  )
294
- use_this_id = sanitize_this_id(i)
295
- # ======================================================================= #
296
- # === Handle blocks next
297
- # ======================================================================= #
298
- if block_given?
299
- yielded = yield
300
- case yielded
301
- # ===================================================================== #
302
- # === :clickable_image
303
- # ===================================================================== #
304
- when :clickable_image
305
- i = "<a href=\"##{use_this_id}\">"+
306
- dot109?+
307
- "</a>#{i}"
308
- end
309
- end
310
- h5 i, id: use_this_id
311
- end
1480
+ h3_id(i, optional_css_class) { :clickable_image }
1481
+ end; alias h3_fancy_id h3_id_clickable # === h3_fancy_id
1482
+ alias h3_fid h3_id_clickable # === h3_fid
312
1483
 
313
1484
  # ========================================================================= #
314
1485
  # === h6_id_clickable
@@ -320,6 +1491,7 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
320
1491
  )
321
1492
  h6_id(i, optional_css_class) { :clickable_image }
322
1493
  end; alias h6_fancy_id h6_id_clickable # === h6_fancy_id
1494
+ alias h6_fid h6_id_clickable # === h6_fid
323
1495
 
324
1496
  # ========================================================================= #
325
1497
  # === h6_id
@@ -345,114 +1517,9 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
345
1517
  "</a>#{i}"
346
1518
  end
347
1519
  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
- )
1520
+ h6(i, id: use_this_id, css_class: optional_css_class)
382
1521
  end
383
1522
 
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
1523
  # ========================================================================= #
457
1524
  # === listing_css_object
458
1525
  # ========================================================================= #
@@ -460,22 +1527,6 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
460
1527
  ::Cyberweb.listing_css_object
461
1528
  end
462
1529
 
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
1530
  # ========================================================================= #
480
1531
  # === listing_css
481
1532
  # ========================================================================= #
@@ -497,33 +1548,6 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
497
1548
  @internal_hash[:listing_counter] = i
498
1549
  end
499
1550
 
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
1551
  # ========================================================================= #
528
1552
  # === l2
529
1553
  # ========================================================================= #
@@ -550,72 +1574,6 @@ class WebObject < ::Cyberweb::Base # === Cyberweb::WebObject
550
1574
  end; alias l2em l2 # === l2em
551
1575
  alias padl2em l2 # === padl2em
552
1576
 
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
1577
  # ========================================================================= #
620
1578
  # === return_progress
621
1579
  # ========================================================================= #
@@ -1130,34 +2088,6 @@ button.for_the_keyboard:active {
1130
2088
  return the_id # Always return it here.
1131
2089
  end; alias register_id register_this_id # === register_id
1132
2090
 
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
2091
  # ========================================================================= #
1162
2092
  # === internal_hash?
1163
2093
  # ========================================================================= #
@@ -1478,27 +2408,6 @@ button.for_the_keyboard:active {
1478
2408
  alias b1= set_body_css_class # === b1=
1479
2409
  alias b1 set_body_css_class # === b1
1480
2410
 
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
2411
  # ========================================================================= #
1503
2412
  # === string_table3
1504
2413
  #
@@ -1677,39 +2586,13 @@ button.for_the_keyboard:active {
1677
2586
  *content,
1678
2587
  &block
1679
2588
  )
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
- )
2589
+ ::Cyberweb.string_table2(
2590
+ css_class,
2591
+ the_id,
2592
+ css_style,
2593
+ content,
2594
+ &block
2595
+ )
1713
2596
  end
1714
2597
 
1715
2598
  # ========================================================================= #
@@ -1720,7 +2603,7 @@ button.for_the_keyboard:active {
1720
2603
  )
1721
2604
  use_this_dataset.flatten!
1722
2605
  use_this_dataset.compact!
1723
- table2('pad0_5em','glossar') {{
2606
+ table2('pad0_5em pretty_table','glossar') {{
1724
2607
  with_this_data: use_this_dataset
1725
2608
  }}
1726
2609
  end; alias glossar glossar_table # === glossar
@@ -1805,13 +2688,6 @@ button.for_the_keyboard:active {
1805
2688
  )
1806
2689
  end
1807
2690
 
1808
- # ========================================================================= #
1809
- # === javascript?
1810
- # ========================================================================= #
1811
- def javascript?
1812
- @internal_hash[:javascript]
1813
- end
1814
-
1815
2691
  # ========================================================================= #
1816
2692
  # === logical_build_up
1817
2693
  #
@@ -1958,6 +2834,7 @@ button.for_the_keyboard:active {
1958
2834
  alias drag_n_drop drag_and_drop # === drag_n_drop
1959
2835
  alias drag_drop drag_and_drop # === drag_drop
1960
2836
  alias add_javascript_drag drag_and_drop # === add_javascript_drag
2837
+ alias draggy drag_and_drop # === draggy
1961
2838
 
1962
2839
  # ========================================================================= #
1963
2840
  # === update_the_body
@@ -2005,26 +2882,6 @@ document.body.innerHTML = "'+with_this_content+'"
2005
2882
  )
2006
2883
  end
2007
2884
 
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
2885
  # ========================================================================= #
2029
2886
  # === parse_table
2030
2887
  # ========================================================================= #
@@ -2145,98 +3002,6 @@ EOF
2145
3002
  SaveFile.write_what_into(what, into)
2146
3003
  end
2147
3004
 
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
3005
  # ========================================================================= #
2241
3006
  # === german
2242
3007
  # ========================================================================= #
@@ -2407,23 +3172,6 @@ a:hover {
2407
3172
  alias smart_include attach_these_constants # === smart_include
2408
3173
  alias adhoc_include attach_these_constants # === adhoc_include
2409
3174
 
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
3175
  # ========================================================================= #
2428
3176
  # === return_css_for_tetris
2429
3177
  #
@@ -2793,65 +3541,6 @@ a:hover {
2793
3541
  add_string_lateron
2794
3542
  end
2795
3543
 
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
3544
  # ========================================================================= #
2856
3545
  # === created_when
2857
3546
  #
@@ -3091,7 +3780,7 @@ a:hover {
3091
3780
  alias css_style css_style # === css_style
3092
3781
  alias inline_css css_style # === inline_css
3093
3782
  alias append_to_css_style css_style # === append_to_css_style
3094
- alias append_this_css css_style # === append_this_css
3783
+ # alias append_this_css css_style # === append_this_css # This is now another wrapper, since 2023.
3095
3784
  alias add_css_style css_style # === add_css_style
3096
3785
 
3097
3786
  # ========================================================================= #
@@ -3181,8 +3870,8 @@ a:hover {
3181
3870
  addnl(
3182
3871
  result
3183
3872
  )
3184
- end; alias embed_pdf embed_this_pdf # === embed_pdf
3185
- alias add_pdf embed_this_pdf # === add_pdf
3873
+ end; alias add_pdf embed_this_pdf # === add_pdf
3874
+ alias embed_pdf embed_this_pdf # === embed_pdf
3186
3875
  alias embed_this_pdf_file embed_this_pdf # === embed_this_pdf_file
3187
3876
 
3188
3877
  # ========================================================================= #
@@ -3786,29 +4475,6 @@ a:hover {
3786
4475
  return _
3787
4476
  end
3788
4477
 
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
4478
  # ========================================================================= #
3813
4479
  # === table_padding=
3814
4480
  # ========================================================================= #
@@ -3985,110 +4651,38 @@ a:hover {
3985
4651
  def add_javascript_file(i)
3986
4652
  if i.is_a? Symbol
3987
4653
  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
4654
+ # ===================================================================== #
4655
+ # === :simple_calculator
4656
+ # ===================================================================== #
4657
+ when :simple_calculator
4658
+ i = File.absolute_path(
4659
+ project_base_dir?+'javascript_code/simple_calculator.js'
4660
+ )
4661
+ end
4662
+ if i and File.exist?(i)
4663
+ i = File.read(i)
4664
+ end
4665
+ end
4666
+ addnl(
4667
+ "<script>\n"+
4668
+ i.to_s+
4669
+ "</script>\n"
4069
4670
  )
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
4671
+ end
4078
4672
 
4079
4673
  # ========================================================================= #
4080
- # === append_to_cmd2
4674
+ # === set_body_content
4081
4675
  # ========================================================================= #
4082
- def append_to_cmd2(i = '')
4083
- ::Cyberweb.append_to_cmd2(i)
4676
+ def set_body_content(i)
4677
+ @internal_hash[:body_content] = i.to_s.dup
4084
4678
  end
4085
-
4679
+
4086
4680
  # ========================================================================= #
4087
- # === append_to_cmd3
4681
+ # === body_content?
4088
4682
  # ========================================================================= #
4089
- def append_to_cmd3(i = '')
4090
- ::Cyberweb.append_to_cmd3(i)
4091
- end
4683
+ def body_content?
4684
+ @internal_hash[:body_content]
4685
+ end; alias body_string? body_content? # === body_string?
4092
4686
 
4093
4687
  # ========================================================================= #
4094
4688
  # === random_linear_gradient_background
@@ -4796,23 +5390,6 @@ SQL
4796
5390
  )
4797
5391
  end; alias eee espan_no_newline # === eee
4798
5392
 
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
5393
  require 'cyberweb/toplevel_methods/markdown.rb'
4817
5394
  # ========================================================================= #
4818
5395
  # === markdown
@@ -5257,41 +5834,6 @@ body {
5257
5834
  alias t= set_title # === t=
5258
5835
  alias title= set_title # === title= # <-- This alias here may be more popular than set_title().
5259
5836
 
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
5837
  # ========================================================================= #
5296
5838
  # === do_use_exceptions
5297
5839
  # ========================================================================= #
@@ -5434,14 +5976,6 @@ body {
5434
5976
  @internal_hash[:mail]
5435
5977
  end; alias mail mail? # === mail
5436
5978
 
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
5979
  # ========================================================================= #
5446
5980
  # === show_this_svg
5447
5981
  # ========================================================================= #
@@ -5573,52 +6107,6 @@ body {
5573
6107
  return result
5574
6108
  end
5575
6109
 
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
6110
  # ========================================================================= #
5623
6111
  # === return_dataset_without_any_comments
5624
6112
  #
@@ -7090,17 +7578,6 @@ body {
7090
7578
  )
7091
7579
  end; alias turn_into_html_id return_the_id # === turn_into_html_id
7092
7580
 
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
7581
  # ========================================================================= #
7105
7582
  # === close_head_then_open_body
7106
7583
  # ========================================================================= #
@@ -7834,27 +8311,6 @@ function simple_clock_timer() {
7834
8311
  return result
7835
8312
  end
7836
8313
 
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
8314
  # ========================================================================= #
7859
8315
  # === add_dynamic_text_shadow
7860
8316
  # ========================================================================= #
@@ -7964,8 +8420,7 @@ function simple_clock_timer() {
7964
8420
  USAGE.md</b>.','marl5em'
7965
8421
  spacer
7966
8422
  end
7967
- else # Don't show the following regularly, only for debugging.
7968
- # e 'DEBUG: The dataset is ok.'
8423
+ # else # Don't show the following regularly, only for debugging.
7969
8424
  end
7970
8425
  end
7971
8426
  end
@@ -8112,7 +8567,8 @@ function simple_clock_timer() {
8112
8567
  )
8113
8568
  bold(i, optional_css_class, optional_the_id)
8114
8569
  br
8115
- end; alias bbr boldbr # === bbr
8570
+ end; alias bbr boldbr # === bbr
8571
+ alias ebold boldbr # === ebold
8116
8572
 
8117
8573
  # ========================================================================= #
8118
8574
  # === return_html_comment
@@ -8301,19 +8757,6 @@ function simple_clock_timer() {
8301
8757
  @internal_hash[:relative_path] = i
8302
8758
  end
8303
8759
 
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
8760
  # ========================================================================= #
8318
8761
  # === string_s2
8319
8762
  #
@@ -8371,20 +8814,6 @@ function simple_clock_timer() {
8371
8814
  alias string_espan string_s2 # === string_espan
8372
8815
  alias return_span string_s2 # === return_span
8373
8816
 
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
8817
  # ========================================================================= #
8389
8818
  # === equote_nobr
8390
8819
  # ========================================================================= #
@@ -8630,66 +9059,6 @@ function simple_clock_timer() {
8630
9059
  alias html_string? result? # === html_string?
8631
9060
  alias _ result? # === _
8632
9061
 
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
9062
  # ========================================================================= #
8694
9063
  # === css_style_or_no_style
8695
9064
  # ========================================================================= #
@@ -8823,55 +9192,6 @@ function simple_clock_timer() {
8823
9192
  end
8824
9193
  end
8825
9194
 
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
9195
  # ========================================================================= #
8876
9196
  # === edot
8877
9197
  # ========================================================================= #
@@ -8967,6 +9287,13 @@ function simple_clock_timer() {
8967
9287
  string_dot(110, 'marr10px')
8968
9288
  end
8969
9289
 
9290
+ # ========================================================================= #
9291
+ # === map_symbol_to_image_location
9292
+ # ========================================================================= #
9293
+ def map_symbol_to_image_location(i)
9294
+ return ::Cyberweb::WebImages.map_symbol_to_image_location(i)
9295
+ end
9296
+
8970
9297
  # ========================================================================= #
8971
9298
  # === config?
8972
9299
  #