logo

blog

My website can't be that messy, right? git clone https://anongit.hacktivis.me/git/blog.git/

css-cursors-demo.sh (1195B)


  1. #!/bin/sh
  2. CURSORS='
  3. auto
  4. default
  5. none
  6. context-menu
  7. help
  8. pointer
  9. progress
  10. wait
  11. cell
  12. crosshair
  13. text
  14. vertical-text
  15. alias
  16. copy
  17. move
  18. no-drop
  19. not-allowed
  20. grab
  21. grabbing
  22. e-resize
  23. n-resize
  24. ne-resize
  25. nw-resize
  26. s-resize
  27. se-resize
  28. sw-resize
  29. w-resize
  30. ew-resize
  31. ns-resize
  32. nesw-resize
  33. nwse-resize
  34. col-resize
  35. row-resize
  36. all-scroll
  37. zoom-in
  38. zoom-out'
  39. WORKDIR="$(dirname "$0")"
  40. for cur in ${CURSORS}; do
  41. printf '#cursors-%s { cursor: %s; }\n' "$cur" "$cur"
  42. done >| "${WORKDIR}/css-cursors-demo.css"
  43. (
  44. printf \
  45. '<!DOCTYPE html>
  46. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" xml:lang="en" lang="en">
  47. <head>
  48. <!--#include file="/templates/head.shtml" -->
  49. <title>CSS cursors demo</title>
  50. <link rel="stylesheet" href="css-cursors-demo.css" />
  51. </head>
  52. <body>
  53. <!--#include file="/templates/en/nav.shtml" -->
  54. <main>
  55. <h1>CSS cursors demo</h1>
  56. <p>You can hover on each word to get it&quot;s corresponding cursor property</p>
  57. <ul>
  58. '
  59. for cur in ${CURSORS}; do
  60. printf \
  61. ' <li id="cursors-%s">%s</li>
  62. ' "$cur" "$cur"
  63. done
  64. printf \
  65. ' </ul>
  66. </main>
  67. <!--#include file="/templates/en/footer.shtml" -->
  68. </body>
  69. </html>\n'
  70. ) >| "${WORKDIR}/css-cursors-demo.xhtml"