Re: Change to documentation headers - Mailing list pgsql-docs

From Bruce Momjian
Subject Re: Change to documentation headers
Date
Msg-id 201110110208.p9B28Zm23632@momjian.us
Whole thread Raw
In response to Re: Change to documentation headers  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Change to documentation headers
List pgsql-docs
Bruce Momjian wrote:
> > More thinking --- "PostgreSQL 9.0.3 Documentation" at the top center is
> > already clickable, so that can act as the home.  Let's duplicate that at
> > the bottom too.
>
> OK, so here is a summary:
>
>     o  remove fast forward/backward links
>     o  add book title where there is no heading
>     o  make book and chapter titles as links
>     o  make the bottom footer match the top header
>
> Can we backpatch this to 8.2 so all our online documentation has it?

I have developed the attached patch which implements an "Up/Home" link
at the top of the page in place of the "Fast Backward" link, and removes
the "Fast Forward" link.  It says "Up", unless you are already at the
book title, in which case it says "Home".

While this isn't ideal, it is probably good enough to make things easier
for users.  This might be nice to backpatch so all our docs have the
same navigation links.

You can view the built docs here:

    http://momjian.us/expire/pgsql/index.html

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +
diff --git a/doc/src/sgml/stylesheet.dsl b/doc/src/sgml/stylesheet.dsl
new file mode 100644
index 637758f..2c18dab
*** a/doc/src/sgml/stylesheet.dsl
--- b/doc/src/sgml/stylesheet.dsl
***************
*** 284,290 ****

  ;; Customization of header, add title attributes (overrides
  ;; dbcommon.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"
--- 284,290 ----

  ;; Customization of header, add title attributes (overrides
  ;; dbcommon.dsl)
! (define (default-header-nav-tbl-ff elemnode prev next)
    (let* ((r1? (nav-banner? elemnode))
       (r1-sosofo (make element gi: "TR"
                (make element gi: "TH"
***************
*** 298,305 ****
                        (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"
                (make element gi: "TD"
--- 298,303 ----
***************
*** 323,337 ****
                           (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 "TITLE" (element-title-string prevsib))
!                                (list "HREF"
!                                  (href-to
!                                   prevsib)))
!                       (gentext-nav-prev-sibling prevsib))))
                (make element gi: "TD"
                  attributes: (list
                           (list "WIDTH" "60%")
--- 321,329 ----
                           (list "WIDTH" "10%")
                           (list "ALIGN" "left")
                           (list "VALIGN" "top"))
!                 (if (nav-up? elemnode)
!                     (nav-up elemnode)
!                     (nav-home-link elemnode)))
                (make element gi: "TD"
                  attributes: (list
                           (list "WIDTH" "60%")
***************
*** 340,360 ****
                  (nav-context elemnode))
                (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 "TITLE" (element-title-string nextsib))
!                                (list "HREF"
!                                  (href-to
!                                   nextsib)))
!                       (gentext-nav-next-sibling nextsib))))
!               (make element gi: "TD"
!                 attributes: (list
!                          (list "WIDTH" "10%")
                           (list "ALIGN" "right")
                           (list "VALIGN" "top"))
                  (if (node-list-empty? next)
--- 332,338 ----
                  (nav-context elemnode))
                (make element gi: "TD"
                  attributes: (list
!                          (list "WIDTH" "20%")
                           (list "ALIGN" "right")
                           (list "VALIGN" "top"))
                  (if (node-list-empty? next)

pgsql-docs by date:

Previous
From: Ron Adams
Date:
Subject: Re: Discrepancy in 9.1 Documentation on CREATE ROLE
Next
From: Bruce Momjian
Date:
Subject: Re: Discrepancy in 9.1 Documentation on CREATE ROLE