Chromium Code Reviews| Index: chrome/browser/resources/touch_ntp/newtab.html |
| diff --git a/chrome/browser/resources/touch_ntp/newtab.html b/chrome/browser/resources/touch_ntp/newtab.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6b895da875000977ccb2aa16a2ba3bc61d08eaa9 |
| --- /dev/null |
| +++ b/chrome/browser/resources/touch_ntp/newtab.html |
| @@ -0,0 +1,71 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| + <meta charset="utf-8"> |
| + <title i18n-content="title"></title> |
| + <link rel="stylesheet" href="newtab.css"> |
| + <!-- Don't scale the viewport in either portrait or landscape mode. |
| + Note that this means apps will be reflowed when rotated (like iPad). |
| + If we wanted to maintain position we could remove 'maximum-scale' so |
| + that we'd zoom out in portrait mode, but then there would be a bunch |
| + of unusable space at the bottom. |
| + --> |
| + <meta name="viewport" content="user-scalable=no, width=device-width, maximum-scale=1.0" /> |
|
arv (Not doing code reviews)
2011/03/10 19:25:59
No /> in HTML
Rick Byers
2011/03/11 02:44:33
Done.
|
| +</head> |
| +<body> |
| + <div id="apps-frame"> |
| + <div id="apps-page-list"> |
| + <div class="apps-page"> |
| + <!-- This is used as a template which JS copies and fills in. The |
| + template itself is never actually displayed. For this HTML to |
| + validate, I need to supply and img src attribute, but to avoid |
|
arv (Not doing code reviews)
2011/03/10 19:25:59
validation is over rated. Don't let it get to you
Rick Byers
2011/03/11 02:44:33
Thanks!
I think this comment is stale anyway -
|
| + errors/warnings in chrome it needs to be a valid image. I use |
| + trash-open because I want to get it preloaded anyway to avoid flicker. |
| + Note that this isn't inside of apps-frame so that we can easily search |
| + for and manipulate all real apps. |
| + An app-container is always a direct child of an apps-page, and is |
| + expected to have a single 'app' child element holding the visible |
| + content, and 'img' and 'span' tags as descendants somewhere. |
| + --> |
| + <div class="app-container" id="app-template"> |
| + <div class="app"> |
| + <img src="trash-open.png"/> |
| + <span>App name</span> |
| + </div> |
| + </div> |
| + </div> |
| + </div> |
| + </div> |
| + <div id="footer"> |
| + <ul id="dot-list"> |
| + <li class="dot"></li> |
| + </ul> |
| + <div id="trash"> |
| + </div> |
| + </div> |
| + <!-- If this page isn't loaded as a chrome extension, try to load the |
| + standalone hacks --> |
| + <script type="text/javascript"> |
|
arv (Not doing code reviews)
2011/03/10 19:25:59
skip type
Rick Byers
2011/03/11 02:44:33
Done. But I'm curious why - isn't it better to be
arv (Not doing code reviews)
2011/03/11 20:08:46
type is optional and defaults to text/javascript i
|
| + if(!window.chrome || !window.chrome.send) { |
|
arv (Not doing code reviews)
2011/03/10 19:25:59
ws after if
Rick Byers
2011/03/11 02:44:33
Done.
|
| + // Dynamically reference the standalone script in the source tree. This |
| + // is intentionally obfuscated so that grit doesn't try to embed this |
|
arv (Not doing code reviews)
2011/03/10 19:25:59
This should be easy to fix in a cleaner way. Take
Rick Byers
2011/03/11 02:44:33
Perfect, thanks! I was never really happy with th
|
| + // file in the chrome resources |
| + document.write('<script type=\"text/javascript\" ' + |
| + 'src=\"standalone/standalone_hack.js\"></scr' + 'ipt>'); |
| + } |
| + </script> |
| + <!-- Substitute localized strings for all elements with il8n-content |
| + attributes. --> |
| + <script type="text/javascript" src="../shared/js/i18n_template.js"></script> |
| + <!-- template data placeholder --> |
| + <script type="text/javascript"> |
| + i18nTemplate.process(document, templateData); |
| + </script> |
| + |
| + <script type="text/javascript" src="eventtracker.js"></script> |
| + <script type="text/javascript" src="touchhandler.js"></script> |
| + <script type="text/javascript" src="slider.js"></script> |
| + <script type="text/javascript" src="grabber.js"></script> |
| + <script type="text/javascript" src="newtab.js"></script> |
| +</body> |
| +</html> |