ORIENT/themes/modern2/pages/test.htm

98 lines
3.5 KiB
HTML

title = "Test"
url = "/test/:id"
layout = "new/master-inside"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"
==
<?php
function onStart(){
$this['test'] = Tps\Tps\Models\Test::where('id', $this->param('id'))->get()->first();
$this['otherTest'] = Tps\Tps\Models\Test::where('id', '!=', $this->param('id'))->with('image')->get();
}
?>
==
{% put styles %}
<style>
.aside-ad-wrapper-txt {
font-weight: bold !important;
font-size: 18px !important;
line-height: 1.4;
margin-top: 10px;
}
</style>
{% endput %}
<!-- Test ================================== -->
<main class="article">
<div class="container">
<div class="article-wrap">
<div class="trending-head affiche-head">
<h2>{{'test.tests'|_}}</h2>
<span></span>
</div>
<div class="article-inner">
<div class="article-content">
<div class="article-content-top">
<div class="article-head">
<h2>
{{ test.title }}
</h2>
</div>
<div class="article-swiper-wrapper">
<div class="swiper articleSwiper">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="article-item">
<img src="{{ test.image.path }}" alt="" />
</div>
</div>
</div>
</div>
</div>
<div class="article-desc">
<p>
{{ test.description }}
</p>
<div class="article_btn color-gr">
<a href="{{ 'test-start'|page({ id: test.id })}}">
{{'test.start_test'|_}}
</a>
</div>
</div>
</div>
</div>
<aside class="aside article-aside">
<h6 class="aside-ad-wrapper-title">
{{'test.see_also'|_}}
</h6>
{% for test in otherTest %}
<div class="aside-ad-wrapper">
<a href="{{'test'|page({id: test.id})}}">
<img src="{{test.image.path}}" alt="" />
</a>
<p class="aside-ad-wrapper-txt">
{{test.title}}
</p>
</div>
{% endfor %}
</aside>
</div>
</div>
</div>
</main>
<!-- Test end ============================== -->