Improve OS X help: split back up into multiple files (thanks to
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 24 Jan 2005 13:00:11 +0000 (13:00 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 24 Jan 2005 13:00:11 +0000 (13:00 +0000)
Halibut's new \cfg{html-local-head} directive), and add some CSS to
mimic the font choices of system help files.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@5194 cda61777-01e9-0310-a592-d414129be87e

Recipe
osx-help.but [new file with mode: 0644]
osx.m
puzzles.but

diff --git a/Recipe b/Recipe
index 6c4d302..0191601 100644 (file)
--- a/Recipe
+++ b/Recipe
@@ -48,8 +48,9 @@ Puzzles  : [MX] osx osx.icns osx-info.plist COMMON ALL
 CFLAGS += -DCOMBINED
 Puzzles_extra = Puzzles.app/Contents/Resources/Help/index.html
 Puzzles.app/Contents/Resources/Help/index.html: \
-       Puzzles.app/Contents/Resources/Help puzzles.but
-       halibut --html=$@ puzzles.but
+       Puzzles.app/Contents/Resources/Help osx-help.but puzzles.but
+       cd Puzzles.app/Contents/Resources/Help; \
+               halibut --html ../../../../osx-help.but ../../../../puzzles.but
 Puzzles.app/Contents/Resources/Help: Puzzles.app/Contents/Resources
        mkdir -p Puzzles.app/Contents/Resources/Help
 !end
diff --git a/osx-help.but b/osx-help.but
new file mode 100644 (file)
index 0000000..fa45996
--- /dev/null
@@ -0,0 +1,14 @@
+\# Additional Halibut fragment to set up the HTML output
+\# appropriately for MacOS online help.
+
+\cfg{html-head-end}{
+<style type="text/css">
+body \{ font-family: "Lucida Grande", Helvetica, Arial; font-size: 9pt \}
+h1 \{ font-size: 12pt \}
+h2 \{ font-size: 10pt \}
+h3 \{ font-size: 9pt \}
+h4 \{ font-size: 9pt \}
+h5 \{ font-size: 9pt \}
+h6 \{ font-size: 9pt \}
+</style>
+}
diff --git a/osx.m b/osx.m
index 245672a..7d0dddb 100644 (file)
--- a/osx.m
+++ b/osx.m
@@ -3,13 +3,8 @@
  *
  * Still to do:
  * 
- *  - Improve the help. For a start I probably ought to split it
- *    into pieces (which means Halibut needs to acquire a mechanism
- *    of putting something in the head section of _only one_ HTML
- *    file); then I'd also like to be able to call up context help
- *    for a specific game at a time. Also I just idly wonder
- *    whether changing font might be nice, to match up to Apple
- *    norms.
+ *  - I'd like to be able to call up context help for a specific
+ *    game at a time.
  * 
  * Mac interface issues that possibly could be done better:
  * 
index 305340a..44081e3 100644 (file)
@@ -5,17 +5,14 @@
 
 \cfg{text-filename}{puzzles.txt}
 
-\#
 \cfg{html-contents-filename}{index.html}
+\cfg{html-template-filename}{%k.html}
+\cfg{html-index-filename}{docindex.html}
 \cfg{html-leaf-level}{1}
 \cfg{html-contents-depth-0}{1}
 \cfg{html-contents-depth-1}{2}
 \cfg{html-leaf-contains-contents}{true}
 
-\cfg{html-single-filename}{index.html}
-\cfg{html-head-end}{<meta name="AppleTitle" content="Puzzles Help">}
-\cfg{html-leaf-level}{0}
-
 \cfg{info-filename}{puzzles.info}
 
 \cfg{ps-filename}{puzzles.ps}
@@ -27,8 +24,9 @@ This is a collection of small one-player puzzle games.
 reserved. You may distribute this documentation under the MIT licence.
 See \k{licence} for the licence text in full.
 
-\versionid $Id$
+\cfg{html-local-head}{<meta name="AppleTitle" content="Puzzles Help">}
 
+\versionid $Id$
 
 \C{intro} Introduction