From 250880d2a4e98e3e77273ec322038d55cd45a14e Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sun, 24 Feb 2013 17:12:03 -0500 Subject: [PATCH] Add links to old documentations. * The all-versions page has a docs column with html/pdf links, and also two links in the nightly builds footer. * Specific version download pages have a link to the docs for that version. (Only html, to save space.) --- collects/meta/web/download/download-pages.rkt | 31 ++++++++++++------- collects/meta/web/download/index.rkt | 10 +----- collects/meta/web/download/symlinks.rkt | 13 ++++++++ collects/meta/web/stubs/pre.rkt | 13 +++++--- 4 files changed, 42 insertions(+), 25 deletions(-) create mode 100644 collects/meta/web/download/symlinks.rkt diff --git a/collects/meta/web/download/download-pages.rkt b/collects/meta/web/download/download-pages.rkt index 52299decea..7dc4a69550 100644 --- a/collects/meta/web/download/download-pages.rkt +++ b/collects/meta/web/download/download-pages.rkt @@ -1,6 +1,6 @@ #lang meta/web -(require "resources.rkt" "data.rkt" "installer-pages.rkt" +(require "resources.rkt" "data.rkt" "installer-pages.rkt" "symlinks.rkt" (prefix-in pre: "../stubs/pre.rkt")) (provide render-download-page) @@ -27,6 +27,7 @@ @|br hr| @div[align: "center"]{ @(let ([links (list ((release-page release) "Release Notes") + @a[href: @list{@|docs|/@|version|/html}]{Docs} @license{License} all-version-pages @pre:installers{Nightly Installers})]) @@ -88,7 +89,8 @@ @thead{ @tr{@td{@nbsp @strong{Version & Release Notes}} @(map (λ (p) @th[align: 'center]{@(package->name p)}) - all-packages)}} + all-packages) + @td{@strong{Documentation}}}} @(let ([sep (tr style: "height: 4px; margin: 0; padding: 0;" (td) (map (λ (_) (td)) all-packages))]) (define (cell rel pkg) @@ -96,17 +98,22 @@ @nbsp @(make-page rel pkg){[download]} @nbsp}) @tbody{ @sep - @(map (λ (r) - @list{ - @tr[class: 'version-row]{ - @td{@|nbsp nbsp| @strong{Version @release-version[r]}, - @(release-page r){@release-date-string[r]} @nbsp} - @(map (λ (p) (cell r p)) all-packages)} - @sep}) - all-releases)}) + @(for/list ([r (in-list all-releases)]) + (define ver (release-version r)) + @list{ + @tr[class: 'version-row]{ + @td{@|nbsp nbsp| @strong{Version @ver}, + @(release-page r){@release-date-string[r]} @nbsp} + @(map (λ (p) (cell r p)) all-packages) + @td{@nbsp @a[href: @list{@|docs|/@|ver|/html}]{[HTML]} @; + @nbsp @a[href: @list{@|docs|/@|ver|/pdf}]{[PDF]} @; + @nbsp}} + @sep})}) @tfoot{ - @tr[class: 'version-row]{@td[align: 'center colspan: 3]{ - @pre:installers}}}}})) + @tr[class: 'version-row]{ + @td[align: 'center colspan: 3]{@pre:installers} + @td{@nbsp @pre:docs[#:sub 'html]{[HTML]} @; + @nbsp @pre:docs[#:sub 'pdf]{[PDF]} @nbsp}}}}})) (define license @page[#:title "Software License" #:part-of 'download]{ diff --git a/collects/meta/web/download/index.rkt b/collects/meta/web/download/index.rkt index bb5217ae13..376fbdee99 100644 --- a/collects/meta/web/download/index.rkt +++ b/collects/meta/web/download/index.rkt @@ -1,14 +1,6 @@ #lang meta/web -(require "resources.rkt" "data.rkt" "../www/download.rkt") - -(define (in-ftp . paths) - (string-join (cons "/var/ftp/pub/racket" paths) "/")) - -(define docs (symlink (in-ftp "docs"))) -(define installers (symlink (in-ftp "installers"))) -(define libs (symlink (in-ftp "libs/tags") "libs")) -(define stubs (symlink "/www/stubs")) +(require "resources.rkt" "symlinks.rkt" "../www/download.rkt") (provide index) (define index diff --git a/collects/meta/web/download/symlinks.rkt b/collects/meta/web/download/symlinks.rkt new file mode 100644 index 0000000000..75f585a9a8 --- /dev/null +++ b/collects/meta/web/download/symlinks.rkt @@ -0,0 +1,13 @@ +#lang meta/web + +(require "resources.rkt") + +(provide (all-defined-out)) + +(define (in-ftp . paths) + (string-join (cons "/var/ftp/pub/racket" paths) "/")) + +(define docs (symlink (in-ftp "docs"))) +(define installers (symlink (in-ftp "installers"))) +(define libs (symlink (in-ftp "libs/tags") "libs")) +(define stubs (symlink "/www/stubs")) diff --git a/collects/meta/web/stubs/pre.rkt b/collects/meta/web/stubs/pre.rkt index 1e0874b997..addd4f5b95 100644 --- a/collects/meta/web/stubs/pre.rkt +++ b/collects/meta/web/stubs/pre.rkt @@ -55,7 +55,7 @@ @~ It is also easy to setup a script that will automate the process of retrieving the @tt{tgz} file, unpacking and installing it. This is - explained in more details in @pre-scripts{scripts}. In addition to being + explained in more details in @script{scripts}. In addition to being convenient for updating your tree, it can be used by an automatic job scheduler (for example, a cron job on Unix) to make tree that is always updated.} @@ -111,7 +111,12 @@ @a[href: "../"]{nightly build page} has everything you could want.}}) -(define pre-docs +(provide (rename-out [docs* docs])) +(define (docs* #:sub [sub #f] . text) + (if sub + (apply a href: (list (url-of docs) sub "/") (if (null? text) sub text)) + (apply docs text))) +(define docs @page[#:file "docs/" #:title "Prebuilt documentation"]{ @p{This directory contains documentation files in all forms, compiled from the current sources.} @@ -120,7 +125,7 @@ @hr @version-hole}) -(define pre-binaries +(define binaries @page[#:file "binaries/" #:title "Prebuilt binaries"]{ @p{This directory contains a subdirectory for each supported platform.} @hr @@ -128,7 +133,7 @@ @hr @version-hole}) -(define pre-scripts +(define script @page[#:file "script.html" #:title "Using the nightly Racket builds"]{ @(define (url . s) @list{http://pre.racket-lang.org/@s}) @(define (pre* . text) (apply pre style: "margin-left: 2em;" text))