perkeep/server/camlistored/ui/index.html

101 lines
3.8 KiB
HTML
Raw Normal View History

<!--
Copyright 2012 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=0.75">
<link rel="shortcut icon" sizes="16x16" href="safe1-16.png">
<link rel="shortcut icon" sizes="32x32" href="safe1-32.png">
<link rel="apple-touch-icon" sizes="16x16" href="safe1-16.png">
<link rel="apple-touch-icon" sizes="32x32" href="safe1-32.png">
<script src="closure/goog/base.js"></script>
<script src="./deps.js"></script>
<script src="?camli.mode=config&var=CAMLISTORE_CONFIG"></script>
<script src="react/react-with-addons.js"></script>
<script>
goog.DEBUG = false;
goog.require('goog.dom');
goog.require('goog.Uri');
goog.require('cam.AnimationLoop');
goog.require('cam.IndexPage');
goog.require('cam.ServerConnection');
</script>
<link rel="stylesheet" href="fontawesome/css/font-awesome.min.css">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="closure/goog/css/common.css" type="text/css">
<link rel="stylesheet/less" href="index.css" type="text/css">
<link rel="stylesheet/less" href="header.css" type="text/css">
<link rel="stylesheet/less" href="detail.css" type="text/css">
<link rel="stylesheet/less" href="blob_item.css" type="text/css">
<link rel="stylesheet/less" href="blob_item_video.css" type="text/css">
<link rel="stylesheet/less" href="blob_item_container.css" type="text/css">
<link rel="stylesheet/less" href="blob_item_foursquare.css" type="text/css">
<link rel="stylesheet/less" href="blob_item_twitter.css" type="text/css">
<link rel="stylesheet/less" href="dialog.css" type="text/css">
<link rel="stylesheet/less" href="permanode_detail.css" type="text/css">
<link rel="stylesheet/less" href="property_sheet.css" type="text/css">
<link rel="stylesheet/less" href="pyramid_throbber.css" type="text/css">
<link rel="stylesheet/less" href="sidebar.css" type="text/css">
<link rel="stylesheet/less" href="tags_control.css" type="text/css">
<script src="less/less.js"></script>
</head>
<body class="cam-index-page">
<script>
var lastWidth = -1;
var lastHeight = -1;
var render = function() {
var currentWidth = document.documentElement.offsetWidth;
var currentHeight = window.innerHeight;
if (currentWidth == lastWidth && currentHeight == lastHeight) {
return;
}
lastWidth = currentWidth;
lastHeight = currentHeight;
var index = cam.IndexPage({
availWidth: currentWidth,
availHeight: currentHeight,
config: CAMLISTORE_CONFIG,
eventTarget: window,
history: window.history,
openWindow: function(url) { return window.open(url); },
location: window.location,
scrolling: {
target: window,
// Note that calling get() can cause layout, so should be used only once per scroll event.
get: function() { return goog.dom.getDocumentScrollElement().scrollTop; },
set: function(val) { goog.dom.getDocumentScrollElement().scrollTop = val; },
},
serverConnection: new cam.ServerConnection(CAMLISTORE_CONFIG),
timer: window,
});
React.renderComponent(index, document.body);
};
window.addEventListener('resize', render);
window.setInterval(render, 3000);
render();
</script>
</body>
</html>