server
This commit is contained in:
parent
e34791760d
commit
132a4febbc
|
|
@ -117,12 +117,15 @@ class Advertisement extends ComponentBase
|
|||
$statistika->increment('click');
|
||||
}
|
||||
|
||||
if($data['url']){
|
||||
$this->page['url'] = $data['url'];
|
||||
return [
|
||||
'@#'.$this->alias => $this->renderPartial('@redirect'),
|
||||
];
|
||||
}
|
||||
//if($data['url']){
|
||||
|
||||
// $this->page['url'] = $data['url'];
|
||||
//return Redirect::to($data['url']);
|
||||
// return [
|
||||
// '@#'.$this->alias => $this->renderPartial('@redirect'),
|
||||
//];
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,19 @@
|
|||
<script>
|
||||
window.open('{{url}}', '_blank');
|
||||
|
||||
|
||||
//var windowReference = window.open('{{url}}', '_blank');
|
||||
|
||||
//myService.getUrl().then(function(url) {
|
||||
// windowReference.location = url;
|
||||
//});
|
||||
|
||||
//function myFunction() {
|
||||
// window.open('{{url}}', '_blank');
|
||||
//}
|
||||
//var element = document.getElementById("lalas");
|
||||
//element.onclick = function(event) {
|
||||
//window.open('{{url}}', '_blank');
|
||||
// }
|
||||
//document.getElementById("lalas").onclick=window.open('{{url}}', '_blank');
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
{% else %}
|
||||
href="{{reklama.url|default('#')}}" target="_blank"
|
||||
{% endif %}
|
||||
onclick='window.open("{{reklama.url}}", "_blank");'
|
||||
>
|
||||
<picture>
|
||||
<source media="(min-width:700px)" srcset="{{reklama.media|media_cdn}}">
|
||||
|
|
@ -16,8 +17,10 @@
|
|||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if __SELF__.property('random') %}
|
||||
<script>
|
||||
|
||||
// advertisement start
|
||||
$(function () {
|
||||
var $slideshow = $(".rek_{{__SELF__}}");
|
||||
|
|
|
|||
|
|
@ -2,9 +2,13 @@ columns:
|
|||
title:
|
||||
label: title
|
||||
type: text
|
||||
searchable: true
|
||||
sortable: true
|
||||
url:
|
||||
label: url
|
||||
type: text
|
||||
searchable: true
|
||||
sortable: true
|
||||
start_date:
|
||||
label: start_date
|
||||
type: datetime
|
||||
|
|
@ -14,9 +18,10 @@ columns:
|
|||
group:
|
||||
label: group
|
||||
type: text
|
||||
searchable: true
|
||||
sortable: true
|
||||
relation: group
|
||||
valueFrom: name
|
||||
sortable: false
|
||||
views:
|
||||
label: views
|
||||
type: text
|
||||
|
|
@ -25,3 +30,6 @@ columns:
|
|||
label: clicks
|
||||
type: text
|
||||
sortable: false
|
||||
media:
|
||||
label: media
|
||||
type: text
|
||||
|
|
|
|||
|
|
@ -116,7 +116,14 @@ body {
|
|||
/* ========================================== */
|
||||
|
||||
|
||||
.slick-slide img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.swiper-slide-content {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.right_top-title-text-2 {
|
||||
width: 9.4rem;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ random = 0
|
|||
</main>
|
||||
|
||||
{% partial 'footer' %}
|
||||
|
||||
<!-- javascript start
|
||||
============================================= -->
|
||||
<script src="{{ ['assets/js/jquery.js','assets/js/menu.js']|theme }}"></script>
|
||||
|
|
|
|||
|
|
@ -42,6 +42,12 @@ random = 0
|
|||
============================================= -->
|
||||
<script src="{{ ['assets/js/jquery.js','assets/js/menu.js']|theme }}"></script>
|
||||
{% framework extras %}
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
// start load my js functions
|
||||
init();
|
||||
});
|
||||
</script>
|
||||
<!-- javascript end
|
||||
============================================= -->
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
|
|
|
|||
|
|
@ -36,11 +36,13 @@ random = 0
|
|||
</div>
|
||||
</div>
|
||||
{% partial 'footer' %}
|
||||
|
||||
<!-- javascript start
|
||||
============================================= -->
|
||||
<script src="{{ ['assets/js/jquery.js','assets/js/menu.js','assets/slick/slick.min.js','assets/js/lazy.js','assets/js/main.js']|theme }}"></script>
|
||||
{% framework extras %}
|
||||
{% scripts %}
|
||||
|
||||
<!-- javascript end
|
||||
============================================= -->
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
|
|
|
|||
|
|
@ -33,7 +33,12 @@ random = 0
|
|||
============================================= -->
|
||||
<script src="{{ ['assets/js/jquery.js','assets/js/menu.js']|theme }}"></script>
|
||||
{% framework extras %}
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
// start load my js functions
|
||||
init();
|
||||
});
|
||||
</script>
|
||||
<!-- javascript end
|
||||
============================================= -->
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
|
|
|
|||
|
|
@ -0,0 +1,212 @@
|
|||
title = "home2"
|
||||
url = "/home2"
|
||||
layout = "master"
|
||||
is_hidden = 0
|
||||
robot_index = "index"
|
||||
robot_follow = "follow"
|
||||
|
||||
[blogCategories]
|
||||
slug = "{{ :slug }}"
|
||||
displayEmpty = 0
|
||||
categoryPage = "category"
|
||||
|
||||
[adverts adv_center_1]
|
||||
code = "bank"
|
||||
type = "slider"
|
||||
random = 0
|
||||
|
||||
[adverts adv_center_2]
|
||||
code = "bottom"
|
||||
type = "slider"
|
||||
random = 0
|
||||
|
||||
[adverts adv_center_3]
|
||||
code = "cnpc"
|
||||
type = "slider"
|
||||
random = 0
|
||||
|
||||
[adverts adv_center_4]
|
||||
code = "china-daily"
|
||||
type = "slider"
|
||||
random = 0
|
||||
|
||||
[adverts adv_center_5]
|
||||
code = "very-bottom"
|
||||
type = "slider"
|
||||
random = 0
|
||||
|
||||
[adverts right_top]
|
||||
code = "right-top"
|
||||
type = "slider"
|
||||
random = 0
|
||||
|
||||
[adverts right_middle]
|
||||
code = "right-middle"
|
||||
type = "slider"
|
||||
random = 0
|
||||
|
||||
[adverts right_bottom]
|
||||
code = "right-bottom"
|
||||
type = "slider"
|
||||
random = 0
|
||||
|
||||
[adverts right_top_m]
|
||||
code = "right-top"
|
||||
type = "slider"
|
||||
random = 0
|
||||
|
||||
[adverts right_middle_m]
|
||||
code = "right-middle"
|
||||
type = "slider"
|
||||
random = 0
|
||||
|
||||
[adverts right_bottom_m]
|
||||
code = "right-bottom"
|
||||
type = "slider"
|
||||
random = 0
|
||||
==
|
||||
<style>
|
||||
.event__body-column .card {
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #dcdcdc;
|
||||
}
|
||||
|
||||
.card__link {
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
line-height: 25px;
|
||||
margin: 10px 0 0 0;
|
||||
display: block;
|
||||
height: 49px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
padding: 21px 30px;
|
||||
background: #ffffff;
|
||||
}
|
||||
.card {
|
||||
position: relative;
|
||||
padding: 21px 30px;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.event__header {
|
||||
margin-bottom: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
}
|
||||
.main {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.event {
|
||||
margin: 30px 0;
|
||||
margin-bottom: 70px;
|
||||
}
|
||||
.main__banner {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.main__body-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 35px;
|
||||
position: relative;
|
||||
}
|
||||
.partner__title {
|
||||
font-size: 20px;
|
||||
line-height: 26px;
|
||||
font-weight: 700;
|
||||
color: #242424;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
</style>
|
||||
<section class="hero">
|
||||
<div class="auto__container">
|
||||
<div class="hero__inner">
|
||||
{% partial 'slider' %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- main start
|
||||
================================================ -->
|
||||
<section class="main">
|
||||
<div class="auto__container">
|
||||
<div class="main__inner">
|
||||
<div class="main__content">
|
||||
<div class="main__banner">
|
||||
{% component 'adv_center_1' %}
|
||||
</div>
|
||||
<!-- event start ================================================ -->
|
||||
{% partial 'index/top_section' category = blogCategories.categories.shift %}
|
||||
<!-- event end ================================================ -->
|
||||
<div class="main__banner">
|
||||
{% component 'adv_center_2' %}
|
||||
</div>
|
||||
<div class="main__body">
|
||||
<div class="main__body-row">
|
||||
{% partial 'index/category_posts2' category = blogCategories.categories.shift %}
|
||||
<div class="banner__mobile">
|
||||
{% component 'right_top_m' css_class= 'main__sidebar-adv' %}
|
||||
</div>
|
||||
{% partial 'index/category_posts2' category = blogCategories.categories.shift %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="main__banner">
|
||||
{% component 'adv_center_3' %}
|
||||
</div>
|
||||
<div class="main__body">
|
||||
<div class="main__body-row">
|
||||
{% partial 'index/category_posts2' category = blogCategories.categories.shift %}
|
||||
<div class="banner__mobile">
|
||||
{% component 'right_middle_m' css_class = 'main__sidebar-adv' %}
|
||||
</div>
|
||||
{% partial 'index/category_posts2' category = blogCategories.categories.shift %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="main__banner">
|
||||
{% component 'adv_center_4' %}
|
||||
</div>
|
||||
<div class="main__body">
|
||||
<div class="main__body-row">
|
||||
{% partial 'index/category_posts2' category = blogCategories.categories.shift %}
|
||||
<div class="banner__mobile">
|
||||
{% component 'right_bottom_m' css_class= 'main__sidebar-adv' %}
|
||||
</div>
|
||||
{% partial 'index/category_posts2' category = blogCategories.categories.shift %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="main__banner">
|
||||
{% component 'adv_center_5' %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="main__sidebar">
|
||||
{% partial 'sidebar__cards' %}
|
||||
{% component 'right_top' css_class= 'main__sidebar-adv' %}
|
||||
{% partial 'popular-posts2' %}
|
||||
{% component 'right_middle' css_class = 'main__sidebar-adv' %}
|
||||
{% component 'right_bottom' css_class= 'main__sidebar-adv' %}
|
||||
{% component 'right_top' css_class= 'main__sidebar-adv' %}
|
||||
{% partial 'tags' %}
|
||||
{% partial 'calendar' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- popUp end
|
||||
================================================ -->
|
||||
{% partial 'index/mobile_app' %}
|
||||
<!-- popUp end
|
||||
================================================ -->
|
||||
|
||||
<!-- main end
|
||||
================================================ -->
|
||||
|
|
@ -74,6 +74,71 @@ code = "right-bottom"
|
|||
type = "slider"
|
||||
random = 0
|
||||
==
|
||||
<style>
|
||||
.event__body-column .card {
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #dcdcdc;
|
||||
}
|
||||
|
||||
.card__link {
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
line-height: 25px;
|
||||
margin: 5px 0 0 0;
|
||||
display: block;
|
||||
height: 49px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
padding: 21px 30px;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.event__header {
|
||||
margin-bottom: 25px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
}
|
||||
.main {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.event {
|
||||
margin: 30px 0;
|
||||
margin-bottom: 70px;
|
||||
}
|
||||
.main__banner {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.main__body-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 35px;
|
||||
position: relative;
|
||||
}
|
||||
.partner__title {
|
||||
font-size: 20px;
|
||||
line-height: 26px;
|
||||
font-weight: 700;
|
||||
color: #242424;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.main__body-row {
|
||||
margin: 0px -20px 50px -20px;
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
||||
<section class="hero">
|
||||
<div class="auto__container">
|
||||
<div class="hero__inner">
|
||||
|
|
@ -139,11 +204,10 @@ random = 0
|
|||
{% partial 'sidebar__cards' %}
|
||||
{% component 'right_top' css_class= 'main__sidebar-adv' %}
|
||||
{% partial 'popular-posts' %}
|
||||
{% partial 'tenders' %}
|
||||
{% partial 'tags' %}
|
||||
{% component 'right_middle' css_class = 'main__sidebar-adv' %}
|
||||
{% partial 'calendar' %}
|
||||
{% component 'right_bottom' css_class= 'main__sidebar-adv' %}
|
||||
{% partial 'tags' %}
|
||||
{% partial 'calendar' %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,38 @@ slug = "{{ :slug }}"
|
|||
[SeoBlogPost]
|
||||
post = "post"
|
||||
==
|
||||
<style>
|
||||
.main {
|
||||
margin-top: 45px;
|
||||
}
|
||||
.news__image {
|
||||
width: 100%;
|
||||
margin: 20px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.news__date {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 20px;
|
||||
line-height: 26px;
|
||||
color: #a2a2a2;
|
||||
font-weight: 400;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.news__sidebar .card {
|
||||
padding: 18px 0;
|
||||
border-bottom: 1px solid #dcdcdc;
|
||||
}
|
||||
|
||||
.card__header-view svg {
|
||||
margin-right: 5px;
|
||||
stroke: #a2a2a2;
|
||||
width: 21px;
|
||||
height: 15px;
|
||||
}
|
||||
</style>
|
||||
{% component 'SeoBlogPost' %}
|
||||
<article class="news__content">
|
||||
<header>
|
||||
|
|
|
|||
|
|
@ -15,4 +15,5 @@
|
|||
<meta name="msapplication-TileImage" content="{{'assets/images/icon/cropped-cropped-orienticon-270x270.png'|theme}}">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="yandex-verification" content="9d83831cdb407bac" />
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[viewBag]
|
||||
==
|
||||
{% set posts = category.take_posts(4) %}
|
||||
<div class="main__body-column">
|
||||
{% set posts = category.take_posts(3) %}
|
||||
<div class="main__body-column">
|
||||
<div class="main__body-header">
|
||||
<div class="main__body-header-title">
|
||||
{{category.name}}
|
||||
|
|
@ -37,4 +37,4 @@
|
|||
{% partial 'index/category_post_item' post = post %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
[viewBag]
|
||||
==
|
||||
{% set posts = category.take_posts(3) %}
|
||||
<div class="main__body-column">
|
||||
<div class="main__body-header">
|
||||
<div class="main__body-header-title">
|
||||
{{category.name}}
|
||||
</div>
|
||||
<a href="{{'category'|page({slug:category.slug})}}" class="main__body-header-link">
|
||||
{{'page.more'|_}}
|
||||
</a>
|
||||
</div>
|
||||
<a href="{{posts.first.featured_image|media|resize(470)}}" class="primary progressive replace">
|
||||
<img class="preview" src="{{posts.first.featured_image|media|resize(10)}}" alt="{{posts.first.title}}">
|
||||
</a>
|
||||
<div class="main__body-card">
|
||||
<div class="card">
|
||||
<div class="card__header">
|
||||
<div class="card__header-category">
|
||||
{{category.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card__header">
|
||||
<time class="card__header-date"><span>{{posts.first.published_at|date('d.m.Y')}}</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 4">
|
||||
<path id="Polygon_1" data-name="Polygon 1" d="M2,0,4,2,2,4,0,2Z"
|
||||
fill="#a2a2a2" />
|
||||
</svg>
|
||||
<span>{{posts.first.published_at|date('H:i')}}</span>
|
||||
</time> </span>
|
||||
</div>
|
||||
<a href="{{'post'|page({id:posts.first.id,slug:posts.first.slug})}}" class="card__link">
|
||||
{{posts.first.title}}
|
||||
</a>
|
||||
</div>
|
||||
{% for post in posts.slice(1) %}
|
||||
{% partial 'index/category_post_item' post = post %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
description = "popular-posts"
|
||||
|
||||
[viewBag]
|
||||
|
||||
[popularPosts]
|
||||
postsLimit = 10
|
||||
category = "{{ :category }}"
|
||||
postsLimit = 5
|
||||
noPostsMessage = "No posts found"
|
||||
postPage = "post"
|
||||
|
||||
[viewBag]
|
||||
==
|
||||
<div id="right_top-up" class="right_top-up">
|
||||
<div class="right_top-title">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
[popularPosts]
|
||||
category = "{{ :category }}"
|
||||
postsLimit = 5
|
||||
noPostsMessage = "No posts found"
|
||||
postPage = "post"
|
||||
|
||||
[viewBag]
|
||||
==
|
||||
<div id="right_top-up" class="right_top-up">
|
||||
<div class="right_top-title">
|
||||
<h2 class="right_top-title-text">{{'Самое читаемое'|_}}</h2>
|
||||
<div class="right_top-line"></div>
|
||||
</div>
|
||||
{% for post in posts %}
|
||||
<div class="right_top-content">
|
||||
<div class="right_top-content-top">
|
||||
<h4 class="right_top-content-sphere">{{ post.categories.first.name }}</h4>
|
||||
<div class="right-top-content-date">
|
||||
<span class="date">{{ post.published_at| date('d.m.Y')}}</span>
|
||||
<span class="time">{{post.published_at|date('H:i')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right_top-content-bottom">
|
||||
<a href="{{postPage|page({slug:post.slug,id:post.id})}}" class="right_top-content-bottom-text">
|
||||
{{post.title}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="hr-line"></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
Loading…
Reference in New Issue