template.xhtml 1.83 KB
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:tools="http://java.sun.com/jsf/composite/cditools"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html" locale="#{sessionHandler.locale}">

	<h:head>

		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title><h:outputText value="#{layoutView.getHeader()}" /></title>
		<meta name="description" content="Lippukauppa" />
		<meta name="author" content="CodeCrew ry" />
		<meta http-equiv="Content-Language" content="fi" />

		<link rel="stylesheet" type="text/css"
			href="#{request.contextPath}/resources/templates/adduser/css/style.css" />
		<link rel="stylesheet" type="text/css"
			href="#{request.contextPath}/resources/templates/adduser/css/general.css" />
		<ui:insert name="headerdata" />

	</h:head>


	<h:body>
 <h:outputScript library="primefaces" name="jquery/jquery.js" />
		<div class="container top">
			<ui:insert name="topbar" />
		</div>

		<div class="container clearfix">

			<div id="content" class="boxcenter">
				<ui:insert name="content" />
			</div>

		</div>


		<script type="text/javascript">
		$(function(){
			   
			 $(window).resize(function() {
				 onResize(); });
					

			 function onResize() {
				 $('.boxcenter').css({
					   position:'absolute',
					   left: ($(window).width() 
					     - $('.boxcenter').outerWidth())/2,
					   top: ($(window).height() 
					     - $('.boxcenter').outerHeight())/2
				 });
				
				}
			 
			 // To initially run the function:
			 onResize();
		});


		</script>
		
	</h:body>

</f:view>
</html>