[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Graphics for navigation links
> Date: Mon, 24 Apr 2000 11:41:46 -0400 > From: Bob Bernstein > To: docbook-apps@lists.oasis-open.org > Subject: DOCBOOK-APPS: Graphics for navigation links > > > I notice that graphics for 'Home', 'Up', etc. navigation links were included > in the distribution of the Docbook modular stylesheets. I can't find a hint > as to how to "turn them on." > I had the same difficulty, so I figured it out. Try using this as your stylesheet (modify the icon paths). The second section moves the fast-back and forward links to the outside edges. Cheers, Mark ============================================== <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ <!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL> ]> <style-sheet> <style-specification use="docbook"> <style-specification-body> ;; Turn on fast-forward link generation (define %gentext-nav-use-ff% #t) ;; --------------------- ;; Navigation Icons ;; --------------------- ;; ;; Redefine links as graphic icons instead of text ;; ;; (Overrides definitions in common/dbl1en.dsl) ;; (define (gentext-en-nav-prev prev) (make empty-element gi: "IMG" attributes: '(("SRC" "../icons/prev.gif") ("BORDER" "0") ("ALT" "Prev")))) (define (gentext-en-nav-prev-sibling prevsib) (make empty-element gi: "IMG" attributes: '(("SRC" "../icons/fast-bak.gif") ("BORDER" "0") ("ALT" "Fast Backward")))) (define (gentext-en-nav-next-sibling nextsib) (make empty-element gi: "IMG" attributes: '(("SRC" "../icons/fast-for.gif") ("BORDER" "0") ("ALT" "Fast Forward")))) (define (gentext-en-nav-next next) (make empty-element gi: "IMG" attributes: '(("SRC" "../icons/next.gif") ("BORDER" "0") ("ALT" "Next")))) (define (gentext-en-nav-up up) (make empty-element gi: "IMG" attributes: '(("SRC" "../icons/up.gif") ("BORDER" "0") ("ALT" "Up")))) (define (gentext-en-nav-home home) (make empty-element gi: "IMG" attributes: '(("SRC" "../icons/home.gif") ("BORDER" "0") ("ALT" "Home")))) ;; ;; ;;================================================================= ;; End of navigation icons section ;;================================================================= ;;================================================================= ;; NAVIGATION HEADER TABLES ;;================================================================= ;; ;; ;; Rearrange navigation header to put bigger jumps at outside edge ;; ;; (Overrides stuff defined in html/dbnavig.dsl) ;; ;; ;;================================================================= ;;================================================================= ;; ;; (define (default-header-nav-tbl-ff elemnode prev next prevsib nextsib) (let* ((r1? (nav-banner? elemnode)) (r1-sosofo (make element gi: "TR" (make element gi: "TH" attributes: (list (list "COLSPAN" "5") (list "ALIGN" "center") (list "VALIGN" "bottom")) (nav-banner elemnode)))) (r2? (or (not (node-list-empty? prev)) (not (node-list-empty? next)) (not (node-list-empty? prevsib)) (not (node-list-empty? nextsib)) (nav-context? elemnode))) (r2-sosofo (make element gi: "TR" ;; constructs Fast-Backward link (make element gi: "TD" attributes: (list (list "WIDTH" "10%") (list "ALIGN" "left") (list "VALIGN" "top")) (if (node-list-empty? prevsib) (make entity-ref name: "nbsp") (make element gi: "A" attributes: (list (list "HREF" (href-to prevsib))) (gentext-nav-prev-sibling prevsib)))) ;; constructs Previous link (make element gi: "TD" attributes: (list (list "WIDTH" "10%") (list "ALIGN" "left") (list "VALIGN" "top")) (if (node-list-empty? prev) (make entity-ref name: "nbsp") (make element gi: "A" attributes: (list (list "HREF" (href-to prev))) (gentext-nav-prev prev)))) ;; center part: navigation context, title, etc. (make element gi: "TD" attributes: (list (list "WIDTH" "60%") (list "ALIGN" "center") (list "VALIGN" "bottom")) (nav-context elemnode)) ;; constructs Next link (make element gi: "TD" attributes: (list (list "WIDTH" "10%") (list "ALIGN" "right") (list "VALIGN" "top")) (if (node-list-empty? next) (make entity-ref name: "nbsp") (make element gi: "A" attributes: (list (list "HREF" (href-to next))) (gentext-nav-next next)))) ;; constructs Fast-Forward link (make element gi: "TD" attributes: (list (list "WIDTH" "10%") (list "ALIGN" "right") (list "VALIGN" "top")) (if (node-list-empty? nextsib) (make entity-ref name: "nbsp") (make element gi: "A" attributes: (list (list "HREF" (href-to nextsib))) (gentext-nav-next-sibling nextsib)))) ))) (if (or r1? r2?) (make element gi: "DIV" attributes: '(("CLASS" "NAVHEADER")) (make element gi: "TABLE" attributes: (list (list "WIDTH" %gentext-nav-tblwidth%) (list "BORDER" "0") (list "CELLPADDING" "0") (list "CELLSPACING" "0")) (if r1? r1-sosofo (empty-sosofo)) (if r2? r2-sosofo (empty-sosofo))) (make empty-element gi: "HR" attributes: (list (list "ALIGN" "LEFT") (list "WIDTH" %gentext-nav-tblwidth%)))) (empty-sosofo)))) ;; ;; ;;================================================================= ;;================================================================= </style-specification-body> </style-specification> <external-specification id="docbook" document="docbook.dsl"> </style-sheet>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC