Posted to tcl by oldlaptop at Thu Feb 25 13:42:13 GMT 2021view raw

  1. Should apply to a clean fossil tree; test with `make html DISTDIR=.` or so in a ./configured build directory.
  2.  
  3. Index: tools/tcltk-man2html-utils.tcl
  4. ==================================================================
  5. --- tools/tcltk-man2html-utils.tcl
  6. +++ tools/tcltk-man2html-utils.tcl
  7. @@ -75,18 +75,22 @@
  8. }
  9.  
  10. proc DOCTYPE {} {
  11. return "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
  12. }
  13. +
  14. +proc magicmeta {} {
  15. + return {<META NAME="viewport" CONTENT="width=device-width, initial-scale=1">}
  16. +}
  17.  
  18. proc htmlhead {title header args} {
  19. set level ""
  20. if {[lindex $args end] eq "../[indexfile]"} {
  21. # XXX hack - assume same level for CSS file
  22. set level "../"
  23. }
  24. - set out "[DOCTYPE]\n<HTML>\n<HEAD><TITLE>$title</TITLE>\n[CSS $level]</HEAD>\n"
  25. + set out "[DOCTYPE]\n<HTML>\n<HEAD>\n[magicmeta]\n<TITLE>$title</TITLE>\n[CSS $level]</HEAD>\n"
  26. foreach {uptitle url} $args {
  27. set header "<a href=\"$url\">$uptitle</a> <small>&gt;</small> $header"
  28. }
  29. append out "<BODY><H2>$header</H2>"
  30. global manual
  31.  
  32.