diff --git a/examples/todos/.meteor/release b/examples/todos/.meteor/release
index 7057f80807..08dd5d2b36 100644
--- a/examples/todos/.meteor/release
+++ b/examples/todos/.meteor/release
@@ -1 +1 @@
-METEOR@0.9.4
+METEOR@0.9.4
\ No newline at end of file
diff --git a/examples/todos/client/head.html b/examples/todos/client/head.html
index 3560b0b94a..ab61347796 100644
--- a/examples/todos/client/head.html
+++ b/examples/todos/client/head.html
@@ -1,6 +1,4 @@
-
-
Todos - All your todos synced wherever you happen to be
diff --git a/examples/todos/client/stylesheets/globals/nav.import.less b/examples/todos/client/stylesheets/globals/nav.import.less
index 1fb7ce1a0a..02a97dca26 100644
--- a/examples/todos/client/stylesheets/globals/nav.import.less
+++ b/examples/todos/client/stylesheets/globals/nav.import.less
@@ -42,7 +42,10 @@ nav {
.title-page {
.position(absolute, 0, 3rem, auto, 3rem);
- @media screen and (min-width: 40em) { left: 1rem; }
+ @media screen and (min-width: 40em) {
+ left: 1rem;
+ right: 6rem;
+ }
cursor: pointer;
font-size: 1.125em; // 18px
diff --git a/examples/todos/client/stylesheets/main.less b/examples/todos/client/stylesheets/main.less
index 69d5c249e7..f1136cc6f8 100644
--- a/examples/todos/client/stylesheets/main.less
+++ b/examples/todos/client/stylesheets/main.less
@@ -3,6 +3,7 @@
// Mixins & utilities
@import 'util/helpers.import.less';
@import 'util/lesshat.import.less';
+@import 'util/fontface.import.less';
@import 'util/text.import.less';
@import 'util/typography.import.less';
@import 'util/variables.import.less';
@@ -26,4 +27,4 @@
@import '../templates/lists-show.import.less';
@import '../templates/auth.import.less';
@import '../templates/app-not-found.import.less';
-@import '../templates/loading.import.less';
\ No newline at end of file
+@import '../templates/loading.import.less';
diff --git a/examples/todos/client/stylesheets/util/fontface.import.less b/examples/todos/client/stylesheets/util/fontface.import.less
new file mode 100644
index 0000000000..55051a4b08
--- /dev/null
+++ b/examples/todos/client/stylesheets/util/fontface.import.less
@@ -0,0 +1,24 @@
+// Light
+@font-face {
+ font-family: 'Open Sans';
+ src: url('font/OpenSans-Light-webfont.eot');
+ src: url('font/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'),
+ url('font/OpenSans-Light-webfont.woff') format('woff'),
+ url('font/OpenSans-Light-webfont.ttf') format('truetype'),
+ url('font/OpenSans-Light-webfont.svg#OpenSansLight') format('svg');
+ font-weight: 200;
+ font-style: normal;
+}
+
+// Regular
+@font-face {
+ font-family: 'Open Sans';
+ src: url('font/OpenSans-Regular-webfont.eot');
+ src: url('font/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
+ url('font/OpenSans-Regular-webfont.woff') format('woff'),
+ url('font/OpenSans-Regular-webfont.ttf') format('truetype'),
+ url('font/OpenSans-Regular-webfont.svg#OpenSansRegular') format('svg');
+ font-weight: normal;
+ font-weight: 400;
+ font-style: normal;
+}
\ No newline at end of file
diff --git a/examples/todos/client/templates/app-body.js b/examples/todos/client/templates/app-body.js
index ef5df616ae..702ef907a1 100644
--- a/examples/todos/client/templates/app-body.js
+++ b/examples/todos/client/templates/app-body.js
@@ -7,7 +7,7 @@ Session.setDefault(USER_MENU_KEY, false);
var SHOW_CONNECTION_ISSUE_KEY = 'showConnectionIssue';
Session.setDefault(SHOW_CONNECTION_ISSUE_KEY, false);
-var CONNECTION_ISSUE_TIMEOUT = 1000;
+var CONNECTION_ISSUE_TIMEOUT = 5000;
Meteor.startup(function () {
// set up a swipe left / right handler
@@ -21,9 +21,13 @@ Meteor.startup(function () {
preventDefaultEvents: false
});
- // Don't show the connection error box unless we haven't connected within
- // 1 second of app starting
+ // Only show the connection error box if it has been 5 seconds since
+ // the app started
setTimeout(function () {
+ // Launch screen handle created in lib/router.js
+ dataReadyHold.release();
+
+ // Show the connection error box
Session.set(SHOW_CONNECTION_ISSUE_KEY, true);
}, CONNECTION_ISSUE_TIMEOUT);
});
@@ -34,11 +38,13 @@ Template.appBody.rendered = function() {
$(node)
.hide()
.insertBefore(next)
- .fadeIn();
+ .fadeIn(function () {
+ listFadeInHold.release();
+ });
},
removeElement: function(node) {
$(node).fadeOut(function() {
- this.remove();
+ $(this).remove();
});
}
};
diff --git a/examples/todos/client/templates/lists-show.js b/examples/todos/client/templates/lists-show.js
index 65eeb55fe2..acd8518105 100644
--- a/examples/todos/client/templates/lists-show.js
+++ b/examples/todos/client/templates/lists-show.js
@@ -1,7 +1,22 @@
var EDITING_KEY = 'editingList';
Session.setDefault(EDITING_KEY, false);
+// Track if this is the first time the list template is rendered
+var firstRender = true;
+var listRenderHold = LaunchScreen.hold();
+listFadeInHold = null;
+
Template.listsShow.rendered = function() {
+ if (firstRender) {
+ // Released in app-body.js
+ listFadeInHold = LaunchScreen.hold();
+
+ // Handle for launch screen defined in app-body.js
+ listRenderHold.release();
+
+ firstRender = false;
+ }
+
this.find('.js-title-nav')._uihooks = {
insertElement: function(node, next) {
$(node)
diff --git a/examples/todos/lib/router.js b/examples/todos/lib/router.js
index 7bc5d889cd..abb50cc968 100644
--- a/examples/todos/lib/router.js
+++ b/examples/todos/lib/router.js
@@ -18,8 +18,16 @@ Router.configure({
}
});
+dataReadyHold = null;
+
if (Meteor.isClient) {
- var launchScreenHandle = LaunchScreen.hold();
+ // Keep showing the launch screen on mobile devices until we have loaded
+ // the app's data
+ dataReadyHold = LaunchScreen.hold();
+
+ // Show the loading screen on desktop
+ Router.onBeforeAction('loading', {except: ['join', 'signin']});
+ Router.onBeforeAction('dataNotFound', {except: ['join', 'signin']});
}
Router.map(function() {
@@ -32,15 +40,17 @@ Router.map(function() {
// subscription, we'll just render the items as they arrive
onBeforeAction: function () {
this.todosHandle = Meteor.subscribe('todos', this.params._id);
+
+ if (this.ready()) {
+ // Handle for launch screen defined in app-body.js
+ dataReadyHold.release();
+ }
},
data: function () {
return Lists.findOne(this.params._id);
},
action: function () {
this.render();
- if (Meteor.isClient) {
- launchScreenHandle.release();
- }
}
});
diff --git a/examples/todos/mobile-config.js b/examples/todos/mobile-config.js
index ae73b56247..ae38fa09c3 100644
--- a/examples/todos/mobile-config.js
+++ b/examples/todos/mobile-config.js
@@ -33,3 +33,5 @@ App.launchScreens({
App.setPreference('StatusBarOverlaysWebView', 'false');
App.setPreference('StatusBarBackgroundColor', '#000000');
+App.setPreference('SplashScreen', 'screen');
+
diff --git a/examples/todos/packages/iron-router b/examples/todos/packages/iron-router
new file mode 160000
index 0000000000..ed1956e815
--- /dev/null
+++ b/examples/todos/packages/iron-router
@@ -0,0 +1 @@
+Subproject commit ed1956e815f799505c2dce719e0537d9a5590e93
diff --git a/examples/todos/public/font/OpenSans-Light-webfont.eot b/examples/todos/public/font/OpenSans-Light-webfont.eot
new file mode 100755
index 0000000000..f17617e039
Binary files /dev/null and b/examples/todos/public/font/OpenSans-Light-webfont.eot differ
diff --git a/examples/todos/public/font/OpenSans-Light-webfont.svg b/examples/todos/public/font/OpenSans-Light-webfont.svg
new file mode 100755
index 0000000000..deadc3ef1a
--- /dev/null
+++ b/examples/todos/public/font/OpenSans-Light-webfont.svg
@@ -0,0 +1,252 @@
+
+
+
\ No newline at end of file
diff --git a/examples/todos/public/font/OpenSans-Light-webfont.ttf b/examples/todos/public/font/OpenSans-Light-webfont.ttf
new file mode 100755
index 0000000000..b83078a607
Binary files /dev/null and b/examples/todos/public/font/OpenSans-Light-webfont.ttf differ
diff --git a/examples/todos/public/font/OpenSans-Light-webfont.woff b/examples/todos/public/font/OpenSans-Light-webfont.woff
new file mode 100755
index 0000000000..ff882b6aca
Binary files /dev/null and b/examples/todos/public/font/OpenSans-Light-webfont.woff differ
diff --git a/examples/todos/public/font/OpenSans-Regular-webfont.eot b/examples/todos/public/font/OpenSans-Regular-webfont.eot
new file mode 100755
index 0000000000..545b7c15e5
Binary files /dev/null and b/examples/todos/public/font/OpenSans-Regular-webfont.eot differ
diff --git a/examples/todos/public/font/OpenSans-Regular-webfont.svg b/examples/todos/public/font/OpenSans-Regular-webfont.svg
new file mode 100755
index 0000000000..46a8f4c6ca
--- /dev/null
+++ b/examples/todos/public/font/OpenSans-Regular-webfont.svg
@@ -0,0 +1,252 @@
+
+
+
\ No newline at end of file
diff --git a/examples/todos/public/font/OpenSans-Regular-webfont.ttf b/examples/todos/public/font/OpenSans-Regular-webfont.ttf
new file mode 100755
index 0000000000..a5b2378e5c
Binary files /dev/null and b/examples/todos/public/font/OpenSans-Regular-webfont.ttf differ
diff --git a/examples/todos/public/font/OpenSans-Regular-webfont.woff b/examples/todos/public/font/OpenSans-Regular-webfont.woff
new file mode 100755
index 0000000000..11698afc2c
Binary files /dev/null and b/examples/todos/public/font/OpenSans-Regular-webfont.woff differ
diff --git a/examples/todos/resources/icons/icon-36-ldpi.png b/examples/todos/resources/icons/icon-36-ldpi.png
new file mode 100644
index 0000000000..027097b933
Binary files /dev/null and b/examples/todos/resources/icons/icon-36-ldpi.png differ
diff --git a/examples/todos/resources/icons/icon-40.png b/examples/todos/resources/icons/icon-40.png
index 8a1c89fb50..708244986d 100644
Binary files a/examples/todos/resources/icons/icon-40.png and b/examples/todos/resources/icons/icon-40.png differ
diff --git a/examples/todos/resources/icons/icon-40@2x.png b/examples/todos/resources/icons/icon-40@2x.png
index a03333a6d4..50e8ebd582 100644
Binary files a/examples/todos/resources/icons/icon-40@2x.png and b/examples/todos/resources/icons/icon-40@2x.png differ
diff --git a/examples/todos/resources/icons/icon-48-mdpi.png b/examples/todos/resources/icons/icon-48-mdpi.png
new file mode 100644
index 0000000000..f6e44b40f1
Binary files /dev/null and b/examples/todos/resources/icons/icon-48-mdpi.png differ
diff --git a/examples/todos/resources/icons/icon-50.png b/examples/todos/resources/icons/icon-50.png
index 2b6e93779c..7fd194926b 100644
Binary files a/examples/todos/resources/icons/icon-50.png and b/examples/todos/resources/icons/icon-50.png differ
diff --git a/examples/todos/resources/icons/icon-50@2x.png b/examples/todos/resources/icons/icon-50@2x.png
index e5942fb639..e4e5f00128 100644
Binary files a/examples/todos/resources/icons/icon-50@2x.png and b/examples/todos/resources/icons/icon-50@2x.png differ
diff --git a/examples/todos/resources/icons/icon-60.png b/examples/todos/resources/icons/icon-60.png
index 4c693ceeac..246c051dfc 100644
Binary files a/examples/todos/resources/icons/icon-60.png and b/examples/todos/resources/icons/icon-60.png differ
diff --git a/examples/todos/resources/icons/icon-60@2x.png b/examples/todos/resources/icons/icon-60@2x.png
index d7ca52dd0b..d3832624bf 100644
Binary files a/examples/todos/resources/icons/icon-60@2x.png and b/examples/todos/resources/icons/icon-60@2x.png differ
diff --git a/examples/todos/resources/icons/icon-72-hdpi.png b/examples/todos/resources/icons/icon-72-hdpi.png
new file mode 100644
index 0000000000..d0d0c6325b
Binary files /dev/null and b/examples/todos/resources/icons/icon-72-hdpi.png differ
diff --git a/examples/todos/resources/icons/icon-72.png b/examples/todos/resources/icons/icon-72.png
index 675d58e272..85aeb2900a 100644
Binary files a/examples/todos/resources/icons/icon-72.png and b/examples/todos/resources/icons/icon-72.png differ
diff --git a/examples/todos/resources/icons/icon-72@2x.png b/examples/todos/resources/icons/icon-72@2x.png
index 2d95191dd4..c1b7f7c979 100644
Binary files a/examples/todos/resources/icons/icon-72@2x.png and b/examples/todos/resources/icons/icon-72@2x.png differ
diff --git a/examples/todos/resources/icons/icon-76.png b/examples/todos/resources/icons/icon-76.png
index abf57010c1..bb4593f618 100644
Binary files a/examples/todos/resources/icons/icon-76.png and b/examples/todos/resources/icons/icon-76.png differ
diff --git a/examples/todos/resources/icons/icon-76@2x.png b/examples/todos/resources/icons/icon-76@2x.png
index 81792f5e19..b957a3edaf 100644
Binary files a/examples/todos/resources/icons/icon-76@2x.png and b/examples/todos/resources/icons/icon-76@2x.png differ
diff --git a/examples/todos/resources/icons/icon-96-xhdpi.png b/examples/todos/resources/icons/icon-96-xhdpi.png
new file mode 100644
index 0000000000..1b54fef422
Binary files /dev/null and b/examples/todos/resources/icons/icon-96-xhdpi.png differ
diff --git a/examples/todos/resources/icons/icon-small.png b/examples/todos/resources/icons/icon-small.png
index 08060aa57b..a68d919e19 100644
Binary files a/examples/todos/resources/icons/icon-small.png and b/examples/todos/resources/icons/icon-small.png differ
diff --git a/examples/todos/resources/icons/icon-small@2x.png b/examples/todos/resources/icons/icon-small@2x.png
index 1f6ff784e0..b02e1e6a27 100644
Binary files a/examples/todos/resources/icons/icon-small@2x.png and b/examples/todos/resources/icons/icon-small@2x.png differ
diff --git a/examples/todos/resources/icons/icon.png b/examples/todos/resources/icons/icon.png
index 0d35755f9b..84f6a6d6c8 100644
Binary files a/examples/todos/resources/icons/icon.png and b/examples/todos/resources/icons/icon.png differ
diff --git a/examples/todos/resources/icons/icon@2x.png b/examples/todos/resources/icons/icon@2x.png
index 4b35dfc41c..f731fbb8ac 100644
Binary files a/examples/todos/resources/icons/icon@2x.png and b/examples/todos/resources/icons/icon@2x.png differ
diff --git a/examples/todos/resources/splash/Default-568h@2x~iphone.png b/examples/todos/resources/splash/Default-568h@2x~iphone.png
index a021680854..64908e344b 100644
Binary files a/examples/todos/resources/splash/Default-568h@2x~iphone.png and b/examples/todos/resources/splash/Default-568h@2x~iphone.png differ
diff --git a/examples/todos/resources/splash/Default-Landscape@2x~ipad.png b/examples/todos/resources/splash/Default-Landscape@2x~ipad.png
index d7f0b043e0..c7f8b1290e 100644
Binary files a/examples/todos/resources/splash/Default-Landscape@2x~ipad.png and b/examples/todos/resources/splash/Default-Landscape@2x~ipad.png differ
diff --git a/examples/todos/resources/splash/Default-Landscape~ipad.png b/examples/todos/resources/splash/Default-Landscape~ipad.png
index ec07625968..6efc75e776 100644
Binary files a/examples/todos/resources/splash/Default-Landscape~ipad.png and b/examples/todos/resources/splash/Default-Landscape~ipad.png differ
diff --git a/examples/todos/resources/splash/Default-Portrait@2x~ipad.png b/examples/todos/resources/splash/Default-Portrait@2x~ipad.png
index c49c254858..d07707a84d 100644
Binary files a/examples/todos/resources/splash/Default-Portrait@2x~ipad.png and b/examples/todos/resources/splash/Default-Portrait@2x~ipad.png differ
diff --git a/examples/todos/resources/splash/Default-Portrait~ipad.png b/examples/todos/resources/splash/Default-Portrait~ipad.png
index 77fd231984..aaa1aecff8 100644
Binary files a/examples/todos/resources/splash/Default-Portrait~ipad.png and b/examples/todos/resources/splash/Default-Portrait~ipad.png differ
diff --git a/examples/todos/resources/splash/Default@2x~iphone.png b/examples/todos/resources/splash/Default@2x~iphone.png
index 91a44ff8f5..33eee2787d 100644
Binary files a/examples/todos/resources/splash/Default@2x~iphone.png and b/examples/todos/resources/splash/Default@2x~iphone.png differ
diff --git a/examples/todos/resources/splash/Default~iphone.png b/examples/todos/resources/splash/Default~iphone.png
index e9831e2c9b..d85238eeb3 100644
Binary files a/examples/todos/resources/splash/Default~iphone.png and b/examples/todos/resources/splash/Default~iphone.png differ
diff --git a/examples/todos/resources/splash/hdpi.png b/examples/todos/resources/splash/hdpi.png
new file mode 100644
index 0000000000..d22e7920a7
Binary files /dev/null and b/examples/todos/resources/splash/hdpi.png differ
diff --git a/examples/todos/resources/splash/ldpi.png b/examples/todos/resources/splash/ldpi.png
new file mode 100644
index 0000000000..43ce751639
Binary files /dev/null and b/examples/todos/resources/splash/ldpi.png differ
diff --git a/examples/todos/resources/splash/mdpi.png b/examples/todos/resources/splash/mdpi.png
new file mode 100644
index 0000000000..65112282f6
Binary files /dev/null and b/examples/todos/resources/splash/mdpi.png differ
diff --git a/examples/todos/resources/splash/xhdpi.png b/examples/todos/resources/splash/xhdpi.png
new file mode 100644
index 0000000000..b8c3f25fe9
Binary files /dev/null and b/examples/todos/resources/splash/xhdpi.png differ