racket/html-properties: add `js-addition'
original commit: 9162fc25042364c128be0b850c730a93ff910679
This commit is contained in:
parent
f470e3c3a7
commit
4a512f6a66
|
@ -9,6 +9,7 @@
|
||||||
[script-property ([type string?]
|
[script-property ([type string?]
|
||||||
[script (or/c path-string? (listof string?))])]
|
[script (or/c path-string? (listof string?))])]
|
||||||
[css-addition ([path (or/c path-string? (cons/c 'collects (listof bytes?)) bytes?)])]
|
[css-addition ([path (or/c path-string? (cons/c 'collects (listof bytes?)) bytes?)])]
|
||||||
|
[js-addition ([path (or/c path-string? (cons/c 'collects (listof bytes?)) bytes?)])]
|
||||||
[html-defaults ([prefix-path (or/c bytes? path-string? (cons/c 'collects (listof bytes?)))]
|
[html-defaults ([prefix-path (or/c bytes? path-string? (cons/c 'collects (listof bytes?)))]
|
||||||
[style-path (or/c bytes? path-string? (cons/c 'collects (listof bytes?)))]
|
[style-path (or/c bytes? path-string? (cons/c 'collects (listof bytes?)))]
|
||||||
[extra-files (listof (or/c path-string? (cons/c 'collects (listof bytes?))))])]
|
[extra-files (listof (or/c path-string? (cons/c 'collects (listof bytes?))))])]
|
||||||
|
|
|
@ -686,6 +686,19 @@
|
||||||
(list style-file)
|
(list style-file)
|
||||||
style-extra-files))
|
style-extra-files))
|
||||||
,(scribble-js-contents script-file (lookup-path script-file alt-paths))
|
,(scribble-js-contents script-file (lookup-path script-file alt-paths))
|
||||||
|
,@(map (lambda (script-file)
|
||||||
|
(if (bytes? script-file)
|
||||||
|
(scribble-js-contents script-file #f)
|
||||||
|
(let ([p (lookup-path script-file alt-paths)])
|
||||||
|
(unless p (install-file script-file))
|
||||||
|
(scribble-js-contents script-file p))))
|
||||||
|
(extract-part-style-files
|
||||||
|
d
|
||||||
|
ri
|
||||||
|
'css
|
||||||
|
(lambda (p) (part-whole-page? p ri))
|
||||||
|
js-addition?
|
||||||
|
js-addition-path))
|
||||||
,(xml:comment "[if IE 6]><style type=\"text/css\">.SIEHidden { overflow: hidden; }</style><![endif]")
|
,(xml:comment "[if IE 6]><style type=\"text/css\">.SIEHidden { overflow: hidden; }</style><![endif]")
|
||||||
,@(for/list ([p (style-properties (part-style d))]
|
,@(for/list ([p (style-properties (part-style d))]
|
||||||
#:when (head-extra? p))
|
#:when (head-extra? p))
|
||||||
|
|
|
@ -1405,6 +1405,13 @@ The @racket[path] field can be a result of
|
||||||
@racket[path->main-collects-relative].}
|
@racket[path->main-collects-relative].}
|
||||||
|
|
||||||
|
|
||||||
|
@defstruct[js-addition ([path (or/c path-string?
|
||||||
|
(cons/c 'collects (listof bytes?))
|
||||||
|
bytes?)])]{
|
||||||
|
|
||||||
|
Like @racket[css-addition], but for a Javascript file instead of a CSS file.}
|
||||||
|
|
||||||
|
|
||||||
@defstruct[body-id ([value string?])]{
|
@defstruct[body-id ([value string?])]{
|
||||||
|
|
||||||
Used as a @tech{style property} to associate an @tt{id} attribute with
|
Used as a @tech{style property} to associate an @tt{id} attribute with
|
||||||
|
|
Loading…
Reference in New Issue
Block a user