You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ti...@apache.org on 2012/08/30 01:05:28 UTC
webworks commit: Updating hello world app
Updated Branches:
refs/heads/master a50a05886 -> eb145bf30
Updating hello world app
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/commit/eb145bf3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/tree/eb145bf3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/diff/eb145bf3
Branch: refs/heads/master
Commit: eb145bf3099b87724a5a875bb955b695e8b3ff5e
Parents: a50a058
Author: Tim Kim <ti...@nitobi.com>
Authored: Wed Aug 29 16:05:20 2012 -0700
Committer: Tim Kim <ti...@nitobi.com>
Committed: Wed Aug 29 16:05:20 2012 -0700
----------------------------------------------------------------------
bin/templates/project/www/config.xml | 6 +-
bin/templates/project/www/css/index.css | 80 +++++++--------
bin/templates/project/www/img/cordova.png | Bin 19932 -> 0 bytes
bin/templates/project/www/img/logo.png | Bin 0 -> 21814 bytes
bin/templates/project/www/index.html | 6 +-
.../project/www/res/icon/blackberry/icon-80.png | Bin 0 -> 7287 bytes
.../project/www/res/icon/cordova_bb_80.png | Bin 7287 -> 0 bytes
.../www/res/screen/blackberry/screen-225.png | Bin 0 -> 16776 bytes
.../www/res/screen/blackberry_transparent_300.png | Bin 15823 -> 0 bytes
.../www/res/screen/blackberry_transparent_400.png | Bin 11001 -> 0 bytes
10 files changed, 44 insertions(+), 48 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/eb145bf3/bin/templates/project/www/config.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/config.xml b/bin/templates/project/www/config.xml
index d267d5c..89576c7 100644
--- a/bin/templates/project/www/config.xml
+++ b/bin/templates/project/www/config.xml
@@ -63,11 +63,11 @@
<!-- Expose access to all URIs, including the file and http protocols -->
<access subdomains="true" uri="*" />
- <icon rim:hover="false" src="res/icon/cordova_bb_80.png" />
- <icon rim:hover="true" src="res/icon/cordova_bb_80.png" />
+ <icon rim:hover="false" src="res/icon/blackberry/icon-80.png" />
+ <icon rim:hover="true" src="res/icon/blackberry/icon-80.png" />
<rim:loadingScreen backgroundColor="#CFCFCF"
- foregroundImage="res/screen/blackberry_transparent_300.png"
+ foregroundImage="res/screen/blackberry/screen-225.png"
onFirstLaunch="true">
<rim:transitionEffect type="fadeOut" />
</rim:loadingScreen>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/eb145bf3/bin/templates/project/www/css/index.css
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/css/index.css b/bin/templates/project/www/css/index.css
index 0edd132..bacd6e3 100644
--- a/bin/templates/project/www/css/index.css
+++ b/bin/templates/project/www/css/index.css
@@ -16,19 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
-html,
-body {
- height:100%;
- font-size:12px;
- width:100%;
-}
-
-html {
- display:table;
+* {
+ -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
+ -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
+ -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
+ -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */
}
body {
- background-color:#A7A7A7;
+ background-color:#E4E4E4;
background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
@@ -39,22 +35,43 @@ body {
color-stop(0, #A7A7A7),
color-stop(0.51, #E4E4E4)
);
- display:table-cell;
+ background-attachment:fixed;
font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
+ font-size:12px;
+ height:100%;
+ margin:0px;
+ padding:0px;
text-transform:uppercase;
- vertical-align:middle;
+ width:100%;
}
+/* Portrait layout (default) */
.app {
- background-image:url(../img/cordova.png);
- background-repeat:no-repeat;
- margin:0px auto;
- width:275px;
+ background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
+ position:absolute; /* position in the center of the screen */
+ left:50%;
+ top:50%;
+ height:50px; /* text area height */
+ width:225px; /* text area width */
+ text-align:center;
+ padding:180px 0px 0px 0px; /* image height is 200px (bottom 20px are overlapped with text) */
+ margin:-115px 0px 0px -112px; /* offset vertical: half of image height and text area height */
+ /* offset horizontal: half of text area width */
+}
+
+/* Landscape layout (with min-width) */
+@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
+ .app {
+ background-position:left center;
+ padding:75px 0px 75px 170px; /* padding-top + padding-bottom + text area = image height */
+ margin:-90px 0px 0px -198px; /* offset vertical: half of image height */
+ /* offset horizontal: half of image width and text area width */
+ }
}
h1 {
- font-size:2em;
- font-weight:300;
+ font-size:24px;
+ font-weight:normal;
margin:0px;
overflow:visible;
padding:0px;
@@ -66,12 +83,9 @@ h1 {
border-radius:4px;
-webkit-border-radius:4px;
color:#FFFFFF;
- font-size:1em;
- margin:0px auto;
- padding:2px 10px;
- text-align:center;
- width:100%;
- max-width:175px;
+ font-size:12px;
+ margin:0px 30px;
+ padding:2px 0px;
}
.status.complete {
@@ -98,21 +112,3 @@ h1 {
animation:fade 3000ms infinite;
-webkit-animation:fade 3000ms infinite;
}
-
-/* portrait */
-/* @media screen and (max-aspect-ratio: 1/1) */
-.app {
- background-position:center top;
- height:100px; /* adds enough room for text */
- padding:180px 0px 0px 0px; /* background height - shadow offset */
-}
-
-/* lanscape (when wide enough) */
-@media screen and (min-aspect-ratio: 1/1) and (min-width:445px) {
- .app {
- background-position:left center;
- height:140px; /* height + padding = background image size */
- padding-left:170px; /* background width */
- padding-top:60px; /* center the text */
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/eb145bf3/bin/templates/project/www/img/cordova.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/img/cordova.png b/bin/templates/project/www/img/cordova.png
deleted file mode 100644
index e8169cf..0000000
Binary files a/bin/templates/project/www/img/cordova.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/eb145bf3/bin/templates/project/www/img/logo.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/img/logo.png b/bin/templates/project/www/img/logo.png
new file mode 100644
index 0000000..9519e7d
Binary files /dev/null and b/bin/templates/project/www/img/logo.png differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/eb145bf3/bin/templates/project/www/index.html
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/index.html b/bin/templates/project/www/index.html
index 1480690..b69a6a5 100644
--- a/bin/templates/project/www/index.html
+++ b/bin/templates/project/www/index.html
@@ -21,9 +21,9 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="format-detection" content="telephone=no" />
- <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width;" />
+ <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
- <title>Hello Cordova</title>
+ <title>Hello World</title>
</head>
<body>
<div class="app">
@@ -34,7 +34,7 @@
</div>
</div>
<script type="text/javascript" src="js/webworks.js"></script>
- <script type="text/javascript" src="cordova-2.1.0rc1.js"></script>
+ <script type="text/javascript" src="cordova-2.1.0.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/eb145bf3/bin/templates/project/www/res/icon/blackberry/icon-80.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/blackberry/icon-80.png b/bin/templates/project/www/res/icon/blackberry/icon-80.png
new file mode 100644
index 0000000..f86a27a
Binary files /dev/null and b/bin/templates/project/www/res/icon/blackberry/icon-80.png differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/eb145bf3/bin/templates/project/www/res/icon/cordova_bb_80.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/icon/cordova_bb_80.png b/bin/templates/project/www/res/icon/cordova_bb_80.png
deleted file mode 100644
index f86a27a..0000000
Binary files a/bin/templates/project/www/res/icon/cordova_bb_80.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/eb145bf3/bin/templates/project/www/res/screen/blackberry/screen-225.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/blackberry/screen-225.png b/bin/templates/project/www/res/screen/blackberry/screen-225.png
new file mode 100644
index 0000000..29873e9
Binary files /dev/null and b/bin/templates/project/www/res/screen/blackberry/screen-225.png differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/eb145bf3/bin/templates/project/www/res/screen/blackberry_transparent_300.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/blackberry_transparent_300.png b/bin/templates/project/www/res/screen/blackberry_transparent_300.png
deleted file mode 100644
index b548bdc..0000000
Binary files a/bin/templates/project/www/res/screen/blackberry_transparent_300.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-cordova-blackberry-webworks/blob/eb145bf3/bin/templates/project/www/res/screen/blackberry_transparent_400.png
----------------------------------------------------------------------
diff --git a/bin/templates/project/www/res/screen/blackberry_transparent_400.png b/bin/templates/project/www/res/screen/blackberry_transparent_400.png
deleted file mode 100644
index 3facdf9..0000000
Binary files a/bin/templates/project/www/res/screen/blackberry_transparent_400.png and /dev/null differ