Post page

This commit is contained in:
merdan 2021-03-14 18:53:00 +05:00
parent 9489f49958
commit 4f099ca263
22 changed files with 527 additions and 27 deletions

View File

@ -258,7 +258,16 @@ class Message extends Model
Log::error('SMALL CONTACT FORM: Missing defined email template: ' . $componentProperties[ ('autoreply_template_'.App::getLocale())] . '. ' . $template . ' template will be used!');
}
Mail::{$method}($template, ['messageObject' => $messageObject, 'uploads' => $messageObject->uploads, 'fields' => $output, 'fieldsDetails' => $outputFull, 'url' => url()->full()], function($message) use($sendTo, $componentProperties, $output){
if(!empty($messageObject->uploads))
{
$uploads = $messageObject->uploads;
}
else
{
$uploads = [];
}
Mail::{$method}($template, ['messageObject' => $messageObject, 'uploads' => $uploads, 'fields' => $output, 'fieldsDetails' => $outputFull, 'url' => url()->full()], function($message) use($sendTo, $componentProperties, $output){
$message->to($sendTo);
if (!empty($componentProperties['autoreply_subject'])) {
@ -446,8 +455,16 @@ class Message extends Model
Log::error('SMALL CONTACT FORM: Missing defined email template: ' . $componentProperties[ ('notification_template_'.App::getLocale())] . '. ' . $template . ' template will be used!');
}
if(!empty($messageObject->uploads))
{
$uploads = $messageObject->uploads;
}
else
{
$uploads = [];
}
Mail::{$method}($template, ['messageObject' => $messageObject, 'uploads' => $messageObject->uploads, 'fields' => $output, 'fieldsDetails' => $outputFull, 'url' => url()->full()], function($message) use($sendToAddressesValidated, $replyToAddress, $replyToName, $componentProperties, $output){
Mail::{$method}($template, ['messageObject' => $messageObject, 'uploads' => $uploads, 'fields' => $output, 'fieldsDetails' => $outputFull, 'url' => url()->full()], function($message) use($sendToAddressesValidated, $replyToAddress, $replyToName, $componentProperties, $output){
if( count($sendToAddressesValidated)>1 ) {

View File

@ -230,4 +230,6 @@
- Fixed AJAX validation
- Updated README
1.51.1:
- Removed uploads array from default fields sent to autoreply template
- Removed uploads array from default fields sent to autoreply template
1.51.2:
- Fixed uploads field in email messages

View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit72036f1eda87e289ce9c6a3db2183e92::getLoader();
return ComposerAutoloaderInit09b213e01e94cc60dfc52fd1d9c7122e::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit72036f1eda87e289ce9c6a3db2183e92
class ComposerAutoloaderInit09b213e01e94cc60dfc52fd1d9c7122e
{
private static $loader;
@ -19,15 +19,15 @@ class ComposerAutoloaderInit72036f1eda87e289ce9c6a3db2183e92
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit72036f1eda87e289ce9c6a3db2183e92', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit09b213e01e94cc60dfc52fd1d9c7122e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit72036f1eda87e289ce9c6a3db2183e92', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit09b213e01e94cc60dfc52fd1d9c7122e', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit72036f1eda87e289ce9c6a3db2183e92::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit09b213e01e94cc60dfc52fd1d9c7122e::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit72036f1eda87e289ce9c6a3db2183e92
class ComposerStaticInit09b213e01e94cc60dfc52fd1d9c7122e
{
public static $prefixLengthsPsr4 = array (
'C' =>
@ -23,8 +23,8 @@ class ComposerStaticInit72036f1eda87e289ce9c6a3db2183e92
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit72036f1eda87e289ce9c6a3db2183e92::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit72036f1eda87e289ce9c6a3db2183e92::$prefixDirsPsr4;
$loader->prefixLengthsPsr4 = ComposerStaticInit09b213e01e94cc60dfc52fd1d9c7122e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit09b213e01e94cc60dfc52fd1d9c7122e::$prefixDirsPsr4;
}, null, ClassLoader::class);
}

View File

@ -6,12 +6,12 @@
"source": {
"type": "git",
"url": "https://github.com/composer/installers.git",
"reference": "98b34f8ab3558bee5caa7c07efbab3f5bd7663ab"
"reference": "1b94b414035400a8be5c694048a0e711a86b1080"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/installers/zipball/98b34f8ab3558bee5caa7c07efbab3f5bd7663ab",
"reference": "98b34f8ab3558bee5caa7c07efbab3f5bd7663ab",
"url": "https://api.github.com/repos/composer/installers/zipball/1b94b414035400a8be5c694048a0e711a86b1080",
"reference": "1b94b414035400a8be5c694048a0e711a86b1080",
"shasum": ""
},
"require": {
@ -29,7 +29,7 @@
"symfony/phpunit-bridge": "^4.2 || ^5",
"symfony/process": "^2.3"
},
"time": "2021-02-02T15:00:11+00:00",
"time": "2021-03-08T12:02:54+00:00",
"type": "composer-plugin",
"extra": {
"class": "Composer\\Installers\\Plugin",

View File

@ -123,6 +123,7 @@ is not needed to install packages with these frameworks:
| Vanilla | `vanilla-plugin`<br>`vanilla-theme`
| Vgmcp | `vgmcp-bundle`<br>`vgmcp-theme`
| WHMCS | `whmcs-addons`<br>`whmcs-fraud`<br>`whmcs-gateways`<br>`whmcs-notifications`<br>`whmcs-registrars`<br>`whmcs-reports`<br>`whmcs-security`<br>`whmcs-servers`<br>`whmcs-social`<br>`whmcs-support`<br>`whmcs-templates`<br>`whmcs-includes`
| Winter CMS | **`winter-module`<br>`winter-plugin`<br>`winter-theme`**
| Wolf CMS | `wolfcms-plugin`
| WordPress | <b>`wordpress-plugin`<br>`wordpress-theme`</b><br>`wordpress-muplugin`<br>`wordpress-dropin`
| YAWIK | `yawik-module`

View File

@ -78,7 +78,7 @@ class Installer extends LibraryInstaller
'october' => 'OctoberInstaller',
'ontowiki' => 'OntoWikiInstaller',
'oxid' => 'OxidInstaller',
'osclass' => 'OsclassInstaller',
'osclass' => 'OsclassInstaller',
'pxcms' => 'PxcmsInstaller',
'phpbb' => 'PhpBBInstaller',
'pimcore' => 'PimcoreInstaller',
@ -110,6 +110,7 @@ class Installer extends LibraryInstaller
'userfrosting' => 'UserFrostingInstaller',
'vanilla' => 'VanillaInstaller',
'whmcs' => 'WHMCSInstaller',
'winter' => 'WinterInstaller',
'wolfcms' => 'WolfCMSInstaller',
'wordpress' => 'WordPressInstaller',
'yawik' => 'YawikInstaller',

View File

@ -35,6 +35,12 @@ class Post extends ComponentBase
'default' => '{{ :slug }}',
'type' => 'string',
],
'id' => [
'title' => 'ID',
'description' => 'Post id',
'default' => '{{ :id }}',
'type' => 'string'
],
'categoryPage' => [
'title' => 'rainlab.blog::lang.settings.post_category',
'description' => 'rainlab.blog::lang.settings.post_category_description',
@ -99,7 +105,7 @@ class Post extends ComponentBase
if (!$this->checkEditor()) {
$query->isPublished();
}
$post = $query->first();
/*

View File

@ -25,7 +25,7 @@ class Post extends Model
use \October\Rain\Database\Traits\Validation;
public $table = 'rainlab_blog_posts';
public $implement = ['@RainLab.Translate.Behaviors.TranslatableModel'];
// public $implement = ['@RainLab.Translate.Behaviors.TranslatableModel'];
/*
* Validation
@ -92,7 +92,7 @@ class Post extends Model
];
public $attachMany = [
'featured_images' => ['System\Models\File', 'order' => 'sort_order'],
// 'featured_images' => ['System\Models\File', 'order' => 'sort_order'],
'content_images' => ['System\Models\File']
];

View File

@ -70,10 +70,19 @@ secondaryTabs:
type: textarea
size: small
featured_images:
# featured_images:
# tab: rainlab.blog::lang.post.tab_manage
# label: rainlab.blog::lang.post.featured_images
# type: fileupload
# mode: image
# imageWidth: 200
# imageHeight: 200
featured_image:
label: Featured image
tab: rainlab.blog::lang.post.tab_manage
label: rainlab.blog::lang.post.featured_images
type: fileupload
type: mediafinder
mode: image
imageWidth: 200
imageHeight: 200
span: storm
cssClass: col-xs-12
imageWidth: 300
imageHeight: 300

View File

@ -0,0 +1,31 @@
<?php namespace RainLab\Blog\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
use RainLab\Blog\Models\Category as CategoryModel;
class PostsAddMetadata extends Migration
{
public function up()
{
if (Schema::hasColumn('rainlab_blog_posts', 'featured_image')) {
return;
}
Schema::table('rainlab_blog_posts', function($table)
{
$table->string('featured_image')->nullable();
});
}
public function down()
{
if (Schema::hasColumn('rainlab_blog_posts', 'metadata')) {
Schema::table('rainlab_blog_posts', function ($table) {
$table->dropColumn('featured_image');
});
}
}
}

View File

@ -57,3 +57,6 @@
1.4.1: Fixes potential security issue with unsafe Markdown. Allow blog bylines to be translated.
1.4.2: Fix 404 redirects for missing blog posts. Assign current category to the listed posts when using the Posts component on a page with the category parameter available.
1.4.3: Fixes incompatibility with locale switching when plugin is used in conjunction with the Translate plugin. Fixes undefined category error.
1.5.0:
- Added featured_image column for for choosing from media finder
- posts_add_featured_image.php

View File

@ -4,6 +4,8 @@ en:
nav.home: 'Home'
nav.city: 'Ashgabat'
page.latest_news: 'Latest news'
page.tags: 'TAGS'
page.calendar: 'NEWS CALENDAR'
page.more: 'More'
page.search: 'Search'
page.search_result: 'The search results found: :number articles'
@ -17,6 +19,8 @@ ru:
site.slogan: 'Наш ориентир то, что сближает людей'
nav.home: 'Главная'
nav.city: 'Ашхабад'
page.tags: 'ТЭГИ'
page.calendar: 'КАЛЕНДАРЬ НОВОСТЕЙ'
page.latest_news: 'Последние новости'
page.more: 'Ещё'
page.search: 'Поиск'

View File

@ -0,0 +1,34 @@
[localePicker]
forceUrl = 1
[SeoCmsPage]
==
<!DOCTYPE html>
<html lang="{{activeLocale}}">
<head>
{% component 'SeoCmsPage' %}
{% partial 'head' %}
</head>
<body>
{% partial 'header' %}
<!-- main start
================================================ -->
<main class="main mr-top-bot">
<div class="auto__container">
<div class="main__inner">
{% page %}
</div>
</div>
</main>
{% partial 'footer' %}
<!-- javascript start
============================================= -->
<script src="{{ ['assets/js/jquery.js','assets/js/menu.js']|theme }}"></script>
{% framework extras %}
{% scripts %}
<!-- javascript end
============================================= -->
</body>
</html>

View File

@ -1,6 +1,6 @@
title = "Рубрика"
url = "/category/:slug"
layout = "master"
layout = "cms"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"
@ -13,4 +13,64 @@ noPostsMessage = "No posts found"
sortOrder = "published_at desc"
categoryPage = "category"
postPage = "post"
==
==
<div class="main__content">
<div class="heading">
<div class="heading__title">
{{category.name}}
</div>
{% for item in posts %}
{% partial 'post_list_item' post = item %}
{% endfor %}
<div class="heading__footer">
<a href="#" class="heading__footer-page">
<svg xmlns="http://www.w3.org/2000/svg" width="10.004" height="10.832"
viewBox="0 0 10.004 10.832">
<g id="arrow-right" transform="translate(1 1.414)">
<line id="Line_55" data-name="Line 55" x1="8" transform="translate(0.004 4.004)"
fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" />
<path id="Path_1" data-name="Path 1" d="M16,5,12,9l4,4"
transform="translate(-12 -5)" fill="none" stroke="#fff"
stroke-linecap="round" stroke-linejoin="round" stroke-width="2" />
</g>
</svg>
</a>
<div class="heading__footer-input">
<input type="number" value="1">
</div>
<a href="#" class="heading__footer-page">
<svg xmlns="http://www.w3.org/2000/svg" width="10.004" height="10.832"
viewBox="0 0 10.004 10.832">
<g id="arrow-right" transform="translate(-4 -3.586)">
<line id="Line_55" data-name="Line 55" x2="8" transform="translate(5 9.004)"
fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2" />
<path id="Path_1" data-name="Path 1" d="M12,5l4,4-4,4"
transform="translate(-2.998)" fill="none" stroke="#fff"
stroke-linecap="round" stroke-linejoin="round" stroke-width="2" />
</g>
</svg>
</a>
<span>
из 2021
</span>
</div>
</div>
</div>
<div class="main__sidebar">
{% partial 'calendar' %}
{% partial 'tags' %}
</div>
{% put scripts %}
<script src="{{['assets/js/moment.min.js','assets/js/lightpick.js','assets/js/lazy.js','assets/js/main.js']|theme}}"></script>
<script>
var picker = new Lightpick({
inline: true,
selectBackward: true,
selectForward: false,
lang: '{{activeLocale}}',
field: document.getElementById('calendar')
});
</script>
{% endput %}

View File

@ -2,6 +2,8 @@ title = "Пост"
url = "/post/:id/:slug"
layout = "master"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"
[viewBag]
localeTitle[en] = "Post"
@ -9,4 +11,146 @@ localeTitle[en] = "Post"
[blogPost]
slug = "{{ :slug }}"
categoryPage = "blog/category"
==
[SeoBlogPost]
post = "post"
[views]
slug = "{{ :slug }}"
[registerVisit]
==
<article class="news__content">
<header>
<time class="news__date">
<span>{{post.published_at|date('d.m.Y')}}</span>
<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" 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>{{post.published_at|date('H:i')}}</span>
</time>
<h1 class="news__title">
{{post.title}}}
</h1>
{% if post.image %}
<picture class="news__image">
<img src="{{post.image|media|resize(983,null, { mode: 'contain' })}}" alt="{{post.title}}">
</picture>
{% endif %}
</header>
<div class="news__body">
{{post.content}}
</div>
<div class="news__footer">
<div class="news__footer-social">
{% if this.theme.youtube %}
<a href="{{this.theme.youtube}}" class="news__footer-social-link">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="20" viewBox="0 0 26 20">
<g id="youtube" transform="translate(0.001)">
<path id="Path_6492" data-name="Path 6492"
d="M198.366,109.848l-5.834-3.192a1.071,1.071,0,0,0-1.586.94v6.329a1.07,1.07,0,0,0,1.579.944l5.834-3.137a1.071,1.071,0,0,0,.007-1.884Zm-5.872,3.281V108.4l4.36,2.386Zm0,0"
transform="translate(-181.316 -101.03)" fill="" />
<path id="Path_6493" data-name="Path 6493"
d="M25.808,4.72V4.708A6.1,6.1,0,0,0,24.66,1.644a4.2,4.2,0,0,0-2.8-1.334L21.729.294l-.045,0C18.247.035,13.056,0,13,0h-.009c-.052,0-5.243.035-8.711.289l-.046,0L4.116.309A4.1,4.1,0,0,0,1.33,1.684,6.391,6.391,0,0,0,.193,4.693l0,.027C.183,4.809,0,6.914,0,9.028V11c0,2.114.183,4.219.191,4.308v.013a6.039,6.039,0,0,0,1.142,3.027,4.285,4.285,0,0,0,2.9,1.316c.106.012.2.023.259.034l.06.008c1.985.192,8.207.286,8.471.29h.016c.052,0,5.243-.035,8.68-.289l.045,0,.146-.017a4,4,0,0,0,2.762-1.342A6.39,6.39,0,0,0,25.8,15.338l0-.027C25.815,15.223,26,13.118,26,11V9.028c0-2.114-.184-4.219-.191-4.308ZM24.475,11c0,1.956-.168,3.971-.184,4.156a4.963,4.963,0,0,1-.747,2.144,2.488,2.488,0,0,1-1.8.847l-.162.019c-3.325.244-8.32.282-8.55.283-.258,0-6.389-.1-8.314-.281-.1-.016-.205-.029-.317-.042A2.826,2.826,0,0,1,2.454,17.3l-.014-.015a4.5,4.5,0,0,1-.733-2.122c-.012-.14-.185-2.178-.185-4.162V9.028c0-1.954.168-3.967.184-4.156a4.861,4.861,0,0,1,.747-2.144,2.611,2.611,0,0,1,1.836-.883l.124-.015c3.373-.245,8.4-.282,8.584-.283s5.21.038,8.553.283l.134.016a2.708,2.708,0,0,1,1.866.858l.006.007a4.576,4.576,0,0,1,.733,2.153c.012.132.185,2.175.185,4.163Zm0,0"
fill="" />
</g>
</svg>
</a>
{% endif %}
{% if this.theme.vk %}
<a href="{{this.theme.vk}}" class="news__footer-social-link">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="20" viewBox="0 0 32 20">
<g id="vk" transform="translate(-1078 -276)">
<path id="vk-2" data-name="vk"
d="M16.193,24.5c4.629,0,2.979-2.931,3.336-3.773-.005-.629-.011-1.235.011-1.6a7.105,7.105,0,0,1,2.415,1.823c2.207,2.227,2.771,3.553,4.553,3.553h3.281a2.166,2.166,0,0,0,1.852-.792,2.071,2.071,0,0,0,.237-1.917c-.732-2.3-5-6.268-5.267-6.687.04-.077.1-.18.137-.233h0c.843-1.113,4.059-5.932,4.532-7.86a.025.025,0,0,0,0-.011,1.922,1.922,0,0,0-.221-1.773A2.038,2.038,0,0,0,29.328,4.5H26.047a2.416,2.416,0,0,0-2.353,1.563c-.705,1.793-2.687,5.481-4.172,6.787-.045-1.849-.015-3.261.009-4.311.048-2.047.2-4.039-1.921-4.039H12.452c-1.331,0-2.6,1.453-1.225,3.179,1.205,1.512.433,2.355.693,6.549A24.535,24.535,0,0,1,7.829,6.456,2.4,2.4,0,0,0,5.407,4.5H2.125A1.873,1.873,0,0,0,0,6.441C0,9.169,6.039,24.5,16.193,24.5ZM5.407,6.5c.289,0,.319,0,.533.609,1.305,3.844,4.233,9.532,6.372,9.532,1.607,0,1.607-1.647,1.607-2.267V9.44A4.716,4.716,0,0,0,12.844,6.5l4.677.005c0,.023-.027,5.46.013,6.777,0,1.871,1.485,2.943,3.8.6a28.5,28.5,0,0,0,4.207-7.057c.1-.24.187-.321.5-.321h3.295s0,.008,0,.012c-.3,1.4-3.261,5.861-4.252,7.247-.016.021-.031.044-.045.067a1.992,1.992,0,0,0,.06,2.605h0c.077.093.279.312.572.616.912.941,4.04,4.16,4.317,5.44-.184.029-.384.008-3.484.015-.66,0-1.176-.987-3.145-2.973C21.592,17.805,20.443,17.1,19.4,17.1c-2.032,0-1.884,1.649-1.865,3.644.007,2.163-.007,1.479.008,1.615a4.019,4.019,0,0,1-1.345.14C7.733,22.5,2.224,9.072,2.012,6.505c.073-.007,1.083,0,3.395,0Z"
transform="translate(1078 271.5)" fill="" />
</g>
</svg>
</a>
{% endif %}
{% if this.theme.twitter %}
<a href="{{this.theme.twitter}}" class="news__footer-social-link">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="20" viewBox="0 0 24 20">
<g id="twitter" transform="translate(-1130 -276)">
<path id="twitter_1_" data-name="twitter (1)"
d="M24,2.671c-1.51.071-1.477.065-1.647.08l.894-2.6s-2.791,1.045-3.5,1.232a5.521,5.521,0,0,0-6.595-.54,4.68,4.68,0,0,0-2.2,4.782A12.131,12.131,0,0,1,3.066,1.1L2.4.292l-.495.925A5.679,5.679,0,0,0,1.324,4.98a5.471,5.471,0,0,0,.515,1.469l-.568-.224L1.2,7.191a5.225,5.225,0,0,0,.859,3.065,5.433,5.433,0,0,0,.669.84l-.294-.046L2.8,12.157a5.355,5.355,0,0,0,2.717,3.206c-1.267.548-2.291.9-3.974,1.46L0,17.339l1.422.792a14.762,14.762,0,0,0,4.351,1.612c4.208.672,8.945.125,12.135-2.8,2.686-2.463,3.568-5.967,3.385-9.614a2.308,2.308,0,0,1,.418-1.483c.6-.81,2.286-3.169,2.29-3.175ZM20.586,4.988a3.758,3.758,0,0,0-.7,2.414c.185,3.678-.8,6.53-2.922,8.478-2.481,2.275-6.482,3.167-10.977,2.45a10.74,10.74,0,0,1-2.352-.712A36.917,36.917,0,0,0,7.9,15.835l2.456-1.184-2.712-.177A3.822,3.822,0,0,1,4.6,12.708a4.785,4.785,0,0,0,1.032-.175L8.216,11.8l-2.608-.65a3.889,3.889,0,0,1-2.372-1.68,4.087,4.087,0,0,1-.514-1.155,6.4,6.4,0,0,0,1.058.172l2.414.243L4.281,7.21A4.139,4.139,0,0,1,2.755,2.891a13.85,13.85,0,0,0,9.859,4.321A8.622,8.622,0,0,0,12.47,6a3.31,3.31,0,0,1,1.419-3.935,4.141,4.141,0,0,1,4.955.418A1.243,1.243,0,0,0,20,2.794,9.59,9.59,0,0,0,20.95,2.5l-.606,1.763h.774l-.532.725Zm0,0"
transform="translate(1130 276)" fill="" />
</g>
</svg>
</a>
{% endif %}
{% if this.theme.ok %}
<a href="{{this.theme.ok}}" class="news__footer-social-link">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="20" viewBox="0 0 13 20">
<g id="odnoklassniki" transform="translate(-4.5)">
<path id="Path_6490" data-name="Path 6490"
d="M4.692,12.748c-.531,1,.072,1.484,1.448,2.3A9.837,9.837,0,0,0,9.965,16.1L5.873,19.887c-1.191,1.1.726,2.858,1.916,1.784l3.222-2.988c1.233,1.141,2.416,2.234,3.222,2.992,1.191,1.078,3.107-.668,1.929-1.784-.088-.081-4.366-4.026-4.105-3.784a9.863,9.863,0,0,0,3.8-1.051h0c1.376-.824,1.98-1.3,1.456-2.308-.316-.57-1.169-1.047-2.3-.223A7.206,7.206,0,0,1,11,13.654,7.2,7.2,0,0,1,7,12.525c-1.135-.828-1.991-.347-2.3.223Z"
transform="translate(0 -2.013)" fill="" />
<path id="Path_6491" data-name="Path 6491"
d="M11.2,10.118a5.308,5.308,0,0,0,5.516-5.053A5.309,5.309,0,0,0,11.2,0,5.31,5.31,0,0,0,5.68,5.065,5.308,5.308,0,0,0,11.2,10.118Zm0-7.553a2.612,2.612,0,0,1,2.709,2.5A2.611,2.611,0,0,1,11.2,7.553,2.611,2.611,0,0,1,8.488,5.065a2.611,2.611,0,0,1,2.709-2.5Z"
transform="translate(-0.197)" fill="" />
</g>
</svg>
</a>
{% endif %}
{% if this.theme.linkedin %}
<a href="{{this.theme.linkedin}}" class="news__footer-social-link">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<g id="linkedin" transform="translate(-1250 -294)">
<path id="linkedin-2" data-name="linkedin"
d="M6.251,16.523H3.516V7.7H6.251ZM6.523,4.883a1.6,1.6,0,1,0-1.6,1.6,1.6,1.6,0,0,0,1.6-1.6Zm9.961,6.784c0-2.37-.5-4.128-3.269-4.128A2.838,2.838,0,0,0,10.628,8.9h0V7.7H7.969v8.828h2.656V12.14c0-1.148.292-2.26,1.715-2.26,1.4,0,1.449,1.313,1.449,2.333v4.31h2.7ZM20,17.656V2.344A2.346,2.346,0,0,0,17.657,0H2.344A2.346,2.346,0,0,0,0,2.344V17.656A2.346,2.346,0,0,0,2.344,20H17.657A2.346,2.346,0,0,0,20,17.656ZM17.657,1.563a.782.782,0,0,1,.781.781V17.656a.782.782,0,0,1-.781.781H2.344a.782.782,0,0,1-.781-.781V2.344a.782.782,0,0,1,.781-.781Zm0,0"
transform="translate(1250 294)" fill="" />
</g>
</svg>
</a>
{% endif %}
{% if this.theme.instagram %}
<a href="{{this.theme.instagram}}" class="news__footer-social-link">
<svg id="instagram" xmlns="http://www.w3.org/2000/svg" width="20" height="20"
viewBox="0 0 20 20">
<path id="Path_96" data-name="Path 96"
d="M20.4,5.88a7.307,7.307,0,0,0-.465-2.426A5.124,5.124,0,0,0,17.006.527,7.329,7.329,0,0,0,14.579.063C13.508.012,13.168,0,10.452,0S7.4.012,6.33.059A7.313,7.313,0,0,0,3.9.524,4.881,4.881,0,0,0,2.129,1.68,4.924,4.924,0,0,0,.976,3.45,7.326,7.326,0,0,0,.511,5.876C.46,6.947.449,7.287.449,10s.012,3.055.059,4.122A7.306,7.306,0,0,0,.972,16.55,5.123,5.123,0,0,0,3.9,19.477a7.331,7.331,0,0,0,2.427.465c1.067.047,1.407.059,4.123.059s3.056-.012,4.123-.059A7.309,7.309,0,0,0,17,19.477a5.116,5.116,0,0,0,2.927-2.926,7.331,7.331,0,0,0,.465-2.426c.047-1.067.059-1.407.059-4.122s0-3.055-.051-4.122Zm-1.8,8.166a5.481,5.481,0,0,1-.344,1.856,3.318,3.318,0,0,1-1.9,1.9,5.5,5.5,0,0,1-1.856.344c-1.055.047-1.372.059-4.041.059s-2.989-.012-4.041-.059A5.481,5.481,0,0,1,4.56,17.8a3.078,3.078,0,0,1-1.149-.746,3.109,3.109,0,0,1-.746-1.149,5.5,5.5,0,0,1-.344-1.856c-.047-1.055-.059-1.371-.059-4.04s.012-2.989.059-4.04a5.478,5.478,0,0,1,.344-1.856,3.04,3.04,0,0,1,.75-1.149,3.105,3.105,0,0,1,1.149-.746A5.507,5.507,0,0,1,6.42,1.875c1.055-.047,1.372-.059,4.041-.059s2.989.012,4.041.059a5.484,5.484,0,0,1,1.856.344,3.076,3.076,0,0,1,1.149.746,3.109,3.109,0,0,1,.746,1.149A5.5,5.5,0,0,1,18.6,5.97c.047,1.055.059,1.371.059,4.04s-.012,2.981-.059,4.036Zm0,0"
transform="translate(-0.449 0)" fill="" />
<path id="Path_97" data-name="Path 97"
d="M130.089,124.5a5.138,5.138,0,1,0,5.14,5.138A5.14,5.14,0,0,0,130.089,124.5Zm0,8.47a3.333,3.333,0,1,1,3.334-3.333A3.334,3.334,0,0,1,130.089,132.97Zm0,0"
transform="translate(-120.085 -119.636)" fill="" />
<path id="Path_98" data-name="Path 98"
d="M364.849,89.8a1.2,1.2,0,1,1-1.2-1.2A1.2,1.2,0,0,1,364.849,89.8Zm0,0"
transform="translate(-348.303 -85.14)" fill="" />
</svg>
</a>
{% endif %}
{% if this.theme.facebook %}
<a href="{{this.theme.facebook}}" class="news__footer-social-link">
<svg id="facebook" width="20" height="20">
<g id="Group_199" data-name="Group 199">
<path id="Path_99" data-name="Path 99"
d="M17.656,0H2.344A2.346,2.346,0,0,0,0,2.344V17.656A2.346,2.346,0,0,0,2.344,20H17.656A2.346,2.346,0,0,0,20,17.656V2.344A2.346,2.346,0,0,0,17.656,0Zm.781,17.656a.782.782,0,0,1-.781.781H13.2V12.07h2.414l.4-2.422H13.2V7.969A1.152,1.152,0,0,1,14.375,6.8h1.6V4.375h-1.6a3.593,3.593,0,0,0-3.593,3.6V9.648H8.438V12.07h2.345v6.367H2.344a.782.782,0,0,1-.781-.781V2.344a.782.782,0,0,1,.781-.781H17.656a.782.782,0,0,1,.781.781Z"
fill="" />
</g>
</svg>
</a>
{% endif %}
{% if this.theme.telegram %}
<a href="{{this.theme.telegram}}" class="news__footer-social-link">
<svg width="23" height="20.001">
<g id="Telegram" transform="translate(-1174 -275.999)">
<path id="telegram-2" data-name="telegram"
d="M.4,10.709l5.625,2.785a.725.725,0,0,0,.682-.022l5.006-2.892-3.03,2.668a.713.713,0,0,0-.242.535v6.5a.721.721,0,0,0,1.294.429L12.164,17.5l6.013,3.4a.72.72,0,0,0,1.06-.48l3.75-18.57a.717.717,0,0,0-.966-.806L.457,9.4a.713.713,0,0,0-.059,1.3ZM21.319,2.854l-3.3,16.319-5.7-3.224a.723.723,0,0,0-.931.191L9.876,18.147V14.105l8.195-7.215a.716.716,0,0,0-.838-1.152L6.318,12.045,2.492,10.15Z"
transform="translate(1173.999 275.002)" fill="" />
</g>
</svg>
</a>
{% endif %}
</div>
<div class="news__footer-name">
Нуры АМАНОВ
</div>
</div>
</article>
<div class="news__sidebar">
{% partial 'latest_news'%}
</div>

View File

@ -0,0 +1,6 @@
<div class="main__sidebar-title">
{{'page.calendar'|_}}
</div>
<div class="calendar__outer">
<input type="text" id="calendar" />
</div>

View File

@ -0,0 +1,43 @@
[blogPosts]
pageNumber = "{{ :page }}"
postsPerPage = 6
noPostsMessage = "No posts found"
sortOrder = "published_at desc"
categoryPage = "category"
postPage = "category"
exceptPost = "{{ :id }}"
[viewBag]
==
<div class="news__sidebar-title">
{{'page.latest_news'|_}}
</div>
{% for post in posts %}}
<div class="card">
<div class="card__header">
<time class="news__date">
<span>{{post.published_at|date('d.m.Y')}}</span>
<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" 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>{{post.published_at|date('H:i')}}</span>
</time>
<div class="card__header-view">
<svg xmlns="http://www.w3.org/2000/svg">
<g id="eye" transform="translate(-0.5 -3.5)">
<path id="Path_6489" data-name="Path 6489"
d="M1,11S4.636,4,11,4s10,7,10,7-3.636,7-10,7S1,11,1,11Z" fill="none"
stroke="" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" />
<ellipse id="Ellipse_12" data-name="Ellipse 12" cx="4.859" cy="4.791" rx="4.859"
ry="4.791" transform="translate(6.141 6.209)" fill="none" stroke=""
stroke-linecap="round" stroke-linejoin="round" stroke-width="1" />
</g>
</svg>
<span>{{post.views}}</span>
</div>
</div>
<a href="{{postPage|page({slug:post.slug,id:post.id})}}" class="card__link">
<h2>{{post.title}}</h2>
</a>
</div>
{% endfor %}

View File

@ -0,0 +1,29 @@
<div class="card">
<div class="card__header">
<time class="news__date">
<span>{{post.published_at|date('d.m.Y')}}</span>
<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" 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>{{post.published_at|date('H:i')}}</span>
</time>
<div class="card__header-view">
<svg xmlns="http://www.w3.org/2000/svg">
<g id="eye" transform="translate(-0.5 -3.5)">
<path id="Path_6489" data-name="Path 6489"
d="M1,11S4.636,4,11,4s10,7,10,7-3.636,7-10,7S1,11,1,11Z" fill="none"
stroke="" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" />
<ellipse id="Ellipse_12" data-name="Ellipse 12" cx="4.859" cy="4.791" rx="4.859"
ry="4.791" transform="translate(6.141 6.209)" fill="none" stroke=""
stroke-linecap="round" stroke-linejoin="round" stroke-width="1" />
</g>
</svg>
<span>
480
</span>
</div>
</div>
<a href="{{postPage|page({slug:post.slug,id:post.id})}}" class="card__link">
<h2>{{post.title}}</h2>
</a>
</div>

View File

@ -0,0 +1,49 @@
<div class="heading__row">
<a href="images/news/1.png" class="heading__image primary progressive replace">
<img class="preview" src="images/lazy/1.jpg" alt="">
</a>
<div class="heading__content">
<div class="heading__content-header">
<div class="heading__content-header-date">
<span>
{{post.published_at|date('d.m.Y')}}
</span>
<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" 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>
{{post.published_at|date('HH:mm')}}
</span>
</div>
<div class="heading__content-header-view">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 15">
<g id="eye" transform="translate(-0.5 -3.5)">
<path id="Path_6489" data-name="Path 6489"
d="M1,11S4.636,4,11,4s10,7,10,7-3.636,7-10,7S1,11,1,11Z"
fill="none" stroke="" stroke-linecap="round"
stroke-linejoin="round" stroke-width="1" />
<ellipse id="Ellipse_12" data-name="Ellipse 12" cx="4.859"
cy="4.791" rx="4.859" ry="4.791"
transform="translate(6.141 6.209)" fill="none" stroke=""
stroke-linecap="round" stroke-linejoin="round"
stroke-width="1" />
</g>
</svg>
<span>
480
</span>
</div>
</div>
<div class="heading__content-body">
<a href="#" class="heading__content-body-link">
От нефтепродуктов до солодки — что покупали на туркменской бирже за неделю
</a>
<div class="heading__content-body-para">
Итог экспортных сделок Государственной товарно-сырьевой биржи Туркменистана за
первую неделю февраля вышел в сумму более 33,4 миллиона долларов США и 91,2
миллиона манатов.
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,61 @@
<div class="main__sidebar-title">
{{'page.tags'|_}}
</div>
<div class="main__sidebar-tag">
<a class="main__sidebar-tag-link" href="#">
COVID-19
</a>
<a class="main__sidebar-tag-link" href="#">
АЗЕРБАЙДЖАН
</a>
<a class="main__sidebar-tag-link" href="#">
АФГАНИСТАН
</a>
<a class="main__sidebar-tag-link" href="#">
КАСПИЙ
</a>
<a class="main__sidebar-tag-link" href="#">
COVID-19
</a>
<a class="main__sidebar-tag-link" href="#">
КИТАЙ
</a>
<a class="main__sidebar-tag-link" href="#">
ИРАН
</a>
<a class="main__sidebar-tag-link" href="#">
АЗЕРБАЙДЖАН
</a>
<a class="main__sidebar-tag-link" href="#">
COVID-19
</a>
<a class="main__sidebar-tag-link" href="#">
АЗЕРБАЙДЖАН
</a>
<a class="main__sidebar-tag-link" href="#">
COVID-19
</a>
<a class="main__sidebar-tag-link" href="#">
СПОРТ
</a>
<a class="main__sidebar-tag-link" href="#">
COVID-19
</a>
<a class="main__sidebar-tag-link" href="#">
ТУРИЗМ
</a>
<a class="main__sidebar-tag-link" href="#">
COVID-19
</a>
<a class="main__sidebar-tag-link" href="#">
УЗБЕКИСТАН
</a>
<a class="main__sidebar-tag-link" href="#">
COVID-19
</a>
<a class="main__sidebar-tag-link" href="#">
УЗБЕКИСТАН
</a>
</div>