diff --git a/LICENSE.mdown b/LICENSE.mdown index 6267be9..eb791bb 100644 --- a/LICENSE.mdown +++ b/LICENSE.mdown @@ -1,7 +1,7 @@ License ======= -Copyright 2010 Dave Balmer, Jr. All rights reserved. +Copyright 2010-2013 Dave Balmer, Jr. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.mdown b/README.mdown index 3029343..a0739ee 100644 --- a/README.mdown +++ b/README.mdown @@ -43,16 +43,11 @@ Important files in the directory tree are: will need to build the library to make this file (as well as the un-minified version `jo.js` which is useful for debugging). -- `css/aluminum` +- `css/flattery/*` - This is a CSS3 bundle ready to ship your app with. Also serves as a good example + This is the new CSS3 bundle ready to ship your app with. Also serves as a good example of modern HTML5 styling capabilities. Looks pretty bad in IE up through version 8. -- `css/jo.css` - - This is a newer base CSS theme for Jo, preferred over Aluminum for now. Built with - Less CSS compiler. - - `docs/*.mdown` These are supplimental doc files which are used by joDoc to build out the diff --git a/build b/build index 0b05804..0af5129 100755 --- a/build +++ b/build @@ -2,13 +2,13 @@ echo "Building jo.js" cd js/core -cat log.js _jo.js dom.js event.js subject.js time.js yield.js cache.js clipboard.js local.js > ../jo.js +cat log.js _jo.js dom.js event.js subject.js time.js yield.js cache.js clipboard.js local.js queue.js timer.js > ../jo.js cd ../data -cat datasource.js record.js database.js sqldatasource.js filesource.js script.js preference.js yql.js dispatch.js >> ../jo.js +cat datasource.js record.js database.js sqldatasource.js filesource.js script.js preference.js yql.js dispatch.js template.js >> ../jo.js cd ../ui -cat interface.js collect.js view.js container.js control.js button.js list.js busy.js caption.js card.js stack.js scroller.js divider.js expando.js expandotitle.js flexrow.js focus.js footer.js gesture.js group.js html.js input.js label.js menu.js option.js passwordinput.js popup.js screen.js shim.js sound.js stackscroller.js tabbar.js table.js textarea.js title.js toolbar.js form.js dialog.js selectlist.js navbar.js select.js toggle.js slider.js >> ../jo.js +cat interface.js collect.js view.js container.js control.js button.js list.js busy.js caption.js card.js stack.js scroller.js divider.js expando.js expandotitle.js flexrow.js focus.js footer.js gesture.js group.js html.js input.js label.js menu.js option.js passwordinput.js popup.js screen.js shim.js sound.js stackscroller.js tabbar.js table.js textarea.js title.js toolbar.js form.js dialog.js selectlist.js navbar.js select.js toggle.js slider.js image.js canvas.js >> ../jo.js cd .. echo "Done." diff --git a/build.bat b/build.bat index c4f492c..8acde01 100644 --- a/build.bat +++ b/build.bat @@ -6,13 +6,13 @@ goto wrongdir echo "Building js\jo.js" cd js\core -copy log.js + _jo.js + dom.js + event.js + subject.js + time.js + yield.js + cache.js + clipboard.js + local.js ..\jo_core.js +copy log.js + _jo.js + dom.js + event.js + subject.js + time.js + yield.js + cache.js + clipboard.js + local.js + timer.js + queue.js ..\jo_core.js cd ..\data -copy datasource.js + record.js + database.js + filesource.js + sqldatasource.js + script.js + preference.js + yql.js + dispatch.js ..\jo_data.js +copy datasource.js + record.js + database.js + filesource.js + sqldatasource.js + script.js + preference.js + yql.js + dispatch.js + template.js ..\jo_data.js cd ..\ui -copy collect.js + interface.js + view.js + container.js + control.js + button.js + list.js + busy.js + caption.js + card.js + stack.js + scroller.js + divider.js + expando.js + expandotitle.js + flexrow.js + focus.js + footer.js + gesture.js + group.js + html.js + input.js + label.js + menu.js + option.js + passwordinput.js + popup.js + screen.js + shim.js + sound.js + stackscroller.js + tabbar.js + table.js + textarea.js + title.js + toolbar.js + form.js + dialog.js + selectlist.js + navbar.js + select.js + toggle.js + slider.js ..\jo_ui.js +copy collect.js + interface.js + view.js + container.js + control.js + button.js + list.js + busy.js + caption.js + card.js + stack.js + scroller.js + divider.js + expando.js + expandotitle.js + flexrow.js + focus.js + footer.js + gesture.js + group.js + html.js + input.js + label.js + menu.js + option.js + passwordinput.js + popup.js + screen.js + shim.js + sound.js + stackscroller.js + tabbar.js + table.js + textarea.js + title.js + toolbar.js + form.js + dialog.js + selectlist.js + navbar.js + select.js + toggle.js + slider.js + image.js + canvas.js ..\jo_ui.js cd .. diff --git a/css/bootstrap/jo.bootstrap.css b/css/bootstrap/jo.bootstrap.css index c4f7224..fa948a7 100644 --- a/css/bootstrap/jo.bootstrap.css +++ b/css/bootstrap/jo.bootstrap.css @@ -1005,3 +1005,31 @@ jobackbutton { border-color: #424242; font-size: 85%; } + +.nativescroll jostack { width: 100%; position: relative; } + +.nativescroll joscroller { + position: absolute; + display: block; + height: auto; + width: auto; + top: 0; left: 0; bottom: 0; right: 0; + overflow: auto; + padding: 0; + margin: 0; + -webkit-overflow-scrolling: touch; +} + +.nativescroll jocontainer { + height: inherit; +} + +.nativescroll joscroller { + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + diff --git a/css/flat/jo.flat.css b/css/flat/jo.flat.css index 60852e0..b2921cc 100644 --- a/css/flat/jo.flat.css +++ b/css/flat/jo.flat.css @@ -1001,3 +1001,31 @@ jobackbutton { border-color: #424242; font-size: 85%; } + +.nativescroll jostack { width: 100%; position: relative; } + +.nativescroll joscroller { + position: absolute; + display: block; + height: auto; + width: auto; + top: 0; left: 0; bottom: 0; right: 0; + overflow: auto; + padding: 0; + margin: 0; + -webkit-overflow-scrolling: touch; +} + +.nativescroll jocontainer { + height: inherit; +} + +.nativescroll joscroller { + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + diff --git a/css/flattery/README.md b/css/flattery/README.md new file mode 100644 index 0000000..bba5973 --- /dev/null +++ b/css/flattery/README.md @@ -0,0 +1,26 @@ +Jo Flattery Theme +================= + +Clean, flat design style which uses a custom font for glyphs and no image files. + +- Simple cross-platform unified look for your app +- Fast load time +- Quick render time +- Easy to customize +- Easy to scale +- Includes commonly-used glyphs in the custom font created with icomoon (feel +free to create your own) + +Required Files +-------------- + +`jo-flattery.css` Main CSS file +`jo-flattery.ttf` Glyph font +`jo-flattery.woff` Glyph font for older MSIE browsers (and WP8) + +Build File +---------- + +`jo.flattery.less` requires less.js to build. Easy to tweak style preferences +to suit your project (e.g. colors, size, spacing, rounding, borders). + diff --git a/css/flattery/jo-flattery.css b/css/flattery/jo-flattery.css new file mode 100644 index 0000000..6fb98ab --- /dev/null +++ b/css/flattery/jo-flattery.css @@ -0,0 +1,1021 @@ +@font-face { + font-family: 'jo-flattery'; + src: url('jo-flattery.eot'); + src: url('jo-flattery.eot?#iefix') format('embedded-opentype'), url('jo-flattery.ttf') format('truetype'), url('jo-flattery.woff') format('woff'); + font-weight: normal; + font-style: normal; +} +::selection { + background: #4f5b98; + /* Safari */ + color: #fff; +} +::-moz-selection { + background: #4f5b98; + /* Firefox */ + color: #fff; +} +body { + margin: 0; + padding: 0; + background: #ffffff; + word-wrap: break-word; + overflow: hidden; + font: normal 14px "Helvetica", "Droid Sans", "Trebuchet MS"; +} +jobutton, +joview, +jolist, +jolistitem, +jomenu, +jomenuitem, +joexpando, +joexpandotitle, +jogroup, +jocard, +jostack, +jotitle, +jocaption, +jolabel, +jodivider, +joinput, +input, +textarea, +jotextarea, +jooption, +jooptionitem, +jonavbar, +jocontainer, +jotoggle, +joslider, +josliderthumb { + display: block; + margin: 0; + padding: 0; + -webkit-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; + -webkit-background-clip: padding-box; + /* background: transparent; */ +} +/* +em, i, b, span, u, a, button, input { + display: inline; +} +*/ +.noflex { + -webkit-box-flex: 0; + -moz-box-flex: 0; + -o-box-flex: 0; + box-flex: 0; +} +.flexible { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; +} +jobutton, +jooptionitem, +joexpandotitle { + overflow: hidden; +} +.flex { + display: block; + display: -webkit-box; + display: -moz-box; + display: -o-box; + display: box; + margin: 0; + -moz-box-align: stretch; + -o-box-align: stretch; + box-align: stretch; +} +.listitem { + border-top: 1px solid rgba(0, 0, 0, 0.4); + margin: 0; + padding: 1em; + cursor: pointer; +} +.widgety { + color: rgba(255, 255, 255, 0.9); + background-color: #c5c5c5; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + padding: 1em 0; +} +.shiny { + color: rgba(255, 255, 255, 0.9); + background-color: #c5c5c5; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + padding: 1em 0; +} +.matte { + color: rgba(255, 255, 255, 0.9); + background-color: #c5c5c5; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + padding: 1em 0; +} +.stretch-full { + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} +.widget { + margin: 0px 1em 1em 1em; +} +.selected { + background-color: #4f5b98; + color: #fffeff; +} +.focus { + background-color: #fff; +} +jooptionitem:last-child { + -webkit-border-radius: 0; + -webkit-border-top-right-radius: 1.5em; + -webkit-border-bottom-right-radius: 1.5em; + -moz-border-radius: 0 1.5em 1.5em 0; + border-radius: 0 1.5em 1.5em 0; +} +jobutton { + display: block; + text-align: center; + color: #fff; + background: #333; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + height: 3em; + line-height: 3em; + -webkit-border-radius: 1.5em; + -moz-border-radius: 1.5em; + border-radius: 1.5em; +} +jobutton .focus { + background-color: #4f5b98; +} +jooption { + display: block; + display: -webkit-box; + display: -moz-box; + display: -o-box; + display: box; + -moz-box-align: stretch; + -o-box-align: stretch; + box-align: stretch; + margin: 0px 1em 1em 1em; +} +jooptionitem { + color: #000; + background-color: #c5c5c5; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + padding: 0 1.5em; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; + text-align: center; + margin: 0; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + height: 3em; + line-height: 2.6em; + border-left: 0.2em solid #999999; + border-top: 0.2em solid #999999; + border-bottom: 0.2em solid #999999; +} +jooptionitem:first-child { + -webkit-border-radius: 0; + -webkit-border-top-left-radius: 1.5em; + -webkit-border-bottom-left-radius: 1.5em; + -moz-border-radius: 1.5em 0 0 1.5em; + border-radius: 1.5em 0 0 1.5em; +} +jooptionitem:last-child { + border-right: 0.2em solid #999999; + -webkit-border-radius: 0; + -webkit-border-top-right-radius: 1.5em; + -webkit-border-bottom-right-radius: 1.5em; + -moz-border-radius: 0 1.5em 1.5em 0; + border-radius: 0 1.5em 1.5em 0; +} +jobutton, +input, +jolabel, +textarea, +joexpando { + margin: 0px 1em 1em 1em; +} +jotitle { + background-color: #b8b8b8; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + text-align: center; + padding: 1em; + font-size: 120%; + margin: 0; + border-left: none; + border-right: none; + border-bottom: 1px solid #858585; + border-top: 1px solid #d8d8d8; + color: #3c3c3c; +} +*:focus { + outline: none; +} +jolistitem, +jomenuitem { + border-top: 1px solid #ebebeb; + margin: 0; + padding: 1em; + cursor: pointer; + border-bottom: 1px solid #6d6d6d; +} +jolistitem.selected, +jomenuitem.selected { + border-color: #333; +} +jomenuitem:last-child { + border-bottom: 1px solid #666; +} +jobutton.focus { + background-color: #4f5b98; + background-image: none; +} +joselect.focus { + background-color: transparent; +} +jolist { + margin: 0; +} +joselectlist, +joexpandocontent { + display: block; + border-top: none; + -webkit-border-radius: 0; + -webkit-border-bottom-right-radius: 1.5em; + -webkit-border-bottom-left-radius: 1.5em; + -moz-border-radius: 0 0 1.5em 1.5em; + border-radius: 0 0 1.5em 1.5em; + background-color: rgba(255, 255, 255, 0.6); +} +joexpando { + display: block; + padding-bottom: 0px; + margin-bottom: 0; +} +joexpando.open { + margin-bottom: 1em; +} +joexpandocontent { + padding-top: 1em; +} +joselectlist > *:last-child { + border-bottom: none; + -webkit-border-radius: 0; + -webkit-border-bottom-right-radius: 1.5em; + -webkit-border-bottom-left-radius: 1.5em; + -moz-border-radius: 0 0 1.5em 1.5em; + border-radius: 0 0 1.5em 1.5em; +} +joselectlist > *:last-child.select { + border-bottom: none; + -webkit-border-radius: 0; + -webkit-border-bottom-right-radius: 1.5em; + -webkit-border-bottom-left-radius: 1.5em; + -moz-border-radius: 0 0 1.5em 1.5em; + border-radius: 0 0 1.5em 1.5em; +} +joselectlist > *.first-child { + border-top: none; +} +jocard > jolist, +jocard > jomenu { + margin: 0; +} +joinput.password, +input.password { + -webkit-text-security: disc; + -moz-text-security: disc; + -o-text-security: disc; + text-security: disc; +} +joinput, +jotextarea, +input, +textarea { + cursor: text; + display: block; + -webkit-border-radius: 0.2em; + -moz-border-radius: 0.2em; + border-radius: 0.2em; + margin: 0 1em 1em 1em; + padding: 0.75em; + background: #e7e6e7; + /* white-space: nowrap; */ + font-size: 105%; + overflow: hidden; + outline: none; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border: 0.2em solid #999999; +} +jolist, +jomenu { + font-size: 110%; +} +jotextarea, +textarea { + white-space: normal; +} +joinput.disabled, +jotextarea.disabled, +input.disabled, +textarea.disabled { + color: #666; + cursor: text; +} +joexpandotitle joicon { + position: absolute; + border-radius: 0 1.5em 1.5em 0; + background: none; + border: none; + text-align: center; + display: block; + height: 3em; + width: 3em; + line-height: 2.6em; + right: 0; + top: 0; + -webkit-transform-origin: 50% 50% 0; + -webkit-transform: rotatez(0); + -webkit-transition: -webkit-transform 0.2s ease-out; + -moz-transform-origin: 50% 50% 0; + -moz-transform: rotate(0); + -moz-transition: -moz-transform 0.2s ease-out; + -o-transform-origin: 50% 50% 0; + -o-transform: rotate(0); + -o-transition: -o-transform 0.2s ease-out; + -ms-transform-origin: 50% 50% 0; + -ms-transform: rotate(0); + -ms-transition: -ms-transform 0.2s ease-out; +} +joexpando joicon:after { + content: ">"; + font-family: "jo-flattery"; +} +joexpando.open > joexpandotitle joicon { + -webkit-transform: rotatez(90deg); + -moz-transform: rotate(90deg); + -o-transform: rotate(90deg); + -ms-transform: rotate(90deg); +} +joexpando > *:last-child { + height: 0; + overflow: hidden; + opacity: 0; + display: none; + margin-top: 0; + margin-bottom: 0; +} +joexpando.open > *:last-child { + height: 100%; + overflow: visible; + opacity: 1; + display: block; +} +joexpando > *:first-child { + -webkit-transform: none; + opacity: 1; + overflow: visible; +} +joexpandotitle { + color: #000; + position: relative; + background-color: #c5c5c5; + font-weight: normal; + outline: none; + outline-color: transparent; + height: 3em; + line-height: 2.6em; + padding: 0 1em; + -webkit-border-radius: 1.5em; + -moz-border-radius: 1.5em; + border-radius: 1.5em; + cursor: pointer; + text-align: left; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + border: 0.2em solid #999999; +} +joexpando.open > *:first-child { + background-color: #6d6d6d; + -webkit-border-radius: 0; + -webkit-border-top-right-radius: 1.5em; + -webkit-border-top-left-radius: 1.5em; + -moz-border-radius: 1.5em 1.5em 0 0; + border-radius: 1.5em 1.5em 0 0; + color: #fff; +} +jolabel, +label { + margin-bottom: 5px; +} +jocaption { + margin: 1em; +} +johtml { + display: block; + margin: 0 1em 1em 1em; + padding: 0; +} +jodivider { + border-top: 1px solid rgba(0, 0, 0, 0.2); + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + margin: 0 0 1em 0; + text-align: center; + height: 0; + display: block; +} +joflexrow > jotoggle { + -webkit-box-flex: 0; + -moz-box-flex: 0; + -o-box-flex: 0; + box-flex: 0; +} +jotoggle { + cursor: pointer; + display: block; + margin: 1em 1em 0 1em; + -webkit-border-radius: 1.5em; + -moz-border-radius: 1.5em; + border-radius: 1.5em; + background-color: #999; + position: relative; + width: 9em; + height: 3em; + line-height: 3em; +} +jotoggle > * { + color: #000; + background-color: #c5c5c5; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + text-align: center; + -webkit-border-radius: 1.5em; + -moz-border-radius: 1.5em; + border-radius: 1.5em; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + height: 3em; + line-height: 2.6em; + border: 0.2em solid #999999; + width: 6em; + -webkit-transition: -webkit-transform 0.1s ease, background 0.1s ease; + -moz-transition: -moz-transform 0.1s ease, background 0.1s ease; + -o-transition: -o-transform 0.1s ease, background 0.1s ease; + -ms-transition: -ms-transform 0.1s ease, background 0.1s ease; + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translatex(0em); + -o-transform: translatex(0em); + -ms-transform: translatex(0em); + -webkit-animation-fill-mode: forwards; +} +jotoggle.on > * { + color: #fff; + background-color: #4f5b98; + -webkit-transform: translate3d(3em, 0, 0); + -moz-transform: translatex(3em); + -o-transform: translatex(3em); + -ms-transform: translatex(3em); +} +jotable { + display: block; + margin: 0 1em; +} +tr { + margin: 0; +} +th { + text-align: left; + padding: 5px; +} +td { + padding: 5px; +} +jolabel.left { + margin-top: 1em; + padding: 9px 0; +} +.disabled { + opacity: .2; +} +jotoolbar { + padding: 1em; +} +josliderthumb { + position: absolute; + height: 3em; + width: 6em; + color: rgba(255, 255, 255, 0.9); + background-color: #4f5b98; + font-weight: normal; + outline: none; + outline-color: transparent; + -webkit-border-radius: 1.5em; + -moz-border-radius: 1.5em; + border-radius: 1.5em; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + line-height: 2.6em; + border: 0.2em solid #999999; + -webkit-transition: left 0.1s ease; + -moz-transition: left 0.1s ease; + -o-transition: left 0.1s ease; + -ms-transition: left 0.1s ease; +} +joslider.live > josliderthumb { + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + -ms-transition: none; +} +joslider { + cursor: pointer; + background: #999; + margin: 1em; + position: relative; + height: 3em; + -webkit-border-radius: 1.5em; + -moz-border-radius: 1.5em; + border-radius: 1.5em; +} +joflexrow { + display: block; + display: -webkit-box; + display: -moz-box; + display: -o-box; + display: box; + margin: 0; + -moz-box-align: stretch; + -o-box-align: stretch; + box-align: stretch; + width: 100%; +} +joflexrow > * { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; + margin-right: 0; + position: relative; +} +joflexrow > *:last-child { + margin-right: 1em; +} +joflexcol { + display: block; + display: -webkit-box; + display: -moz-box; + display: -o-box; + display: box; + height: 100%; + width: 100%; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + -moz-box-orient: vertical; + -moz-box-align: stretch; + -o-box-orient: vertical; + -o-box-align: stretch; + box-orient: vertical; + box-align: stretch; + margin: 0; +} +joflexcol > * { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; +} +jotitle + joflexcol, +jotitle + joflexrow { + margin-top: 1em; +} +jostack { + height: 100%; + /* + -webkit-perspective: 0; + -moz-perspective: 0; + -o-perspective: 0; + -ms-perspective: 0; +*/ + -webkit-transition: opacity 0.2s ease-out; + -moz-transition: opacity 0.2s ease-out; + -o-transition: opacity 0.2s ease-out; + -ms-transition: opacity 0.2s ease-out; +} +jostack > * { + z-index: 0; + position: absolute; + -webkit-animation-fill-mode: forwards; + /* -webkit-transform-origin: 0 0 0; */ + -webkit-transform: translate3d(0, 0, 0); + -webkit-transition: -webkit-transform 0.2s ease-out, z-index 0.2s ease-out, height 0s ease, overflow 0s ease; + /* -moz-transform-origin: 0 0 0; */ + -moz-transform: translate3d(0, 0, 0); + -moz-transition: -moz-transform 0.2s ease-out, z-index 0.2s ease-out, height 0s ease, overflow 0s ease; + /* -o-transform-origin: 0 0 0; */ + -o-transform: translate3d(0, 0, 0); + -o-transition: -o-transform 0.2s ease-out; + /* -ms-transform-origin: 0 0 0; */ + -ms-transform: translate3d(0, 0, 0); + -ms-transition: -ms-transform 0.2s ease-out; + /* + display: block; + height: 100%; + width: 100%; + overflow: hidden; + padding: 0; + margin: 0; +*/ +} +jostack > .next { + z-index: -1; + -webkit-transform: translateX(100%); + -moz-transform: translateX(100%); + -o-transform: translateX(100%); + -ms-transform: translateX(100%); + height: 100%; + overflow: hidden; +} +jostack > .prev { + z-index: 1; + -webkit-transform: translateX(-100%); + -moz-transform: translateX(-100%); + -o-transform: translateX(-100%); + -ms-transform: translateX(-100%); + height: 100%; + overflow: hidden; +} +* { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +jocard { + width: 100%; + min-height: 100%; + display: -webkit-box; + display: -moz-box; + display: -o-box; + display: box; + padding: 0; + margin: 0; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + -moz-box-orient: vertical; + -moz-box-align: stretch; + -o-box-orient: vertical; + -o-box-align: stretch; + box-orient: vertical; + box-align: stretch; + background: #ffffff; +} +jocard > * { + /* display: block; */ +} +jocard > *:last-child { + margin-bottom: 1em; +} +joscroller { + position: absolute; + display: block; + height: 100%; + width: 100%; + overflow: hidden; + padding: 0; + margin: 0; + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translatey(0); + -o-transform: translate(0, 0); + -ms-transform: translate(0, 0); +} +joscroller > * { + position: absolute; + top: 0; + -webkit-animation-fill-mode: forwards; + -webkit-transition: -webkit-transform 0s ease; + -moz-animation-fill-mode: forwards; + -moz-transition: -moz-transform 0s ease; + -o-animation-fill-mode: forwards; + -o-transition: -o-transform 0s ease; + -ms-animation-fill-mode: forwards; + -ms-transition: -ms-transform 0s ease; +} +.flick { + -webkit-transition: -webkit-transform 1.8s cubic-bezier(0, 0.2, 0, 1); + -moz-transition: -moz-transform 1.8s cubic-bezier(0, 0.2, 0, 1); + -o-transition: -o-transform 1.8s cubic-bezier(0, 0.2, 0, 1); + -ms-transition: -ms-transform 1.8s cubic-bezier(0, 0.2, 0, 1); +} +.flickback { + -webkit-transition: -webkit-transform 0.2s cubic-bezier(0, 0, 0.4, 1); + -moz-transition: -moz-transform 0.2s cubic-bezier(0, 0, 0.4, 1); + -o-transition: -o-transform 0.2s cubic-bezier(0, 0, 0.4, 1); + -ms-transition: -o-transform 0.2s cubic-bezier(0, 0, 0.4, 1); +} +.flickfast { + -webkit-transition: -webkit-transform 0.6s cubic-bezier(0, 0.2, 0, 1); + -moz-transition: -moz-transform 0.6s cubic-bezier(0, 0.2, 0, 1); + -o-transition: -o-transform 0.6s cubic-bezier(0, 0.2, 0, 1); +} +jocontainer { + margin: 0; + display: block; + position: relative; +} +jogroup { + margin: 1em; + padding: 1em 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background: #eeeeee; +} +jogroup > *.last-child { + margin-bottom: 0; +} +jofooter { + display: block; + display: -webkit-box; + display: -moz-box; + display: box; + width: 100%; + -webkit-box-flex: 1; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + -webkit-box-pack: end; + -moz-box-flex: 1; + -moz-box-orient: vertical; + -moz-box-align: stretch; + -moz-box-pack: end; + box-flex: 1; + box-orient: vertical; + box-align: stretch; + box-pack: end; + margin: 0; +} +jofooter > * { + -webkit-box-align: end; + -moz-box-align: end; + -o-box-align: end; + box-align: end; +} +joshim { + overflow: hidden; + position: absolute; + z-index: 100; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: none; + background: rgba(0, 0, 0, 0.8); + opacity: 0; + -webkit-transition: opacity .2s ease; + -moz-transition: opacity .2s ease; + -o-transition: opacity .2s ease; + -ms-transition: opacity .2s ease; +} +joshim.show { + display: block; + opacity: 1; +} +jotoolbar { + border-top: 1px solid rgba(0, 0, 0, 0.8); + padding: 1em 0; + color: rgba(255, 255, 255, 0.9); + background-color: rgba(0, 0, 0, 0.8); + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + z-index: 1; + position: absolute; + bottom: 0; + left: 0; + right: 0; + text-align: center; +} +jopopup { + -webkit-box-flex: 0; + -moz-box-flex: 0; + -o-box-flex: 0; + box-flex: 0; + display: block; + overflow: hidden; + border: 2px solid #434343; + -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.6); + -moz-box-shadow: 0 0 20px rgba(0, 0, 0, 0.6); + -o-box-shadow: 0 0 20px rgba(0, 0, 0, 0.6); + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + background-color: #747474; + color: #000; + background-repeat: repeat-x; + background-position: top left; + background-size: 100% 100%; + -webkit-transition: -webkit-transform 0.4s ease-in, opacity 0.4s ease-in; + -moz-transition: -moz-transform 0.4s ease-in, opacity 0.4s ease-in; + -o-transition: -o-transform 0.4s ease-in, opacity 0.4s ease-in; + -ms-transition: -m-transform 0.4s ease-in, opacity 0.4s ease-in; + -webkit-transform: scale(0.5); + -moz-transform: scale(0.5); + -o-transform: scale(0.5); + -ms-transform: scale(0.5); + max-width: 280px; + margin: 0 auto; + opacity: 0; +} +jopopup > jolist > *.select:first-childjopopup > jomenu > *.select:first-child { + border-top: none; + -webkit-border-radius: 0; + -webkit-border-top-right-radius: 1em; + -webkit-border-top-left-radius: 1em; + -moz-border-radius: 1em 1em 0 0; + border-radius: 1em 1em 0 0; +} +jopopup > jolist > *:last-child.selectjopopup > jomenu > *:first-child.select { + border-bottom: none; + -webkit-border-radius: 0; + -webkit-border-bottom-right-radius: 1em; + -webkit-border-bottom-left-radius: 1em; + -moz-border-radius: 0 0 1em 1em; + border-radius: 0 0 1em 1em; +} +jopopup.show { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -o-transform: scale(1); + -ms-transform: scale(1); + opacity: 1; +} +jopopup > joscroller { + width: 100%; +} +jonavbar { + font-size: 120%; + font-weight: bold; + display: block; + position: relative; + padding: 0; + color: #333; + height: 3em; + line-height: 3em; + border-top: none; + border-right: none; + border-left: none; + text-align: center; + -webkit-box-flex: 0; + -moz-box-flex: 0; + -o-box-flex: 0; + box-flex: 0; + background-color: #888; + cursor: default; +} +jonavbar > joview { + margin: 0; + display: block; + text-align: center; +} +jonavbar > joflexrow { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} +jobackbutton { + margin: 3px 1em; + line-height: 3em; + height: 3em; + padding: 0 1.5em; + -webkit-border-radius: 1.5em; + -moz-border-radius: 1.5em; + border-radius: 1.5em; + display: none; + color: #fff; + background: #000; + font-size: 85%; +} +jobackbutton.focus, +jobackbutton.selected { + background-color: rgba(0, 0, 0, 0.5); +} +jobackbutton.active { + display: block; +} +jonavbar > joflexrow > * { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; +} +jonavbar > joflexrow > jobackbutton { + -webkit-box-flex: 0; + -moz-box-flex: 0; + -o-box-flex: 0; + box-flex: 0; + max-width: 4em; +} +jopopup > jotitle { + color: #fff; + border-top: none; + border-color: #999; + margin-bottom: 1em; + -webkit-border-radius: 0; + -webkit-border-top-right-radius: 2px; + -webkit-border-top-left-radius: 2px; + -moz-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; + background-color: #3f3f3f; +} +joflexcol { + height: 100%; + width: 100%; +} +body > jocontainer, +body > jocard, +body > joview, +body > joflexcol, +body > joscroller, +body > jostack { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; +} +html { + -webkit-text-size-adjust: none; +} +body { + /* -webkit-backface-visibility: hidden; */ +} +.nativescroll jostack { + width: 100%; + position: relative; +} +.nativescroll joscroller { + position: absolute; + display: block; + height: auto; + width: auto; + top: 0; + left: 0; + bottom: 0; + right: 0; + overflow: auto; + padding: 0; + margin: 0; + -webkit-overflow-scrolling: touch; +} +.nativescroll jocontainer { + height: inherit; +} +.nativescroll joscroller { + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} diff --git a/css/flattery/jo-flattery.eot b/css/flattery/jo-flattery.eot new file mode 100755 index 0000000..5e7ea32 Binary files /dev/null and b/css/flattery/jo-flattery.eot differ diff --git a/css/flattery/jo-flattery.less b/css/flattery/jo-flattery.less new file mode 100644 index 0000000..f655a1f --- /dev/null +++ b/css/flattery/jo-flattery.less @@ -0,0 +1,1063 @@ + + +@bgcolor: #fff; +@groupcolor: difference(#fff, #111); +@widgetheight: 3em; +@widgetborderwidth: .2em; +@widgetlineheight: (@widgetheight - (2 * @widgetborderwidth)); +@widgetborder: (@widgetheight / 2); +@space: (@widgetheight / 3); +@widgetpadding: (@widgetheight / 4); +@fontsize: 14px; + +@font-face { + font-family: 'jo-flattery'; + src:url('jo-flattery.eot'); + src:url('jo-flattery.eot?#iefix') format('embedded-opentype'), + url('jo-flattery.ttf') format('truetype'), + url('jo-flattery.woff') format('woff'); + font-weight: normal; + font-style: normal; +} + +::selection { + background: #4f5b98; /* Safari */ + color: #fff; +} +::-moz-selection { + background: #4f5b98; /* Firefox */ + color: #fff; +} + +body { + margin: 0; + padding: 0; + background: @bgcolor; + word-wrap: break-word; + overflow: hidden; + font: normal @fontsize "Helvetica", "Droid Sans", "Trebuchet MS"; +} +jobutton, +joview, +jolist, +jolistitem, +jomenu, +jomenuitem, +joexpando, +joexpandotitle, +jogroup, +jocard, +jostack, +jotitle, +jocaption, +jolabel, +jodivider, +joinput, +input, +textarea, +jotextarea, +jooption, +jooptionitem, +jonavbar, +jocontainer, +jotoggle, +joslider, +josliderthumb { + display: block; + margin: 0; + padding: 0; + -webkit-user-select: none; + -moz-user-select: none; + -o-user-select: none; + user-select: none; + -webkit-background-clip: padding-box; + /* background: transparent; */ +} +/* +em, i, b, span, u, a, button, input { + display: inline; +} +*/ +.noflex { + -webkit-box-flex: 0; + -moz-box-flex: 0; + -o-box-flex: 0; + box-flex: 0; +} +.flexible { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; +} + +jobutton, jooptionitem, joexpandotitle { overflow: hidden; } +.flex { + display: block; + display: -webkit-box; + display: -moz-box; + display: -o-box; + display: box; + margin: 0; + -moz-box-align: stretch; + -o-box-align: stretch; + box-align: stretch; +} +.listitem { + border-top: 1px solid rgba(0, 0, 0, 0.4); + margin: 0; + padding: @space; + cursor: pointer; +} +.widgety { + color: rgba(255, 255, 255, 0.9); + background-color: #c5c5c5; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + padding: @space 0; +} +.shiny { + color: rgba(255, 255, 255, 0.9); + background-color: #c5c5c5; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + padding: @space 0; +} +.matte { + color: rgba(255, 255, 255, 0.9); + background-color: #c5c5c5; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + padding: @space 0; +} +.stretch-full { + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} +.widget { + margin: 0px @space @space @space; +} +*.selected, *.focus { +} +.selected { + background-color: #4f5b98; + color: #fffeff; +} +.focus { + background-color: #fff; +} +jooptionitem:last-child { + -webkit-border-radius: 0; + -webkit-border-top-right-radius: @widgetborder; + -webkit-border-bottom-right-radius: @widgetborder; + -moz-border-radius: 0 @widgetborder @widgetborder 0; + border-radius: 0 @widgetborder @widgetborder 0; +} +jobutton { + display: block; + text-align: center; + color: #fff; + background: #333; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + height: @widgetheight; + line-height: @widgetheight; + -webkit-border-radius: @widgetborder; + -moz-border-radius: @widgetborder; + border-radius: @widgetborder; +} +jobutton .focus { + background-color: #4f5b98; +} +jooption { + display: block; + display: -webkit-box; + display: -moz-box; + display: -o-box; + display: box; + -moz-box-align: stretch; + -o-box-align: stretch; + box-align: stretch; + margin: 0px @space @space @space; +} +jooptionitem { + color: #000; + background-color: #c5c5c5; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + padding: 0 @widgetborder; + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; + text-align: center; + margin: 0; + + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + height: @widgetheight; + line-height: @widgetlineheight; + + border-left: @widgetborderwidth solid #999; + border-top: @widgetborderwidth solid #999; + border-bottom: @widgetborderwidth solid #999; +} +jooptionitem:first-child { + -webkit-border-radius: 0; + -webkit-border-top-left-radius: @widgetborder; + -webkit-border-bottom-left-radius: @widgetborder; + -moz-border-radius: @widgetborder 0 0 @widgetborder; + border-radius: @widgetborder 0 0 @widgetborder; +} +jooptionitem:last-child { + border-right: @widgetborderwidth solid #999; + -webkit-border-radius: 0; + -webkit-border-top-right-radius: @widgetborder; + -webkit-border-bottom-right-radius: @widgetborder; + -moz-border-radius: 0 @widgetborder @widgetborder 0; + border-radius: 0 @widgetborder @widgetborder 0; +} +jobutton, +input, +jolabel, +textarea, +joexpando { + margin: 0px @space @space @space; +} +jotitle { + background-color: #b8b8b8; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + + text-align: center; + padding: @space; + font-size: 120%; + margin: 0; + border-left: none; + border-right: none; + border-bottom: 1px solid #858585; + border-top: 1px solid #d8d8d8; + color: #3c3c3c; +} +*:focus { + outline: none; +} +jolistitem, jomenuitem { + border-top: 1px solid #ebebeb; + margin: 0; + padding: @space; + cursor: pointer; + border-bottom: 1px solid #6d6d6d; +} +jolistitem.selected, jomenuitem.selected { + border-color: #333; +} +jomenuitem:last-child { + border-bottom: 1px solid #666; +} +jobutton.focus { + background-color: #4f5b98; + background-image: none; +} +joselect.focus { + background-color: transparent; +} +jolist { + margin: 0; +} +joselectlist, joexpandocontent { + display: block; + border-top: none; + -webkit-border-radius: 0; + -webkit-border-bottom-right-radius: @widgetborder; + -webkit-border-bottom-left-radius: @widgetborder; + -moz-border-radius: 0 0 @widgetborder @widgetborder; + border-radius: 0 0 @widgetborder @widgetborder; + background-color: rgba(255, 255, 255, 0.6); +} +joexpando { + display: block; + padding-bottom: 0px; + margin-bottom: 0; +} +joexpando.open { + margin-bottom: @space; +} +joexpandocontent { + padding-top: @space; +} +joselectlist > *:last-child { + border-bottom: none; + -webkit-border-radius: 0; + -webkit-border-bottom-right-radius: @widgetborder; + -webkit-border-bottom-left-radius: @widgetborder; + -moz-border-radius: 0 0 @widgetborder @widgetborder; + border-radius: 0 0 @widgetborder @widgetborder; +} +joselectlist > *:last-child.select { + border-bottom: none; + -webkit-border-radius: 0; + -webkit-border-bottom-right-radius: @widgetborder; + -webkit-border-bottom-left-radius: @widgetborder; + -moz-border-radius: 0 0 @widgetborder @widgetborder; + border-radius: 0 0 @widgetborder @widgetborder; +} +joselectlist > *.first-child { + border-top: none; +} +jocard > jolist, jocard > jomenu { + margin: 0; +} +joinput.password, input.password { + -webkit-text-security: disc; + -moz-text-security: disc; + -o-text-security: disc; + text-security: disc; +} +joinput, +jotextarea, +input, +textarea { + cursor: text; + display: block; + -webkit-border-radius: @widgetborderwidth; + -moz-border-radius: @widgetborderwidth; + border-radius: @widgetborderwidth; + margin: 0 @space @space @space; + padding: @widgetpadding; + background: #e7e6e7; +/* white-space: nowrap; */ + font-size: 105%; + overflow: hidden; + outline: none; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; + + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + + border: @widgetborderwidth solid #999; +} +jolist, jomenu { + font-size: 110%; +} +jotextarea, textarea { + white-space: normal; +} +joinput.disabled, +jotextarea.disabled, +input.disabled, +textarea.disabled { + color: #666; + cursor: text; +} +joexpandotitle joicon { + position: absolute; + border-radius: 0 @widgetborder @widgetborder 0; + background: none; + border: none; + text-align: center; + display: block; + height: @widgetheight; + width: @widgetheight; + line-height: @widgetlineheight; + right: 0; + top: 0; + + -webkit-transform-origin: 50% 50% 0; + -webkit-transform: rotatez(0); + -webkit-transition: -webkit-transform 0.2s ease-out; + -moz-transform-origin: 50% 50% 0; + -moz-transform: rotate(0); + -moz-transition: -moz-transform 0.2s ease-out; + -o-transform-origin: 50% 50% 0; + -o-transform: rotate(0); + -o-transition: -o-transform 0.2s ease-out; + -ms-transform-origin: 50% 50% 0; + -ms-transform: rotate(0); + -ms-transition: -ms-transform 0.2s ease-out; +} +joexpando joicon:after { + content: ">"; + font-family: "jo-flattery"; +} + +joexpando.open > joexpandotitle joicon { + -webkit-transform: rotatez(90deg); + -moz-transform: rotate(90deg); + -o-transform: rotate(90deg); + -ms-transform: rotate(90deg); +} +joexpando > *:last-child { + height: 0; + overflow: hidden; + opacity: 0; + display: none; + margin-top: 0; + margin-bottom: 0; +} +joexpando.open > *:last-child { + height: 100%; + overflow: visible; + opacity: 1; + display: block; +} +joexpando > *:first-child { + -webkit-transform: none; + opacity: 1; + overflow: visible; +} + +joexpandotitle { + color: #000; + position: relative; + background-color: #c5c5c5; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + height: @widgetheight; + line-height: @widgetlineheight; + padding: 0 @space; + -webkit-border-radius: @widgetborder; + -moz-border-radius: @widgetborder; + border-radius: @widgetborder; + cursor: pointer; + text-align: left; + + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + + border: @widgetborderwidth solid #999; +} + +joexpando.open > *:first-child { + background-color: #6d6d6d; + -webkit-border-radius: 0; + -webkit-border-top-right-radius: @widgetborder; + -webkit-border-top-left-radius: @widgetborder; + -moz-border-radius: @widgetborder @widgetborder 0 0; + border-radius: @widgetborder @widgetborder 0 0; + color: #fff; +} +jolabel, label { + margin-bottom: 5px; +} +jocaption { + margin: @space; +} +johtml { + display: block; + margin: 0 @space @space @space; + padding: 0; +} +jodivider { + border-top: 1px solid rgba(0, 0, 0, 0.2); + border-bottom: 1px solid rgba(255, 255, 255, 0.2); + margin: 0 0 @space 0; + text-align: center; + height: 0; + display: block; +} + +joflexrow > jotoggle { + -webkit-box-flex: 0; + -moz-box-flex: 0; + -o-box-flex: 0; + box-flex: 0; +} + +jotoggle { + cursor: pointer; + display: block; + margin: @space @space 0 @space; + -webkit-border-radius: @widgetborder; + -moz-border-radius: @widgetborder; + border-radius: @widgetborder; + background-color: #999; + position: relative; + width: (@widgetheight * 3); + height: @widgetheight; + line-height: @widgetheight; +} + +jotoggle > * { + color: #000; + background-color: #c5c5c5; + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + text-align: center; + -webkit-border-radius: @widgetborder; + -moz-border-radius: @widgetborder; + border-radius: @widgetborder; + + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + height: @widgetheight; + line-height: @widgetlineheight; + + border: @widgetborderwidth solid #999; + + width: (@widgetheight * 2); + + -webkit-transition: -webkit-transform 0.1s ease, background 0.1s ease; + -moz-transition: -moz-transform 0.1s ease, background 0.1s ease; + -o-transition: -o-transform 0.1s ease, background 0.1s ease; + -ms-transition: -ms-transform 0.1s ease, background 0.1s ease; + + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translatex(0em); + -o-transform: translatex(0em); + -ms-transform: translatex(0em); + + -webkit-animation-fill-mode: forwards; +} + +jotoggle.on > * { + color: #fff; + background-color: #4f5b98; + -webkit-transform: translate3d(@widgetheight, 0, 0); + -moz-transform: translatex(@widgetheight); + -o-transform: translatex(@widgetheight); + -ms-transform: translatex(@widgetheight); +} +jotable { + display: block; + margin: 0 @space; +} +tr { + margin: 0; +} +th { + text-align: left; + padding: 5px; +} +td { + padding: 5px; +} +jolabel.left { + margin-top: @space; + padding: 9px 0; +} +.disabled { + opacity: .2; +} +jotoolbar { + padding: @space; +} +josliderthumb { + position: absolute; + height: @widgetheight; + width: (@widgetheight * 2); + color: rgba(255, 255, 255, 0.9); + background-color: #4f5b98; + font-weight: normal; + outline: none; + outline-color: transparent; + -webkit-border-radius: @widgetborder; + -moz-border-radius: @widgetborder; + border-radius: @widgetborder; + + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + line-height: @widgetlineheight; + + border: @widgetborderwidth solid #999; + + -webkit-transition: left 0.1s ease; + -moz-transition: left 0.1s ease; + -o-transition: left 0.1s ease; + -ms-transition: left 0.1s ease; +} + +joslider.live > josliderthumb { + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + -ms-transition: none; +} + + +joslider { + cursor: pointer; + background: #999; + margin: @space; + position: relative; + height: @widgetheight; + -webkit-border-radius: @widgetborder; + -moz-border-radius: @widgetborder; + border-radius: @widgetborder; +} +joflexrow { + display: block; + display: -webkit-box; + display: -moz-box; + display: -o-box; + display: box; + margin: 0; + -moz-box-align: stretch; + -o-box-align: stretch; + box-align: stretch; + width: 100%; +} +joflexrow > * { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; + margin-right: 0; + position: relative; +} +joflexrow > *:last-child { + margin-right: @space; +} +joflexcol { + display: block; + display: -webkit-box; + display: -moz-box; + display: -o-box; + display: box; + margin: 0; + -moz-box-align: stretch; + -o-box-align: stretch; + box-align: stretch; + height: 100%; + width: 100%; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + -moz-box-orient: vertical; + -moz-box-align: stretch; + -o-box-orient: vertical; + -o-box-align: stretch; + box-orient: vertical; + box-align: stretch; + margin: 0; +} +joflexcol > * { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; +} +jotitle + joflexcol, jotitle + joflexrow { + margin-top: @space; +} +jostack { + height: 100%; +/* + -webkit-perspective: 0; + -moz-perspective: 0; + -o-perspective: 0; + -ms-perspective: 0; +*/ + -webkit-transition: opacity 0.2s ease-out; + -moz-transition: opacity 0.2s ease-out; + -o-transition: opacity 0.2s ease-out; + -ms-transition: opacity 0.2s ease-out; +} +jostack > * { + z-index: 0; + position: absolute; + + -webkit-animation-fill-mode: forwards; +/* -webkit-transform-origin: 0 0 0; */ + -webkit-transform: translate3d(0, 0, 0); + -webkit-transition: -webkit-transform 0.2s ease-out, z-index 0.2s ease-out, height 0s ease, overflow 0s ease; +/* -moz-transform-origin: 0 0 0; */ + -moz-transform: translate3d(0, 0, 0); + -moz-transition: -moz-transform 0.2s ease-out, z-index 0.2s ease-out, height 0s ease, overflow 0s ease; +/* -o-transform-origin: 0 0 0; */ + -o-transform: translate3d(0, 0, 0); + -o-transition: -o-transform 0.2s ease-out; +/* -ms-transform-origin: 0 0 0; */ + -ms-transform: translate3d(0, 0, 0); + -ms-transition: -ms-transform 0.2s ease-out; + /* + display: block; + height: 100%; + width: 100%; + overflow: hidden; + padding: 0; + margin: 0; +*/ + +} +jostack > .next { + z-index: -1; + -webkit-transform: translateX(100%); + -moz-transform: translateX(100%); + -o-transform: translateX(100%); + -ms-transform: translateX(100%); + height: 100%; + overflow: hidden; +} +jostack > .prev { + z-index: 1; + -webkit-transform: translateX(-100%); + -moz-transform: translateX(-100%); + -o-transform: translateX(-100%); + -ms-transform: translateX(-100%); + height: 100%; + overflow: hidden; +} +* { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +jocard { + width: 100%; + min-height: 100%; + display: -webkit-box; + display: -moz-box; + display: -o-box; + display: box; + padding: 0; + margin: 0; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + -moz-box-orient: vertical; + -moz-box-align: stretch; + -o-box-orient: vertical; + -o-box-align: stretch; + box-orient: vertical; + box-align: stretch; + background: @bgcolor; +} +jocard > * { + /* display: block; */ + +} +jocard > *:last-child { + margin-bottom: @space; +} +joscroller { + position: absolute; + display: block; + height: 100%; + width: 100%; + overflow: hidden; + padding: 0; + margin: 0; + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translatey(0); + -o-transform: translate(0, 0); + -ms-transform: translate(0, 0); +} +joscroller > * { + position: absolute; + top: 0; + -webkit-animation-fill-mode: forwards; + -webkit-transition: -webkit-transform 0s ease; + -moz-animation-fill-mode: forwards; + -moz-transition: -moz-transform 0s ease; + -o-animation-fill-mode: forwards; + -o-transition: -o-transform 0s ease; + -ms-animation-fill-mode: forwards; + -ms-transition: -ms-transform 0s ease; +} +.flick { + -webkit-transition: -webkit-transform 1.8s cubic-bezier(0, 0.2, 0, 1); + -moz-transition: -moz-transform 1.8s cubic-bezier(0, 0.2, 0, 1); + -o-transition: -o-transform 1.8s cubic-bezier(0, 0.2, 0, 1); + -ms-transition: -ms-transform 1.8s cubic-bezier(0, 0.2, 0, 1); +} +.flickback { + -webkit-transition: -webkit-transform 0.2s cubic-bezier(0, 0, 0.4, 1); + -moz-transition: -moz-transform 0.2s cubic-bezier(0, 0, 0.4, 1); + -o-transition: -o-transform 0.2s cubic-bezier(0, 0, 0.4, 1); + -ms-transition: -o-transform 0.2s cubic-bezier(0, 0, 0.4, 1); +} +.flickfast { + -webkit-transition: -webkit-transform 0.6s cubic-bezier(0, 0.2, 0, 1); + -moz-transition: -moz-transform 0.6s cubic-bezier(0, 0.2, 0, 1); + -o-transition: -o-transform 0.6s cubic-bezier(0, 0.2, 0, 1); +} +jocontainer { + margin: 0; + display: block; + position: relative; +} +jogroup { + margin: @space; + padding: @space 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background: @groupcolor; +} +jogroup > *.last-child { + margin-bottom: 0; +} +jofooter { + display: block; + display: -webkit-box; + display: -moz-box; + display: box; + width: 100%; + -webkit-box-flex: 1; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + -webkit-box-pack: end; + -moz-box-flex: 1; + -moz-box-orient: vertical; + -moz-box-align: stretch; + -moz-box-pack: end; + box-flex: 1; + box-orient: vertical; + box-align: stretch; + box-pack: end; + margin: 0; +} +jofooter > * { + -webkit-box-align: end; + -moz-box-align: end; + -o-box-align: end; + box-align: end; +} +joshim { + opacity: 0; + overflow: hidden; + position: absolute; + z-index: 100; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: none; + background: rgba(0,0,0,0.8); + opacity: 0; + -webkit-transition: opacity .2s ease; + -moz-transition: opacity .2s ease; + -o-transition: opacity .2s ease; + -ms-transition: opacity .2s ease; +} +joshim.show { + display: block; + opacity: 1; +} +jotoolbar { + border-top: 1px solid rgba(0, 0, 0, 0.8); + padding: @space 0; + color: rgba(255, 255, 255, 0.9); + background-color: rgba(0,0,0,0.8); + font-weight: normal; + cursor: pointer; + outline: none; + outline-color: transparent; + z-index: 1; + position: absolute; + bottom: 0; + left: 0; + right: 0; + text-align: center; +} +jopopup { + -webkit-box-flex: 0; + -moz-box-flex: 0; + -o-box-flex: 0; + box-flex: 0; + display: block; + overflow: hidden; + margin: 0 auto; + border: 2px solid #434343; + -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.6); + -moz-box-shadow: 0 0 20px rgba(0, 0, 0, 0.6); + -o-box-shadow: 0 0 20px rgba(0, 0, 0, 0.6); + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + background-color: #747474; + color: #000; + background-repeat: repeat-x; + background-position: top left; + background-size: 100% 100%; + -webkit-transition: -webkit-transform 0.4s ease-in, opacity 0.4s ease-in; + -moz-transition: -moz-transform 0.4s ease-in, opacity 0.4s ease-in; + -o-transition: -o-transform 0.4s ease-in, opacity 0.4s ease-in; + -ms-transition: -m-transform 0.4s ease-in, opacity 0.4s ease-in; + -webkit-transform: scale(0.5); + -moz-transform: scale(0.5); + -o-transform: scale(0.5); + -ms-transform: scale(0.5); + max-width: 280px; + margin: 0 auto; + opacity: 0; +} +jopopup > jolist > *.select:first-childjopopup > jomenu > *.select:first-child { + border-top: none; + -webkit-border-radius: 0; + -webkit-border-top-right-radius: @space; + -webkit-border-top-left-radius: @space; + -moz-border-radius: @space @space 0 0; + border-radius: @space @space 0 0; +} +jopopup > jolist > *:last-child.selectjopopup > jomenu > *:first-child.select { + border-bottom: none; + -webkit-border-radius: 0; + -webkit-border-bottom-right-radius: @space; + -webkit-border-bottom-left-radius: @space; + -moz-border-radius: 0 0 @space @space; + border-radius: 0 0 @space @space; +} +jopopup.show { + -webkit-transform: scale(1); + -moz-transform: scale(1); + -o-transform: scale(1); + -ms-transform: scale(1); + opacity: 1; +} +jopopup > joscroller { + width: 100%; +} +jonavbar { + font-size: 120%; + font-weight: bold; + display: block; + position: relative; + padding: 0; + color: #333; + height: 3em; + line-height: 3em; + border-top: none; + border-right: none; + border-left: none; + text-align: center; + -webkit-box-flex: 0; + -moz-box-flex: 0; + -o-box-flex: 0; + box-flex: 0; + background-color: #888; + cursor: default; +} +jonavbar > joview { + margin: 0; + display: block; + text-align: center; +} +jonavbar > joflexrow { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} +jobackbutton { + margin: 3px @space; + line-height: @widgetheight; + height: @widgetheight; + padding: 0 @widgetborder; + -webkit-border-radius: @widgetborder; + -moz-border-radius: @widgetborder; + border-radius: @widgetborder; + display: none; + color: #fff; + background: #000; + font-size: 85%; +} +jobackbutton.focus, jobackbutton.selected { + background-color: rgba(0, 0, 0, 0.5); +} +jobackbutton.active { + display: block; +} +jonavbar > joflexrow > * { + -webkit-box-flex: 1; + -moz-box-flex: 1; + -o-box-flex: 1; + box-flex: 1; +} +jonavbar > joflexrow > jobackbutton { + -webkit-box-flex: 0; + -moz-box-flex: 0; + -o-box-flex: 0; + box-flex: 0; + max-width: 4em; +} +jopopup > jotitle { + color: #fff; + border-top: none; + border-color: #999; + margin-bottom: @space; + -webkit-border-radius: 0; + -webkit-border-top-right-radius: 2px; + -webkit-border-top-left-radius: 2px; + -moz-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; + background-color: #3f3f3f; +} +joflexcol { + height: 100%; + width: 100%; +} +body > jocontainer, +body > jocard, +body > joview, +body > joflexcol, +body > joscroller, +body > jostack { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; +} +html { + -webkit-text-size-adjust: none; +} +body { +/* -webkit-backface-visibility: hidden; */ +} + + +.nativescroll jostack { + width: 100%; + position: relative; +} + +.nativescroll joscroller { + position: absolute; + display: block; + height: auto; + width: auto; + top: 0; left: 0; bottom: 0; right: 0; + overflow: auto; + padding: 0; + margin: 0; + -webkit-overflow-scrolling: touch; +} + +.nativescroll jocontainer { + height: inherit; +} + +.nativescroll joscroller { + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} diff --git a/css/flattery/jo-flattery.ttf b/css/flattery/jo-flattery.ttf new file mode 100755 index 0000000..c5d445a Binary files /dev/null and b/css/flattery/jo-flattery.ttf differ diff --git a/css/flattery/jo-flattery.woff b/css/flattery/jo-flattery.woff new file mode 100755 index 0000000..adc2705 Binary files /dev/null and b/css/flattery/jo-flattery.woff differ diff --git a/css/jo.css b/css/jo.css index bb84367..65f8733 100644 --- a/css/jo.css +++ b/css/jo.css @@ -1093,3 +1093,31 @@ html { body { -webkit-backface-visibility: hidden; } + +.nativescroll jostack { width: 100%; position: relative; } + +.nativescroll joscroller { + position: absolute; + display: block; + height: auto; + width: auto; + top: 0; left: 0; bottom: 0; right: 0; + overflow: auto; + padding: 0; + margin: 0; + -webkit-overflow-scrolling: touch; +} + +.nativescroll jocontainer { + height: inherit; +} + +.nativescroll joscroller { + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + diff --git a/css/jo2.css b/css/jo2.css index 5badb65..c75cd81 100644 --- a/css/jo2.css +++ b/css/jo2.css @@ -1167,3 +1167,31 @@ jobackbutton { color: inherit; font-size: 85%; } + +.nativescroll jostack { width: 100%; position: relative; } + +.nativescroll joscroller { + position: absolute; + display: block; + height: auto; + width: auto; + top: 0; left: 0; bottom: 0; right: 0; + overflow: auto; + padding: 0; + margin: 0; + -webkit-overflow-scrolling: touch; +} + +.nativescroll jocontainer { + height: inherit; +} + +.nativescroll joscroller { + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + diff --git a/css/sample.html b/css/sample.html index dd7a78a..e79cc26 100644 --- a/css/sample.html +++ b/css/sample.html @@ -7,7 +7,7 @@
This HTML fragment was loaded dynamically. The joHTML control +also intercepts links so you +can keep them on the page. This is useful for pure content cases +such as disclaimers, app info, and help.
+ +Note that since Jo uses custom tag names for its controls, +you should have little if any CSS overlap with your App UI.
diff --git a/samples/kitchensink/htmltestlink.html b/samples/kitchensink/htmltestlink.html new file mode 100644 index 0000000..9c05c89 --- /dev/null +++ b/samples/kitchensink/htmltestlink.html @@ -0,0 +1,10 @@ +You tapped a link, the app code listened for it and +handled loading a different HTML fragment into the file source...
+ +Which automatically updated the UI. You could also +push these "pages" onto your UI stack, but that's a little more +involved.
+ +Back to the original file diff --git a/samples/kitchensink/index.html b/samples/kitchensink/index.html index 4ba99f4..2152889 100644 --- a/samples/kitchensink/index.html +++ b/samples/kitchensink/index.html @@ -5,60 +5,16 @@ + +- Welcome to a "kitchen sink" demo of some of the things you - can do with the Jo HTML5 framework. -
-- One thing I hope comes across is how flexible the framework - truly is. This demo illustrates not only some of the important - goodies like widgets and interacting with data, but also some - of the many ways you can go about getting them to work. -
-
- For example, this "about" content is pulled directly from the
- index.html
file in the project using joInterface
.
- This entire box can be defined by your HTML, or using pure
- JavaScript, or a mix.
-
- Most of the coding examples use a pure JavaScript approach - because that tends to be more performant in terms of load time, - and tends to build tighter apps. -
-- However, as this view shows, Jo doesn't try to force you to - go any deeper into the framework than you want to go. By learning - only a few special tags, you can have a quick prototype in HTML - in minutes. -
-- Once you have that prototype, it's easy to turn those styled tags - into working UI controls by using the joInterface class. Heck, - you can even take static HTML content and place it directly into - most of the UI widgets as a string, or by passing a reference to a - parent DOM element. -
-This HTML was included inline, click the load button below to pull in another file asynchronously.
"), + new joButton("Load HTML File") + .selectEvent.subscribe(function() { file.load(); }, this) + ]), + // this is our dynamic HTML control defined above + new joGroup(html), + info + ]).setTitle("Embedded HTML Browser"); + + console.log(card); + + return card; +}); + diff --git a/samples/kitchensink/js/menu.js b/samples/kitchensink/js/menu.js index e9b33c9..8e47d29 100644 --- a/samples/kitchensink/js/menu.js +++ b/samples/kitchensink/js/menu.js @@ -4,15 +4,12 @@ joCache.set("menu", function() { // some inline data and chaining going on here, // dont be afraid, it'll all make sense later var card = new joCard([ - new joTitle("Select an option below"), new joMenu([ - { title: "About", id: "about" }, - { title: "Form Widgets", id: "widgets" }, - { title: "List Views", id: "lists" }, - { title: "Table View", id: "tables" }, - { title: "Popup Dialogs", id: "popups" }, - { title: "Ajax Calls", id: "ajax" }, - { title: "Themes and CSS", id: "themes" } + { title: "UI Widgets", id: "widgets" }, + { title: "Simple Table View", id: "table" }, + { title: "Embedded HTML Browser", id: "html" }, + { title: "Popups & Dialogs", id: "popups" }, + { title: "CSS Utility Functions", id: "themes" } ]).selectEvent.subscribe(function(id) { App.stack.push(joCache.get(id)); }) @@ -21,7 +18,8 @@ joCache.set("menu", function() { // hey, you don't have to make messy chained and // inlined code; that's a coding style decision // Jo doesn't pretend it should make for you. - card.setTitle("Jo Kitchen Sink Demo"); + card.setTitle("Jo App Framework Demos"); + // required return card; }); diff --git a/samples/kitchensink/js/popups.js b/samples/kitchensink/js/popups.js index a89d7dc..9342310 100644 --- a/samples/kitchensink/js/popups.js +++ b/samples/kitchensink/js/popups.js @@ -18,11 +18,11 @@ joCache.set("popups", function() { card.setTitle("Popup Dialogs"); simple.selectEvent.subscribe(function() { - App.scn.alert("This is an Alert", "It's a very simple call to the joScreen object. It's similar to the good ol' alert() function built into most JavaScript engines."); + App.screen.alert("This is an Alert", "It's a very simple call to the joScreen object. It's similar to the good ol' alert() function built into most JavaScript engines."); }); complex.selectEvent.subscribe(function() { - App.scn.showPopup(joCache.get("popup")); + App.screen.showPopup(joCache.get("popup")); }); return card; @@ -45,7 +45,7 @@ joCache.set("popup", function() { function pop() { console.log("hide popup"); - App.scn.hidePopup(); + App.screen.hidePopup(); } return popup; diff --git a/samples/kitchensink/js/table.js b/samples/kitchensink/js/table.js new file mode 100644 index 0000000..3f21ac3 --- /dev/null +++ b/samples/kitchensink/js/table.js @@ -0,0 +1,18 @@ +joCache.set("table", function() { + var back; + + var card = new joCard([ + new joTable([ + ["Name", "Phone", "Email"], + ["Bob", "555-1234", "bob@bob.not"], + ["Candy", "555-2345", "candy@candy.not"], + ["Doug", "555-3456", "doug@doug.not"], + ["Evan", "555-4567", "evan@evan.not"], + ["Frank", "555-5678", "frank@frank.not"] + ]).selectEvent.subscribe(function(index, table) { + console.log(table.getNodeData(table.getRow())); + }, this) + ]).setTitle("Table Demo"); + + return card; +}); diff --git a/samples/kitchensink/js/tables.js b/samples/kitchensink/js/tables.js deleted file mode 100644 index e69de29..0000000 diff --git a/samples/kitchensink/js/themes.js b/samples/kitchensink/js/themes.js index 9be5566..ac03ea8 100644 --- a/samples/kitchensink/js/themes.js +++ b/samples/kitchensink/js/themes.js @@ -2,7 +2,7 @@ joCache.set("themes", function() { var card, theme, size; card = new joCard([ - new joTitle("Pick a theme"), + new joCaption("Jo has a few built-in CSS munging functions, illustrated below."), new joGroup([ new joLabel("Colors"), theme = new joSelect([ @@ -17,7 +17,7 @@ joCache.set("themes", function() { "Funky" ], 0)) ]), - new joHTML("These theme options are all controlled with CSS. For this demo, we're dynamically setting styles inline usingjoDOM.applyCSSRule
. Most apps should have their own style, and would not need to load CSS rules on the fly like this, but it makes for a more interesting demo."),
+ new joHTML("These app-level 'theme' options are all controlled with CSS. For this demo, we're dynamically setting styles inline using joDOM.applyCSSRule
. Most apps should have their own style, and would not need to load CSS rules on the fly like this, but it makes for a more interesting demo."),
new joHTML("WARNING: Your eyes may burn while applying these theme tweaks.")
]);
diff --git a/samples/kitchensink/js/widgets.js b/samples/kitchensink/js/widgets.js
index 354c674..d8fb1a5 100644
--- a/samples/kitchensink/js/widgets.js
+++ b/samples/kitchensink/js/widgets.js
@@ -1,4 +1,5 @@
joCache.set("widgets", function() {
+ var slider;
var card = new joCard([
new joTitle("Input Boxes"),
new joGroup([
@@ -6,11 +7,13 @@ joCache.set("widgets", function() {
new joFlexrow(new joInput("Hello, Jo!")),
new joLabel("joPasswordInput"),
new joFlexrow(new joPasswordInput("password")),
+ new joLabel("joInput with Placeholder"),
+ new joFlexrow(new joInput("", "Placeholder Text")),
new joLabel("joTextArea"),
new joFlexrow(new joTextarea("This is some multi-line text, Jo!")),
new joDivider(),
new joFlexrow([
- new joLabel("Left Aligned").setStyle({className:"left", marginTop:"2px"}),
+ new joLabel("Left Aligned").setStyle({className: "left", marginTop: "2px"}),
new joInput("From CSS").setStyle({width: "150px", marginBottom: "0"})
])
]),
@@ -26,7 +29,10 @@ joCache.set("widgets", function() {
"Chocolate Mousse",
"Rum Raisin Ice Cream",
"Fudge Sundae"
- ]),
+ ]).openEvent.subscribe(function(data, select) {
+ console.log(select);
+ App.stack.scrollTo(select);
+ }),
new joFlexrow([
new joLabel("joToggle").setStyle("left"),
new joToggle(true)
@@ -43,14 +49,6 @@ joCache.set("widgets", function() {
new joFlexrow(new joInput("Hello again, Jo!"))
])
]),
-/*
- new joLabel("Horizontal Scroller"),
- new joScroller([
- new joFlexrow([
- "HI", "HELLO", "HOLA", "SUP", "CHEERS", "DUDE", "YO"
- ])
- ]).setScroll(true, false).setStyle('iconz'),
-*/
new joDivider(),
new joButton("joButton").selectEvent.subscribe(function() {
App.scn.alert("You pressed a button!");
@@ -69,4 +67,3 @@ joCache.set("widgets", function() {
return card;
});
-var slider;
\ No newline at end of file
diff --git a/samples/test.html b/samples/test.html
index 1f74418..0e74e9f 100644
--- a/samples/test.html
+++ b/samples/test.html
@@ -4,10 +4,12 @@
+
+