summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/app_launcher.html
blob: 50ec2c3cc6da12c6a3dcc360c7e9344d7b6886ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html i18n-values="dir:textdirection;">
<head>
<meta charset="utf-8">
<title i18n-content="title"></title>
<style>

/* This is work in progress. */

* {
  -webkit-user-select: none;
}

body {
  margin: 10px;
}

#app-list {
  margin: 0;
  padding: 0;
}

#app-list img {
  width: 64px;
  height: 64px;
}

#app-list > li {
  display: inline-block;
  margin: 2px;
  padding: 0;
  text-align: center;
  width: 108px;
}

#app-list a {
  display: block;
  text-decoration: none;
  font-weight: bold;
  color: navy;
  border-radius: 5px;
  padding: 5px;
  background-color: rgba(255, 255, 255, 0); /* transparent white */
  -webkit-transition: background-color .15s;
}

#app-list a:hover {
  background: rgba(200, 200, 255, 0.3);
}

</style>
<script>

var exampleAppList = [
  {
    'id': '000000000000000000000000000000000000000000000000000000',
    'name': 'Hello A',
    'launch_url': 'http://www.example.com/a/',
    'description': 'Description of A',
    'icon': 'file:///C:/src/chrome/src/chrome/app/theme/extensions_section.png'
  },
  {
    'id': '000000000000000000000000000000000000000000000000000001',
    'name': 'Hello B',
    'launch_url': 'http://www.example.com/b/',
    'description': 'Description of B',
    'icon': 'file:///C:/src/chrome/src/chrome/app/theme/extensions_section.png'
  }
];

chrome.send('getAll', []);

function getAllCallback(value) {
  var context = new JsEvalContext(value);
  var template = document.getElementById('template-root');
  jstProcess(context, template);
}

function launch(uri) {
  chrome.send('launch', [uri]);
}

</script>
</head>
<body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize">

<p>UI under development. Designs are subject to
<a href="http://www.chromium.org/chromium-os/user-experience/">change</a>.

<div id="template-root">

<ul id="app-list" jsdisplay="$this.length">
  <li jsselect="$this">

    <a jsvalues="href:launch_url;title:description"
       onclick="launch(this.href); return false">
      <img jsvalues="src:icon">
      <div jscontent="name">NAME</div>
    </a>
  </li>
</ul>

<p jsdisplay="!$this.length">Go install some apps...

</div>

</body>
</html>