<!DOCTYPE html>
<html lang="en" style="font-size: 14px;">

<head>
	<meta charset="UTF-8" />
	<meta name="viewport"
		content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />

	<link rel="shortcut icon" href="/img/VKo.ico" type="image/x-icon" />

	<link rel="stylesheet" href="/css/{{.ServerVersion}}/messenger.css" />
	<link rel="stylesheet" href="/css/{{.ServerVersion}}/main.css" />
	<link rel="stylesheet" href="/css/{{.ServerVersion}}/icon.css" />
	<link rel="stylesheet" href="/css/{{.ServerVersion}}/controls.css" />
	<link rel="stylesheet" href="/css/{{.ServerVersion}}/modal.css" />
	<link rel="stylesheet" href="/css/{{.ServerVersion}}/media-mobile.css" />
	<link rel="stylesheet" href="/css/{{.ServerVersion}}/media-tablet.css" />
	<link rel="stylesheet" href="/css/{{.ServerVersion}}/media-desktop.css" />
	<link rel="stylesheet" href="/css/{{.ServerVersion}}/zapis.css" />


	<!-- adm -->
	{{if eq .IsAdmin true}}
	<link rel="stylesheet" href="/css/{{.ServerVersion}}/menu-editor.css" />
	<link rel="stylesheet" href="/css/{{.ServerVersion}}/material-editor.css" />
	<link rel="stylesheet" href="/css/{{.ServerVersion}}/admin.css" />
	{{end}}

<!-- secreter -->
{{if eq .isSecreter true}}
<link rel="stylesheet" href="/css/{{.ServerVersion}}/admin.css" />
{{end}}


	<title>Военный коммиссариат Курганской области</title>
</head>

