diff --git a/pollen/private/project-server-routes.rkt b/pollen/private/project-server-routes.rkt index 82f693c..a9a3d2a 100644 --- a/pollen/private/project-server-routes.rkt +++ b/pollen/private/project-server-routes.rkt @@ -19,7 +19,7 @@ (define (response/xexpr+doctype xexpr) (response/xexpr #:preamble #"" xexpr)) -(define (body-wrapper content-xexpr #:title [title #f]) +(define (body-wrapper #:title [title #f] . content-xexpr) `(html (head (title ,(if title title "Pollen")) @@ -28,7 +28,7 @@ [type "text/css"] [href ,(format "/~a" (setup:dashboard-css))]))) (body - ,content-xexpr (div ((id "pollen-logo")))))) + ,@content-xexpr (div ((id "pollen-logo")))))) ;; to make dummy requests for debugging (define/contract (string->request u) @@ -145,7 +145,7 @@ (define empty-cell (cons #f #f)) (define (make-link-cell href+text) (match-define (cons href text) href+text) - (filter-not void? `(td ,(when text + (filter-not void? `(cell ,(when text (if href `(a ((href ,href)) ,text) text))))) @@ -158,10 +158,10 @@ (define dirlinks (cons "/" (map (λ (ps) (format "/~a/" (apply build-path ps))) (for/list ([i (in-range (length (cdr dirs)))]) (take (cdr dirs) (add1 i)))))) - `(tr (th ((colspan "3")) ,@(add-between (map (λ (dir dirlink) `(a ((href ,(format "~a~a" dirlink (setup:main-pagetree)))) ,(->string dir))) dirs dirlinks) "/")))) + `(row (heading ((colspan "3")) ,@(add-between (map (λ (dir dirlink) `(a ((href ,(format "~a~a" dirlink (setup:main-pagetree)))) ,(->string dir))) dirs dirlinks) "/")))) (define (make-path-row filename source indent-level) - `(tr ,@(map make-link-cell + `(row ,@(map make-link-cell (append (list (let ([main-cell (cond ; main cell [(directory-exists? (build-path dashboard-dir filename)) ; links subdir to its dashboard @@ -190,7 +190,7 @@ (cons (car main-cell) (let* ([cell-content (cdr main-cell)] [indent-padding (+ 1 indent-level)] - [padding-attr `(style ,(format "display:block;padding-left:~vem" indent-padding))]) + [padding-attr `(class ,(format "indent_~a" indent-padding))]) (cond [(string? cell-content) `(span (,padding-attr) ,cell-content)] [(txexpr? cell-content) @@ -222,9 +222,8 @@ (loop pn (add1 depth)) depth))) - (body-wrapper #:title (format "~a" dashboard-dir) - `(table - ,@(cons (make-parent-row) + (apply body-wrapper #:title (format "~a" dashboard-dir) + (cons (make-parent-row) (cond [(not (null? project-paths)) (define path-source-pairs @@ -249,7 +248,7 @@ (define indent-levels (map directory-pagetree-depth filenames)) (parameterize ([current-directory dashboard-dir]) (map make-path-row filenames sources indent-levels))] - [else (list '(tr (td ((class "no-files")) "No files yet in this directory") (td) (td)))]))))) + [else (list '(row (cell ((class "no-files")) "No files yet in this directory") (td) (td)))])))) (define route-dashboard (route-wrapper dashboard)) diff --git a/pollen/private/server-extras/FiraMono-Bold.ttf b/pollen/private/server-extras/FiraMono-Bold.ttf new file mode 100755 index 0000000..6d4ffb0 Binary files /dev/null and b/pollen/private/server-extras/FiraMono-Bold.ttf differ diff --git a/pollen/private/server-extras/FiraMono-Medium.ttf b/pollen/private/server-extras/FiraMono-Medium.ttf new file mode 100755 index 0000000..1e95ced Binary files /dev/null and b/pollen/private/server-extras/FiraMono-Medium.ttf differ diff --git a/pollen/private/server-extras/FiraMono-Regular.ttf b/pollen/private/server-extras/FiraMono-Regular.ttf new file mode 100755 index 0000000..59e1e1a Binary files /dev/null and b/pollen/private/server-extras/FiraMono-Regular.ttf differ diff --git a/pollen/private/server-extras/FiraMono-license.txt b/pollen/private/server-extras/FiraMono-license.txt new file mode 100755 index 0000000..37c4a30 --- /dev/null +++ b/pollen/private/server-extras/FiraMono-license.txt @@ -0,0 +1,94 @@ +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/pollen/private/server-extras/poldash.css b/pollen/private/server-extras/poldash.css index 931ea3b..7f0b707 100644 --- a/pollen/private/server-extras/poldash.css +++ b/pollen/private/server-extras/poldash.css @@ -3,110 +3,103 @@ padding: 0; } -body { - padding: 1em; - font-family: "Source Code Pro", "Menlo", "Consolas", monospace; +@font-face { +font-family: Fira-Mono; +font-weight: normal; +src: url("FiraMono-Regular.ttf"); } -div#pollen-logo { - display: none; - position: fixed; - right: 0; - bottom: 0; - width: 76; - height: 76; - background-size: 100%; + +@font-face { +font-family: Fira-Mono; +font-weight: bold; +src: url("FiraMono-Bold.ttf"); } -table { - border-collapse:collapse; + +body { + padding: 1em; + font-family: Fira-Mono, "Menlo", "Consolas", monospace; width: 100%; - max-width: 700px; + max-width: 800px; + font-size: 16px; + line-height: 1.35; } -tr > td:first-child { - width: 0%; +row { + display: grid; + grid-template-columns: 6fr 1fr 1fr; } -th, tr > td:first-child { - font-family: "Source Code Pro", "Menlo", "Consolas", monospace; - background: #f6f6f6; - text-align: left; +row + row { + border-top: 1px solid #ccc; } -th { - background: white; - font-weight: normal; - padding: 0.4em; +row > cell:first-child { + background: #f6f6f6; } - - -tr, tr + tr { - border-top: 1px solid #ccc; +row > heading, row > cell a { + padding: 4px 10px 12px 0px; /* T R B L */ } -td { - font-size: 16px; - line-height: 1.35; - text-align: center; +row > heading { + padding-left: 10px; + padding-top: 0px; } -td.no-files { - padding: 0.4em; + +cell { + display: inline-block; } +/* in & out cells */ +cell + cell { + text-align: center; +} -a:hover { +cell:hover a { background: #eee; } a { text-decoration: none; - color: #6a6; display: block; - padding: 0.4em; - padding-left: 0; - padding-right: 0; } -/* this catches `in` and `out` boxes */ -td+td a { - padding-left: 1em; - padding-right: 1em; -} -th a { - font-weight: normal; +heading a { display: inline; - color: black; - padding-left: 0; + color: inherit; } -th a:hover { +heading a:hover { background: inherit; - color: #6a6; } +a, heading a:hover { + color: #6a6; +} .file-ext { color: #bbb; } -a:active, span.indented-link-text:active { - text-decoration: underline; -} - -a.indented-link:active { - /* don't want to underline leading nbsps */ - text-decoration: none; -} +.indent_1 { padding-left: calc(((1 - 1) * 18px) + 10px); } +.indent_2 { padding-left: calc(((2 - 1) * 18px) + 10px); } +.indent_3 { padding-left: calc(((3 - 1) * 18px) + 10px); } +.indent_4 { padding-left: calc(((4 - 1) * 18px) + 10px); } +.indent_5 { padding-left: calc(((5 - 1) * 18px) + 10px); } +.indent_6 { padding-left: calc(((6 - 1) * 18px) + 10px); } +.indent_7 { padding-left: calc(((7 - 1) * 18px) + 10px); } +.indent_8 { padding-left: calc(((8 - 1) * 18px) + 10px); } +.indent_9 { padding-left: calc(((9 - 1) * 18px) + 10px); } tt { - font-family: "Source Code Pro", "Menlo", "Consolas", monospace; + font-family: Fira-Mono, "Menlo", "Consolas", monospace; font-size: 100%; white-space: pre-wrap; } \ No newline at end of file diff --git a/pollen/private/ts.rktd b/pollen/private/ts.rktd index 2210766..a049b5e 100644 --- a/pollen/private/ts.rktd +++ b/pollen/private/ts.rktd @@ -1 +1 @@ -1511711794 +1511803972