diff options
author | Benjamin Barenblat <benjamin@barenblat.name> | 2016-11-05 17:39:41 -0400 |
---|---|---|
committer | Benjamin Barenblat <benjamin@barenblat.name> | 2016-11-05 17:39:41 -0400 |
commit | 43dca1d076bdea10473f61dd53ddcd7e43fa5b55 (patch) | |
tree | 3cca7a8859786110c064d75da0c71970aa3f4864 | |
parent | 9e4a75fe23afd82dd4556c73be654366f47bad00 (diff) |
Begin writing a custom Material Design library
Stop using Material Design Lite, as its execution model doesn’t play
well with Ur/Web’s functional-reactive page generation. Start building
a Material Design library more closely tailored to uGTD and Ur/Web.
-rw-r--r-- | Makefile | 13 | ||||
-rwxr-xr-x | build_scripts/generate_mdl | 40 | ||||
-rw-r--r-- | main.ur | 93 | ||||
-rw-r--r-- | material/lib.urp | 3 | ||||
-rw-r--r-- | material/material.css | 48 | ||||
-rw-r--r-- | material/material.ur | 42 | ||||
-rw-r--r-- | material/material.urs (renamed from mdl/mdlFfi.urs) | 9 | ||||
l--------- | mdl/classes | 1 | ||||
-rw-r--r-- | mdl/classes-1.1.3 | 991 | ||||
-rw-r--r-- | mdl/lib.urp | 11 | ||||
-rw-r--r-- | mdl/mdl.ur | 49 | ||||
-rw-r--r-- | mdl/mdlFfi.js | 28 | ||||
-rw-r--r-- | ugtd.css | 10 | ||||
-rw-r--r-- | ugtd.urp | 4 |
14 files changed, 113 insertions, 1229 deletions
@@ -12,19 +12,15 @@ # License for the specific language governing permissions and limitations under # the License. -MDL_GENERATED = mdl/mdlClasses.urp mdl/mdlClasses.ur - .PHONY: all all: ugtd ugtd.db ugtd initialize.sql: \ ugtd.urp \ ugtd.css \ - mdl/lib.urp \ - mdl/mdlFfi.urs mdl/mdlFfi.js \ - mdl/mdlClasses.urp \ - mdl/mdlClasses.ur \ - mdl/mdl.ur \ + material/lib.urp \ + material/material.css \ + material/material.urs material/material.ur \ main.urs main.ur urweb -ccompiler build_scripts/clang -output ugtd ugtd @@ -33,9 +29,6 @@ ugtd.db: initialize.sql prepopulate.sql sqlite3 $@ <initialize.sql sqlite3 $@ <prepopulate.sql -mdl/mdlClasses.urp mdl/mdlClasses.ur: mdl/classes - build_scripts/generate_mdl <$< - .PHONY: clean clean: $(RM) $(MDL_GENERATED) diff --git a/build_scripts/generate_mdl b/build_scripts/generate_mdl deleted file mode 100755 index 7c79996..0000000 --- a/build_scripts/generate_mdl +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python3 -# Copyright 2016 Benjamin Barenblat -# Copyright 2016 Chelsea Voss -# -# Licensed under the Apache License, Version 2.0 (the “License”); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an “AS IS” BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. - -import fileinput - -urp_lines = [] -ur_lines = [] -for css_name in fileinput.input(): - css_name = css_name.strip() - urweb_name = css_name.replace("-", "_") - - # Special cases for name collisions - if (css_name.startswith("mdl-mega-footer") or - css_name.startswith("mdl-mini-footer") or - css_name.startswith("mdl-progress")): - urweb_name = css_name.replace("--", "---").replace("-", "_") - urp_lines.append( - "rewrite style MdlClasses/{} {}".format(urweb_name, css_name)) - ur_lines.append("style {} (* {} *)".format(urweb_name, css_name)) - -urp_lines.append("") -urp_lines.append("mdlClasses") - -with open("mdl/mdlClasses.urp", "w") as urp_file: - urp_file.write('\n'.join(urp_lines)) -with open("mdl/mdlClasses.ur", "w") as ur_file: - ur_file.write('\n'.join(ur_lines)) @@ -1,5 +1,4 @@ -(* Copyright 2015 Google Inc. -Copyright 2016 Benjamin Barenblat +(* Copyright 2016 Benjamin Barenblat Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the @@ -12,8 +11,6 @@ under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) -open Mdl.Classes - table nextAction : { Id : int, Nam : string, @@ -22,32 +19,11 @@ table nextAction : { sequence nextActionId -(* Forces JavaScript to be enabled on the given page, so as to pull in external -scripts specified in the .urp file. *) -val forceJavaScript = <xml><script code={return ()} /></xml> - fun markNextActionStatus id done = dml (UPDATE nextAction SET Done = {[done]} WHERE Id = {[id]}) -fun renderNextAction action = - c <- fresh; - done <- source action.Done; - return <xml> - <li class="mdl-list__item"> - <span class="mdl-list__item-primary-content"> - <span class="mdl-list__item-icon"> - <label class="mdl-checkbox" for={c}> - <ccheckbox id={c} source={done} class="mdl-checkbox__input" - onchange={ - b <- get done; - rpc (markNextActionStatus action.Id b) - } /> - </label> - </span> - {[action.Nam]} - </span> - </li> - </xml> +fun renderNextAction action : transaction xbody = + return <xml></xml> val renderNextActions = queryX1' (SELECT * FROM nextAction WHERE nextAction.Done = FALSE) renderNextAction @@ -66,57 +42,24 @@ datatype mode = NextActions | NewNextAction val main = actionItems <- bind renderNextActions source; mode <- source NextActions; - newNextActionDescription <- Mdl.Textbox.make "Description"; - return <xml> - <head> + return (Material.page { + Head = <xml> (* TODO(bbaren): Write a meta-description tag. *) - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Next actions</title> - (* Disable tap highlight on IE. *) - <meta name="msapplication-tap-highlight" content="no" /> - (* TODO(bbaren): Support homescreen tiles for Chrome on Android, Safari on iOS, and Windows 8. *) - (* Color the status bar on mobile devices. *) - <meta name="theme-color" content="#9c27b0" /> - - (* Material Design Lite *) - <link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.purple-orange.min.css" /> - <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" /> - {forceJavaScript} - <link rel="stylesheet" href="/ugtd.css" /> - </head> - <body> + </xml>, + Body = <xml> <div dynClass={ currentMode <- signal mode; return (case currentMode of NewNextAction => visible | _ => hidden) }> - <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header"> - <header class="mdl-layout__header"> - <button class="mdl-layout__drawer-button" onclick={fn _ => set mode NextActions}> - <i class="material-icons">close</i> - </button> - <div class="mdl-layout__header-row"> - <span class="mdl-layout-title">New action</span> - <div class="mdl-layout-spacer" /> - <button class="mdl-button mdl-js-button" value="Save" onclick={fn _ => - name <- get newNextActionDescription.Source; - bind (rpc (newNextAction name)) (set actionItems); - sleep 0; - set mode NextActions; - set newNextActionDescription.Source "" - } /> - </div> - </header> - <div class="mdl-layout__content"> - {newNextActionDescription.Xml} - </div> - </div> + {Material.AppBar.make "New action"} </div> <div dynClass={ currentMode <- signal mode; @@ -124,21 +67,7 @@ val main = NextActions => visible | _ => hidden) }> - <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header"> - <div class="mdl-layout__header mdl-layout__header--waterfall mdl-layout__header--waterfall-hide-top"> - <div class="mdl-layout__header-row"> - <span class="mdl-layout-title">Next actions</span> - </div> - </div> - <div class="mdl-layout__content"> - <ul class="mdl-list"> - <dyn signal={signal actionItems} /> - </ul> - <button class="mdl-button mdl-js-button mdl-button--fab mdl-button--colored" onclick={fn _ => set mode NewNextAction}> - <i class="material-icons">add</i> - </button> - </div> - </div> + {Material.AppBar.make "Next actions"} </div> - </body> - </xml> + </xml> + }) diff --git a/material/lib.urp b/material/lib.urp new file mode 100644 index 0000000..0f75854 --- /dev/null +++ b/material/lib.urp @@ -0,0 +1,3 @@ +file /material.css material.css + +material
\ No newline at end of file diff --git a/material/material.css b/material/material.css new file mode 100644 index 0000000..5a20eda --- /dev/null +++ b/material/material.css @@ -0,0 +1,48 @@ +/* Copyright 2016 Benjamin Barenblat + +Licensed under the Apache License, Version 2.0 (the “License”); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. */ + +html, body { + margin: 0; + padding: 0; + background: #fafafa; + font-family: Roboto; +} + +.Material_AppBar_bar { + background: #9c27b0; + height: 56px; + box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.34); /* 4dp */ + display: flex; +} + +/* Aggressively align text to baseline by pretending it’s a drop cap +(http://blogs.adobe.com/webplatform/2014/08/13/one-weird-trick-to-baseline-align-text/). */ +.Material_AppBar_title { + line-height: 0px; +} +.Material_AppBar_title:after { + display: inline-block; + height: 100%; + content: ""; +} + +.Material_AppBar_title { + margin: auto auto 20px 14px; + font-size: 20px; + font-weight: 500; + color: #fff; + white-space: nowrap; + overflow: visible; + /* We can’t use text-overflow because line-height got set to zero for baseline + adjustment. */ +} diff --git a/material/material.ur b/material/material.ur new file mode 100644 index 0000000..3787355 --- /dev/null +++ b/material/material.ur @@ -0,0 +1,42 @@ +(* Copyright 2015 Google Inc. +Copyright 2016 Benjamin Barenblat + +Licensed under the Apache License, Version 2.0 (the “License”); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. *) + +(* TODO(bbaren): Support attributes in the arguments. *) +fun page p = <xml> + <head> + <link rel="stylesheet" href="/material.css" /> + + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + + (* Disable tap highlight on IE. *) + <meta name="msapplication-tap-highlight" content="no" /> + + (* Color the status bar on mobile devices. *) + <meta name="theme-color" content="#9c27b0" /> + + {p.Head} + </head> + <body>{p.Body}</body> +</xml> + +structure AppBar = struct + style bar + style title + + fun make t = <xml> + <header class={bar}> + <h1 class={title}>{[t]}</h1> + </header> + </xml> +end diff --git a/mdl/mdlFfi.urs b/material/material.urs index 6e8188a..fe50869 100644 --- a/mdl/mdlFfi.urs +++ b/material/material.urs @@ -1,5 +1,4 @@ -(* Copyright 2015 Google Inc. -Copyright 2016 Benjamin Barenblat +(* Copyright 2016 Benjamin Barenblat Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the @@ -12,6 +11,8 @@ under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) -val upgradeAllRegistered : transaction unit +val page : {Head : xhead, Body : xbody} -> page -val showSnackbar : string (* id *) -> string (* text *) -> transaction unit +structure AppBar : sig + val make : string (* app title *) -> xbody +end diff --git a/mdl/classes b/mdl/classes deleted file mode 120000 index 9140837..0000000 --- a/mdl/classes +++ /dev/null @@ -1 +0,0 @@ -classes-1.1.3
\ No newline at end of file diff --git a/mdl/classes-1.1.3 b/mdl/classes-1.1.3 deleted file mode 100644 index e3ccf7e..0000000 --- a/mdl/classes-1.1.3 +++ /dev/null @@ -1,991 +0,0 @@ -browserupgrade -clearfix -focusable -has-drawer -has-scrolling-header -has-tabs -hidden -invisible -is-active -is-animating -is-casting-shadow -is-checked -is-compact -is-dirty -is-disabled -is-focused -is-invalid -is-lowest-value -is-selected -is-small-screen -is-upgraded -is-visible -material-icons -mdl-accordion -mdl-animation--default -mdl-animation--fast-out-linear-in -mdl-animation--fast-out-slow-in -mdl-animation--linear-out-slow-in -mdl-badge -mdl-badge--no-background -mdl-badge--overlap -mdl-button -mdl-button--accent -mdl-button--colored -mdl-button--disabled -mdl-button--fab -mdl-button--icon -mdl-button--mini-fab -mdl-button--mini-icon -mdl-button--primary -mdl-button--raised -mdl-button__ripple-container -mdl-card -mdl-card__actions -mdl-card--border -mdl-card--expand -mdl-card__media -mdl-card__menu -mdl-card__subtitle-text -mdl-card__supporting-text -mdl-card__title -mdl-card__title-text -mdl-cell -mdl-cell--10-col -mdl-cell--10-col-desktop -mdl-cell--10-col-phone -mdl-cell--10-col-tablet -mdl-cell--10-offset -mdl-cell--10-offset-desktop -mdl-cell--11-col -mdl-cell--11-col-desktop -mdl-cell--11-col-phone -mdl-cell--11-col-tablet -mdl-cell--11-offset -mdl-cell--11-offset-desktop -mdl-cell--12-col -mdl-cell--12-col-desktop -mdl-cell--12-col-phone -mdl-cell--12-col-tablet -mdl-cell--1-col -mdl-cell--1-col-desktop -mdl-cell--1-col-phone -mdl-cell--1-col-tablet -mdl-cell--1-offset -mdl-cell--1-offset-desktop -mdl-cell--1-offset-phone -mdl-cell--1-offset-tablet -mdl-cell--2-col -mdl-cell--2-col-desktop -mdl-cell--2-col-phone -mdl-cell--2-col-tablet -mdl-cell--2-offset -mdl-cell--2-offset-desktop -mdl-cell--2-offset-phone -mdl-cell--2-offset-tablet -mdl-cell--3-col -mdl-cell--3-col-desktop -mdl-cell--3-col-phone -mdl-cell--3-col-tablet -mdl-cell--3-offset -mdl-cell--3-offset-desktop -mdl-cell--3-offset-phone -mdl-cell--3-offset-tablet -mdl-cell--4-col -mdl-cell--4-col-desktop -mdl-cell--4-col-phone -mdl-cell--4-col-tablet -mdl-cell--4-offset -mdl-cell--4-offset-desktop -mdl-cell--4-offset-tablet -mdl-cell--5-col -mdl-cell--5-col-desktop -mdl-cell--5-col-phone -mdl-cell--5-col-tablet -mdl-cell--5-offset -mdl-cell--5-offset-desktop -mdl-cell--5-offset-tablet -mdl-cell--6-col -mdl-cell--6-col-desktop -mdl-cell--6-col-phone -mdl-cell--6-col-tablet -mdl-cell--6-offset -mdl-cell--6-offset-desktop -mdl-cell--6-offset-tablet -mdl-cell--7-col -mdl-cell--7-col-desktop -mdl-cell--7-col-phone -mdl-cell--7-col-tablet -mdl-cell--7-offset -mdl-cell--7-offset-desktop -mdl-cell--7-offset-tablet -mdl-cell--8-col -mdl-cell--8-col-desktop -mdl-cell--8-col-phone -mdl-cell--8-col-tablet -mdl-cell--8-offset -mdl-cell--8-offset-desktop -mdl-cell--9-col -mdl-cell--9-col-desktop -mdl-cell--9-col-phone -mdl-cell--9-col-tablet -mdl-cell--9-offset -mdl-cell--9-offset-desktop -mdl-cell--bottom -mdl-cell--hide-desktop -mdl-cell--hide-phone -mdl-cell--hide-tablet -mdl-cell--middle -mdl-cell--order-1 -mdl-cell--order-10 -mdl-cell--order-10-desktop -mdl-cell--order-10-phone -mdl-cell--order-10-tablet -mdl-cell--order-11 -mdl-cell--order-11-desktop -mdl-cell--order-11-phone -mdl-cell--order-11-tablet -mdl-cell--order-12 -mdl-cell--order-12-desktop -mdl-cell--order-12-phone -mdl-cell--order-12-tablet -mdl-cell--order-1-desktop -mdl-cell--order-1-phone -mdl-cell--order-1-tablet -mdl-cell--order-2 -mdl-cell--order-2-desktop -mdl-cell--order-2-phone -mdl-cell--order-2-tablet -mdl-cell--order-3 -mdl-cell--order-3-desktop -mdl-cell--order-3-phone -mdl-cell--order-3-tablet -mdl-cell--order-4 -mdl-cell--order-4-desktop -mdl-cell--order-4-phone -mdl-cell--order-4-tablet -mdl-cell--order-5 -mdl-cell--order-5-desktop -mdl-cell--order-5-phone -mdl-cell--order-5-tablet -mdl-cell--order-6 -mdl-cell--order-6-desktop -mdl-cell--order-6-phone -mdl-cell--order-6-tablet -mdl-cell--order-7 -mdl-cell--order-7-desktop -mdl-cell--order-7-phone -mdl-cell--order-7-tablet -mdl-cell--order-8 -mdl-cell--order-8-desktop -mdl-cell--order-8-phone -mdl-cell--order-8-tablet -mdl-cell--order-9 -mdl-cell--order-9-desktop -mdl-cell--order-9-phone -mdl-cell--order-9-tablet -mdl-cell--stretch -mdl-cell--top -mdl-checkbox -mdl-checkbox__box-outline -mdl-checkbox__focus-helper -mdl-checkbox__input -mdl-checkbox__label -mdl-checkbox__ripple-container -mdl-checkbox__tick-outline -mdl-color--accent -mdl-color--accent-contrast -mdl-color--amber -mdl-color--amber-100 -mdl-color--amber-200 -mdl-color--amber-300 -mdl-color--amber-400 -mdl-color--amber-50 -mdl-color--amber-500 -mdl-color--amber-600 -mdl-color--amber-700 -mdl-color--amber-800 -mdl-color--amber-900 -mdl-color--amber-A100 -mdl-color--amber-A200 -mdl-color--amber-A400 -mdl-color--amber-A700 -mdl-color--black -mdl-color--blue -mdl-color--blue-100 -mdl-color--blue-200 -mdl-color--blue-300 -mdl-color--blue-400 -mdl-color--blue-50 -mdl-color--blue-500 -mdl-color--blue-600 -mdl-color--blue-700 -mdl-color--blue-800 -mdl-color--blue-900 -mdl-color--blue-A100 -mdl-color--blue-A200 -mdl-color--blue-A400 -mdl-color--blue-A700 -mdl-color--blue-grey -mdl-color--blue-grey-100 -mdl-color--blue-grey-200 -mdl-color--blue-grey-300 -mdl-color--blue-grey-400 -mdl-color--blue-grey-50 -mdl-color--blue-grey-500 -mdl-color--blue-grey-600 -mdl-color--blue-grey-700 -mdl-color--blue-grey-800 -mdl-color--blue-grey-900 -mdl-color--brown -mdl-color--brown-100 -mdl-color--brown-200 -mdl-color--brown-300 -mdl-color--brown-400 -mdl-color--brown-50 -mdl-color--brown-500 -mdl-color--brown-600 -mdl-color--brown-700 -mdl-color--brown-800 -mdl-color--brown-900 -mdl-color--cyan -mdl-color--cyan-100 -mdl-color--cyan-200 -mdl-color--cyan-300 -mdl-color--cyan-400 -mdl-color--cyan-50 -mdl-color--cyan-500 -mdl-color--cyan-600 -mdl-color--cyan-700 -mdl-color--cyan-800 -mdl-color--cyan-900 -mdl-color--cyan-A100 -mdl-color--cyan-A200 -mdl-color--cyan-A400 -mdl-color--cyan-A700 -mdl-color--deep-orange -mdl-color--deep-orange-100 -mdl-color--deep-orange-200 -mdl-color--deep-orange-300 -mdl-color--deep-orange-400 -mdl-color--deep-orange-50 -mdl-color--deep-orange-500 -mdl-color--deep-orange-600 -mdl-color--deep-orange-700 -mdl-color--deep-orange-800 -mdl-color--deep-orange-900 -mdl-color--deep-orange-A100 -mdl-color--deep-orange-A200 -mdl-color--deep-orange-A400 -mdl-color--deep-orange-A700 -mdl-color--deep-purple -mdl-color--deep-purple-100 -mdl-color--deep-purple-200 -mdl-color--deep-purple-300 -mdl-color--deep-purple-400 -mdl-color--deep-purple-50 -mdl-color--deep-purple-500 -mdl-color--deep-purple-600 -mdl-color--deep-purple-700 -mdl-color--deep-purple-800 -mdl-color--deep-purple-900 -mdl-color--deep-purple-A100 -mdl-color--deep-purple-A200 -mdl-color--deep-purple-A400 -mdl-color--deep-purple-A700 -mdl-color--green -mdl-color--green-100 -mdl-color--green-200 -mdl-color--green-300 -mdl-color--green-400 -mdl-color--green-50 -mdl-color--green-500 -mdl-color--green-600 -mdl-color--green-700 -mdl-color--green-800 -mdl-color--green-900 -mdl-color--green-A100 -mdl-color--green-A200 -mdl-color--green-A400 -mdl-color--green-A700 -mdl-color--grey -mdl-color--grey-100 -mdl-color--grey-200 -mdl-color--grey-300 -mdl-color--grey-400 -mdl-color--grey-50 -mdl-color--grey-500 -mdl-color--grey-600 -mdl-color--grey-700 -mdl-color--grey-800 -mdl-color--grey-900 -mdl-color--indigo -mdl-color--indigo-100 -mdl-color--indigo-200 -mdl-color--indigo-300 -mdl-color--indigo-400 -mdl-color--indigo-50 -mdl-color--indigo-500 -mdl-color--indigo-600 -mdl-color--indigo-700 -mdl-color--indigo-800 -mdl-color--indigo-900 -mdl-color--indigo-A100 -mdl-color--indigo-A200 -mdl-color--indigo-A400 -mdl-color--indigo-A700 -mdl-color--light-blue -mdl-color--light-blue-100 -mdl-color--light-blue-200 -mdl-color--light-blue-300 -mdl-color--light-blue-400 -mdl-color--light-blue-50 -mdl-color--light-blue-500 -mdl-color--light-blue-600 -mdl-color--light-blue-700 -mdl-color--light-blue-800 -mdl-color--light-blue-900 -mdl-color--light-blue-A100 -mdl-color--light-blue-A200 -mdl-color--light-blue-A400 -mdl-color--light-blue-A700 -mdl-color--light-green -mdl-color--light-green-100 -mdl-color--light-green-200 -mdl-color--light-green-300 -mdl-color--light-green-400 -mdl-color--light-green-50 -mdl-color--light-green-500 -mdl-color--light-green-600 -mdl-color--light-green-700 -mdl-color--light-green-800 -mdl-color--light-green-900 -mdl-color--light-green-A100 -mdl-color--light-green-A200 -mdl-color--light-green-A400 -mdl-color--light-green-A700 -mdl-color--lime -mdl-color--lime-100 -mdl-color--lime-200 -mdl-color--lime-300 -mdl-color--lime-400 -mdl-color--lime-50 -mdl-color--lime-500 -mdl-color--lime-600 -mdl-color--lime-700 -mdl-color--lime-800 -mdl-color--lime-900 -mdl-color--lime-A100 -mdl-color--lime-A200 -mdl-color--lime-A400 -mdl-color--lime-A700 -mdl-color--orange -mdl-color--orange-100 -mdl-color--orange-200 -mdl-color--orange-300 -mdl-color--orange-400 -mdl-color--orange-50 -mdl-color--orange-500 -mdl-color--orange-600 -mdl-color--orange-700 -mdl-color--orange-800 -mdl-color--orange-900 -mdl-color--orange-A100 -mdl-color--orange-A200 -mdl-color--orange-A400 -mdl-color--orange-A700 -mdl-color--pink -mdl-color--pink-100 -mdl-color--pink-200 -mdl-color--pink-300 -mdl-color--pink-400 -mdl-color--pink-50 -mdl-color--pink-500 -mdl-color--pink-600 -mdl-color--pink-700 -mdl-color--pink-800 -mdl-color--pink-900 -mdl-color--pink-A100 -mdl-color--pink-A200 -mdl-color--pink-A400 -mdl-color--pink-A700 -mdl-color--primary -mdl-color--primary-contrast -mdl-color--primary-dark -mdl-color--purple -mdl-color--purple-100 -mdl-color--purple-200 -mdl-color--purple-300 -mdl-color--purple-400 -mdl-color--purple-50 -mdl-color--purple-500 -mdl-color--purple-600 -mdl-color--purple-700 -mdl-color--purple-800 -mdl-color--purple-900 -mdl-color--purple-A100 -mdl-color--purple-A200 -mdl-color--purple-A400 -mdl-color--purple-A700 -mdl-color--red -mdl-color--red-100 -mdl-color--red-200 -mdl-color--red-300 -mdl-color--red-400 -mdl-color--red-50 -mdl-color--red-500 -mdl-color--red-600 -mdl-color--red-700 -mdl-color--red-800 -mdl-color--red-900 -mdl-color--red-A100 -mdl-color--red-A200 -mdl-color--red-A400 -mdl-color--red-A700 -mdl-color--teal -mdl-color--teal-100 -mdl-color--teal-200 -mdl-color--teal-300 -mdl-color--teal-400 -mdl-color--teal-50 -mdl-color--teal-500 -mdl-color--teal-600 -mdl-color--teal-700 -mdl-color--teal-800 -mdl-color--teal-900 -mdl-color--teal-A100 -mdl-color--teal-A200 -mdl-color--teal-A400 -mdl-color--teal-A700 -mdl-color-text--accent -mdl-color-text--accent-contrast -mdl-color-text--amber -mdl-color-text--amber-100 -mdl-color-text--amber-200 -mdl-color-text--amber-300 -mdl-color-text--amber-400 -mdl-color-text--amber-50 -mdl-color-text--amber-500 -mdl-color-text--amber-600 -mdl-color-text--amber-700 -mdl-color-text--amber-800 -mdl-color-text--amber-900 -mdl-color-text--amber-A100 -mdl-color-text--amber-A200 -mdl-color-text--amber-A400 -mdl-color-text--amber-A700 -mdl-color-text--black -mdl-color-text--blue -mdl-color-text--blue-100 -mdl-color-text--blue-200 -mdl-color-text--blue-300 -mdl-color-text--blue-400 -mdl-color-text--blue-50 -mdl-color-text--blue-500 -mdl-color-text--blue-600 -mdl-color-text--blue-700 -mdl-color-text--blue-800 -mdl-color-text--blue-900 -mdl-color-text--blue-A100 -mdl-color-text--blue-A200 -mdl-color-text--blue-A400 -mdl-color-text--blue-A700 -mdl-color-text--blue-grey -mdl-color-text--blue-grey-100 -mdl-color-text--blue-grey-200 -mdl-color-text--blue-grey-300 -mdl-color-text--blue-grey-400 -mdl-color-text--blue-grey-50 -mdl-color-text--blue-grey-500 -mdl-color-text--blue-grey-600 -mdl-color-text--blue-grey-700 -mdl-color-text--blue-grey-800 -mdl-color-text--blue-grey-900 -mdl-color-text--brown -mdl-color-text--brown-100 -mdl-color-text--brown-200 -mdl-color-text--brown-300 -mdl-color-text--brown-400 -mdl-color-text--brown-50 -mdl-color-text--brown-500 -mdl-color-text--brown-600 -mdl-color-text--brown-700 -mdl-color-text--brown-800 -mdl-color-text--brown-900 -mdl-color-text--cyan -mdl-color-text--cyan-100 -mdl-color-text--cyan-200 -mdl-color-text--cyan-300 -mdl-color-text--cyan-400 -mdl-color-text--cyan-50 -mdl-color-text--cyan-500 -mdl-color-text--cyan-600 -mdl-color-text--cyan-700 -mdl-color-text--cyan-800 -mdl-color-text--cyan-900 -mdl-color-text--cyan-A100 -mdl-color-text--cyan-A200 -mdl-color-text--cyan-A400 -mdl-color-text--cyan-A700 -mdl-color-text--deep-orange -mdl-color-text--deep-orange-100 -mdl-color-text--deep-orange-200 -mdl-color-text--deep-orange-300 -mdl-color-text--deep-orange-400 -mdl-color-text--deep-orange-50 -mdl-color-text--deep-orange-500 -mdl-color-text--deep-orange-600 -mdl-color-text--deep-orange-700 -mdl-color-text--deep-orange-800 -mdl-color-text--deep-orange-900 -mdl-color-text--deep-orange-A100 -mdl-color-text--deep-orange-A200 -mdl-color-text--deep-orange-A400 -mdl-color-text--deep-orange-A700 -mdl-color-text--deep-purple -mdl-color-text--deep-purple-100 -mdl-color-text--deep-purple-200 -mdl-color-text--deep-purple-300 -mdl-color-text--deep-purple-400 -mdl-color-text--deep-purple-50 -mdl-color-text--deep-purple-500 -mdl-color-text--deep-purple-600 -mdl-color-text--deep-purple-700 -mdl-color-text--deep-purple-800 -mdl-color-text--deep-purple-900 -mdl-color-text--deep-purple-A100 -mdl-color-text--deep-purple-A200 -mdl-color-text--deep-purple-A400 -mdl-color-text--deep-purple-A700 -mdl-color-text--green -mdl-color-text--green-100 -mdl-color-text--green-200 -mdl-color-text--green-300 -mdl-color-text--green-400 -mdl-color-text--green-50 -mdl-color-text--green-500 -mdl-color-text--green-600 -mdl-color-text--green-700 -mdl-color-text--green-800 -mdl-color-text--green-900 -mdl-color-text--green-A100 -mdl-color-text--green-A200 -mdl-color-text--green-A400 -mdl-color-text--green-A700 -mdl-color-text--grey -mdl-color-text--grey-100 -mdl-color-text--grey-200 -mdl-color-text--grey-300 -mdl-color-text--grey-400 -mdl-color-text--grey-50 -mdl-color-text--grey-500 -mdl-color-text--grey-600 -mdl-color-text--grey-700 -mdl-color-text--grey-800 -mdl-color-text--grey-900 -mdl-color-text--indigo -mdl-color-text--indigo-100 -mdl-color-text--indigo-200 -mdl-color-text--indigo-300 -mdl-color-text--indigo-400 -mdl-color-text--indigo-50 -mdl-color-text--indigo-500 -mdl-color-text--indigo-600 -mdl-color-text--indigo-700 -mdl-color-text--indigo-800 -mdl-color-text--indigo-900 -mdl-color-text--indigo-A100 -mdl-color-text--indigo-A200 -mdl-color-text--indigo-A400 -mdl-color-text--indigo-A700 -mdl-color-text--light-blue -mdl-color-text--light-blue-100 -mdl-color-text--light-blue-200 -mdl-color-text--light-blue-300 -mdl-color-text--light-blue-400 -mdl-color-text--light-blue-50 -mdl-color-text--light-blue-500 -mdl-color-text--light-blue-600 -mdl-color-text--light-blue-700 -mdl-color-text--light-blue-800 -mdl-color-text--light-blue-900 -mdl-color-text--light-blue-A100 -mdl-color-text--light-blue-A200 -mdl-color-text--light-blue-A400 -mdl-color-text--light-blue-A700 -mdl-color-text--light-green -mdl-color-text--light-green-100 -mdl-color-text--light-green-200 -mdl-color-text--light-green-300 -mdl-color-text--light-green-400 -mdl-color-text--light-green-50 -mdl-color-text--light-green-500 -mdl-color-text--light-green-600 -mdl-color-text--light-green-700 -mdl-color-text--light-green-800 -mdl-color-text--light-green-900 -mdl-color-text--light-green-A100 -mdl-color-text--light-green-A200 -mdl-color-text--light-green-A400 -mdl-color-text--light-green-A700 -mdl-color-text--lime -mdl-color-text--lime-100 -mdl-color-text--lime-200 -mdl-color-text--lime-300 -mdl-color-text--lime-400 -mdl-color-text--lime-50 -mdl-color-text--lime-500 -mdl-color-text--lime-600 -mdl-color-text--lime-700 -mdl-color-text--lime-800 -mdl-color-text--lime-900 -mdl-color-text--lime-A100 -mdl-color-text--lime-A200 -mdl-color-text--lime-A400 -mdl-color-text--lime-A700 -mdl-color-text--orange -mdl-color-text--orange-100 -mdl-color-text--orange-200 -mdl-color-text--orange-300 -mdl-color-text--orange-400 -mdl-color-text--orange-50 -mdl-color-text--orange-500 -mdl-color-text--orange-600 -mdl-color-text--orange-700 -mdl-color-text--orange-800 -mdl-color-text--orange-900 -mdl-color-text--orange-A100 -mdl-color-text--orange-A200 -mdl-color-text--orange-A400 -mdl-color-text--orange-A700 -mdl-color-text--pink -mdl-color-text--pink-100 -mdl-color-text--pink-200 -mdl-color-text--pink-300 -mdl-color-text--pink-400 -mdl-color-text--pink-50 -mdl-color-text--pink-500 -mdl-color-text--pink-600 -mdl-color-text--pink-700 -mdl-color-text--pink-800 -mdl-color-text--pink-900 -mdl-color-text--pink-A100 -mdl-color-text--pink-A200 -mdl-color-text--pink-A400 -mdl-color-text--pink-A700 -mdl-color-text--primary -mdl-color-text--primary-contrast -mdl-color-text--primary-dark -mdl-color-text--purple -mdl-color-text--purple-100 -mdl-color-text--purple-200 -mdl-color-text--purple-300 -mdl-color-text--purple-400 -mdl-color-text--purple-50 -mdl-color-text--purple-500 -mdl-color-text--purple-600 -mdl-color-text--purple-700 -mdl-color-text--purple-800 -mdl-color-text--purple-900 -mdl-color-text--purple-A100 -mdl-color-text--purple-A200 -mdl-color-text--purple-A400 -mdl-color-text--purple-A700 -mdl-color-text--red -mdl-color-text--red-100 -mdl-color-text--red-200 -mdl-color-text--red-300 -mdl-color-text--red-400 -mdl-color-text--red-50 -mdl-color-text--red-500 -mdl-color-text--red-600 -mdl-color-text--red-700 -mdl-color-text--red-800 -mdl-color-text--red-900 -mdl-color-text--red-A100 -mdl-color-text--red-A200 -mdl-color-text--red-A400 -mdl-color-text--red-A700 -mdl-color-text--teal -mdl-color-text--teal-100 -mdl-color-text--teal-200 -mdl-color-text--teal-300 -mdl-color-text--teal-400 -mdl-color-text--teal-50 -mdl-color-text--teal-500 -mdl-color-text--teal-600 -mdl-color-text--teal-700 -mdl-color-text--teal-800 -mdl-color-text--teal-900 -mdl-color-text--teal-A100 -mdl-color-text--teal-A200 -mdl-color-text--teal-A400 -mdl-color-text--teal-A700 -mdl-color-text--white -mdl-color-text--yellow -mdl-color-text--yellow-100 -mdl-color-text--yellow-200 -mdl-color-text--yellow-300 -mdl-color-text--yellow-400 -mdl-color-text--yellow-50 -mdl-color-text--yellow-500 -mdl-color-text--yellow-600 -mdl-color-text--yellow-700 -mdl-color-text--yellow-800 -mdl-color-text--yellow-900 -mdl-color-text--yellow-A100 -mdl-color-text--yellow-A200 -mdl-color-text--yellow-A400 -mdl-color-text--yellow-A700 -mdl-color--white -mdl-color--yellow -mdl-color--yellow-100 -mdl-color--yellow-200 -mdl-color--yellow-300 -mdl-color--yellow-400 -mdl-color--yellow-50 -mdl-color--yellow-500 -mdl-color--yellow-600 -mdl-color--yellow-700 -mdl-color--yellow-800 -mdl-color--yellow-900 -mdl-color--yellow-A100 -mdl-color--yellow-A200 -mdl-color--yellow-A400 -mdl-color--yellow-A700 -mdl-data-table -mdl-data-table__cell--non-numeric -mdl-data-table__header--sorted-ascending -mdl-data-table__header--sorted-descending -mdl-data-table__select -mdl-data-table--selectable -mdl-dialog -mdl-dialog__actions -mdl-dialog__actions--full-width -mdl-dialog__content -mdl-dialog__title -mdl-dropdown-menu -mdl-grid -mdl-grid--no-spacing -mdl-icon-toggle -mdl-icon-toggle__input -mdl-icon-toggle__label -mdl-icon-toggle__ripple-container -mdl-item -mdl-js-button -mdl-js-checkbox -mdl-js-data-table -mdl-js-icon-toggle -mdl-js-layout -mdl-js-menu -mdl-js-progress -mdl-js-radio -mdl-js-ripple-effect -mdl-js-ripple-effect--ignore-events -mdl-js-slider -mdl-js-snackbar -mdl-js-spinner -mdl-js-switch -mdl-js-tabs -mdl-js-textfield -mdl-js-tooltip -mdl-layout -mdl-layout__container -mdl-layout__content -mdl-layout__drawer -mdl-layout__drawer-button -mdl-layout--fixed-drawer -mdl-layout--fixed-header -mdl-layout--fixed-tabs -mdl-layout__header -mdl-layout__header-row -mdl-layout__header--scroll -mdl-layout__header--seamed -mdl-layout__header--transparent -mdl-layout__header--waterfall -mdl-layout__header--waterfall-hide-top -mdl-layout-icon -mdl-layout--large-screen-only -mdl-layout--no-desktop-drawer-button -mdl-layout--no-drawer-button -mdl-layout__obfuscator -mdl-layout--small-screen-only -mdl-layout-spacer -mdl-layout__tab -mdl-layout__tab-bar -mdl-layout__tab-bar-button -mdl-layout__tab-bar-container -mdl-layout__tab-bar-left-button -mdl-layout__tab-bar-right-button -mdl-layout__tab-panel -mdl-layout__tab-ripple-container -mdl-layout__title -mdl-layout-title -mdl-list -mdl-list__item -mdl-list__item-avatar -mdl-list__item-icon -mdl-list__item-primary-content -mdl-list__item-secondary-action -mdl-list__item-secondary-content -mdl-list__item-secondary-info -mdl-list__item-sub-header -mdl-list__item-sub-title -mdl-list__item-text-body -mdl-list__item--three-line -mdl-list__item--two-line -mdl-logo -mdl-mega-footer -mdl-mega-footer__bottom-section -mdl-mega-footer--bottom-section -mdl-mega-footer__drop-down-section -mdl-mega-footer--drop-down-section -mdl-mega-footer__heading -mdl-mega-footer--heading -mdl-mega-footer__heading-checkbox -mdl-mega-footer--heading-checkbox -mdl-mega-footer__left-section -mdl-mega-footer--left-section -mdl-mega-footer__link-list -mdl-mega-footer--link-list -mdl-mega-footer__middle-section -mdl-mega-footer--middle-section -mdl-mega-footer__right-section -mdl-mega-footer--right-section -mdl-mega-footer__social-btn -mdl-mega-footer--social-btn -mdl-mega-footer__top-section -mdl-mega-footer--top-section -mdl-menu -mdl-menu--bottom-left -mdl-menu--bottom-right -mdl-menu__container -mdl-menu__item -mdl-menu__item--full-bleed-divider -mdl-menu__item--ripple-container -mdl-menu__item-ripple-container -mdl-menu__outline -mdl-menu--top-left -mdl-menu--top-right -mdl-menu--unaligned -mdl-mini-footer -mdl-mini-footer__left-section -mdl-mini-footer--left-section -mdl-mini-footer__link-list -mdl-mini-footer--link-list -mdl-mini-footer__right-section -mdl-mini-footer--right-section -mdl-mini-footer__social-btn -mdl-mini-footer--social-btn -mdl-navigation -mdl-navigation__link -mdl-navigation__link--current -mdl-progress -mdl-progress__indeterminate -mdl-progress--indeterminate -mdl-radio -mdl-radio__button -mdl-radio__inner-circle -mdl-radio__label -mdl-radio__outer-circle -mdl-radio__ripple-container -mdl-ripple -mdl-ripple--center -mdl-shadow--16dp -mdl-shadow--24dp -mdl-shadow--2dp -mdl-shadow--3dp -mdl-shadow--4dp -mdl-shadow--6dp -mdl-shadow--8dp -mdl-slider -mdl-slider__background-flex -mdl-slider__background-lower -mdl-slider__background-upper -mdl-slider__container -mdl-slider__ie-container -mdl-snackbar -mdl-snackbar__action -mdl-snackbar--active -mdl-snackbar__text -mdl-spinner -mdl-spinner__circle -mdl-spinner__circle-clipper -mdl-spinner__gap-patch -mdl-spinner__layer -mdl-spinner__layer-1 -mdl-spinner__layer-2 -mdl-spinner__layer-3 -mdl-spinner__layer-4 -mdl-spinner__left -mdl-spinner__right -mdl-spinner--single-color -mdl-styleguide -mdl-switch -mdl-switch__focus-helper -mdl-switch__input -mdl-switch__label -mdl-switch__ripple-container -mdl-switch__thumb -mdl-switch__track -mdl-tabs -mdl-tabs__panel -mdl-tabs__ripple-container -mdl-tabs__tab -mdl-tabs__tab-bar -mdl-textfield -mdl-textfield--align-right -mdl-textfield__error -mdl-textfield--expandable -mdl-textfield__expandable-holder -mdl-textfield--floating-label -mdl-textfield--full-width -mdl-textfield__input -mdl-textfield__label -mdl-tooltip -mdl-tooltip--large -mdl-typography--body-1 -mdl-typography--body-1-color-contrast -mdl-typography--body-1-force-preferred-font -mdl-typography--body-1-force-preferred-font-color-contrast -mdl-typography--body-2 -mdl-typography--body-2-color-contrast -mdl-typography--body-2-force-preferred-font -mdl-typography--body-2-force-preferred-font-color-contrast -mdl-typography--button -mdl-typography--button-color-contrast -mdl-typography--caption -mdl-typography--caption-color-contrast -mdl-typography--caption-force-preferred-font -mdl-typography--caption-force-preferred-font-color-contrast -mdl-typography--display-1 -mdl-typography--display-1-color-contrast -mdl-typography--display-2 -mdl-typography--display-2-color-contrast -mdl-typography--display-3 -mdl-typography--display-3-color-contrast -mdl-typography--display-4 -mdl-typography--display-4-color-contrast -mdl-typography--font-black -mdl-typography--font-bold -mdl-typography--font-light -mdl-typography--font-medium -mdl-typography--font-regular -mdl-typography--font-thin -mdl-typography--headline -mdl-typography--headline-color-contrast -mdl-typography--menu -mdl-typography--menu-color-contrast -mdl-typography--subhead -mdl-typography--subhead-color-contrast -mdl-typography--text-capitalize -mdl-typography--text-center -mdl-typography--text-justify -mdl-typography--text-left -mdl-typography--text-lowercase -mdl-typography--text-nowrap -mdl-typography--text-right -mdl-typography--text-uppercase -mdl-typography--title -mdl-typography--title-color-contrast -visuallyhidden diff --git a/mdl/lib.urp b/mdl/lib.urp deleted file mode 100644 index e4447db..0000000 --- a/mdl/lib.urp +++ /dev/null @@ -1,11 +0,0 @@ -benignEffectful MdlFfi.showSnackbar -benignEffectful MdlFfi.upgradeAllRegistered -ffi mdlFfi -file /zoBIS4V6.js mdlFfi.js -html5 -jsFunc MdlFfi.showSnackbar=UrWeb.MdlFfi.showSnackbar -jsFunc MdlFfi.upgradeAllRegistered=componentHandler.upgradeAllRegistered -library mdlClasses -script /zoBIS4V6.js - -mdl diff --git a/mdl/mdl.ur b/mdl/mdl.ur deleted file mode 100644 index 90f03a1..0000000 --- a/mdl/mdl.ur +++ /dev/null @@ -1,49 +0,0 @@ -(* Copyright 2015 Google Inc. -Copyright 2016 Benjamin Barenblat - -Licensed under the Apache License, Version 2.0 (the “License”); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. *) - -structure Classes = MdlClasses -open Classes - -val upgradeAllRegistered = MdlFfi.upgradeAllRegistered - -structure Textbox = struct - fun make (placeholder : string) : transaction {Source : source string, - Xml : xbody} = - contents <- source ""; - id <- fresh; - return { - Source = contents, - Xml = <xml> - <div class="mdl-textfield mdl-js-textfield"> - <ctextbox class="mdl-textfield__input" id={id} source={contents} /> - <label class="mdl-textfield__label" for={id}>{[placeholder]}</label> - </div> - </xml> - } -end - -structure Toast = struct - val make : transaction {Placeholder: xbody, - Show: string -> transaction unit} = - id <- fresh; - return { - Placeholder = <xml> - <div id={id} class="mdl-js-snackbar mdl-snackbar"> - <div class="mdl-snackbar__text" /> - <button class="mdl-snackbar__action"></button> - </div> - </xml>, - Show = MdlFfi.showSnackbar (show id) - } -end diff --git a/mdl/mdlFfi.js b/mdl/mdlFfi.js deleted file mode 100644 index f961cab..0000000 --- a/mdl/mdlFfi.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2015 Google Inc. -// Copyright 2016 Benjamin Barenblat -// -// Licensed under the Apache License, Version 2.0 (the “License”); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an “AS IS” BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -"use strict"; - -var UrWeb = { - MdlFfi: { - - showSnackbar: - function(id, text) { - document.querySelector('#' + id) - .MaterialSnackbar.showSnackbar({message: text}); - }, - - } -}; // UrWeb.MdlFfi @@ -11,16 +11,6 @@ under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -header .mdl-button { - color: inherit; -} - .Main_hidden { display: none; } - -.mdl-button--fab { - position: fixed; - right: 16px; - bottom: 16px; -} @@ -3,12 +3,10 @@ allow meta theme-color allow meta viewport allow responseHeader X-UA-Compatible allow url https://fonts.googleapis.com/* -allow url https://code.getmdl.io/* database dbname=ugtd.db dbms sqlite file /ugtd.css ugtd.css -library mdl -script https://storage.googleapis.com/code.getmdl.io/1.1.3/material.min.js +library material sql initialize.sql rewrite url Main/main |