<link href="templates/tiles/style.css" rel="stylesheet">
<div class="content" ng-init="rowsCount = 4">
	<div class="content image" ng-if="!fullscreenImage" ng-style="{'background-image': 'url(' + backgroundImage + ')'}">
		<div class="orders" ng-if="orders.length <= rowsCount * rowsCount">
			<div class="order-space">
				<div class="order" ng-repeat="order in orders | limitTo: rowsCount * rowsCount" ng-class="{completed: order.completed}" ng-style="{'width': (100 / (rowsCount)) +'%'}">
					<div class="order-prop order-empty"></div>
					<div class="order-prop order-number order-space">
						<div class="order-number-content">
							<span>{{order.number}}</span>
						</div>
					</div>
				</div>
				<div class="clearfix"></div>
			</div>
		</div>
		<div class="orders fullscreen" ng-if="orders.length > rowsCount * rowsCount">
			<div class="order-space">
				<div class="order" ng-repeat="order in orders | limitTo: 2*rowsCount * rowsCount" ng-class="{completed: order.completed}" ng-style="{'width': (100 / (2*rowsCount)) +'%'}">
					<div class="order-prop order-empty"></div>
					<div class="order-prop order-number order-space">
						<div class="order-number-content">
							<span>{{order.number}}</span>
						</div>
					</div>
				</div>
				<div class="clearfix"></div>
			</div>
		</div>
		<div class="orders fullheight" ng-if="orders.length <= rowsCount * rowsCount">
			<div class="image" ng-if="!isVideo(image)" ng-style="{'background-image': 'url(' + image + ')'}"></div>
			<video class="video" ng-if="isVideo(image)">
				<source src="{{image}}" type="video/mp4" ng-if="isVideo(image)">
				Your browser does not support the video tag.
			</video>
		</div>
	</div>
	<div class="image" ng-if="fullscreenImage && !isVideo(fullscreenImage)" ng-style="{'background-image': 'url(' + fullscreenImage + ')'}"></div>
	<video class="video" ng-if="fullscreenImage && isVideo(fullscreenImage)">
		<source src="{{fullscreenImage}}" type="video/mp4" ng-if="fullscreenImage && isVideo(fullscreenImage)">
		Your browser does not support the video tag.
	</video>
	<div class="title-bar" ng-click="showOrder()">
		<div class="logo" ng-style="{'background-image': 'url(' + logoImage + ')'}"></div>
		<div class="time">{{time | date: 'HH:mm'}}</div>
	</div>
</div>
