Отформатированы лейауты; Перенесена часть JS из шаблонов в map.js - в общем навел красоту в разметке
This commit is contained in:
parent
5f5750c834
commit
90af568b3a
|
|
@ -124,21 +124,3 @@ if (App::$user) {
|
||||||
var categoryArray = '<?= json_encode($categoryArray) ?>';
|
var categoryArray = '<?= json_encode($categoryArray) ?>';
|
||||||
</script>
|
</script>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<script>
|
|
||||||
$(document).ready(function () {
|
|
||||||
if ($.cookie('doNotShowVKgroup')) {
|
|
||||||
$('#vkBigLogo').remove();
|
|
||||||
} else {
|
|
||||||
setTimeout(function () {
|
|
||||||
$('#vkBigLogo').css({'display': 'block'}).animate({'margin-left': "-225px"}, 1500);
|
|
||||||
}, 10000);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
function hideBigLogo() {
|
|
||||||
$.cookie('doNotShowVKgroup', true, {expires: 100, path: '/'});
|
|
||||||
$('#vkBigLogo').animate({'margin-left': "285px"}, 1500, function () {
|
|
||||||
$('#vkBigLogo').remove();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -7,50 +7,52 @@
|
||||||
<head>
|
<head>
|
||||||
<title><?= App::getConfig('title') ?></title>
|
<title><?= App::getConfig('title') ?></title>
|
||||||
|
|
||||||
<?php if ($styles): ?>
|
<?php if ($styles): ?>
|
||||||
<?php foreach ($styles as $style): ?>
|
<?php foreach ($styles as $style): ?>
|
||||||
<link href="<?= $style ?>" media="all" rel="stylesheet" type="text/css" />
|
<link href="<?= $style ?>" media="all" rel="stylesheet" type="text/css" />
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ($scripts): ?>
|
<?php if ($scripts): ?>
|
||||||
<?php foreach ($scripts as $script): ?>
|
<?php foreach ($scripts as $script): ?>
|
||||||
<script src="<?= $script ?>" type="text/javascript"></script>
|
<script src="<?= $script ?>" type="text/javascript"></script>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ($vars): ?>
|
<?php if ($vars): ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<?php foreach ($vars as $varName => $var): ?>
|
<?php foreach ($vars as $varName => $var): ?>
|
||||||
var <?= $varName ?> = '<?= $var ?>';
|
var <?= $varName ?> = '<?= $var ?>';
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</script>
|
</script>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if (isset($data['og']) && $data['og']): ?>
|
<?php if (isset($data['og']) && $data['og']): ?>
|
||||||
<meta property="og:title" content="<?= $data['og']['title'] ?>" />
|
<meta property="og:title" content="<?= $data['og']['title'] ?>" />
|
||||||
<meta property="og:description" content="<?= $data['og']['description'] ?>" />
|
<meta property="og:description" content="<?= $data['og']['description'] ?>" />
|
||||||
<meta property="og:site_name" content="<?= $data['og']['site_name'] ?>" />
|
<meta property="og:site_name" content="<?= $data['og']['site_name'] ?>" />
|
||||||
<meta property="og:type" content="<?= $data['og']['type'] ?>" />
|
<meta property="og:type" content="<?= $data['og']['type'] ?>" />
|
||||||
<meta property="og:url" content="<?= $data['og']['url'] ?>" />
|
<meta property="og:url" content="<?= $data['og']['url'] ?>" />
|
||||||
<meta property="og:image" content="<?= $data['og']['image'] ?>" />
|
<meta property="og:image" content="<?= $data['og']['image'] ?>" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||||
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu:400&subset=Cyrillic">
|
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu:400&subset=Cyrillic" />
|
||||||
|
|
||||||
<link rel="apple-touch-icon" href="/img/touch-icon-iphone.png">
|
<link rel="apple-touch-icon" href="/img/touch-icon-iphone.png" />
|
||||||
<link rel="apple-touch-icon" sizes="76x76" href="/img/touch-icon-ipad.png">
|
<link rel="apple-touch-icon" sizes="76x76" href="/img/touch-icon-ipad.png" />
|
||||||
<link rel="apple-touch-icon" sizes="120x120" href="/img/touch-icon-iphone-retina.png">
|
<link rel="apple-touch-icon" sizes="120x120" href="/img/touch-icon-iphone-retina.png" />
|
||||||
<link rel="apple-touch-icon" sizes="152x152" href="/img/touch-icon-ipad-retina.png">
|
<link rel="apple-touch-icon" sizes="152x152" href="/img/touch-icon-ipad-retina.png" />
|
||||||
</head>
|
</head>
|
||||||
<body style="padding: 10px 25px; overflow-y: scroll;">
|
<body style="padding: 10px 25px; overflow-y: scroll;">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<a href="/"><img src="/img/logo.png" title="WIKIPOINTS.RU" /></a>
|
<a href="/"><img src="/img/logo.png" title="WIKIPOINTS.RU" /></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?= isset($content) && !empty($content) ? $content : 'No content =(' ?>
|
<?= isset($content) && !empty($content) ? $content : 'No content =(' ?>
|
||||||
<?= self::renderPartial('metrika.php', array(), true) ?>
|
<?= self::renderPartial('metrika.php', array(), true) ?>
|
||||||
<?= self::renderPartial('ganalytics.php', array(), true) ?>
|
<?= self::renderPartial('ganalytics.php', array(), true) ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
<script lang="javascript">
|
<script lang="javascript">
|
||||||
function setSizeForAdditional() {
|
function setSizeForAdditional() {
|
||||||
|
|
@ -72,4 +74,4 @@
|
||||||
setSizeForAdditional();
|
setSizeForAdditional();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -2,29 +2,24 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><?= App::getConfig('title') ?></title>
|
<title><?= App::getConfig('title') ?></title>
|
||||||
|
<?php if ($styles): ?>
|
||||||
<?php if ($styles): ?>
|
<?php foreach ($styles as $style): ?>
|
||||||
<?php foreach ($styles as $style): ?>
|
|
||||||
<link href="<?= $style ?>" media="all" rel="stylesheet" type="text/css" />
|
<link href="<?= $style ?>" media="all" rel="stylesheet" type="text/css" />
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ($scripts): ?>
|
|
||||||
<?php foreach ($scripts as $script): ?>
|
|
||||||
<script src="<?= $script ?>" type="text/javascript"></script>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<?php if ($vars): ?>
|
|
||||||
<script type="text/javascript">
|
|
||||||
<?php foreach ($vars as $varName => $var): ?>
|
|
||||||
var <?= $varName ?> = '<?= $var ?>';
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</script>
|
|
||||||
<?php endif; ?>
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu:400&subset=Cyrillic">
|
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu:400&subset=Cyrillic">
|
||||||
|
<?php if ($scripts): ?>
|
||||||
|
<?php foreach ($scripts as $script): ?>
|
||||||
|
<script src="<?= $script ?>" type="text/javascript"></script>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($vars): ?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
<?php foreach ($vars as $varName => $var): ?>
|
||||||
|
var <?= $varName ?> = '<?= $var ?>';
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</script>
|
||||||
|
<?php endif; ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>WikiPoints.ru</h1>
|
<h1>WikiPoints.ru</h1>
|
||||||
|
|
|
||||||
|
|
@ -74,71 +74,3 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
|
||||||
function addNewImage(link)
|
|
||||||
{
|
|
||||||
if ($('.extraImage', '#addPointForm').length < 10)
|
|
||||||
{
|
|
||||||
$('.extraImage', '#newIm').clone().appendTo('#imgsContainer').show(200);
|
|
||||||
if (link != undefined)
|
|
||||||
{
|
|
||||||
$('.form-control.images', '#addPointForm').last().attr('readonly', 'readonly').val(link);
|
|
||||||
$('.input-group-addon.type.button', '#addPointForm').remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeInput(el)
|
|
||||||
{
|
|
||||||
container = $(el).parent().parent();
|
|
||||||
container.hide(300, function () {
|
|
||||||
container.remove()
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function switchType(el)
|
|
||||||
{
|
|
||||||
container = $(el).parent().parent();
|
|
||||||
if (container.hasClass('asLink'))
|
|
||||||
{
|
|
||||||
$('.ordering', container).val('FILE');
|
|
||||||
$('.ico span', container).removeClass('glyphicon-link').addClass('glyphicon-paperclip');
|
|
||||||
$('.form-control.images', container).attr('type', 'file').attr('name', 'photos[]');
|
|
||||||
$('.form-control.photoLinks', container).show();
|
|
||||||
container.removeClass('asLink');
|
|
||||||
el.attr('title', 'Указать ссылку на изображение');
|
|
||||||
$('.input-group-addon.type.ico', container).attr('title', 'Загрузите файл с изображением');
|
|
||||||
$('.input-group-addon.type.preview', container).hide();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$('.ordering', container).val('LINK');
|
|
||||||
$('.ico span', container).removeClass('glyphicon-paperclip').addClass('glyphicon-link');
|
|
||||||
$('.form-control.images', container).attr('type', 'text').attr('name', 'imgs[]');
|
|
||||||
$('.form-control.photoLinks', container).hide();
|
|
||||||
container.addClass('asLink');
|
|
||||||
el.attr('title', 'Загрузить файл');
|
|
||||||
$('.input-group-addon.type.ico', container).attr('title', 'Укажите ссылку на изображение');
|
|
||||||
$('.input-group-addon.type.preview', container).show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function showPreview(el) {
|
|
||||||
img = $('input.images', el.parent()).val();
|
|
||||||
|
|
||||||
if ($('input.ordering', el.parent()).val() == 'FILE' || img.length < 12) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (img.toLowerCase().indexOf('http') == -1) {
|
|
||||||
img = '/photos/small/' + img;
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#imgPreview').attr('src', img);
|
|
||||||
$('#imgPreview').show();
|
|
||||||
}
|
|
||||||
|
|
||||||
function hidePerview() {
|
|
||||||
$('#imgPreview').hide();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
|
||||||
|
|
@ -353,3 +353,91 @@ function showPointagreement()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// =============== ADD POINT
|
||||||
|
|
||||||
|
function addNewImage(link)
|
||||||
|
{
|
||||||
|
if ($('.extraImage', '#addPointForm').length < 10)
|
||||||
|
{
|
||||||
|
$('.extraImage', '#newIm').clone().appendTo('#imgsContainer').show(200);
|
||||||
|
if (link != undefined)
|
||||||
|
{
|
||||||
|
$('.form-control.images', '#addPointForm').last().attr('readonly', 'readonly').val(link);
|
||||||
|
$('.input-group-addon.type.button', '#addPointForm').remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeInput(el)
|
||||||
|
{
|
||||||
|
container = $(el).parent().parent();
|
||||||
|
container.hide(300, function () {
|
||||||
|
container.remove()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function switchType(el)
|
||||||
|
{
|
||||||
|
container = $(el).parent().parent();
|
||||||
|
if (container.hasClass('asLink'))
|
||||||
|
{
|
||||||
|
$('.ordering', container).val('FILE');
|
||||||
|
$('.ico span', container).removeClass('glyphicon-link').addClass('glyphicon-paperclip');
|
||||||
|
$('.form-control.images', container).attr('type', 'file').attr('name', 'photos[]');
|
||||||
|
$('.form-control.photoLinks', container).show();
|
||||||
|
container.removeClass('asLink');
|
||||||
|
el.attr('title', 'Указать ссылку на изображение');
|
||||||
|
$('.input-group-addon.type.ico', container).attr('title', 'Загрузите файл с изображением');
|
||||||
|
$('.input-group-addon.type.preview', container).hide();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('.ordering', container).val('LINK');
|
||||||
|
$('.ico span', container).removeClass('glyphicon-paperclip').addClass('glyphicon-link');
|
||||||
|
$('.form-control.images', container).attr('type', 'text').attr('name', 'imgs[]');
|
||||||
|
$('.form-control.photoLinks', container).hide();
|
||||||
|
container.addClass('asLink');
|
||||||
|
el.attr('title', 'Загрузить файл');
|
||||||
|
$('.input-group-addon.type.ico', container).attr('title', 'Укажите ссылку на изображение');
|
||||||
|
$('.input-group-addon.type.preview', container).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function showPreview(el) {
|
||||||
|
img = $('input.images', el.parent()).val();
|
||||||
|
|
||||||
|
if ($('input.ordering', el.parent()).val() == 'FILE' || img.length < 12) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (img.toLowerCase().indexOf('http') == -1) {
|
||||||
|
img = '/photos/small/' + img;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#imgPreview').attr('src', img);
|
||||||
|
$('#imgPreview').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function hidePerview() {
|
||||||
|
$('#imgPreview').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ======================= VK Button
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
if ($.cookie('doNotShowVKgroup')) {
|
||||||
|
$('#vkBigLogo').remove();
|
||||||
|
} else {
|
||||||
|
setTimeout(function () {
|
||||||
|
$('#vkBigLogo').css({'display': 'block'}).animate({'margin-left': "-225px"}, 1500);
|
||||||
|
}, 10000);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function hideBigLogo() {
|
||||||
|
$.cookie('doNotShowVKgroup', true, {expires: 100, path: '/'});
|
||||||
|
$('#vkBigLogo').animate({'margin-left': "285px"}, 1500, function () {
|
||||||
|
$('#vkBigLogo').remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue