From bdfcca7d1130c1ecad6aa2e70945bab8c28b6f81 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 27 Aug 2008 11:19:20 +0000 Subject: [PATCH] Use an nonexistent css class for installation warning message, so when it's installed on the web page it's easy to add the missing class with a `display: none' so it's not show without any html rehacking. Disabled the "(installation)" suffix to the main title for now: it's also used for the window title and that shouldn't have the suffix because the browser window will have it. svn: r11452 --- collects/scribble/scribble.css | 4 ++-- collects/scribblings/main/private/utils.ss | 18 +++++++++++++++--- collects/scribblings/main/start.scrbl | 13 ++++++------- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/collects/scribble/scribble.css b/collects/scribble/scribble.css index 9e484583d6..38b12c61bb 100644 --- a/collects/scribble/scribble.css +++ b/collects/scribble/scribble.css @@ -502,6 +502,6 @@ i { margin: 0em -23em 0em 0em; font-size: 82%; } -.author:before { +.author:before { content: "by "; -} \ No newline at end of file +} diff --git a/collects/scribblings/main/private/utils.ss b/collects/scribblings/main/private/utils.ss index 2eac1e2899..6f39555d38 100644 --- a/collects/scribblings/main/private/utils.ss +++ b/collects/scribblings/main/private/utils.ss @@ -8,7 +8,7 @@ scheme/list setup/dirs) -(provide main-page script script-ref) +(provide main-page script script-ref not-on-the-web) (define page-info (let ([links (filter pair? links)]) @@ -22,6 +22,13 @@ (define (script-ref #:noscript [noscript null] path) (make-script-element #f noscript "text/javascript" path)) +;; this is for content that should not be displayed on the web (this +;; is done by a class name that is not included in the usual css file, +;; but for the web version the css is extended with this class as +;; something that is not displayed) +(define (not-on-the-web . body) + (make-element "hide_when_on_the_web" (decode-content body))) + ;; the second argument specifies installation/user specific, and if ;; it's missing, then it's a page with a single version (define (main-page id [installation-specific? '?]) @@ -36,9 +43,14 @@ (regexp-replace* #rx"[^/]*/" (regexp-replace #rx"[^/]+$" path "") "../")) (define page-title (title #:style '(no-toc) title-string - (cond [inst-doc? " (installation)"] + #; + ;; the "(installation)" part shouldn't be visible on the web, but + ;; there's no way (currently) to not have it in the window title + ;; too. + (cond [inst-doc? (not-on-the-web " (installation)")] [user-doc? ""] ; can be " (user)" - [else ""]))) + [else ""]) + )) (define toc (map (lambda (item) (let ([link-id (if (pair? item) (car item) item)]) diff --git a/collects/scribblings/main/start.scrbl b/collects/scribblings/main/start.scrbl index cb42c04049..dce75d7a4d 100644 --- a/collects/scribblings/main/start.scrbl +++ b/collects/scribblings/main/start.scrbl @@ -1,16 +1,15 @@ #lang scribble/doc @(require scribble/manual - scribble/struct "private/utils.ss" "private/manuals.ss") @main-page['start #t] -@margin-note{This is an installation-specific listing. Running - @exec{plt-help} may open a different page with local and - user-specific documentation, including documentation for - installed - @link["http://planet.plt-scheme.org/"]{@|PLaneT|} - packages.} +@margin-note{ + @not-on-the-web{ + This is an installation-specific listing. Running @exec{plt-help} + may open a different page with local and user-specific + documentation, including documentation for installed + @link["http://planet.plt-scheme.org/"]{@|PLaneT|} packages.}} @(make-start-page #f)