diff --git a/new-racket-web/web/all.rkt b/new-racket-web/web/all.rkt index 8b50d015d8..3f323c75dd 100644 --- a/new-racket-web/web/all.rkt +++ b/new-racket-web/web/all.rkt @@ -1,5 +1,6 @@ #lang meta/web (require "www/all.rkt" "download/all.rkt" "minis/all.rkt" "stubs/all.rkt") -(set-navbar! (list main download documentation planet community learning) +(set-navbar! `((main . ,main) (download . ,download) (documentation . ,documentation)) + ;; pkgs should be here too, needs a stub main help) diff --git a/new-racket-web/web/common/layout.rkt b/new-racket-web/web/common/layout.rkt index e54b958938..3b8d62a26e 100644 --- a/new-racket-web/web/common/layout.rkt +++ b/new-racket-web/web/common/layout.rkt @@ -1,6 +1,6 @@ #lang at-exp racket/base -(require scribble/html (for-syntax racket/base syntax/name syntax/parse) +(require scribble/html racket/dict (for-syntax racket/base syntax/name syntax/parse) "utils.rkt" "resources.rkt") (define-for-syntax (process-contents who layouter stx xs) @@ -131,18 +131,21 @@ (define (icon name) @i[class: name]{}) (define (row . content) (apply div class: "row" content)) + (define download-promise (lazy (dict-ref (force (first (unbox navbar-info))) 'download))) + (define main-promise (lazy (second (unbox navbar-info)))) + @div[class: "navbar" gumby-fixed: "top" id: "nav1"]{ @row{ @a[class: "toggle" gumby-trigger: "#nav1 > .row > ul" href: "#"]{ @icon{icon-menu}} - @a[class: "five columns logo" href: ""]{ + @a[class: "five columns logo" href: (url-of (force main-promise))]{ @img[class: "logo" src: logo]} @ul[class: "five columns"]{ - @li{@a[href: "https://pkg.racket-lang.org"]{Packages}} - @li{@a[href: "https://docs.racket-lang.org"]{Documentation}} - @li{@a[href: "https://blog.racket-lang.org"]{Blog}} + @li{@a[href: "http://pkg.racket-lang.org"]{Packages}} + @li{@a[href: "http://docs.racket-lang.org"]{Documentation}} + @li{@a[href: "http://blog.racket-lang.org"]{Blog}} @li{@div[class: "medium metro info btn icon-left entypo icon-install"]{ - @a[href: 'download]{Download}}}}}}) + @(force download-promise)}}}}}) (define html-preamble @list{ diff --git a/new-racket-web/web/www/index.rkt b/new-racket-web/web/www/index.rkt index 1d4c75693a..b045cafa07 100644 --- a/new-racket-web/web/www/index.rkt +++ b/new-racket-web/web/www/index.rkt @@ -520,10 +520,10 @@ File, query and maybe fix existing reports.}}} @div[class: "modal" id: @list{code-modal@pos}]{ @div[class: "content"]{ @a[class: "close switch" gumby-trigger: @list{|#code-modal@pos}]{@i[class: "icon-cancel"]} - @row{@columns[10 #:center? #t #:center-text? #t]{ + @row{@columns[10 #:center? #t]{ @h4{@(example-title elem)} @pre[style: "font-size: 140%; margin-top: 2%; margin-bottom: 3%;"]{@(example-code elem)}}} - @row{@columns[10 #:center? #t #:center-text? #t]{ + @row{@columns[10 #:center? #t]{ @(example-desc elem) @p[style: "font-size: 80%;"]{ Form and function names in the code are hyperlinked to