Отформатированы лейауты; Перенесена часть JS из шаблонов в map.js - в общем навел красоту в разметке
This commit is contained in:
parent
5f5750c834
commit
90af568b3a
|
|
@ -124,21 +124,3 @@ if (App::$user) {
|
|||
var categoryArray = '<?= json_encode($categoryArray) ?>';
|
||||
</script>
|
||||
<?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>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
<meta property="og:url" content="<?= $data['og']['url'] ?>" />
|
||||
<meta property="og:image" content="<?= $data['og']['image'] ?>" />
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($vars): ?>
|
||||
<script type="text/javascript">
|
||||
<?php foreach ($vars as $varName => $var): ?>
|
||||
|
|
@ -29,18 +30,20 @@
|
|||
<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="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="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" 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="120x120" href="/img/touch-icon-iphone-retina.png" />
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/img/touch-icon-ipad-retina.png" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<a href="/"><img src="/img/logo.png" title="WIKIPOINTS.RU" /></a>
|
||||
</div>
|
||||
|
||||
<?= isset($content) && !empty($content) ? $content : 'No content =(' ?>
|
||||
<?= self::renderPartial('metrika.php', array(), true) ?>
|
||||
<?= self::renderPartial('ganalytics.php', array(), true) ?>
|
||||
|
||||
</body>
|
||||
|
||||
<style>
|
||||
|
|
|
|||
|
|
@ -37,20 +37,22 @@
|
|||
<?php endif; ?>
|
||||
|
||||
<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" 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="152x152" href="/img/touch-icon-ipad-retina.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="120x120" href="/img/touch-icon-iphone-retina.png" />
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/img/touch-icon-ipad-retina.png" />
|
||||
</head>
|
||||
<body style="padding: 10px 25px; overflow-y: scroll;">
|
||||
<div class="header">
|
||||
<a href="/"><img src="/img/logo.png" title="WIKIPOINTS.RU" /></a>
|
||||
</div>
|
||||
|
||||
<?= isset($content) && !empty($content) ? $content : 'No content =(' ?>
|
||||
<?= self::renderPartial('metrika.php', array(), true) ?>
|
||||
<?= self::renderPartial('ganalytics.php', array(), true) ?>
|
||||
|
||||
</body>
|
||||
<script lang="javascript">
|
||||
function setSizeForAdditional() {
|
||||
|
|
|
|||
|
|
@ -2,19 +2,17 @@
|
|||
<html>
|
||||
<head>
|
||||
<title><?= App::getConfig('title') ?></title>
|
||||
|
||||
<?php if ($styles): ?>
|
||||
<?php foreach ($styles as $style): ?>
|
||||
<link href="<?= $style ?>" media="all" rel="stylesheet" type="text/css" />
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<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): ?>
|
||||
|
|
@ -22,9 +20,6 @@
|
|||
<?php endforeach; ?>
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Ubuntu:400&subset=Cyrillic">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1>WikiPoints.ru</h1>
|
||||
|
|
|
|||
|
|
@ -74,71 +74,3 @@
|
|||
</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