├── doc ├── doc-site.css ├── doc-site.js ├── scribble-style.css ├── manual-racket.js ├── racket.css ├── scribble-common.js ├── manual-racket.css ├── scribble.css └── manual-style.css ├── .gitignore ├── info.rkt └── main.rkt /doc/doc-site.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/doc-site.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/scribble-style.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | compiled/ 2 | *~ 3 | todo.sqlite 4 | deploy/ 5 | -------------------------------------------------------------------------------- /info.rkt: -------------------------------------------------------------------------------- 1 | #lang info 2 | (define collection "todobot") 3 | (define deps '("base" 4 | "https://github.com/braidchat/braidbot.git#v2.1")) 5 | (define build-deps '("racket-doc" "rackunit-lib")) 6 | (define scribblings '()) 7 | (define pkg-desc "Description Here") 8 | (define version "0.0") 9 | (define pkg-authors '(SJ)) 10 | 11 | -------------------------------------------------------------------------------- /main.rkt: -------------------------------------------------------------------------------- 1 | #lang braidbot/insta 2 | (require 3 | racket/string 4 | db 5 | braidbot/uuid 6 | braidbot/util) 7 | 8 | ;; Set the bot-id, bot-token, and braid-url in environment variables. 9 | ;; If doing this, you'd run the bot like 10 | ;; BOT_ID='...' BOT_TOKEN='...' BRAID_URL='...' racket -t main.rkt 11 | (define bot-id (or (getenv "BOT_ID") "5a7b5657-6f0e-4345-b153-1a1b6a419ab9")) 12 | (define bot-token (or (getenv "BOT_TOKEN") "daO_NO11mgNWb-yKS_CJI08ZDu9DSQmBg0VMKCbG")) 13 | (define braid-url (or (getenv "BRAID_API_URL") "http://localhost:5557")) 14 | 15 | ;; set the port the bot will listen on 16 | (listen-port 8989) 17 | 18 | ;; set a function to run on startup 19 | 20 | (define con (sqlite3-connect #:database "todo.sqlite" 21 | #:mode 'create)) 22 | 23 | (on-init (λ () (println "Bot starting") 24 | (query-exec con 25 | "create table if not exists todos 26 | (id rowid, user_id text, content text)"))) 27 | 28 | (define (store-todo msg todo) 29 | (let ([user (hash-ref msg '#:user-id)]) 30 | (query-exec con "insert into todos (user_id, content) values ($1 , $2)" 31 | (uuid->string user) todo))) 32 | 33 | (define (list-todos user) 34 | (query-rows con "select rowid, content from todos where user_id=$1" 35 | (uuid->string user))) 36 | 37 | (define (complete-todo user-id todo-id) 38 | (query-exec con "delete from todos where rowid = $1 and user_id = $2" todo-id (uuid->string user-id))) 39 | 40 | 41 | (define (format-row row) 42 | (format "~a. ~a" (vector-ref row 0) (vector-ref row 1))) 43 | 44 | (define (reply msg content) 45 | (reply-to msg content 46 | #:bot-id bot-id 47 | #:bot-token bot-token 48 | #:braid-url braid-url)) 49 | 50 | (define bot-name "todo") 51 | 52 | (define msg-handlers (list 53 | (cons #px"^list" 54 | (λ (msg matches) 55 | (let* ([user-id (hash-ref msg '#:user-id)] 56 | [todos (map format-row (list-todos user-id))]) 57 | (reply msg (string-join todos "\n"))))) 58 | (cons #px"^add (.*)$" 59 | (λ (msg matches) 60 | (let ([todos (string-split (first matches) ", ")]) 61 | (for ([todo todos]) 62 | (store-todo msg todo)) 63 | (reply msg (~a "added " (length todos)))))) 64 | (cons #px"^done\\s+(\\d+)$" 65 | (lambda (msg matches) 66 | (let ([todo-id 67 | (~> matches first string->number)]) 68 | (complete-todo (hash-ref msg '#:user-id) todo-id) 69 | (reply msg (~a "completed " todo-id))))))) 70 | 71 | (define (act-on-message msg) 72 | (let* ([full-content (hash-ref msg '#:content)] 73 | [name-re (pregexp (string-append "^/" bot-name "\\s+"))] 74 | [content (regexp-replace name-re full-content "")]) 75 | (for/first ([re-fn msg-handlers] 76 | #:when (regexp-match (car re-fn) content)) 77 | ((cdr re-fn) msg (cdr (regexp-match (car re-fn) content)))))) 78 | 79 | ;; required function you must implement 80 | ;; `msg` is the decoded message that the bot has recieved 81 | ;; note that, if it's a mention, the content will begin with `/botname` 82 | 83 | -------------------------------------------------------------------------------- /doc/manual-racket.js: -------------------------------------------------------------------------------- 1 | /* For the Racket manual style */ 2 | 3 | AddOnLoad(function() { 4 | /* Look for header elements that have x-source-module and x-part tag. 5 | For those elements, add a hidden element that explains how to 6 | link to the section, and set the element's onclick() to display 7 | the explanation. */ 8 | var tag_names = ["h1", "h2", "h3", "h4", "h5"]; 9 | for (var j = 0; j < tag_names.length; j++) { 10 | elems = document.getElementsByTagName(tag_names[j]); 11 | for (var i = 0; i < elems.length; i++) { 12 | var elem = elems.item(i); 13 | AddPartTitleOnClick(elem); 14 | } 15 | } 16 | }) 17 | 18 | function AddPartTitleOnClick(elem) { 19 | var mod_path = elem.getAttribute("x-source-module"); 20 | var tag = elem.getAttribute("x-part-tag"); 21 | if (mod_path && tag) { 22 | // Might not be present: 23 | var prefixes = elem.getAttribute("x-part-prefixes"); 24 | 25 | var info = document.createElement("div"); 26 | info.className = "RPartExplain"; 27 | 28 | /* The "top" tag refers to a whole document: */ 29 | var is_top = (tag == "\"top\""); 30 | info.appendChild(document.createTextNode("Link to this " 31 | + (is_top ? "document" : "section") 32 | + " with ")); 33 | 34 | /* Break `secref` into two lines if the module path and tag 35 | are long enough: */ 36 | var is_long = (is_top ? false : ((mod_path.length 37 | + tag.length 38 | + (prefixes ? (16 + prefixes.length) : 0)) 39 | > 60)); 40 | 41 | var line1 = document.createElement("div"); 42 | var line1x = ((is_long && prefixes) ? document.createElement("div") : line1); 43 | var line2 = (is_long ? document.createElement("div") : line1); 44 | 45 | function add(dest, str, cn) { 46 | var s = document.createElement("span"); 47 | s.className = cn; 48 | s.style.whiteSpace = "nowrap"; 49 | s.appendChild(document.createTextNode(str)); 50 | dest.appendChild(s); 51 | } 52 | /* Construct a `secref` call with suitable syntax coloring: */ 53 | add(line1, "\xA0@", "RktRdr"); 54 | add(line1, (is_top ? "other-doc" : "secref"), "RktSym"); 55 | add(line1, "[", "RktPn"); 56 | if (!is_top) 57 | add(line1, tag, "RktVal"); 58 | if (is_long) { 59 | /* indent additional lines: */ 60 | if (prefixes) 61 | add(line1x, "\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0", "RktPn"); 62 | add(line2, "\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0", "RktPn"); 63 | } 64 | if (prefixes) { 65 | add(line1x, " #:tag-prefixes ", "RktPn"); 66 | add(line1x, "'", "RktVal"); 67 | add(line1x, prefixes, "RktVal"); 68 | } 69 | if (!is_top) 70 | add(line2, " #:doc ", "RktPn"); 71 | add(line2, "'", "RktVal"); 72 | add(line2, mod_path, "RktVal"); 73 | add(line2, "]", "RktPn"); 74 | 75 | info.appendChild(line1); 76 | if (is_long) 77 | info.appendChild(line1x); 78 | if (is_long) 79 | info.appendChild(line2); 80 | 81 | info.style.display = "none"; 82 | 83 | /* Add the new element afterthe header: */ 84 | var n = elem.nextSibling; 85 | if (n) 86 | elem.parentNode.insertBefore(info, n); 87 | else 88 | elem.parentNode.appendChild(info); 89 | 90 | /* Clicking the header shows the explanation element: */ 91 | elem.onclick = function () { 92 | if (info.style.display == "none") 93 | info.style.display = "block"; 94 | else 95 | info.style.display = "none"; 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /doc/racket.css: -------------------------------------------------------------------------------- 1 | 2 | /* See the beginning of "scribble.css". */ 3 | 4 | /* Monospace: */ 5 | .RktIn, .RktRdr, .RktPn, .RktMeta, 6 | .RktMod, .RktKw, .RktVar, .RktSym, 7 | .RktRes, .RktOut, .RktCmt, .RktVal, 8 | .RktBlk { 9 | font-family: monospace; 10 | white-space: inherit; 11 | } 12 | 13 | /* Serif: */ 14 | .inheritedlbl { 15 | font-family: serif; 16 | } 17 | 18 | /* Sans-serif: */ 19 | .RBackgroundLabelInner { 20 | font-family: sans-serif; 21 | } 22 | 23 | /* ---------------------------------------- */ 24 | /* Inherited methods, left margin */ 25 | 26 | .inherited { 27 | width: 100%; 28 | margin-top: 0.5em; 29 | text-align: left; 30 | background-color: #ECF5F5; 31 | } 32 | 33 | .inherited td { 34 | font-size: 82%; 35 | padding-left: 1em; 36 | text-indent: -0.8em; 37 | padding-right: 0.2em; 38 | } 39 | 40 | .inheritedlbl { 41 | font-style: italic; 42 | } 43 | 44 | /* ---------------------------------------- */ 45 | /* Racket text styles */ 46 | 47 | .RktIn { 48 | color: #cc6633; 49 | background-color: #eeeeee; 50 | } 51 | 52 | .RktInBG { 53 | background-color: #eeeeee; 54 | } 55 | 56 | .RktRdr { 57 | } 58 | 59 | .RktPn { 60 | color: #843c24; 61 | } 62 | 63 | .RktMeta { 64 | color: black; 65 | } 66 | 67 | .RktMod { 68 | color: black; 69 | } 70 | 71 | .RktOpt { 72 | color: black; 73 | } 74 | 75 | .RktKw { 76 | color: black; 77 | } 78 | 79 | .RktErr { 80 | color: red; 81 | font-style: italic; 82 | } 83 | 84 | .RktVar { 85 | color: #262680; 86 | font-style: italic; 87 | } 88 | 89 | .RktSym { 90 | color: #262680; 91 | } 92 | 93 | .RktSymDef { /* used with RktSym at def site */ 94 | } 95 | 96 | .RktValLink { 97 | text-decoration: none; 98 | color: blue; 99 | } 100 | 101 | .RktValDef { /* used with RktValLink at def site */ 102 | } 103 | 104 | .RktModLink { 105 | text-decoration: none; 106 | color: blue; 107 | } 108 | 109 | .RktStxLink { 110 | text-decoration: none; 111 | color: black; 112 | } 113 | 114 | .RktStxDef { /* used with RktStxLink at def site */ 115 | } 116 | 117 | .RktRes { 118 | color: #0000af; 119 | } 120 | 121 | .RktOut { 122 | color: #960096; 123 | } 124 | 125 | .RktCmt { 126 | color: #c2741f; 127 | } 128 | 129 | .RktVal { 130 | color: #228b22; 131 | } 132 | 133 | /* ---------------------------------------- */ 134 | /* Some inline styles */ 135 | 136 | .together { 137 | width: 100%; 138 | } 139 | 140 | .prototype, .argcontract, .RBoxed { 141 | white-space: nowrap; 142 | } 143 | 144 | .prototype td { 145 | vertical-align: text-top; 146 | } 147 | 148 | .RktBlk { 149 | white-space: inherit; 150 | text-align: left; 151 | } 152 | 153 | .RktBlk tr { 154 | white-space: inherit; 155 | } 156 | 157 | .RktBlk td { 158 | vertical-align: baseline; 159 | white-space: inherit; 160 | } 161 | 162 | .argcontract td { 163 | vertical-align: text-top; 164 | } 165 | 166 | .highlighted { 167 | background-color: #ddddff; 168 | } 169 | 170 | .defmodule { 171 | width: 100%; 172 | background-color: #F5F5DC; 173 | } 174 | 175 | .specgrammar { 176 | float: right; 177 | } 178 | 179 | .RBibliography td { 180 | vertical-align: text-top; 181 | } 182 | 183 | .leftindent { 184 | margin-left: 1em; 185 | margin-right: 0em; 186 | } 187 | 188 | .insetpara { 189 | margin-left: 1em; 190 | margin-right: 1em; 191 | } 192 | 193 | .Rfilebox { 194 | } 195 | 196 | .Rfiletitle { 197 | text-align: right; 198 | margin: 0em 0em 0em 0em; 199 | } 200 | 201 | .Rfilename { 202 | border-top: 1px solid #6C8585; 203 | border-right: 1px solid #6C8585; 204 | padding-left: 0.5em; 205 | padding-right: 0.5em; 206 | background-color: #ECF5F5; 207 | } 208 | 209 | .Rfilecontent { 210 | margin: 0em 0em 0em 0em; 211 | } 212 | 213 | .RpackageSpec { 214 | padding-right: 0.5em; 215 | } 216 | 217 | /* ---------------------------------------- */ 218 | /* For background labels */ 219 | 220 | .RBackgroundLabel { 221 | float: right; 222 | width: 0px; 223 | height: 0px; 224 | } 225 | 226 | .RBackgroundLabelInner { 227 | position: relative; 228 | width: 25em; 229 | left: -25.5em; 230 | top: 0px; 231 | text-align: right; 232 | color: white; 233 | z-index: 0; 234 | font-weight: bold; 235 | } 236 | 237 | .RForeground { 238 | position: relative; 239 | left: 0px; 240 | top: 0px; 241 | z-index: 1; 242 | } 243 | 244 | /* ---------------------------------------- */ 245 | /* History */ 246 | 247 | .SHistory { 248 | font-size: 82%; 249 | } 250 | -------------------------------------------------------------------------------- /doc/scribble-common.js: -------------------------------------------------------------------------------- 1 | // Common functionality for PLT documentation pages 2 | 3 | // Page Parameters ------------------------------------------------------------ 4 | 5 | var page_query_string = location.search.substring(1); 6 | 7 | var page_args = 8 | ((function(){ 9 | if (!page_query_string) return []; 10 | var args = page_query_string.split(/[&;]/); 11 | for (var i=0; i= 0) args[i] = [a.substring(0,p), a.substring(p+1)]; 15 | else args[i] = [a, false]; 16 | } 17 | return args; 18 | })()); 19 | 20 | function GetPageArg(key, def) { 21 | for (var i=0; i= 0 && cur.substring(0,eql) == key) 78 | return unescape(cur.substring(eql+1)); 79 | } 80 | return def; 81 | } 82 | } 83 | 84 | function SetCookie(key, val) { 85 | try { 86 | localStorage[key] = val; 87 | } catch(e) { 88 | var d = new Date(); 89 | d.setTime(d.getTime()+(365*24*60*60*1000)); 90 | try { 91 | document.cookie = 92 | key + "=" + escape(val) + "; expires="+ d.toGMTString() + "; path=/"; 93 | } catch (e) {} 94 | } 95 | } 96 | 97 | // note that this always stores a directory name, ending with a "/" 98 | function SetPLTRoot(ver, relative) { 99 | var root = location.protocol + "//" + location.host 100 | + NormalizePath(location.pathname.replace(/[^\/]*$/, relative)); 101 | SetCookie("PLT_Root."+ver, root); 102 | } 103 | 104 | // adding index.html works because of the above 105 | function GotoPLTRoot(ver, relative) { 106 | var u = GetCookie("PLT_Root."+ver, null); 107 | if (u == null) return true; // no cookie: use plain up link 108 | // the relative path is optional, default goes to the toplevel start page 109 | if (!relative) relative = "index.html"; 110 | location = u + relative; 111 | return false; 112 | } 113 | 114 | // Utilities ------------------------------------------------------------------ 115 | 116 | var normalize_rxs = [/\/\/+/g, /\/\.(\/|$)/, /\/[^\/]*\/\.\.(\/|$)/]; 117 | function NormalizePath(path) { 118 | var tmp, i; 119 | for (i = 0; i < normalize_rxs.length; i++) 120 | while ((tmp = path.replace(normalize_rxs[i], "/")) != path) path = tmp; 121 | return path; 122 | } 123 | 124 | // `noscript' is problematic in some browsers (always renders as a 125 | // block), use this hack instead (does not always work!) 126 | // document.write(""); 127 | 128 | // Interactions --------------------------------------------------------------- 129 | 130 | function DoSearchKey(event, field, ver, top_path) { 131 | var val = field.value; 132 | if (event && event.keyCode == 13) { 133 | var u = GetCookie("PLT_Root."+ver, null); 134 | if (u == null) u = top_path; // default: go to the top path 135 | u += "search/index.html?q=" + encodeURIComponent(val); 136 | u = MergePageArgsIntoUrl(u); 137 | location = u; 138 | return false; 139 | } 140 | return true; 141 | } 142 | 143 | function TocviewToggle(glyph, id) { 144 | var s = document.getElementById(id).style; 145 | var expand = s.display == "none"; 146 | s.display = expand ? "block" : "none"; 147 | glyph.innerHTML = expand ? "▼" : "►"; 148 | } 149 | 150 | // Page Init ------------------------------------------------------------------ 151 | 152 | // Note: could make a function that inspects and uses window.onload to chain to 153 | // a previous one, but this file needs to be required first anyway, since it 154 | // contains utilities for all other files. 155 | var on_load_funcs = []; 156 | function AddOnLoad(fun) { on_load_funcs.push(fun); } 157 | window.onload = function() { 158 | for (var i=0; i tr:first-child > td > .together { 185 | border-top: 0px; /* erase border on first instance of together */ 186 | } 187 | 188 | .RktBlk { 189 | white-space: pre; 190 | text-align: left; 191 | } 192 | 193 | .highlighted { 194 | font-size: 1rem; 195 | background-color: #fee; 196 | } 197 | 198 | .defmodule { 199 | font-family: 'Fira-Mono', monospace; 200 | padding: 0.25rem 0.75rem 0.25rem 0.5rem; 201 | margin-bottom: 1rem; 202 | width: 100%; 203 | background-color: #ebf0f4; 204 | } 205 | 206 | .defmodule a { 207 | color: #444; 208 | } 209 | 210 | 211 | .defmodule td span.hspace:first-child { 212 | position: absolute; 213 | width: 0; 214 | display: inline-block; 215 | } 216 | 217 | .defmodule .RpackageSpec .Smaller, 218 | .defmodule .RpackageSpec .stt { 219 | font-size: 1rem; 220 | } 221 | 222 | /* make parens ordinary color in defmodule */ 223 | .defmodule .RktPn { 224 | color: inherit; 225 | } 226 | 227 | .specgrammar { 228 | float: none; 229 | padding-left: 1em; 230 | } 231 | 232 | 233 | .RBibliography td { 234 | vertical-align: text-top; 235 | padding-top: 1em; 236 | } 237 | 238 | .leftindent { 239 | margin-left: 2rem; 240 | margin-right: 0em; 241 | } 242 | 243 | .insetpara { 244 | margin-left: 1em; 245 | margin-right: 1em; 246 | } 247 | 248 | .SCodeFlow .Rfilebox { 249 | margin-left: -1em; /* see 17.2 of guide, module languages */ 250 | } 251 | 252 | .Rfiletitle { 253 | text-align: right; 254 | background-color: #eee; 255 | } 256 | 257 | .SCodeFlow .Rfiletitle { 258 | border-top: 1px dotted gray; 259 | border-right: 1px dotted gray; 260 | } 261 | 262 | 263 | .Rfilename { 264 | border-top: 0; 265 | border-right: 0; 266 | padding-left: 0.5em; 267 | padding-right: 0.5em; 268 | background-color: inherit; 269 | } 270 | 271 | .Rfilecontent { 272 | margin: 0.5em; 273 | } 274 | 275 | .RpackageSpec { 276 | padding-right: 0; 277 | } 278 | 279 | /* ---------------------------------------- */ 280 | /* For background labels */ 281 | 282 | .RBackgroundLabel { 283 | float: right; 284 | width: 0px; 285 | height: 0px; 286 | } 287 | 288 | .RBackgroundLabelInner { 289 | position: relative; 290 | width: 25em; 291 | left: -25.5em; 292 | top: 0.20rem; /* sensitive to monospaced font choice */ 293 | text-align: right; 294 | z-index: 0; 295 | font-weight: 300; 296 | font-family: 'Fira-Mono', monospace; 297 | font-size: 0.9rem; 298 | color: gray; 299 | } 300 | 301 | 302 | .RpackageSpec .Smaller { 303 | font-weight: 300; 304 | font-family: 'Fira-Mono', monospace; 305 | font-size: 0.9rem; 306 | } 307 | 308 | .RForeground { 309 | position: relative; 310 | left: 0px; 311 | top: 0px; 312 | z-index: 1; 313 | } 314 | 315 | /* ---------------------------------------- */ 316 | /* For section source modules & tags */ 317 | 318 | .RPartExplain { 319 | background: #eee; 320 | font-size: 0.9rem; 321 | margin-top: 0.2rem; 322 | padding: 0.2rem; 323 | text-align: left; 324 | } 325 | -------------------------------------------------------------------------------- /doc/scribble.css: -------------------------------------------------------------------------------- 1 | 2 | /* This file is used by default by all Scribble documents. 3 | See also "manual.css", which is added by default by the 4 | `scribble/manual` language. */ 5 | 6 | /* CSS seems backward: List all the classes for which we want a 7 | particular font, so that the font can be changed in one place. (It 8 | would be nicer to reference a font definition from all the places 9 | that we want it.) 10 | 11 | As you read the rest of the file, remember to double-check here to 12 | see if any font is set. */ 13 | 14 | /* Monospace: */ 15 | .maincolumn, .refpara, .refelem, .tocset, .stt, .hspace, .refparaleft, .refelemleft { 16 | font-family: monospace; 17 | } 18 | 19 | /* Serif: */ 20 | .main, .refcontent, .tocview, .tocsub, .sroman, i { 21 | font-family: serif; 22 | } 23 | 24 | /* Sans-serif: */ 25 | .version, .versionNoNav, .ssansserif { 26 | font-family: sans-serif; 27 | } 28 | .ssansserif { 29 | font-size: 80%; 30 | font-weight: bold; 31 | } 32 | 33 | /* ---------------------------------------- */ 34 | 35 | p, .SIntrapara { 36 | display: block; 37 | margin: 1em 0; 38 | } 39 | 40 | h2 { /* per-page main title */ 41 | margin-top: 0; 42 | } 43 | 44 | h3, h4, h5, h6, h7, h8 { 45 | margin-top: 1.75em; 46 | margin-bottom: 0.5em; 47 | } 48 | 49 | .SSubSubSubSection { 50 | font-weight: bold; 51 | font-size: 0.83em; /* should match h5; from HTML 4 reference */ 52 | } 53 | 54 | /* Needed for browsers like Opera, and eventually for HTML 4 conformance. 55 | This means that multiple paragraphs in a table element do not have a space 56 | between them. */ 57 | table p { 58 | margin-top: 0; 59 | margin-bottom: 0; 60 | } 61 | 62 | /* ---------------------------------------- */ 63 | /* Main */ 64 | 65 | body { 66 | color: black; 67 | background-color: #ffffff; 68 | } 69 | 70 | table td { 71 | padding-left: 0; 72 | padding-right: 0; 73 | } 74 | 75 | .maincolumn { 76 | width: 43em; 77 | margin-right: -40em; 78 | margin-left: 15em; 79 | } 80 | 81 | .main { 82 | text-align: left; 83 | } 84 | 85 | /* ---------------------------------------- */ 86 | /* Navigation */ 87 | 88 | .navsettop, .navsetbottom { 89 | background-color: #f0f0e0; 90 | padding: 0.25em 0 0.25em 0; 91 | } 92 | 93 | .navsettop { 94 | margin-bottom: 1.5em; 95 | border-bottom: 2px solid #e0e0c0; 96 | } 97 | 98 | .navsetbottom { 99 | margin-top: 2em; 100 | border-top: 2px solid #e0e0c0; 101 | } 102 | 103 | .navleft { 104 | margin-left: 1ex; 105 | position: relative; 106 | float: left; 107 | white-space: nowrap; 108 | } 109 | .navright { 110 | margin-right: 1ex; 111 | position: relative; 112 | float: right; 113 | white-space: nowrap; 114 | } 115 | .nonavigation { 116 | color: #e0e0e0; 117 | } 118 | 119 | .searchform { 120 | display: inline; 121 | margin: 0; 122 | padding: 0; 123 | } 124 | 125 | .nosearchform { 126 | display: none; 127 | } 128 | 129 | .searchbox { 130 | width: 16em; 131 | margin: 0px; 132 | padding: 0px; 133 | background-color: #eee; 134 | border: 1px solid #ddd; 135 | text-align: center; 136 | vertical-align: middle; 137 | } 138 | 139 | #contextindicator { 140 | position: fixed; 141 | background-color: #c6f; 142 | color: #000; 143 | font-family: monospace; 144 | font-weight: bold; 145 | padding: 2px 10px; 146 | display: none; 147 | right: 0; 148 | bottom: 0; 149 | } 150 | 151 | /* ---------------------------------------- */ 152 | /* Version */ 153 | 154 | .versionbox { 155 | position: relative; 156 | float: right; 157 | left: 2em; 158 | height: 0em; 159 | width: 13em; 160 | margin: 0em -13em 0em 0em; 161 | } 162 | .version { 163 | font-size: small; 164 | } 165 | .versionNoNav { 166 | font-size: xx-small; /* avoid overlap with author */ 167 | } 168 | 169 | .version:before, .versionNoNav:before { 170 | content: "Version "; 171 | } 172 | 173 | /* ---------------------------------------- */ 174 | /* Margin notes */ 175 | 176 | .refpara, .refelem { 177 | position: relative; 178 | float: right; 179 | left: 2em; 180 | height: 0em; 181 | width: 13em; 182 | margin: 0em -13em 0em 0em; 183 | } 184 | 185 | .refpara, .refparaleft { 186 | top: -1em; 187 | } 188 | 189 | .refcolumn { 190 | background-color: #F5F5DC; 191 | display: block; 192 | position: relative; 193 | width: 13em; 194 | font-size: 85%; 195 | border: 0.5em solid #F5F5DC; 196 | margin: 0 0 0 0; 197 | white-space: normal; /* in case margin note is inside code sample */ 198 | } 199 | 200 | .refcontent { 201 | margin: 0 0 0 0; 202 | } 203 | 204 | .refcontent p { 205 | margin-top: 0; 206 | margin-bottom: 0; 207 | } 208 | 209 | .refparaleft, .refelemleft { 210 | position: relative; 211 | float: left; 212 | right: 2em; 213 | height: 0em; 214 | width: 13em; 215 | margin: 0em 0em 0em -13em; 216 | } 217 | 218 | .refcolumnleft { 219 | background-color: #F5F5DC; 220 | display: block; 221 | position: relative; 222 | width: 13em; 223 | font-size: 85%; 224 | border: 0.5em solid #F5F5DC; 225 | margin: 0 0 0 0; 226 | } 227 | 228 | 229 | /* ---------------------------------------- */ 230 | /* Table of contents, inline */ 231 | 232 | .toclink { 233 | text-decoration: none; 234 | color: blue; 235 | font-size: 85%; 236 | } 237 | 238 | .toptoclink { 239 | text-decoration: none; 240 | color: blue; 241 | font-weight: bold; 242 | } 243 | 244 | /* ---------------------------------------- */ 245 | /* Table of contents, left margin */ 246 | 247 | .tocset { 248 | position: relative; 249 | float: left; 250 | width: 12.5em; 251 | margin-right: 2em; 252 | } 253 | .tocset td { 254 | vertical-align: text-top; 255 | } 256 | 257 | .tocview { 258 | text-align: left; 259 | background-color: #f0f0e0; 260 | } 261 | 262 | .tocsub { 263 | text-align: left; 264 | margin-top: 0.5em; 265 | background-color: #f0f0e0; 266 | } 267 | 268 | .tocviewlist, .tocsublist { 269 | margin-left: 0.2em; 270 | margin-right: 0.2em; 271 | padding-top: 0.2em; 272 | padding-bottom: 0.2em; 273 | } 274 | .tocviewlist table { 275 | font-size: 82%; 276 | } 277 | 278 | .tocviewlisttopspace { 279 | margin-bottom: 1em; 280 | } 281 | 282 | .tocviewsublist, .tocviewsublistonly, .tocviewsublisttop, .tocviewsublistbottom { 283 | margin-left: 0.4em; 284 | border-left: 1px solid #bbf; 285 | padding-left: 0.8em; 286 | } 287 | .tocviewsublist { 288 | margin-bottom: 1em; 289 | } 290 | .tocviewsublist table, 291 | .tocviewsublistonly table, 292 | .tocviewsublisttop table, 293 | .tocviewsublistbottom table { 294 | font-size: 75%; 295 | } 296 | 297 | .tocviewtitle * { 298 | font-weight: bold; 299 | } 300 | 301 | .tocviewlink { 302 | text-decoration: none; 303 | color: blue; 304 | } 305 | 306 | .tocviewselflink { 307 | text-decoration: underline; 308 | color: blue; 309 | } 310 | 311 | .tocviewtoggle { 312 | text-decoration: none; 313 | color: blue; 314 | font-size: 75%; /* looks better, and avoids bounce when toggling sub-sections due to font alignments */ 315 | } 316 | 317 | .tocsublist td { 318 | padding-left: 1em; 319 | text-indent: -1em; 320 | } 321 | 322 | .tocsublinknumber { 323 | font-size: 82%; 324 | } 325 | 326 | .tocsublink { 327 | font-size: 82%; 328 | text-decoration: none; 329 | } 330 | 331 | .tocsubseclink { 332 | font-size: 82%; 333 | text-decoration: none; 334 | } 335 | 336 | .tocsubnonseclink { 337 | font-size: 82%; 338 | text-decoration: none; 339 | padding-left: 0.5em; 340 | } 341 | 342 | .tocsubtitle { 343 | font-size: 82%; 344 | font-style: italic; 345 | margin: 0.2em; 346 | } 347 | 348 | /* ---------------------------------------- */ 349 | /* Some inline styles */ 350 | 351 | .indexlink { 352 | text-decoration: none; 353 | } 354 | 355 | .nobreak { 356 | white-space: nowrap; 357 | } 358 | 359 | pre { margin-left: 2em; } 360 | blockquote { margin-left: 2em; } 361 | 362 | ol { list-style-type: decimal; } 363 | ol ol { list-style-type: lower-alpha; } 364 | ol ol ol { list-style-type: lower-roman; } 365 | ol ol ol ol { list-style-type: upper-alpha; } 366 | 367 | .SCodeFlow { 368 | display: block; 369 | margin-left: 1em; 370 | margin-bottom: 0em; 371 | margin-right: 1em; 372 | margin-top: 0em; 373 | white-space: nowrap; 374 | } 375 | 376 | .SVInsetFlow { 377 | display: block; 378 | margin-left: 0em; 379 | margin-bottom: 0em; 380 | margin-right: 0em; 381 | margin-top: 0em; 382 | } 383 | 384 | .SubFlow { 385 | display: block; 386 | margin: 0em; 387 | } 388 | 389 | .boxed { 390 | width: 100%; 391 | background-color: #E8E8FF; 392 | } 393 | 394 | .hspace { 395 | } 396 | 397 | .slant { 398 | font-style: oblique; 399 | } 400 | 401 | .badlink { 402 | text-decoration: underline; 403 | color: red; 404 | } 405 | 406 | .plainlink { 407 | text-decoration: none; 408 | color: blue; 409 | } 410 | 411 | .techoutside { text-decoration: underline; color: #b0b0b0; } 412 | .techoutside:hover { text-decoration: underline; color: blue; } 413 | 414 | /* .techinside:hover doesn't work with FF, .techinside:hover> 415 | .techinside doesn't work with IE, so use both (and IE doesn't 416 | work with inherit in the second one, so use blue directly) */ 417 | .techinside { color: black; } 418 | .techinside:hover { color: blue; } 419 | .techoutside:hover>.techinside { color: inherit; } 420 | 421 | .SCentered { 422 | text-align: center; 423 | } 424 | 425 | .imageleft { 426 | float: left; 427 | margin-right: 0.3em; 428 | } 429 | 430 | .Smaller { 431 | font-size: 82%; 432 | } 433 | 434 | .Larger { 435 | font-size: 122%; 436 | } 437 | 438 | /* A hack, inserted to break some Scheme ids: */ 439 | .mywbr { 440 | display: inline-block; 441 | height: 0; 442 | width: 0; 443 | font-size: 1px; 444 | } 445 | 446 | .compact li p { 447 | margin: 0em; 448 | padding: 0em; 449 | } 450 | 451 | .noborder img { 452 | border: 0; 453 | } 454 | 455 | .SAuthorListBox { 456 | position: relative; 457 | float: right; 458 | left: 2em; 459 | top: -2.5em; 460 | height: 0em; 461 | width: 13em; 462 | margin: 0em -13em 0em 0em; 463 | } 464 | .SAuthorList { 465 | font-size: 82%; 466 | } 467 | .SAuthorList:before { 468 | content: "by "; 469 | } 470 | .author { 471 | display: inline; 472 | white-space: nowrap; 473 | } 474 | 475 | /* print styles : hide the navigation elements */ 476 | @media print { 477 | .tocset, 478 | .navsettop, 479 | .navsetbottom { display: none; } 480 | .maincolumn { 481 | width: auto; 482 | margin-right: 13em; 483 | margin-left: 0; 484 | } 485 | } 486 | -------------------------------------------------------------------------------- /doc/manual-style.css: -------------------------------------------------------------------------------- 1 | 2 | /* See the beginning of "scribble.css". 3 | This file is used by the `scribble/manual` language, along with 4 | "manual-racket.css". */ 5 | 6 | @import url("manual-fonts.css"); 7 | 8 | * { 9 | margin: 0; 10 | padding: 0; 11 | } 12 | 13 | @media all {html {font-size: 15px;}} 14 | @media all and (max-width:940px){html {font-size: 14px;}} 15 | @media all and (max-width:850px){html {font-size: 13px;}} 16 | @media all and (max-width:830px){html {font-size: 12px;}} 17 | @media all and (max-width:740px){html {font-size: 11px;}} 18 | 19 | /* CSS seems backward: List all the classes for which we want a 20 | particular font, so that the font can be changed in one place. (It 21 | would be nicer to reference a font definition from all the places 22 | that we want it.) 23 | 24 | As you read the rest of the file, remember to double-check here to 25 | see if any font is set. */ 26 | 27 | /* Monospace: */ 28 | .maincolumn, .refpara, .refelem, .tocset, .stt, .hspace, .refparaleft, .refelemleft { 29 | font-family: 'Fira-Mono', monospace; 30 | white-space: inherit; 31 | font-size: 1rem; 32 | } 33 | 34 | /* embolden the "Racket Guide" and "Racket Reference" links on the TOC */ 35 | /* there isn't an obvious tag in the markup that designates the top TOC page, which is called "start.scrbl" */ 36 | /* nor a tag that designates these two links as special */ 37 | /* so we'll use this slightly tortured sibling selector that hooks onto the h2 tag */ 38 | h2[x-source-module='(lib "scribblings/main/start.scrbl")'] ~ table a[href="guide/index.html"], 39 | h2[x-source-module='(lib "scribblings/main/start.scrbl")'] ~ table a[href="reference/index.html"] { 40 | font-weight: bold; 41 | } 42 | 43 | 44 | h2 .stt { 45 | font-size: 2.3rem; 46 | /* prevent automatic bolding from h2 */ 47 | font-weight: 400; 48 | } 49 | 50 | .toptoclink .stt { 51 | font-size: inherit; 52 | } 53 | .toclink .stt { 54 | font-size: 90%; 55 | } 56 | 57 | .RpackageSpec .stt { 58 | font-weight: 300; 59 | font-family: 'Fira-Mono', monospace; 60 | font-size: 0.9rem; 61 | } 62 | 63 | h3 .stt, h4 .stt, h5 .stt { 64 | color: #333; 65 | font-size: 1.65rem; 66 | font-weight: 400; 67 | } 68 | 69 | 70 | /* Serif: */ 71 | .main, .refcontent, .tocview, .tocsub, .sroman, i { 72 | font-family: 'Charter-Racket', serif; 73 | font-size: 1.18rem; 74 | /* Don't use font-feature-settings with Charter, 75 | it fouls up loading for reasons mysterious */ 76 | /* font-feature-settings: 'tnum' 1, 'liga' 0; */ 77 | } 78 | 79 | 80 | /* Sans-serif: */ 81 | .version, .versionNoNav, .ssansserif { 82 | font-family: 'Fira', sans-serif; 83 | } 84 | 85 | /* used mostly for DrRacket menu commands */ 86 | .ssansserif { 87 | font-family: 'Fira', sans-serif; 88 | font-size: 0.9em; 89 | } 90 | 91 | .tocset .ssansserif { 92 | font-size: 100%; 93 | } 94 | 95 | /* ---------------------------------------- */ 96 | 97 | p, .SIntrapara { 98 | display: block; 99 | margin: 0 0 1em 0; 100 | line-height: 1.4; 101 | } 102 | 103 | .compact { 104 | padding: 0 0 1em 0; 105 | } 106 | 107 | li { 108 | list-style-position: outside; 109 | margin-left: 1.2em; 110 | } 111 | 112 | h1, h2, h3, h4, h5, h6, h7, h8 { 113 | font-family: 'Fira', sans-serif; 114 | font-weight: 300; 115 | font-size: 1.6rem; 116 | color: #333; 117 | margin-top: inherit; 118 | margin-bottom: 1rem; 119 | line-height: 1.25; 120 | 121 | } 122 | 123 | h3, h4, h5, h6, h7, h8 { 124 | border-top: 1px solid black; 125 | } 126 | 127 | 128 | 129 | h2 { /* per-page main title */ 130 | font-family: 'Cooper-Hewitt'; 131 | margin-top: 4rem; 132 | font-size: 2.3rem; 133 | font-weight: bold; 134 | line-height: 1.2; 135 | width: 90%; 136 | /* a little nudge to make text visually lower than 4rem rule in left margin */ 137 | position: relative; 138 | top: 6px; 139 | } 140 | 141 | h3, h4, h5, h6, h7, h8 { 142 | margin-top: 2em; 143 | padding-top: 0.1em; 144 | margin-bottom: 0.75em; 145 | } 146 | 147 | /* ---------------------------------------- */ 148 | /* Main */ 149 | 150 | body { 151 | color: black; 152 | background-color: white; 153 | } 154 | 155 | .maincolumn { 156 | width: auto; 157 | margin-top: 4rem; 158 | margin-left: 17rem; 159 | margin-right: 2rem; 160 | margin-bottom: 10rem; /* to avoid fixed bottom nav bar */ 161 | max-width: 700px; 162 | min-width: 370px; /* below this size, code samples don't fit */ 163 | } 164 | 165 | a { 166 | text-decoration: inherit; 167 | } 168 | 169 | a, .toclink, .toptoclink, .tocviewlink, .tocviewselflink, .tocviewtoggle, .plainlink, 170 | .techinside, .techoutside:hover, .techinside:hover { 171 | color: #07A; 172 | } 173 | 174 | a:hover { 175 | text-decoration: underline; 176 | } 177 | 178 | 179 | /* ---------------------------------------- */ 180 | /* Navigation */ 181 | 182 | .navsettop, .navsetbottom { 183 | left: 0; 184 | width: 15rem; 185 | height: 6rem; 186 | font-family: 'Fira', sans-serif; 187 | font-size: 0.9rem; 188 | border-bottom: 0px solid hsl(216, 15%, 70%); 189 | background-color: inherit; 190 | padding: 0; 191 | } 192 | 193 | .navsettop { 194 | position: absolute; 195 | top: 0; 196 | left: 0; 197 | margin-bottom: 0; 198 | border-bottom: 0; 199 | } 200 | 201 | .navsettop a, .navsetbottom a { 202 | color: black; 203 | } 204 | 205 | .navsettop a:hover, .navsetbottom a:hover { 206 | background: hsl(216, 78%, 95%); 207 | text-decoration: none; 208 | } 209 | 210 | .navleft, .navright { 211 | position: static; 212 | float: none; 213 | margin: 0; 214 | white-space: normal; 215 | } 216 | 217 | 218 | .navleft a { 219 | display: inline-block; 220 | } 221 | 222 | .navright a { 223 | display: inline-block; 224 | text-align: center; 225 | } 226 | 227 | .navleft a, .navright a, .navright span { 228 | display: inline-block; 229 | padding: 0.5rem; 230 | min-width: 1rem; 231 | } 232 | 233 | 234 | .navright { 235 | height: 2rem; 236 | white-space: nowrap; 237 | } 238 | 239 | 240 | .navsetbottom { 241 | display: none; 242 | } 243 | 244 | .nonavigation { 245 | color: #889; 246 | } 247 | 248 | .searchform { 249 | display: block; 250 | margin: 0; 251 | padding: 0; 252 | border-bottom: 1px solid #eee; 253 | height: 4rem; 254 | } 255 | 256 | .nosearchform { 257 | margin: 0; 258 | padding: 0; 259 | height: 4rem; 260 | } 261 | 262 | .searchbox { 263 | font-size: 0.9rem; 264 | width: 12rem; 265 | margin: 1rem; 266 | padding: 0.25rem 0.4rem ; 267 | vertical-align: middle; 268 | background-color: white; 269 | font-family: 'Fira-Mono', monospace; 270 | } 271 | 272 | 273 | #search_box { 274 | font-family: 'Fira-Mono', monospace; 275 | font-size: 1rem; 276 | padding: 0.25rem 0.3rem ; 277 | } 278 | 279 | /* Default to local view. Global will specialize */ 280 | .plt_global_only { display: none; } 281 | .plt_local_only { display: block; } 282 | 283 | /* ---------------------------------------- */ 284 | /* Version */ 285 | 286 | .versionbox { 287 | position: absolute; 288 | float: none; 289 | top: 0.25rem; 290 | left: 17rem; 291 | z-index: 11000; 292 | height: 2em; 293 | font-size: 70%; 294 | font-weight: lighter; 295 | width: inherit; 296 | margin: 0; 297 | } 298 | .version, .versionNoNav { 299 | font-size: inherit; 300 | } 301 | .version:before, .versionNoNav:before { 302 | content: "v."; 303 | } 304 | 305 | 306 | /* ---------------------------------------- */ 307 | /* Margin notes */ 308 | 309 | /* cancel scribble.css styles: */ 310 | .refpara, .refelem { 311 | position: static; 312 | float: none; 313 | height: auto; 314 | width: auto; 315 | margin: 0; 316 | } 317 | 318 | .refcolumn { 319 | position: static; 320 | display: block; 321 | width: auto; 322 | font-size: inherit; 323 | margin: 2rem; 324 | margin-left: 2rem; 325 | padding: 0.5em; 326 | padding-left: 0.75em; 327 | padding-right: 1em; 328 | background: hsl(60, 29%, 94%); 329 | border: 1px solid #ccb; 330 | border-left: 0.4rem solid #ccb; 331 | } 332 | 333 | 334 | /* slightly different handling for margin-note* on narrow screens */ 335 | @media all and (max-width:1340px) { 336 | span.refcolumn { 337 | float: right; 338 | width: 50%; 339 | margin-left: 1rem; 340 | margin-bottom: 0.8rem; 341 | margin-top: 1.2rem; 342 | } 343 | 344 | } 345 | 346 | .refcontent, .refcontent p { 347 | line-height: 1.5; 348 | margin: 0; 349 | } 350 | 351 | .refcontent p + p { 352 | margin-top: 1em; 353 | } 354 | 355 | .refcontent a { 356 | font-weight: 400; 357 | } 358 | 359 | .refpara, .refparaleft { 360 | top: -1em; 361 | } 362 | 363 | 364 | @media all and (max-width:600px) { 365 | .refcolumn { 366 | margin-left: 0; 367 | margin-right: 0; 368 | } 369 | } 370 | 371 | 372 | @media all and (min-width:1340px) { 373 | .refcolumn { 374 | margin: 0 -22.5rem 1rem 0; 375 | float: right; 376 | clear: right; 377 | width: 18rem; 378 | } 379 | } 380 | 381 | .refcontent { 382 | font-family: 'Fira', sans-serif; 383 | font-size: 1rem; 384 | line-height: 1.6; 385 | margin: 0 0 0 0; 386 | } 387 | 388 | 389 | .refparaleft, .refelemleft { 390 | position: relative; 391 | float: left; 392 | right: 2em; 393 | height: 0em; 394 | width: 13em; 395 | margin: 0em 0em 0em -13em; 396 | } 397 | 398 | .refcolumnleft { 399 | background-color: hsl(60, 29%, 94%); 400 | display: block; 401 | position: relative; 402 | width: 13em; 403 | font-size: 85%; 404 | border: 0.5em solid hsl(60, 29%, 94%); 405 | margin: 0 0 0 0; 406 | } 407 | 408 | 409 | /* ---------------------------------------- */ 410 | /* Table of contents, left margin */ 411 | 412 | .tocset { 413 | position: absolute; 414 | float: none; 415 | left: 0; 416 | top: 0rem; 417 | width: 14rem; 418 | padding: 7rem 0.5rem 0.5rem 0.5rem; 419 | background-color: hsl(216, 15%, 70%); 420 | margin: 0; 421 | 422 | } 423 | 424 | .tocset td { 425 | vertical-align: text-top; 426 | padding-bottom: 0.4rem; 427 | padding-left: 0.2rem; 428 | line-height: 1.1; 429 | font-family: 'Fira', sans-serif; 430 | } 431 | 432 | .tocset td a { 433 | color: black; 434 | font-weight: 400; 435 | } 436 | 437 | 438 | .tocview { 439 | text-align: left; 440 | background-color: inherit; 441 | } 442 | 443 | 444 | .tocview td, .tocsub td { 445 | line-height: 1.3; 446 | } 447 | 448 | 449 | .tocview table, .tocsub table { 450 | width: 90%; 451 | } 452 | 453 | .tocset td a.tocviewselflink { 454 | font-weight: lighter; 455 | font-size: 110%; /* monospaced styles below don't need to enlarge */ 456 | color: white; 457 | } 458 | 459 | .tocviewselflink { 460 | text-decoration: none; 461 | } 462 | 463 | .tocsub { 464 | text-align: left; 465 | margin-top: 0.5em; 466 | background-color: inherit; 467 | } 468 | 469 | .tocviewlist, .tocsublist { 470 | margin-left: 0.2em; 471 | margin-right: 0.2em; 472 | padding-top: 0.2em; 473 | padding-bottom: 0.2em; 474 | } 475 | .tocviewlist table { 476 | font-size: 82%; 477 | } 478 | 479 | .tocviewlisttopspace { 480 | margin-bottom: 1em; 481 | } 482 | 483 | .tocviewsublist, .tocviewsublistonly, .tocviewsublisttop, .tocviewsublistbottom { 484 | margin-left: 0.4em; 485 | border-left: 1px solid #99a; 486 | padding-left: 0.8em; 487 | } 488 | .tocviewsublist { 489 | margin-bottom: 1em; 490 | } 491 | .tocviewsublist table, 492 | .tocviewsublistonly table, 493 | .tocviewsublisttop table, 494 | .tocviewsublistbottom table, 495 | table.tocsublist { 496 | font-size: 1rem; 497 | } 498 | 499 | .tocviewsublist td, 500 | .tocviewsublistbottom td, 501 | .tocviewsublisttop td, 502 | .tocsub td, 503 | .tocviewsublistonly td { 504 | font-size: 90%; 505 | } 506 | 507 | /* shrink the monospaced text (`stt`) within nav */ 508 | .tocviewsublist td .stt, 509 | .tocviewsublistbottom td .stt, 510 | .tocviewsublisttop td .stt, 511 | .tocsub td .stt, 512 | .tocviewsublistonly td .stt { 513 | font-size: 95%; 514 | } 515 | 516 | 517 | .tocviewtoggle { 518 | font-size: 75%; /* looks better, and avoids bounce when toggling sub-sections due to font alignments */ 519 | } 520 | 521 | .tocsublist td { 522 | padding-left: 0.5rem; 523 | padding-top: 0.25rem; 524 | text-indent: 0; 525 | } 526 | 527 | .tocsublinknumber { 528 | font-size: 100%; 529 | } 530 | 531 | .tocsublink { 532 | font-size: 82%; 533 | text-decoration: none; 534 | } 535 | 536 | .tocsubseclink { 537 | font-size: 100%; 538 | text-decoration: none; 539 | } 540 | 541 | .tocsubnonseclink { 542 | font-size: 82%; 543 | text-decoration: none; 544 | margin-left: 1rem; 545 | padding-left: 0; 546 | display: inline-block; 547 | } 548 | 549 | /* the label "on this page" */ 550 | .tocsubtitle { 551 | display: block; 552 | font-size: 62%; 553 | font-family: 'Fira', sans-serif; 554 | font-weight: bolder; 555 | font-style: normal; 556 | letter-spacing: 2px; 557 | text-transform: uppercase; 558 | margin: 0.5em; 559 | } 560 | 561 | .toptoclink { 562 | font-weight: bold; 563 | font-size: 110%; 564 | margin-bottom: 0.5rem; 565 | margin-top: 1.5rem; 566 | display: inline-block; 567 | } 568 | 569 | .toclink { 570 | font-size: inherit; 571 | } 572 | 573 | /* ---------------------------------------- */ 574 | /* Some inline styles */ 575 | 576 | .indexlink { 577 | text-decoration: none; 578 | } 579 | 580 | pre { 581 | margin-left: 2em; 582 | } 583 | 584 | blockquote { 585 | margin-left: 2em; 586 | margin-right: 2em; 587 | margin-bottom: 1em; 588 | } 589 | 590 | .SCodeFlow { 591 | border-left: 1px dotted black; 592 | padding-left: 1em; 593 | padding-right: 1em; 594 | margin-top: 1em; 595 | margin-bottom: 1em; 596 | margin-left: 0em; 597 | margin-right: 2em; 598 | white-space: nowrap; 599 | line-height: 1.5; 600 | } 601 | 602 | .SCodeFlow img { 603 | margin-top: 0.5em; 604 | margin-bottom: 0.5em; 605 | } 606 | 607 | /* put a little air between lines of code sample */ 608 | /* Fira Mono appears taller than Source Code Pro */ 609 | .SCodeFlow td { 610 | padding-bottom: 1px; 611 | } 612 | 613 | .boxed { 614 | margin: 0; 615 | margin-top: 2em; 616 | padding: 0.25em; 617 | padding-top: 0.3em; 618 | padding-bottom: 0.4em; 619 | background: #f3f3f3; 620 | box-sizing:border-box; 621 | border-top: 1px solid #99b; 622 | background: hsl(216, 78%, 95%); 623 | background: -moz-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%); 624 | background: -webkit-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%); 625 | background: -o-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%); 626 | background: -ms-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%); 627 | background: linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%); 628 | } 629 | 630 | blockquote > blockquote.SVInsetFlow { 631 | /* resolves issue in e.g. /reference/notation.html */ 632 | margin-top: 0em; 633 | } 634 | 635 | .leftindent .SVInsetFlow { /* see e.g. section 4.5 of Racket Guide */ 636 | margin-top: 1em; 637 | margin-bottom: 1em; 638 | } 639 | 640 | .SVInsetFlow a, .SCodeFlow a { 641 | color: #07A; 642 | } 643 | 644 | .SubFlow { 645 | display: block; 646 | margin: 0em; 647 | } 648 | 649 | .boxed { 650 | width: 100%; 651 | background-color: inherit; 652 | } 653 | 654 | .techoutside { text-decoration: none; } 655 | 656 | .SAuthorListBox { 657 | position: static; 658 | float: none; 659 | font-family: 'Fira', sans-serif; 660 | font-weight: 300; 661 | font-size: 110%; 662 | margin-top: 1rem; 663 | margin-bottom: 2rem; 664 | width: 30rem; 665 | height: auto; 666 | } 667 | 668 | .author > a { /* email links within author block */ 669 | font-weight: inherit; 670 | color: inherit; 671 | } 672 | 673 | .SAuthorList { 674 | font-size: 82%; 675 | } 676 | .SAuthorList:before { 677 | content: "by "; 678 | } 679 | .author { 680 | display: inline; 681 | white-space: nowrap; 682 | } 683 | 684 | /* phone + tablet styles */ 685 | 686 | @media all and (max-width:720px){ 687 | 688 | 689 | @media all and (max-width:720px){ 690 | 691 | @media all {html {font-size: 15px;}} 692 | @media all and (max-width:700px){html {font-size: 14px;}} 693 | @media all and (max-width:630px){html {font-size: 13px;}} 694 | @media all and (max-width:610px){html {font-size: 12px;}} 695 | @media all and (max-width:550px){html {font-size: 11px;}} 696 | @media all and (max-width:520px){html {font-size: 10px;}} 697 | 698 | .navsettop, .navsetbottom { 699 | display: block; 700 | position: absolute; 701 | width: 100%; 702 | height: 4rem; 703 | border: 0; 704 | background-color: hsl(216, 15%, 70%); 705 | } 706 | 707 | .searchform { 708 | display: inline; 709 | border: 0; 710 | } 711 | 712 | .navright { 713 | position: absolute; 714 | right: 1.5rem; 715 | margin-top: 1rem; 716 | border: 0px solid red; 717 | } 718 | 719 | .navsetbottom { 720 | display: block; 721 | margin-top: 8rem; 722 | } 723 | 724 | .tocset { 725 | display: none; 726 | } 727 | 728 | .tocset table, .tocset tbody, .tocset tr, .tocset td { 729 | display: inline; 730 | } 731 | 732 | .tocview { 733 | display: none; 734 | } 735 | 736 | .tocsub .tocsubtitle { 737 | display: none; 738 | } 739 | 740 | .versionbox { 741 | top: 4.5rem; 742 | left: 1rem; /* same distance as main-column */ 743 | z-index: 11000; 744 | height: 2em; 745 | font-size: 70%; 746 | font-weight: lighter; 747 | } 748 | 749 | 750 | .maincolumn { 751 | margin-left: 1em; 752 | margin-top: 7rem; 753 | margin-bottom: 0rem; 754 | } 755 | 756 | } 757 | 758 | } 759 | 760 | /* print styles : hide the navigation elements */ 761 | @media print { 762 | .tocset, 763 | .navsettop, 764 | .navsetbottom { display: none; } 765 | .maincolumn { 766 | width: auto; 767 | margin-right: 13em; 768 | margin-left: 0; 769 | } 770 | } 771 | --------------------------------------------------------------------------------