@Title{Gallery}@
@CSS{
	.album{
		width:33.33%;
		/*float:left;*/
		display:inline-block;
		vertical-align:top;
	}
	
	.album>div{
		margin:5px;
		padding:5px;
		background:#e0e0e0;
	}
	
	.album span{
		display:block;
		text-align:center;
		color:#424242;
		overflow:hidden;
	}
}@
@CSSMed{
	@media(orientation:portrait){
		.album{
			width:50%;
		}
	}
}@
@CSSSmall{
	@media(orientation:portrait){
		.album{
			width:100%;
		}
	}
	
	@media(orientation:landscape){
		.album{
			width:50%;
		}
	}
}@
@ButtonsRight{
	<?php if (Session::GetLoggedInUser()->HasAccess("gallery/manage")){?>
		<button onclick="Navigate('/gallery/manage/')" title="Manage">
			<img src="/images/gallery.svg" alt="Manage" />
		</button>
	<?php } ?>
}@
@Body{
	<?php foreach ($albums as $album){
		echo '<div class="album"><div><a href="/gallery/view/',$album->AlbumUrl,'/"><img src="/',$album->Images[0]->ThumbnailPath,'" /></a><span>',$album->AlbumTitle,'</span></div></div>';
	}?>
}@