Infoscreen css fit and stretch and sample images
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#infocontent {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
z-index: -1; /* Ensure div tag stays behind content; -999 might work, too. */
|
||||
}
|
||||
|
||||
.stretch {
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.fit {
|
||||
width: auto;
|
||||
min-height: 100%;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<h1>testi1 {{ testparam }}</h1>
|
||||
<img ng-src="{{imagepath}}" class="fit"/>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
@@ -1,16 +1,18 @@
|
||||
var app = angular.module('infoApp', []);
|
||||
|
||||
|
||||
|
||||
app.controller('infoscreen_main', function($scope, $http,$timeout){
|
||||
var index = -1;
|
||||
var templates = [
|
||||
{
|
||||
template: "/static/html/test1.html",
|
||||
onload: function(){$scope.testparam = "foo";}
|
||||
onload: function(){$scope.imagepath = "/static/img/siklogo.jpg";}
|
||||
},{
|
||||
template: "/static/html/test2.html"
|
||||
},{
|
||||
template: "/static/html/test1.html",
|
||||
onload: function(){$scope.testparam = "bar";}
|
||||
onload: function(){$scope.imagepath = "/static/img/teekkaribileet.jpg";}
|
||||
},{
|
||||
template: "/static/html/test3.html"
|
||||
},
|
||||
|
||||
@@ -11,11 +11,24 @@
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"></link>
|
||||
<script src="/static/js/infoscreen_controllers.js"></script>
|
||||
<link rel="stylesheet" href="/static/css/infoscreen.css">
|
||||
<script src="/static/js/infoscreen_controllers.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="jumbotron" ng-controller="infoscreen_main">
|
||||
<div ng-controller="infoscreen_main" >
|
||||
<div id="infocontent" ng-include="active.template" onload="active.onload()"></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var elem = document.getElementById("infocontent");
|
||||
if (elem.requestFullscreen) {
|
||||
elem.requestFullscreen();
|
||||
} else if (elem.webkitRequestFullscreen) {
|
||||
elem.webkitRequestFullscreen();
|
||||
} else if (elem.mozRequestFullScreen) {
|
||||
elem.mozRequestFullScreen();
|
||||
} else if (elem.msRequestFullscreen) {
|
||||
elem.msRequestFullscreen();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user