Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Import code samples
Browse files Browse the repository at this point in the history
  • Loading branch information
townxelliot committed Mar 19, 2014
1 parent ca7a0be commit 79dc8f0
Show file tree
Hide file tree
Showing 19 changed files with 1,502 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hello_world/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Hello, world!

A minimalistic skeleton sample web application.
13 changes: 13 additions & 0 deletions hello_world/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<html>
<head>
<title>Hello, world!</title>
<link rel='stylesheet' href='main.css'>
<script src='main.js'></script>
</head>
<body>
Hello, world!<br>
<br>
Crosswalk version (per userAgent):<br>
<div id='version'></div>
</body>
</html>
8 changes: 8 additions & 0 deletions hello_world/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
body {
background-color: #f0f0f0;
border: 5ex solid #fdfdf0;
padding: 5ex;
margin: 0;
line-height: 1.75rem;
font-size: 1.25rem;
}
5 changes: 5 additions & 0 deletions hello_world/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

document.addEventListener('DOMContentLoaded', function () {
document.getElementById ('version').textContent =
navigator.userAgent;
});
10 changes: 10 additions & 0 deletions hello_world/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Hello, world!",
"manifest_version": 1,
"version": "0.0.0.1",
"app": {
"launch":{
"local_path": "index.html"
}
}
}
9 changes: 9 additions & 0 deletions tizen_apis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## tizen.systeminfo API example

A small sample demonstrating usage of the tizen.systeminfo API.

# Installation
sdb push samples/tizen_apis /home/developer/tizen_apis

# Running
sdb shell "tizen-extensions-crosswalk /home/developer/tizen_apis/index.html"
26 changes: 26 additions & 0 deletions tizen_apis/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<html>
<head>
<title>tizen.systeminfo API</title>
<link rel='stylesheet' href='main.css'>
<script src='main.js'></script>
</head>
<body>
<textarea id="output"></textarea>
<br>
<button id="capability_btn">GetCapabilities</button>
<br>
<button id="battery_btn">Battery</button>
<button id="cpu_btn">CPU</button>
<button id="storage_btn">Storage</button>
<button id="display_btn">Display</button>
<button id="device_orientation_btn">Device Orientation</button>
<button id="build_btn">Build</button>
<br>
<button id="locale_btn">Locale</button>
<button id="network_btn">Network</button>
<button id="wifi_network_btn">Wifi Network</button>
<button id="cellular_network_btn">Cellular Network</button>
<button id="sim_btn">SIM</button>
<button id="peripheral_btn">Peripheral</button>
</body>
</html>
25 changes: 25 additions & 0 deletions tizen_apis/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
body {
background-color: #f0f0f0;
border: 2.5ex solid #fdfdf0;
padding: 2.5ex;
margin: 0;
line-height: 1.75rem;
font-size: 1.25rem;
}

textarea {
width: 100%;
height: 50%;
font-size: 1.25rem;
line-height: 1.5rem;
}

button {
border-radius: 5px;
color: black;
background: hsl(23, 75%, 56%);
border: 2px solid hsl(23, 57%, 30%);
padding: 1ex 2ex;
margin: 0.5em;
min-width: 20ex;
}
Loading

0 comments on commit 79dc8f0

Please sign in to comment.