<body>
	<header>
		<a class="logo" href="/">
			<img src="/img/logo.png" alt="logo" />
			<div class="text">ФКУ ВК г.Курган</div>
		</a>

		<div class="organization">
			<div>Федеральное казённое учреждение</div>
			<div>Военный коммиссариат Курганской области<br />Военный коммиссариат города Курган</div>
		</div>

		{{if eq .IsAdmin true}}
			<label class="admin-toolbox">
				<input type="checkbox">
				<div class="toolbox">
					<h4>Меню редактора</h4>
					<div class="tool-group">
						<div class="tool-button" data-category="новость" id="CreateNewsButton">
							<i class="fas fa-plus-circle"></i>
							Создать новость</div>
						<div class="tool-button" data-category="материал" id="CreateMaterialButton">
							<i class="fas fa-plus-circle"></i>
							Создать материал</div>
						<div class="tool-button" id="AddMaterialButton">
							<i class="fas fa-plus-circle"></i>
							Добавить материал в полезную информацию</div>
					</div>
				</div>
				<div class="toggle-button"><i class="fas fa-toolbox"></i></div>
			</label>
			
			{{end}}

			{{if eq .isSecreter true}}
			<label class="admin-toolbox">
				<input type="checkbox">
				<div class="toolbox">
					<h4>Меню секретаря</h4>
					<div class="tool-group">
						<a class="tool-button" style="text-decoration: none;" id="CreateNewsButton" href="/page/PageZap" >
							<i class="fas fa-clipboard-list"></i>
							Посетители</a>
						
					</div>
				</div>
				<i class="fas fa-people-arrows"></i>
			</label>
			
			{{end}}
			
	</header>
	<main>
		<section>
			<a class="block flex" href="/page/Zapis">
				<div class="pan">
					<i class="fas fa-pencil-alt"></i>
				</div>
				<div class="text-center">
					<div class="normal"><b>Запись на приём</b></div>
				</div>
			</a>

			<a class="block flex" href="/данные/материал/Schedule">
				<div class="icon">
					<i class="fas fa-th-list"></i>
				</div>
				<div class="text-center">
					<div class="normal"><b>График работы кабинетов</b></div>

				</div>
			</a>
			<a class="block flex" href="/page/position">
				<div class="icon">
					<i class="fas fa-map-marked-alt"></i>
				</div>
				<div class="text-center">
					<div class="normal"><b>Пункты призывной комиссии</b></div>
					<div class="red"><b></b></div>
				</div>
			</a>
		
			<a class="block flex" href="/page/Mass">
				<div class="icon">
					<i class="fas fa-info"></i>
				</div>
				<div class="text-center">
					<div class="normal"><b>Полезная информация</b></div>
					<div class="red"><b></b></div>
				</div>
			</a>
			<a class="block flex" href="/">
				<div class="icon">
					<i class="fas fa-newspaper"></i>
				</div>
				<div class="text-center">
					<div class="normal"><b>Новости</b></div>

				</div>
			</a>
			<a class="block flex" href="/page/BigBoss">
				<div class="icon">
					<i class="fas fa-users"></i>
				</div>
				<div class="text-center">
					<div class="normal"><b>Руководящий состав</b></div>
				</div>
			</a>
			<a class="block flex" href="http://mil.ru/">
				<div class="image">
					<img src="/img/minobrLog.png" alt="МИНОБОРОНЫ" />
				</div>
				<div class="text-center">
					<div class="normal"><b>МИНОБОРОНЫ РФ</b></div>
				</div>
			</a>
		</section>
		<section>
			
			{{if eq .IsMain true}}

			<!-- NEWS CONTAINER -->
			<div class="article-title">НОВОСТИ</div>
			<div class="news-container">{{.News}}</div>
			<div class="news-pagination">{{.Pagination}}</div>

			<!-- ELSE NOT MAIN -->
			{{else}}
			<article class="main-article">
				{{if eq .AvailableMaterial true}}
				<h1>{{.Page.Caption}}</h1>
				{{if eq .IsAdmin true}}
				<div class="material-tool-group">
					<div id="EditMaterialButton" class="tool-button" data-category="{{.Page.Category}}"
						data-link="{{.Page.Link}}"><i class="fas fa-pencil-alt"></i></div>
					{{if eq .Page.Active true}}
					<div id="DeleteMaterialButton" class="tool-button" data-active="true" data-link="{{.Page.Link}}"><i
							class="fas fa-times"></i></div>
				</div>
				{{else}}
				<div id="DeleteMaterialButton" class="tool-button" data-active="false" data-link="{{.Page.Link}}"><i
						class="fas fa-redo-alt"></i></div>
				</div>
				<div style="margin: 20px;color: red;text-align: center;">Материал удалён</div>
				{{end}}
				{{end}}
				<div class="published">{{.Page.Published}}</div>
				{{.Page.Content}}
				{{else}}
				{{if eq .Page "404"}}
				{{template "404"}}{{else}}
				{{if eq .Page "position"}}{{template "position"}}{{else}}
				{{if eq .Page "BigBoss"}}{{template "BigBoss"}}{{else}}
				{{if eq .Page "Zapis"}}{{template "Zapis"}}
				{{else}}
				{{if eq .Page "Mass"}}{{template "Mass" .}}
				{{end}}
				{{if eq .Page "PageZap"}}{{template "PageZap" .}}
				{{end}}
				{{end}}
				{{end}}
				{{end}}
				{{end}}
				{{end}}
			</article>
			{{end}}
		</section>
	</main>

	<footer>
		<div class="copyright">Разработал <a href="https://vk.com/paxan_dark">Новожилов Павел Андреевич</a><br>Все права защищены © 2020</div>
		{{if eq .IsLogin true}}
		<div onclick="VKKO.Main.SignOut()" class="sign-in"><i class="fas fa-sign-out-alt"></i> Выйти</div>
		{{else}}
		<div  class="sign-in hide"><i class="fas fa-sign-in-alt"></i> Войти</div>
		{{end}}
	</footer>

	<!-- Loading animated element. Default is not render -->
	<div class="loading hidden" id="LoadingAnimation">
		<div class="glob" style="--i:1"></div>
		<div class="glob" style="--i:2"></div>
		<div class="glob" style="--i:3"></div>
		<div class="glob" style="--i:4"></div>
		<div class="glob" style="--i:5"></div>
		<div class="glob" style="--i:6"></div>
	</div>
	<svg class="loading-filter">
		<filter id="gaus">
			<feGaussianBlur in="SourceGraphic" stdDeviation="10" />
			<feColorMatrix values="
				1 0 0 0 0
				0 1 0 0 0
				0 0 1 0 0
				0 0 0 40 -5
				" />
		</filter>
	</svg>
	<!-- ADMIN -->
	{{if eq .IsAdmin true}}

	<!-- EDITOR JS -->
	<script src="/js/{{.ServerVersion}}/editor/header.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/link.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/list.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/paragraph.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/image.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/simple-image.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/quote.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/table.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/marker.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/inline-code.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/code.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/delimiter.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/embed.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/checklist.js" async></script>
	<script src="/js/{{.ServerVersion}}/editor/editor.js" async></script>
	{{end}}
	<script>
		var ServerVersion = "{{.ServerVersion}}";
		var IsMain = "{{.IsMain}}" === "true" ? true : false;
		document.addEventListener("DOMContentLoaded", function () {
			VKKO.Main.Init();
		});
	</script>
	<script src="/js/{{.ServerVersion}}/fslightbox.js"></script>
	<script src="/js/{{.ServerVersion}}/app.js"></script>
</body>

</html>