This commit is contained in:
gerchek 2022-12-13 05:37:10 +00:00
parent c4dfa2a658
commit 76a8c1de91
9 changed files with 45 additions and 311 deletions

View File

@ -384,7 +384,7 @@ return [
|
*/
'enableSafeMode' => null,
'enableSafeMode' => false,
/*
|--------------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
let lang = document.querySelectorAll('.lang_group');
let lang_group = document.querySelectorAll('.lang_group');
let drop_lang = document.querySelectorAll('.drop_lang');
let burger = document.querySelector('.burger');
@ -36,7 +38,7 @@ function sleep(time) {
window.onscroll = function () {
// scrollFunc();
nav_group.forEach(nav_group => {
if (nav_group != undefined) {
nav_group.classList.contains('active');
@ -46,6 +48,7 @@ window.onscroll = function () {
}
);
drop_lang.forEach(drop_lang => {
if (drop_lang != undefined) {
drop_lang.classList.remove('active')
@ -88,14 +91,13 @@ window.onclick = function (e) {
nav_bg.classList.remove('active')
body.classList.remove('active')
}
if (nav_inner.classList.contains('active') && !e.target.closest('.lang_group') && !e.target.closest('.top_link')) {
nav_inner.classList.remove('active')
body.classList.remove('active')
}
nav_group.forEach(group => {
if (nav_group != undefined) {
group.classList.contains('active') && !e.target.closest('.nav_txt') && !e.target.closest('.nav_group');
@ -109,8 +111,8 @@ window.onclick = function (e) {
// Clicks =================================
if (lang != undefined) {
lang.forEach(x => {
if (lang_group != undefined) {
lang_group.forEach(x => {
x.addEventListener('click', function () {
sleep(2).then(() => {
drop_lang.forEach(e => {
@ -176,7 +178,6 @@ function onlyOne(checkbox) {
let checkboxes = document.getElementsByName('check')
checkboxes.forEach((item) => {
if (item !== checkbox) item.checked = false
})
}
// For check only once =======================
@ -343,47 +344,9 @@ function percentCalc() {
// deadline = parseInt(document.getElementById("deadline").value);
if (percentq == 100) {
// document.getElementById("creditSum").placeholder = "20 TMT az bolmadyk";
document.getElementById("creditSum").placeholder = "20 TMT az bolmadyk";
document.getElementById("creditSum").setAttribute("maxLength", "500");
// document.getElementById("select-text").innerHTML = "3 ay";
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("select-text").innerHTML = "3 aý";
document.getElementById("sum").placeholder = "20 TMT az bolmadyk";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("select-text").innerHTML = "3 месяц";
document.getElementById("sum").placeholder = "Не менее 20 манат";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("select-text").innerHTML = "3 month";
document.getElementById("sum").placeholder = "Not less than 20 TMT";
}
// console.log(window.location.pathname.split('/')[1]);
// if (window.location.pathname.split('/')["tm"]) {
// document.getElementById("creditSum").placeholder = "20 TMT az bolmadyk";
// }
// else if (window.location.pathname.split('/')["ru"]) {
// document.getElementById("creditSum").placeholder = "Не ниже 20 тмт";
// }
// else if (window.location.pathname.split('/')["en"]) {
// document.getElementById("creditSum").placeholder = "Not less than 20 TMT";
// }
// if (window.location.pathname.split('/')[1] == "tm") {
// document.getElementById("creditSum").placeholder = "20 TMT az bolmadyk";
// }
// else if (window.location.pathname.split('/')[1] == "ru") {
// document.getElementById("creditSum").placeholder = "Не ниже 20 тмт";
// }
// else if (window.location.pathname.split('/')[1] == "en") {
// document.getElementById("creditSum").placeholder = "Not less than 20 TMT";
// }
document.getElementById("select-text").innerHTML = "3 ay";
deadlineq = 90;
dd = 3;
@ -392,23 +355,9 @@ function percentCalc() {
}
if (percentq == 200) {
// document.getElementById("creditSum").placeholder = "20 TMT az bolmadyk";
document.getElementById("creditSum").placeholder = "20 TMT az bolmadyk";
document.getElementById("creditSum").setAttribute("maxLength", "500");
// document.getElementById("select-text").innerHTML = "6 ay";
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("sum").placeholder = "20 TMT az bolmadyk";
document.getElementById("select-text").innerHTML = "6 aý";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("sum").placeholder = "Не менее 20 тмт";
document.getElementById("select-text").innerHTML = "6 месяц";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("sum").placeholder = "Not less than 20 TMT";
document.getElementById("select-text").innerHTML = "6 month";
}
document.getElementById("select-text").innerHTML = "6 ay";
deadlineq = 180;
dd = 6;
percentq = 6
@ -416,56 +365,19 @@ function percentCalc() {
}
if (percentq == 300) {
// document.getElementById("creditSum").placeholder = "50 TMT az bolmadyk";
document.getElementById("creditSum").placeholder = "50 TMT az bolmadyk";
document.getElementById("creditSum").setAttribute("maxLength", "500");
// document.getElementById("select-text").innerHTML = "1 ýyl";
document.getElementById("select-text").innerHTML = "1 ýyl";
deadlineq = 365;
dd = 12;
percentq = 10
// creditSum.onkeyup = handle;
// if (window.location.pathname.split('/')["tm"]) {
// document.getElementById("creditSum").placeholder = "50 TMT az bolmadyk";
// }
// else if (window.location.pathname.split('/')["ru"]) {
// document.getElementById("creditSum").placeholder = "Не ниже 50 тмт";
// }
// else if (window.location.pathname.split('/')["en"]) {
// document.getElementById("creditSum").placeholder = "Not less than 50 TMT";
// }
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("sum").placeholder = "50 TMT az bolmadyk";
document.getElementById("select-text").innerHTML = "1 ýyl";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("sum").placeholder = "Не менее 50 тмт";
document.getElementById("select-text").innerHTML = "1 год";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("sum").placeholder = "Not less than 50 TMT";
document.getElementById("select-text").innerHTML = "1 year";
}
}
if (percentq == 400) {
// document.getElementById("creditSum").placeholder = "20 TMT az bolmadyk";
document.getElementById("creditSum").placeholder = "20 TMT az bolmadyk";
document.getElementById("creditSum").setAttribute("maxLength", "500");
// document.getElementById("select-text").innerHTML = "1 ýyl";
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("sum").placeholder = "20 TMT az bolmadyk";
document.getElementById("select-text").innerHTML = "1 ýyl";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("sum").placeholder = "Не менее 20 тмт";
document.getElementById("select-text").innerHTML = "1 год";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("sum").placeholder = "Not less than 20 TMT";
document.getElementById("select-text").innerHTML = "1 year";
}
document.getElementById("select-text").innerHTML = "1 ýyl";
deadlineq = 365;
dd = 12;
percentq = 8
@ -473,21 +385,9 @@ function percentCalc() {
}
if (percentq == 500) {
// document.getElementById("creditSum").placeholder = "2000 TMT az bolmadyk";
document.getElementById("creditSum").placeholder = "2000 TMT az bolmadyk";
document.getElementById("creditSum").setAttribute("maxLength", "500");
// document.getElementById("select-text").innerHTML = "2 ýyl";
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("sum").placeholder = "2000 TMT az bolmadyk";
document.getElementById("select-text").innerHTML = "2 ýyl";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("sum").placeholder = "Не менее 2000 тмт";
document.getElementById("select-text").innerHTML = "2 год";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("sum").placeholder = "Not less than 2000 TMT";
document.getElementById("select-text").innerHTML = "2 year";
}
document.getElementById("select-text").innerHTML = "2 ýyl";
deadlineq = 730;
dd = 24;
@ -534,11 +434,9 @@ function creditCalc(b = false) {
}
// console.log(document.getElementById("creditPercent").value)
// var my_twig_var = {% if activeLocale=="ru" %}Рус{% endif %}{% if activeLocale=="tm" %}Tkm{% endif %}
// 50 000 manada çenli
if (selectType == 1) {
// document.getElementById("creditSum").placeholder = "50 000 manada çenli";
document.getElementById("creditSum").placeholder = "50 000 manada çenli";
document.getElementById("creditSum").setAttribute("maxLength", "5");
percentq = 12
@ -547,105 +445,30 @@ function creditCalc(b = false) {
// document.getElementById("calc_form").reset();
// document.getElementById("creditSum").innerHTML = '';
// document.getElementById("creditSum").value = '';
// if (window.location.pathname.split('/')["tm"]) {
// document.getElementById("creditSum").placeholder = "50 000 manada çenli";
// }
// else if (window.location.pathname.split('/')["ru"]) {
// document.getElementById("creditSum").placeholder = "До 50 000 TMT";
// }
// else if (window.location.pathname.split('/')["en"]) {
// document.getElementById("creditSum").placeholder = "Up to 50,000 TMT";
// }
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("creditSum").placeholder = "50 000 manada çenli";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("creditSum").placeholder = "До 50 000 TMT";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("creditSum").placeholder = "Up to 50,000 TMT";
}
}
if (selectType == 2) {
// document.getElementById("creditSum").placeholder = "6 000 manada çenli";
document.getElementById("creditSum").placeholder = "6 000 manada çenli";
document.getElementById("creditSum").setAttribute("maxLength", "4");
percentq = 1;
percentq = 1
creditSum.onkeyup = handle2;
// console.log(typeof(window.location.pathname.split('/')[1]);
// if (window.location.pathname.split('/')[1] == "tm") {
// document.getElementById("creditSum").placeholder = "6 000 manada çenli";
// }
// else if (window.location.pathname.split('/')[1] == "ru") {
// document.getElementById("creditSum").placeholder = "До 6 000 TMT";
// }
// else if (window.location.pathname.split('/')[1] == "en") {
// document.getElementById("creditSum").placeholder = "Up to 6 000 TMT";
// }
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("creditSum").placeholder = "6 000 manada çenli";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("creditSum").placeholder = "До 6 000 TMT";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("creditSum").placeholder = "Up to 6 000 TMT";
}
}
if (selectType == 3) {
// document.getElementById("creditSum").placeholder = "30 000 manada çenli";
document.getElementById("creditSum").placeholder = "30 000 manada çenli";
document.getElementById("creditSum").setAttribute("maxLength", "5");
percentq = 10
creditSum.onkeyup = handle3;
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("creditSum").placeholder = "30 000 manada çenli";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("creditSum").placeholder = "До 30 000 TMT";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("creditSum").placeholder = "Up to 30 000 TMT";
}
}
if (selectType == 4) {
// document.getElementById("creditSum").placeholder = "100 000 manada çenli";
document.getElementById("creditSum").placeholder = "100 000 manada çenli";
document.getElementById("creditSum").setAttribute("maxLength", "6");
percentq = 12
creditSum.onkeyup = handle4;
// if (window.location.pathname.split('/')[1] == "tm") {
// document.getElementById("creditSum").placeholder = "100 000 manada çenli";
// }
// else if (window.location.pathname.split('/')[1] == "ru") {
// document.getElementById("creditSum").placeholder = "До 100 000 TMT";
// }
// else if (window.location.pathname.split('/')[1] == "en") {
// document.getElementById("creditSum").placeholder = "Up to 100 000 TMT";
// }
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("creditSum").placeholder = "100 000 manada çenli";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("creditSum").placeholder = "До 100 000 TMT";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("creditSum").placeholder = "Up to 100 000 TMT";
}
}
@ -690,120 +513,32 @@ function creditCalc(b = false) {
function handle(e) {
if (parseInt(e.target.value) >= 50000) {
document.getElementById('alert-text').innerHTML = "50 000 manada çenli saýlap bolýar"
// if (window.location.pathname.split('/')["tm"]) {
// document.getElementById("creditSum").placeholder = "50 000 manada çenli saýlap bolýar";
// }
// else if (window.location.pathname.split('/')["ru"]) {
// document.getElementById("creditSum").placeholder = "Допустимо до 50 000 TMT ";
// }
// else if (window.location.pathname.split('/')["en"]) {
// document.getElementById("creditSum").placeholder = "Up to 50 000 TMT";
// }
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("creditSum").placeholder = "50 000 manada çenli saýlap bolýar";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("creditSum").placeholder = "Допустимо до 50 000 TMT ";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("creditSum").placeholder = "Up to 50 000 TMT";
}
}
}
function handle2(e) {
if (parseInt(e.target.value) > 6000) {
document.getElementById('alert-text').innerHTML = "6 000 manada çenli saýlap bolýar"
// if (window.location.pathname.split('/')["tm"]) {
// document.getElementById("creditSum").placeholder = "6 000 manada çenli saýlap bolýar";
// }
// else if (window.location.pathname.split('/')["ru"]) {
// document.getElementById("creditSum").placeholder = "Допустимо до 6 000 TMT ";
// }
// else if (window.location.pathname.split('/')["en"]) {
// document.getElementById("creditSum").placeholder = "Up to 6 000 TMT";
// }
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("creditSum").placeholder = "6 000 manada çenli saýlap bolýar";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("creditSum").placeholder = "Допустимо до 6 000 TMT ";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("creditSum").placeholder = "Up to 6 000 TMT";
}
}
}
function handle3(e) {
if (parseInt(e.target.value) > 30000) {
document.getElementById('alert-text').innerHTML = "30 000 manada çenli saýlap bolýar"
// if (window.location.pathname.split('/')["tm"]) {
// document.getElementById("creditSum").placeholder = "30 000 manada çenli saýlap bolýar";
// }
// else if (window.location.pathname.split('/')["ru"]) {
// document.getElementById("creditSum").placeholder = "Допустимо до 30 000 TMT ";
// }
// else if (window.location.pathname.split('/')["en"]) {
// document.getElementById("creditSum").placeholder = "Up to 30 000 TMT";
// }
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("creditSum").placeholder = "30 000 manada çenli saýlap bolýar";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("creditSum").placeholder = "Допустимо до 30 000 TMT ";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("creditSum").placeholder = "Up to 30 000 TMT";
}
}
}
function handle4(e) {
if (parseInt(e.target.value) > 100000) {
document.getElementById('alert-text').innerHTML = "100 000 manada çenli saýlap bolýar"
// if (window.location.pathname.split('/')["tm"]) {
// document.getElementById("creditSum").placeholder = "100 000 manada çenli saýlap bolýar";
// }
// else if (window.location.pathname.split('/')["ru"]) {
// document.getElementById("creditSum").placeholder = "Допустимо до 100 000 TMT ";
// }
// else if (window.location.pathname.split('/')["en"]) {
// document.getElementById("creditSum").placeholder = "Up to 100 000 TMT";
// }
if (window.location.pathname.split('/')[1] == "tm") {
document.getElementById("creditSum").placeholder = "100 000 manada çenli saýlap bolýar";
}
else if (window.location.pathname.split('/')[1] == "ru") {
document.getElementById("creditSum").placeholder = "Допустимо до 100 000 TMT ";
}
else if (window.location.pathname.split('/')[1] == "en") {
document.getElementById("creditSum").placeholder = "Up to 100 000 TMT";
}
}
}
// Calculstion end ====================
@ -832,4 +567,3 @@ function handle4(e) {

View File

View File

18
themes/halk_bank/layouts/default.htm Executable file → Normal file
View File

@ -60,23 +60,23 @@ forceUrl = 1
<script src="{{ 'assets/js/slider.js'|theme }}"></script>
<script src="{{ 'assets/js/custom-select.js'|theme }}"></script>
<script src="{{ 'assets/js/moment.min.js'|theme }}"></script>
<script src="{{ 'assets/js/lightpick.js'|theme }}"></script>
<!-- <script src="{{ 'assets/js/lightpick.js'|theme }}"></script> -->
<script src="{{ 'assets/js/mian.js'|theme }}"></script>
<script>
<!-- <script>
var picker = new Lightpick({
field: document.getElementById('birth'),
var picker = new Lightpick({
field: document.getElementById('birth'),
});
});
var picker2 = new Lightpick({
field: document.getElementById('pass-date'),
var picker2 = new Lightpick({
field: document.getElementById('pass-date'),
});
});
</script>
</script> -->
{% framework extras %}
{% scripts %}

2
themes/halk_bank/layouts/default_4.htm Executable file → Normal file
View File

@ -247,7 +247,7 @@ forceUrl = 1
<script src="{{ 'assets/js/slider.js'|theme }}"></script>
<script src="{{ 'assets/js/custom-select.js'|theme }}"></script>
<script src="{{ 'assets/js/moment.min.js'|theme }}"></script>
<script src="{{ 'assets/js/lightpick.js'|theme }}"></script>
<!-- <script src="{{ 'assets/js/lightpick.js'|theme }}"></script> -->
<script src="{{ 'assets/js/mian.js'|theme }}"></script>
{% framework extras %}

2
themes/halk_bank/pages/articles.htm Executable file → Normal file
View File

@ -55,7 +55,7 @@ function onStart()
{{ post.name }}
</a>
<div class="news_date">
{{ post.date }}
{{ post.date|date("d.m.Y") }}
</div>
<a href="{{ 'post2'|page({ post_id: post.id }) }}" class="search_text">
{{ post.text|raw }}

View File

@ -593,8 +593,4 @@ function onStart()
// document.write("<br>Date is: "+day+"/"+month+"/"+year);
</script>
<!-- {% put scripts %}
<script src="{{ ['assets/js/jquery.js','assets/js/slick.min.js','assets/js/slider.js','assets/js/custom-select.js','assets/js/mian.js']|theme }}"></script>
{% endput %} -->
</script>

12
themes/halk_bank/pages/news.htm Executable file → Normal file
View File

@ -1,4 +1,4 @@
title = "Новости"
title = "News"
url = "/news"
layout = "default"
is_hidden = 0
@ -9,7 +9,9 @@ localeTitle[tm] = "Habarlar"
<?php
function onStart()
{
$this['posts'] = Atash\News\Models\News::orderBy('id', 'desc')->get();
//dd($this['posts']);
}
?>
@ -50,12 +52,13 @@ function onStart()
{% for post in posts %}
<div class="news_item">
<div class="news_group">
<a href="{{ 'post'|page({ post_id: post.id }) }}" class="search_title">
{{ post.name }}
</a>
<div class="news_date">
{{ post.date | date("d.m.Y") }}
{{ post.date }}
</div>
<a href="{{ 'post'|page({ post_id: post.id }) }}" class="search_text">
{{ post.text|raw }}
@ -65,8 +68,9 @@ function onStart()
{{ 'Ginisleyin'|_ }}
</a>
</div>
{% endfor %}
{% endfor %}
</div>
</div>
</div>