generated from mirzaev/pot-php
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 31df4fa07d | |||
| 0d48c55530 |
@@ -187,47 +187,7 @@ final class index extends core
|
|||||||
];
|
];
|
||||||
|
|
||||||
// Sending the cookie with the team workload (1800 = 30min)
|
// Sending the cookie with the team workload (1800 = 30min)
|
||||||
setcookie('workload', $this->view->workload, time() + 1800, '/');
|
/* setcookie('workload', $this->view->workload, time() + 1800, '/'); */
|
||||||
|
|
||||||
// Initializing the project constructor data
|
|
||||||
$this->view->project = [
|
|
||||||
'architectures' => [
|
|
||||||
'site' => 'Сайт',
|
|
||||||
'chat_robot' => 'Чат-робот',
|
|
||||||
'program' => 'Программа',
|
|
||||||
'game' => 'Видеоигра',
|
|
||||||
'script' => 'Скрипт, парсер, макрос',
|
|
||||||
'module' => 'Модуль, плагин, расширение',
|
|
||||||
],
|
|
||||||
'purposes' => [
|
|
||||||
'funnel' => 'Воронка (обработка пользователя)',
|
|
||||||
'contacts' => 'Контакты (сбор данных)',
|
|
||||||
'ai' => 'Внедрение ИИ',
|
|
||||||
'archive' => 'Архив (галерея, библиотека, реестр)',
|
|
||||||
'crm' => 'Индивидуальная CRM',
|
|
||||||
'landing' => 'Лендинг (посадочная страница)',
|
|
||||||
'marketplace' => 'Маркетплейс, магазин, витрина',
|
|
||||||
'saas' => 'SaaS проект',
|
|
||||||
'search' => 'Поиск и анализ',
|
|
||||||
'calculate' => 'Вычисления (калькулятор)',
|
|
||||||
'individual' => 'Индивидуальная разработка',
|
|
||||||
],
|
|
||||||
'integrations' => [
|
|
||||||
'one_c' => '1C',
|
|
||||||
'bitrix24' => 'Битрикс24',
|
|
||||||
'moy_sklad' => 'Мой Склад',
|
|
||||||
'mail' => 'Почта',
|
|
||||||
'excel' => 'Excel',
|
|
||||||
'ozon' => 'OZON',
|
|
||||||
'wildberries' => 'Wildberries',
|
|
||||||
'yandex_market' => 'Яндекс Маркет',
|
|
||||||
'avito' => 'Авито',
|
|
||||||
'vk' => 'ВКонтакте',
|
|
||||||
'max' => 'МАКС',
|
|
||||||
'telegram' => 'Телеграм',
|
|
||||||
'neural_networks' => 'Нейросети'
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
// Initializing contacts data
|
// Initializing contacts data
|
||||||
$this->view->integrations = [
|
$this->view->integrations = [
|
||||||
@@ -250,6 +210,7 @@ final class index extends core
|
|||||||
$page = $this->view->render(
|
$page = $this->view->render(
|
||||||
'pages/index.html',
|
'pages/index.html',
|
||||||
[
|
[
|
||||||
|
'uri' => 'https://' . DOMAIN,
|
||||||
'smartphone' => $this->request->smartphone,
|
'smartphone' => $this->request->smartphone,
|
||||||
'tablet' => $this->request->tablet
|
'tablet' => $this->request->tablet
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ final class offer extends core
|
|||||||
$page = $this->view->render(
|
$page = $this->view->render(
|
||||||
'pages/offer.html',
|
'pages/offer.html',
|
||||||
[
|
[
|
||||||
|
'uri' => 'https://' . DOMAIN . '/offer',
|
||||||
'smartphone' => $this->request->smartphone,
|
'smartphone' => $this->request->smartphone,
|
||||||
'tablet' => $this->request->tablet
|
'tablet' => $this->request->tablet
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ use kodorvan\site\controllers\core;
|
|||||||
|
|
||||||
// PHP framework
|
// PHP framework
|
||||||
use mirzaev\minimal\http\enumerations\content,
|
use mirzaev\minimal\http\enumerations\content,
|
||||||
|
mirzaev\minimal\http\enumerations\method,
|
||||||
mirzaev\minimal\http\enumerations\status;
|
mirzaev\minimal\http\enumerations\status;
|
||||||
|
|
||||||
// Mail server
|
// Mail server
|
||||||
@@ -40,85 +41,176 @@ final class project extends core
|
|||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Page: calculator
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
public function calculator(): null
|
||||||
|
{
|
||||||
|
if ($this->request->method === method::get) {
|
||||||
|
// GET
|
||||||
|
|
||||||
|
if (str_contains($this->request->headers['accept'] ?? '', content::html->value)) {
|
||||||
|
// Request for HTML response
|
||||||
|
|
||||||
|
// Initializing the project constructor data
|
||||||
|
$this->view->calculator = [
|
||||||
|
'architectures' => [
|
||||||
|
'site' => 'Сайт',
|
||||||
|
'chat_robot' => 'Чат-робот',
|
||||||
|
'program' => 'Программа',
|
||||||
|
'game' => 'Видеоигра',
|
||||||
|
'script' => 'Скрипт, парсер, макрос',
|
||||||
|
'module' => 'Модуль, плагин, расширение',
|
||||||
|
],
|
||||||
|
'purposes' => [
|
||||||
|
'funnel' => 'Воронка (обработка пользователя)',
|
||||||
|
'contacts' => 'Контакты (сбор данных)',
|
||||||
|
'ai' => 'Внедрение ИИ',
|
||||||
|
'archive' => 'Архив (галерея, библиотека, реестр)',
|
||||||
|
'crm' => 'Индивидуальная CRM',
|
||||||
|
'landing' => 'Лендинг (посадочная страница)',
|
||||||
|
'marketplace' => 'Маркетплейс, магазин, витрина',
|
||||||
|
'saas' => 'SaaS проект',
|
||||||
|
'search' => 'Поиск и анализ',
|
||||||
|
'calculate' => 'Вычисления (калькулятор)',
|
||||||
|
'individual' => 'Индивидуальная разработка',
|
||||||
|
],
|
||||||
|
'integrations' => [
|
||||||
|
'one_c' => '1C',
|
||||||
|
'bitrix24' => 'Битрикс24',
|
||||||
|
'moy_sklad' => 'Мой Склад',
|
||||||
|
'mail' => 'Почта',
|
||||||
|
'excel' => 'Excel',
|
||||||
|
'ozon' => 'OZON',
|
||||||
|
'wildberries' => 'Wildberries',
|
||||||
|
'yandex_market' => 'Яндекс Маркет',
|
||||||
|
'avito' => 'Авито',
|
||||||
|
'vk' => 'ВКонтакте',
|
||||||
|
'max' => 'МАКС',
|
||||||
|
'telegram' => 'Телеграм',
|
||||||
|
'neural_networks' => 'Нейросети'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
// Render page
|
||||||
|
$page = $this->view->render(
|
||||||
|
'pages/project/calculator.html',
|
||||||
|
[
|
||||||
|
'uri' => 'https://' . DOMAIN . "/project/calculator",
|
||||||
|
'smartphone' => $this->request->smartphone,
|
||||||
|
'tablet' => $this->request->tablet
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
// Sending response
|
||||||
|
$this->response
|
||||||
|
->start()
|
||||||
|
->clean()
|
||||||
|
->sse()
|
||||||
|
->write($page)
|
||||||
|
->validate($this->request)
|
||||||
|
?->body()
|
||||||
|
->end();
|
||||||
|
|
||||||
|
// Deinitializing rendered page
|
||||||
|
unset($page);
|
||||||
|
|
||||||
|
// Exit (success)
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Exit (fail)
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Request the project by calculator
|
||||||
*
|
*
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
public function request(string $request): null
|
public function request(string $request): null
|
||||||
{
|
{
|
||||||
// Initializing the project identifier (temporary solution)
|
if ($this->request->method === method::put) {
|
||||||
$identifier = blake3($request, 20);
|
// PUT
|
||||||
|
// Initializing the project identifier (temporary solution)
|
||||||
|
$identifier = blake3($request, 20);
|
||||||
|
|
||||||
// Initializing the project storage path
|
// Initializing the project storage path
|
||||||
$path = STORAGE . DIRECTORY_SEPARATOR . 'projects' . DIRECTORY_SEPARATOR . $identifier;
|
$path = STORAGE . DIRECTORY_SEPARATOR . 'projects' . DIRECTORY_SEPARATOR . $identifier;
|
||||||
|
|
||||||
// Initializing the project storage directory in the storage
|
// Initializing the project storage directory in the storage
|
||||||
if (!file_exists($path)) mkdir($path, 0775, true);
|
if (!file_exists($path)) mkdir($path, 0775, true);
|
||||||
|
|
||||||
// Declaring the project storage files registry
|
// Declaring the project storage files registry
|
||||||
$files = [];
|
$files = [];
|
||||||
|
|
||||||
foreach ($this->request->files as $file) {
|
foreach ($this->request->files as $file) {
|
||||||
// Iterating over files
|
// Iterating over files
|
||||||
|
|
||||||
// Initializing the file destination path
|
// Initializing the file destination path
|
||||||
$destination = $path . DIRECTORY_SEPARATOR . $file['name'];
|
$destination = $path . DIRECTORY_SEPARATOR . $file['name'];
|
||||||
|
|
||||||
// Writing the file into the project storage
|
// Writing the file into the project storage
|
||||||
copy($file['tmp_name'], $destination);
|
copy($file['tmp_name'], $destination);
|
||||||
|
|
||||||
// Writing the file destination path into the project storage files registry
|
// Writing the file destination path into the project storage files registry
|
||||||
$files[$file['name']] = $destination;
|
$files[$file['name']] = $destination;
|
||||||
}
|
|
||||||
|
|
||||||
// Decoding the request JSON argument
|
|
||||||
$request = json_decode(json: $request, associative: true, depth: 5);
|
|
||||||
|
|
||||||
// Initializing the mail server
|
|
||||||
$mail = new mail(true);
|
|
||||||
|
|
||||||
try {
|
|
||||||
// Writing the mail server parameters
|
|
||||||
/* $mail->SMTPDebug = smtp::DEBUG_SERVER; */
|
|
||||||
$mail->setLanguage('ru');
|
|
||||||
$mail->CharSet = mail::CHARSET_UTF8;
|
|
||||||
$mail->isSMTP();
|
|
||||||
$mail->Host = MAIL['host'];
|
|
||||||
$mail->SMTPAuth = true;
|
|
||||||
$mail->Username = MAIL['sender']['mail'];
|
|
||||||
$mail->Password = MAIL['sender']['password'];
|
|
||||||
$mail->SMTPSecure = mail::ENCRYPTION_SMTPS;
|
|
||||||
$mail->Port = 465;
|
|
||||||
$mail->setFrom(MAIL['sender']['mail'], MAIL['sender']['name']);
|
|
||||||
$mail->addAddress(MAIL['receiver']['mail'], MAIL['receiver']['name']);
|
|
||||||
|
|
||||||
// The message
|
|
||||||
$mail->isHTML(true);
|
|
||||||
$mail->Subject = empty($request['project']['name']) ? 'Заказ' : 'Заказ: ' . $request['project']['name'];
|
|
||||||
$mail->Body = $this->view->render('messages/request.html', $request);
|
|
||||||
/* $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; */
|
|
||||||
|
|
||||||
// Attachments
|
|
||||||
foreach ($files as $name => $file) {
|
|
||||||
// Iterating of project storage files registry
|
|
||||||
|
|
||||||
// Writing the attachment into the message
|
|
||||||
$mail->addAttachment($file, $name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sending the message
|
// Decoding the request JSON argument
|
||||||
$mail->send();
|
$request = json_decode(json: $request, associative: true, depth: 5);
|
||||||
} catch (mail_exception $exception) {
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sending response
|
// Initializing the mail server
|
||||||
$this->response
|
$mail = new mail(true);
|
||||||
->start()
|
|
||||||
->clean()
|
try {
|
||||||
->sse()
|
// Writing the mail server parameters
|
||||||
->validate($this->request)
|
/* $mail->SMTPDebug = smtp::DEBUG_SERVER; */
|
||||||
?->body()
|
$mail->setLanguage('ru');
|
||||||
->end();
|
$mail->CharSet = mail::CHARSET_UTF8;
|
||||||
|
$mail->isSMTP();
|
||||||
|
$mail->Host = MAIL['host'];
|
||||||
|
$mail->SMTPAuth = true;
|
||||||
|
$mail->Username = MAIL['sender']['mail'];
|
||||||
|
$mail->Password = MAIL['sender']['password'];
|
||||||
|
$mail->SMTPSecure = mail::ENCRYPTION_SMTPS;
|
||||||
|
$mail->Port = 465;
|
||||||
|
$mail->setFrom(MAIL['sender']['mail'], MAIL['sender']['name']);
|
||||||
|
$mail->addAddress(MAIL['receiver']['mail'], MAIL['receiver']['name']);
|
||||||
|
|
||||||
|
// The message
|
||||||
|
$mail->isHTML(true);
|
||||||
|
$mail->Subject = empty($request['project']['name']) ? 'Заказ' : 'Заказ: ' . $request['project']['name'];
|
||||||
|
$mail->Body = $this->view->render('messages/request.html', $request);
|
||||||
|
/* $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; */
|
||||||
|
|
||||||
|
// Attachments
|
||||||
|
foreach ($files as $name => $file) {
|
||||||
|
// Iterating of project storage files registry
|
||||||
|
|
||||||
|
// Writing the attachment into the message
|
||||||
|
$mail->addAttachment($file, $name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sending the message
|
||||||
|
$mail->send();
|
||||||
|
} catch (mail_exception $exception) {
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sending response
|
||||||
|
$this->response
|
||||||
|
->start()
|
||||||
|
->clean()
|
||||||
|
->sse()
|
||||||
|
->validate($this->request)
|
||||||
|
?->body()
|
||||||
|
->end();
|
||||||
|
|
||||||
|
// Exit (success)
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// Exit (fail)
|
// Exit (fail)
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -6,10 +6,11 @@ namespace kodorvan\site\controllers;
|
|||||||
|
|
||||||
// Files of the project
|
// Files of the project
|
||||||
use kodorvan\site\controllers\core,
|
use kodorvan\site\controllers\core,
|
||||||
kodorvan\site\models\superpack;
|
kodorvan\site\models\superpack as model;
|
||||||
|
|
||||||
// Framework for PHP
|
// Framework for PHP
|
||||||
use mirzaev\minimal\http\enumerations\content,
|
use mirzaev\minimal\http\enumerations\content,
|
||||||
|
mirzaev\minimal\http\enumerations\method,
|
||||||
mirzaev\minimal\http\enumerations\status;
|
mirzaev\minimal\http\enumerations\status;
|
||||||
|
|
||||||
// Baza database
|
// Baza database
|
||||||
@@ -53,19 +54,24 @@ final class superpack extends core
|
|||||||
// Request for HTML response
|
// Request for HTML response
|
||||||
|
|
||||||
// Initializing the superpack
|
// Initializing the superpack
|
||||||
$superpack = new superpack()->read(filter: fn(record $record) => $record->urn === $urn && $record->active === 1);
|
$superpack = new model()->read(filter: fn(record $record) => $record->urn === $urn && $record->active === 1);
|
||||||
|
|
||||||
if ($superpack instanceof superpack) {
|
if ($superpack instanceof model) {
|
||||||
// Initialized the superpack
|
// Initialized the superpack
|
||||||
|
|
||||||
// Render page
|
// Render page
|
||||||
$page = $this->view->render(
|
$page = $this->view->render(
|
||||||
'pages/article.html',
|
'pages/article.html',
|
||||||
[
|
[
|
||||||
|
'uri' => 'https://' . DOMAIN . "/superpack/$urn",
|
||||||
'article' => [
|
'article' => [
|
||||||
'urn' => $urn,
|
'urn' => $superpack->urn,
|
||||||
'title' => $superpack->title,
|
'head' => [
|
||||||
'html' => $superpack->html
|
'title' => $superpack->title
|
||||||
|
],
|
||||||
|
'body' => [
|
||||||
|
'html' => $superpack->html
|
||||||
|
]
|
||||||
],
|
],
|
||||||
'smartphone' => $this->request->smartphone,
|
'smartphone' => $this->request->smartphone,
|
||||||
'tablet' => $this->request->tablet
|
'tablet' => $this->request->tablet
|
||||||
@@ -95,4 +101,97 @@ final class superpack extends core
|
|||||||
// Exit (fail)
|
// Exit (fail)
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Page: superpack
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
public function create(
|
||||||
|
?string $identifier = null,
|
||||||
|
?string $urn = null,
|
||||||
|
?string $title = null,
|
||||||
|
?string $html = null,
|
||||||
|
?string $text = null,
|
||||||
|
string|int|float|null $supercost = null
|
||||||
|
): null {
|
||||||
|
if ($this->request->method === method::get) {
|
||||||
|
// GET
|
||||||
|
|
||||||
|
if (str_contains($this->request->headers['accept'] ?? '', content::html->value)) {
|
||||||
|
// Request for HTML response
|
||||||
|
|
||||||
|
// Render page
|
||||||
|
$page = $this->view->render(
|
||||||
|
'pages/system/superpack/create.html',
|
||||||
|
[
|
||||||
|
'uri' => 'https://' . DOMAIN . "/system/superpack/create",
|
||||||
|
'smartphone' => $this->request->smartphone,
|
||||||
|
'tablet' => $this->request->tablet
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
// Sending response
|
||||||
|
$this->response
|
||||||
|
->start()
|
||||||
|
->clean()
|
||||||
|
->sse()
|
||||||
|
->write($page)
|
||||||
|
->validate($this->request)
|
||||||
|
?->body()
|
||||||
|
->end();
|
||||||
|
|
||||||
|
// Deinitializing rendered page
|
||||||
|
unset($page);
|
||||||
|
|
||||||
|
// Exit (success)
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} else if ($this->request->method === method::put) {
|
||||||
|
// PUT
|
||||||
|
|
||||||
|
// Initializing the superpack
|
||||||
|
$superpack = new model()->read(filter: fn(record $record) => $record->urn === $urn);
|
||||||
|
|
||||||
|
if ($superpack instanceof model) {
|
||||||
|
// The superpack is already created
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// The superpack is not already created
|
||||||
|
|
||||||
|
// Sanitizing
|
||||||
|
$urn = preg_replace('/[^\w\d\-.]+/', '', $urn);
|
||||||
|
$title = preg_replace('/[^\w\d\s\-.,!]+/u', '', $title);
|
||||||
|
$supercost = (float) preg_replace('/[^\d.]+/', '', $supercost);
|
||||||
|
|
||||||
|
// Creating the superpack
|
||||||
|
$superpack = new model()->write(
|
||||||
|
urn: $urn,
|
||||||
|
title: $title,
|
||||||
|
html: $html,
|
||||||
|
text: $text,
|
||||||
|
supercost: $supercost
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($superpack instanceof record) {
|
||||||
|
// Created the superpack
|
||||||
|
|
||||||
|
// Sending response
|
||||||
|
$this->response
|
||||||
|
->start()
|
||||||
|
->clean()
|
||||||
|
->sse()
|
||||||
|
->json([
|
||||||
|
'redirect' => "/superpack/$urn"
|
||||||
|
])
|
||||||
|
->validate($this->request)
|
||||||
|
?->body()
|
||||||
|
->end();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Exit (fail)
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,11 +74,11 @@ final class superpack extends core implements record_interface
|
|||||||
->columns(
|
->columns(
|
||||||
new column('identifier', type::long_long_unsigned),
|
new column('identifier', type::long_long_unsigned),
|
||||||
/* new column('account', type::long_long_unsigned), */
|
/* new column('account', type::long_long_unsigned), */
|
||||||
new column('urn', type::long_long_unsigned),
|
new column('urn', type::string, ['length' => 64]),
|
||||||
new column('title', type::string, ['length' => 64]),
|
new column('title', type::string, ['length' => 128]),
|
||||||
new column('html', type::string, ['length' => 8192]),
|
new column('html', type::string, ['length' => 8192]),
|
||||||
new column('text', type::string, ['length' => 8192]),
|
new column('text', type::string, ['length' => 8192]),
|
||||||
new column('supercost', type::integer_unsigned),
|
new column('supercost', type::float),
|
||||||
new column('active', type::char),
|
new column('active', type::char),
|
||||||
new column('updated', type::integer_unsigned),
|
new column('updated', type::integer_unsigned),
|
||||||
new column('created', type::integer_unsigned)
|
new column('created', type::integer_unsigned)
|
||||||
@@ -99,7 +99,7 @@ final class superpack extends core implements record_interface
|
|||||||
* @param string $title Title
|
* @param string $title Title
|
||||||
* @param string|null $html Content (HTML)
|
* @param string|null $html Content (HTML)
|
||||||
* @param string|null $html Content (text)
|
* @param string|null $html Content (text)
|
||||||
* @param int $supercost Cost
|
* @param int|float|null $supercost Cost
|
||||||
* @param int $active Is the record active?
|
* @param int $active Is the record active?
|
||||||
*
|
*
|
||||||
* @return record|false The record, if created
|
* @return record|false The record, if created
|
||||||
@@ -110,7 +110,7 @@ final class superpack extends core implements record_interface
|
|||||||
string $title,
|
string $title,
|
||||||
?string $html = null,
|
?string $html = null,
|
||||||
?string $text = null,
|
?string $text = null,
|
||||||
?int $supercost = null,
|
int|float|null $supercost = null,
|
||||||
bool $active = true,
|
bool $active = true,
|
||||||
): record|false {
|
): record|false {
|
||||||
if (!empty($html) || !empty($text)) {
|
if (!empty($html) || !empty($text)) {
|
||||||
@@ -122,7 +122,7 @@ final class superpack extends core implements record_interface
|
|||||||
$title,
|
$title,
|
||||||
(string) $html,
|
(string) $html,
|
||||||
(string) $text,
|
(string) $text,
|
||||||
(int) $supercost,
|
(float) $supercost,
|
||||||
(int) $active,
|
(int) $active,
|
||||||
svoboda::timestamp(),
|
svoboda::timestamp(),
|
||||||
svoboda::timestamp()
|
svoboda::timestamp()
|
||||||
|
|||||||
@@ -52,7 +52,11 @@ $core->router
|
|||||||
|
|
||||||
->write('/superpack/$urn', new route('superpack', 'index'), 'GET')
|
->write('/superpack/$urn', new route('superpack', 'index'), 'GET')
|
||||||
|
|
||||||
|
->write('/project/calculator', new route('project', 'calculator'), 'GET')
|
||||||
->write('/project/request', new route('project', 'request'), 'PUT')
|
->write('/project/request', new route('project', 'request'), 'PUT')
|
||||||
|
|
||||||
|
->write('/system/superpack/create', new route('superpack', 'create'), 'GET')
|
||||||
|
->write('/system/superpack/create', new route('superpack', 'create'), 'PUT')
|
||||||
;
|
;
|
||||||
|
|
||||||
// Handling request
|
// Handling request
|
||||||
|
|||||||
@@ -10,6 +10,20 @@
|
|||||||
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
|
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
|
||||||
*/
|
*/
|
||||||
class core {
|
class core {
|
||||||
|
/**
|
||||||
|
* @name Global modules
|
||||||
|
*
|
||||||
|
* @type {object}
|
||||||
|
*/
|
||||||
|
static global = {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name System modules
|
||||||
|
*
|
||||||
|
* @type {object}
|
||||||
|
*/
|
||||||
|
static system = {};
|
||||||
|
|
||||||
// Domain
|
// Domain
|
||||||
static domain = window.location.hostname;
|
static domain = window.location.hostname;
|
||||||
|
|
||||||
@@ -125,7 +139,7 @@ class core {
|
|||||||
*
|
*
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*/
|
*/
|
||||||
/* static choose = core.damper(
|
/* static choose = core.global.damper(
|
||||||
(
|
(
|
||||||
title = "Выбор действия",
|
title = "Выбор действия",
|
||||||
text = "",
|
text = "",
|
||||||
@@ -299,32 +313,50 @@ Object.assign(
|
|||||||
/**
|
/**
|
||||||
* @name Connect modules
|
* @name Connect modules
|
||||||
*
|
*
|
||||||
* @param {(Array|string)} modules Names of modules without extension (`.mjs` only)
|
* @param {(Array|string)} global Names of global modules without extension (`.mjs` only)
|
||||||
|
* @param {(Array|string)} system Names of system modules without extenstion (`.mjs` only)
|
||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
*/
|
*/
|
||||||
async connect(modules) {
|
async connect(global, system) {
|
||||||
// Normalisation required arguments
|
// Normalisation required arguments
|
||||||
if (typeof modules === "string") modules = [modules];
|
if (typeof global === "string") global = [global];
|
||||||
|
if (typeof system === "string") system = [system];
|
||||||
|
|
||||||
if (modules instanceof Array) {
|
// Initializing the registry of connected modules
|
||||||
// Received and validated required arguments
|
const connected = {
|
||||||
|
system: [],
|
||||||
|
global: []
|
||||||
|
};
|
||||||
|
|
||||||
// Initializing the registry of connected modules
|
if (global?.length > 0) {
|
||||||
const connected = [];
|
// Global
|
||||||
|
|
||||||
for (const module of modules) {
|
for (const module of global) {
|
||||||
// Iterating over modules
|
// Iterating over global modules
|
||||||
|
|
||||||
// Downloading, importing and writing the module into a core property and into registry of connected modules
|
// Downloading, importing and writing the global module into a core property and into registry of connected modules
|
||||||
core[module] =
|
core.global[module] =
|
||||||
connected[module] =
|
connected.global[module] =
|
||||||
await (await import(`./modules/${module}.mjs`)).default;
|
await (await import(`./modules/${module}.mjs`)).default;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exit (success)
|
|
||||||
return connected;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (system?.length > 0) {
|
||||||
|
// System
|
||||||
|
|
||||||
|
for (const module of system) {
|
||||||
|
// Iterating over system modules
|
||||||
|
|
||||||
|
// Downloading, importing and writing the system module into a core property and into registry of connected modules
|
||||||
|
core.system[module] =
|
||||||
|
connected.system[module] =
|
||||||
|
await (await import(`./modules/system/${module}.mjs`)).default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Exit (success)
|
||||||
|
return connected;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -347,7 +379,7 @@ core.modules.connect("damper").then(() => {
|
|||||||
*
|
*
|
||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
*/
|
*/
|
||||||
damper: core.damper(
|
damper: core.global.damper(
|
||||||
(...variables) => core.buffer.write.system(...variables),
|
(...variables) => core.buffer.write.system(...variables),
|
||||||
300,
|
300,
|
||||||
2,
|
2,
|
||||||
|
|||||||
@@ -72,6 +72,37 @@ export default class paginator {
|
|||||||
*/
|
*/
|
||||||
#page = 1;
|
#page = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Page (get)
|
||||||
|
*
|
||||||
|
* @return {number}
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
get page() {
|
||||||
|
return this.#page;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name The initial page
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#initial = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name The initial page (get)
|
||||||
|
*
|
||||||
|
* @return {number}
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
get initial() {
|
||||||
|
return this.#initial;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Constructor
|
* @name Constructor
|
||||||
*
|
*
|
||||||
@@ -79,16 +110,14 @@ export default class paginator {
|
|||||||
* Initialize a hotline instance
|
* Initialize a hotline instance
|
||||||
*
|
*
|
||||||
* @param {HTMLElement} shell The shell element
|
* @param {HTMLElement} shell The shell element
|
||||||
* @param {NodeList} pages
|
* @param {NodeList} pages The pages HTML-elements list
|
||||||
* @param {Set} hide_on_the_first_page HTML-elements that will be hidden on the first page
|
* @param {number} initial The initial page identifier
|
||||||
* @param {Set} hide_on_the_last_page HTML-elements that will be hidden on the last page
|
|
||||||
* @param {boolean} [inject=false] Write the hotline instance into the shell element?
|
* @param {boolean} [inject=false] Write the hotline instance into the shell element?
|
||||||
**/
|
**/
|
||||||
constructor(
|
constructor(
|
||||||
shell,
|
shell,
|
||||||
pages,
|
pages,
|
||||||
hide_on_the_first_page,
|
initial,
|
||||||
hide_on_the_last_page,
|
|
||||||
inject = false
|
inject = false
|
||||||
) {
|
) {
|
||||||
if (shell instanceof HTMLElement) {
|
if (shell instanceof HTMLElement) {
|
||||||
@@ -102,11 +131,18 @@ export default class paginator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pages instanceof NodeList) {
|
if (pages instanceof NodeList) {
|
||||||
// Initialized pages
|
// Initialized the pages HTML-elements list
|
||||||
|
|
||||||
// Writing the pages
|
// Writing the pages HTML-elements list
|
||||||
this.#pages = pages;
|
this.#pages = pages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof initial === 'number') {
|
||||||
|
// Initialized the initial page identifier
|
||||||
|
|
||||||
|
// Writing the initial page identifier
|
||||||
|
this.#page = this.#initial = initial;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1896,7 +1896,7 @@ export default class project {
|
|||||||
*
|
*
|
||||||
* @return {void}
|
* @return {void}
|
||||||
*/
|
*/
|
||||||
damper: core.damper(
|
damper: core.global.damper(
|
||||||
(...variables) => this.send.system(...variables),
|
(...variables) => this.send.system(...variables),
|
||||||
300,
|
300,
|
||||||
2,
|
2,
|
||||||
@@ -2153,20 +2153,32 @@ export default class project {
|
|||||||
// Initializing the result HTML-element
|
// Initializing the result HTML-element
|
||||||
const result = this.#elements.get('result');
|
const result = this.#elements.get('result');
|
||||||
|
|
||||||
// Showing the result HTML-element
|
if (result instanceof HTMLElement) {
|
||||||
result.style.removeProperty('display');
|
// Initialized the result HTML-element
|
||||||
|
|
||||||
|
// Showing the result HTML-element
|
||||||
|
result.style.removeProperty('display');
|
||||||
|
}
|
||||||
|
|
||||||
// Initializing the hours HTML-element
|
// Initializing the hours HTML-element
|
||||||
const output = this.#elements.get('hours_output');
|
const output = this.#elements.get('hours_output');
|
||||||
|
|
||||||
// Writing into the hours output HTML-element
|
if (output instanceof HTMLElement) {
|
||||||
output.innerText = hours;
|
// Initialized the hours HTML-element
|
||||||
|
|
||||||
|
// Writing into the hours output HTML-element
|
||||||
|
output.innerText = hours;
|
||||||
|
}
|
||||||
|
|
||||||
// Initializing the hours wrap HTML-element
|
// Initializing the hours wrap HTML-element
|
||||||
const wrap = this.#elements.get('hours');
|
const wrap = this.#elements.get('hours');
|
||||||
|
|
||||||
// Showing the hours wrap HTML-element
|
if (wrap instanceof HTMLElement) {
|
||||||
wrap.style.removeProperty('display');
|
// Initialized the hours wrap HTML-element
|
||||||
|
|
||||||
|
// Showing the hours wrap HTML-element
|
||||||
|
wrap.style.removeProperty('display');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exit (success)
|
// Exit (success)
|
||||||
@@ -2197,8 +2209,12 @@ export default class project {
|
|||||||
// Initializing the days HTML-element
|
// Initializing the days HTML-element
|
||||||
const output = this.#elements.get('days_output');
|
const output = this.#elements.get('days_output');
|
||||||
|
|
||||||
// Writing into the days output HTML-element
|
if (output instanceof HTMLElement) {
|
||||||
output.innerText = days;
|
// Initialized the days HTML-element
|
||||||
|
|
||||||
|
// Writing into the days output HTML-element
|
||||||
|
output.innerText = days;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exit (success)
|
// Exit (success)
|
||||||
@@ -2256,24 +2272,52 @@ export default class project {
|
|||||||
// Initializing the result HTML-element
|
// Initializing the result HTML-element
|
||||||
const result = this.#elements.get('result');
|
const result = this.#elements.get('result');
|
||||||
|
|
||||||
// Showing the result HTML-element
|
if (result instanceof HTMLElement) {
|
||||||
result.style.removeProperty('display');
|
// Initialized the result HTML-element
|
||||||
|
|
||||||
// Initializing the output HTML-elements
|
// Showing the result HTML-element
|
||||||
|
result.style.removeProperty('display');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initializing the payment output HTML-element
|
||||||
const payment_output = this.#elements.get('payment_output');
|
const payment_output = this.#elements.get('payment_output');
|
||||||
|
|
||||||
|
if (payment_output instanceof HTMLElement) {
|
||||||
|
// Initialized the payment output HTML-element
|
||||||
|
|
||||||
|
// Writing into the payment output HTML-element
|
||||||
|
payment_output.innerText = new Intl.NumberFormat("ru-RU", { maximumSignificantDigits: 3 }).format(costs.full);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initializing the prepayment output HTML-element
|
||||||
const prepayment_output = this.#elements.get('prepayment_output');
|
const prepayment_output = this.#elements.get('prepayment_output');
|
||||||
|
|
||||||
// Writing into the output HTML-elements
|
if (prepayment_output instanceof HTMLElement) {
|
||||||
payment_output.innerText = new Intl.NumberFormat("ru-RU", { maximumSignificantDigits: 3 }).format(costs.full);
|
// Initialized the prepayment output HTML-element
|
||||||
prepayment_output.innerText = new Intl.NumberFormat("ru-RU", { maximumSignificantDigits: 3 }).format(costs.prepayment);
|
|
||||||
|
|
||||||
// Initializing the wrap HTML-elements
|
// Writing into the prepayment output HTML-element
|
||||||
|
prepayment_output.innerText = new Intl.NumberFormat("ru-RU", { maximumSignificantDigits: 3 }).format(costs.prepayment);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initializing the payment wrap HTML-element
|
||||||
const payment_wrap = this.#elements.get('payment');
|
const payment_wrap = this.#elements.get('payment');
|
||||||
|
|
||||||
|
if (payment_wrap instanceof HTMLElement) {
|
||||||
|
// Initialized the payment wrap HTML-element
|
||||||
|
|
||||||
|
// Showing the payment wrap HTML-element
|
||||||
|
payment_wrap.style.removeProperty('display');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initializing the prepayment wrap HTML-element
|
||||||
const prepayment_wrap = this.#elements.get('prepayment');
|
const prepayment_wrap = this.#elements.get('prepayment');
|
||||||
|
|
||||||
// Showing the wrap HTML-elements
|
if (prepayment_wrap instanceof HTMLElement) {
|
||||||
payment_wrap.style.removeProperty('display');
|
// Initialized the prepayment wrap HTML-element
|
||||||
prepayment_wrap.style.removeProperty('display');
|
|
||||||
|
// Showing the prepayment wrap HTML-element
|
||||||
|
prepayment_wrap.style.removeProperty('display');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exit (success)
|
// Exit (success)
|
||||||
|
|||||||
623
kodorvan/site/system/public/js/modules/system/article.mjs
Normal file
623
kodorvan/site/system/public/js/modules/system/article.mjs
Normal file
@@ -0,0 +1,623 @@
|
|||||||
|
/** @module superpack */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name superpack.mjs
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Module for creating superpacks
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @public
|
||||||
|
*
|
||||||
|
* {@link https://git.mirzaev.sexy/mirzaev/superpack.mjs}
|
||||||
|
*
|
||||||
|
* @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License
|
||||||
|
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
|
||||||
|
*/
|
||||||
|
export default class superpack {
|
||||||
|
/**
|
||||||
|
* @name Shell
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Shell of all elements, top-level parent HTML-element
|
||||||
|
*
|
||||||
|
* @type {HTMLElement}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#shell;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Elements
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Calculation steps shell elements
|
||||||
|
*
|
||||||
|
* @type {Map}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#elements = new Map();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Elements (get)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Getter for `this.#elements`
|
||||||
|
*
|
||||||
|
* @return {Map}
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
get elements() {
|
||||||
|
return this.#elements;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name stages
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Active stages for guide
|
||||||
|
*
|
||||||
|
* @return {Set}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#stages = new Set();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Stages (get)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Getter for `this.#stages`
|
||||||
|
*
|
||||||
|
* @return {Set}
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
get stages() {
|
||||||
|
return this.#stages;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Shell (get)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Getter for `this.#shell`
|
||||||
|
*
|
||||||
|
* @return {HTMLElement}
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
get shell() {
|
||||||
|
return this.#shell;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name URN
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* The superpack URN (https://kodorvan.tech/superpack/{URN})
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#urn = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name URN (set)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Setter for `this.#urn`
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
set urn(value) {
|
||||||
|
// Writing into the hour cost
|
||||||
|
this.#urn = value;
|
||||||
|
|
||||||
|
// Dispatching event: "system.superpack.write"
|
||||||
|
this.#shell.dispatchEvent(
|
||||||
|
new CustomEvent("system.superpack.write", {
|
||||||
|
detail: { name: 'urn', value: value }
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (this.#urn.length > 0) {
|
||||||
|
// Has a value
|
||||||
|
|
||||||
|
// Deleting from the stages registry
|
||||||
|
this.#stages.delete('urn');
|
||||||
|
} else {
|
||||||
|
// Has no value
|
||||||
|
|
||||||
|
// Writing into the stages registry
|
||||||
|
this.#stages.add('urn');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reinitializing guide HTML-elements
|
||||||
|
this.guide();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Title
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* The superpack title
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#title = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Title (set)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Setter for `this.#title`
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
set title(value) {
|
||||||
|
// Writing into the hour cost
|
||||||
|
this.#title = value;
|
||||||
|
|
||||||
|
// Dispatching event: "system.superpack.write"
|
||||||
|
this.#shell.dispatchEvent(
|
||||||
|
new CustomEvent("system.superpack.write", {
|
||||||
|
detail: { name: 'title', value: value }
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (this.#title.length > 0) {
|
||||||
|
// Has a value
|
||||||
|
|
||||||
|
// Deleting from the stages registry
|
||||||
|
this.#stages.delete('title');
|
||||||
|
} else {
|
||||||
|
// Has no value
|
||||||
|
|
||||||
|
// Writing into the stages registry
|
||||||
|
this.#stages.add('title');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reinitializing guide HTML-elements
|
||||||
|
this.guide();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Image
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* The head image of the article
|
||||||
|
*
|
||||||
|
* @type {File}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#image;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Image (set)
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
set image(value) {
|
||||||
|
if (value instanceof File){
|
||||||
|
// File
|
||||||
|
|
||||||
|
// Writing into the property
|
||||||
|
this.#image = value;
|
||||||
|
} else {
|
||||||
|
// Undefined
|
||||||
|
|
||||||
|
// Deleting the property
|
||||||
|
this.#image = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.#image.length > 0) {
|
||||||
|
// Has the image
|
||||||
|
|
||||||
|
// Deleting from the stages registry
|
||||||
|
this.#stages.delete('image');
|
||||||
|
} else {
|
||||||
|
// Has no image
|
||||||
|
|
||||||
|
// Writing into the stages registry
|
||||||
|
this.#stages.add('image');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dispatching event: "article.write"
|
||||||
|
this.shell.dispatchEvent(
|
||||||
|
new CustomEvent("article.write", {
|
||||||
|
detail: { name: 'image', value: this.#image }
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
// Reinitializing guide HTML-elements
|
||||||
|
this.guide();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Image (get)
|
||||||
|
*
|
||||||
|
* @return {File}
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
get image() {
|
||||||
|
return this.#image;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name HTML
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* The superpack content (HTML)
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#html = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name HTML (set)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Setter for `this.#html`
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
set html(value) {
|
||||||
|
// Writing into the hour cost
|
||||||
|
this.#html = value;
|
||||||
|
|
||||||
|
// Dispatching event: "system.superpack.write"
|
||||||
|
this.#shell.dispatchEvent(
|
||||||
|
new CustomEvent("system.superpack.write", {
|
||||||
|
detail: { name: 'html', value: value }
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (this.#html.length > 0) {
|
||||||
|
// Has a value
|
||||||
|
|
||||||
|
// Deleting from the stages registry
|
||||||
|
this.#stages.delete('html');
|
||||||
|
} else {
|
||||||
|
// Has no value
|
||||||
|
|
||||||
|
// Writing into the stages registry
|
||||||
|
this.#stages.add('html');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reinitializing guide HTML-elements
|
||||||
|
this.guide();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Text
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* The superpack content (text)
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#text = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Text (set)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Setter for `this.#text`
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
set text(value) {
|
||||||
|
// Writing into the hour cost
|
||||||
|
this.#text = value;
|
||||||
|
|
||||||
|
// Dispatching event: "system.superpack.write"
|
||||||
|
this.#shell.dispatchEvent(
|
||||||
|
new CustomEvent("system.superpack.write", {
|
||||||
|
detail: { name: 'text', value: value }
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (this.#text.length > 0) {
|
||||||
|
// Has a value
|
||||||
|
|
||||||
|
// Deleting from the stages registry
|
||||||
|
this.#stages.delete('text');
|
||||||
|
} else {
|
||||||
|
// Has no value
|
||||||
|
|
||||||
|
// Writing into the stages registry
|
||||||
|
this.#stages.add('text');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reinitializing guide text-elements
|
||||||
|
this.guide();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Supercost
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* The superpack content (supercost)
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#supercost = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Supercost (set)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Setter for `this.#supercost`
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
set supercost(value) {
|
||||||
|
// Writing into the hour cost
|
||||||
|
this.#supercost = value;
|
||||||
|
|
||||||
|
// Dispatching event: "system.superpack.write"
|
||||||
|
this.#shell.dispatchEvent(
|
||||||
|
new CustomEvent("system.superpack.write", {
|
||||||
|
detail: { name: 'supercost', value: value }
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (this.#supercost > 0) {
|
||||||
|
// Has a value
|
||||||
|
|
||||||
|
// Deleting from the stages registry
|
||||||
|
this.#stages.delete('supercost');
|
||||||
|
} else {
|
||||||
|
// Has no value
|
||||||
|
|
||||||
|
// Writing into the stages registry
|
||||||
|
this.#stages.add('supercost');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reinitializing guide supercost-elements
|
||||||
|
this.guide();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Constructor
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Initialize an instance
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} shell The shell element
|
||||||
|
**/
|
||||||
|
constructor(
|
||||||
|
shell,
|
||||||
|
urn,
|
||||||
|
title,
|
||||||
|
html,
|
||||||
|
text,
|
||||||
|
supercost
|
||||||
|
) {
|
||||||
|
if (shell instanceof HTMLElement) {
|
||||||
|
// Initialized the shell
|
||||||
|
|
||||||
|
// Writing the shell HTML-element
|
||||||
|
this.#shell = shell;
|
||||||
|
|
||||||
|
if (urn instanceof HTMLElement) this.#elements.set('urn', urn);
|
||||||
|
if (title instanceof HTMLElement) this.#elements.set('title', title);
|
||||||
|
if (html instanceof HTMLElement) this.#elements.set('html', html);
|
||||||
|
if (text instanceof HTMLElement) this.#elements.set('text', text);
|
||||||
|
if (supercost instanceof HTMLElement) this.#elements.set('supercost', supercost);
|
||||||
|
|
||||||
|
Object.assign(
|
||||||
|
this.send,
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @name Send (system)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Send the superpack data to the server
|
||||||
|
*
|
||||||
|
* @memberof superpack.send
|
||||||
|
*
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
async system(request, resolve, reject) {
|
||||||
|
try {
|
||||||
|
if (
|
||||||
|
// typeof identifier === "string" ||
|
||||||
|
true
|
||||||
|
) {
|
||||||
|
// Validated all required arguments
|
||||||
|
|
||||||
|
return await core.request(
|
||||||
|
"/system/superpack/create",
|
||||||
|
request,
|
||||||
|
"PUT",
|
||||||
|
).then(
|
||||||
|
async (json) => {
|
||||||
|
if (json) {
|
||||||
|
// Received a JSON-response
|
||||||
|
|
||||||
|
if (
|
||||||
|
json.errors !== null &&
|
||||||
|
typeof json.errors === "object" &&
|
||||||
|
json.errors.length > 0
|
||||||
|
) {
|
||||||
|
// Fail (received errors)
|
||||||
|
|
||||||
|
// Exit (fail)
|
||||||
|
reject(json);
|
||||||
|
} else {
|
||||||
|
// Success (not received errors)
|
||||||
|
|
||||||
|
// Reloading the page @todo make something smarter
|
||||||
|
alert("Запрос доставлен");
|
||||||
|
|
||||||
|
if (json.redirect?.length > 0) {
|
||||||
|
// Received the redirect
|
||||||
|
|
||||||
|
// Redirect
|
||||||
|
window.location = json.redirect;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Exit (success)
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
() => reject(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
core?.modules.connect("damper").then((connected) => {
|
||||||
|
// Imported the damper.mjs module
|
||||||
|
|
||||||
|
Object.assign(
|
||||||
|
this.send,
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @name Send (damper)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Send the superpack data to the server
|
||||||
|
*
|
||||||
|
* @memberof superpack.send
|
||||||
|
*
|
||||||
|
* @param {booleanean} [force=false] Ignore the damper?
|
||||||
|
*
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
damper: core.global.damper(
|
||||||
|
(...variables) => this.send.system(...variables),
|
||||||
|
300,
|
||||||
|
2,
|
||||||
|
),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Guide
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Set user interface help elements
|
||||||
|
*
|
||||||
|
* @param {(string|Set)} stages
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
**/
|
||||||
|
guide(stages) {
|
||||||
|
if (stages !== undefined) {
|
||||||
|
// Received stages
|
||||||
|
|
||||||
|
if (stages instanceof Set) {
|
||||||
|
// Set
|
||||||
|
|
||||||
|
// Reinitializing stages
|
||||||
|
this.#stages = stages;
|
||||||
|
} else {
|
||||||
|
// String (expected)
|
||||||
|
|
||||||
|
// Writing into stages
|
||||||
|
this.#stages.add(stages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const [parameter, element] of this.#elements) {
|
||||||
|
// Iterating over elements
|
||||||
|
|
||||||
|
// Initializing the guide HTML-element
|
||||||
|
const guide = element.querySelector('.guide');
|
||||||
|
|
||||||
|
if (guide instanceof HTMLElement) {
|
||||||
|
// Initialized the guide HTML-element
|
||||||
|
|
||||||
|
// Initializing the input HTML-element
|
||||||
|
const input = element.querySelector('.input');
|
||||||
|
|
||||||
|
if (input.value == "" || this.#stages.has(parameter)) {
|
||||||
|
// Requested guide
|
||||||
|
|
||||||
|
// Showing the guide
|
||||||
|
guide.classList.add('active');
|
||||||
|
} else {
|
||||||
|
// Not requested guide
|
||||||
|
|
||||||
|
// Hiding the guide
|
||||||
|
guide.classList.remove('active');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Pack
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Compose the superpack parameters
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*
|
||||||
|
* @returns {string} Parameters row for `application/x-www-form-urlencoded`
|
||||||
|
*/
|
||||||
|
pack() {
|
||||||
|
// Exit (success)
|
||||||
|
return "identifier=" + encodeURIComponent(new Date().valueOf())
|
||||||
|
+ "&urn=" + encodeURIComponent(this.#urn)
|
||||||
|
+ "&title=" + encodeURIComponent(this.#title)
|
||||||
|
+ "&html=" + encodeURIComponent(this.#html)
|
||||||
|
+ "&text=" + encodeURIComponent(this.#text)
|
||||||
|
+ "&supercost=" + encodeURIComponent(this.#supercost)
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Send
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Compose the superpack and send to the server
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*
|
||||||
|
* @param {boolean} [force=false] Ignore the damper?
|
||||||
|
*/
|
||||||
|
send(force = false) {
|
||||||
|
core.modules.connect("damper").then(
|
||||||
|
() => {
|
||||||
|
// Imported the damper module
|
||||||
|
|
||||||
|
// Processing under damper
|
||||||
|
this.send.damper(this.pack(), force);
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
// Not imported the damper module
|
||||||
|
|
||||||
|
// Processing
|
||||||
|
this.send.system(this.pack());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
559
kodorvan/site/system/public/js/modules/system/superpack.mjs
Normal file
559
kodorvan/site/system/public/js/modules/system/superpack.mjs
Normal file
@@ -0,0 +1,559 @@
|
|||||||
|
/** @module superpack */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name superpack.mjs
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Module for creating superpacks
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
* @public
|
||||||
|
*
|
||||||
|
* {@link https://git.mirzaev.sexy/mirzaev/superpack.mjs}
|
||||||
|
*
|
||||||
|
* @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License
|
||||||
|
* @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
|
||||||
|
*/
|
||||||
|
export default class superpack {
|
||||||
|
/**
|
||||||
|
* @name Shell
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Shell of all elements, top-level parent HTML-element
|
||||||
|
*
|
||||||
|
* @type {HTMLElement}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#shell;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Elements
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Calculation steps shell elements
|
||||||
|
*
|
||||||
|
* @type {Map}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#elements = new Map();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Elements (get)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Getter for `this.#elements`
|
||||||
|
*
|
||||||
|
* @return {Map}
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
get elements() {
|
||||||
|
return this.#elements;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name stages
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Active stages for guide
|
||||||
|
*
|
||||||
|
* @return {Set}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#stages = new Set();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Stages (get)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Getter for `this.#stages`
|
||||||
|
*
|
||||||
|
* @return {Set}
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
get stages() {
|
||||||
|
return this.#stages;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Shell (get)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Getter for `this.#shell`
|
||||||
|
*
|
||||||
|
* @return {HTMLElement}
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
get shell() {
|
||||||
|
return this.#shell;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name URN
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* The superpack URN (https://kodorvan.tech/superpack/{URN})
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#urn = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name URN (set)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Setter for `this.#urn`
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
set urn(value) {
|
||||||
|
// Writing into the hour cost
|
||||||
|
this.#urn = value;
|
||||||
|
|
||||||
|
// Dispatching event: "system.superpack.write"
|
||||||
|
this.#shell.dispatchEvent(
|
||||||
|
new CustomEvent("system.superpack.write", {
|
||||||
|
detail: { name: 'urn', value: value }
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (this.#urn.length > 0) {
|
||||||
|
// Has a value
|
||||||
|
|
||||||
|
// Deleting from the stages registry
|
||||||
|
this.#stages.delete('urn');
|
||||||
|
} else {
|
||||||
|
// Has no value
|
||||||
|
|
||||||
|
// Writing into the stages registry
|
||||||
|
this.#stages.add('urn');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reinitializing guide HTML-elements
|
||||||
|
this.guide();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Title
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* The superpack title
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#title = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Title (set)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Setter for `this.#title`
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
set title(value) {
|
||||||
|
// Writing into the hour cost
|
||||||
|
this.#title = value;
|
||||||
|
|
||||||
|
// Dispatching event: "system.superpack.write"
|
||||||
|
this.#shell.dispatchEvent(
|
||||||
|
new CustomEvent("system.superpack.write", {
|
||||||
|
detail: { name: 'title', value: value }
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (this.#title.length > 0) {
|
||||||
|
// Has a value
|
||||||
|
|
||||||
|
// Deleting from the stages registry
|
||||||
|
this.#stages.delete('title');
|
||||||
|
} else {
|
||||||
|
// Has no value
|
||||||
|
|
||||||
|
// Writing into the stages registry
|
||||||
|
this.#stages.add('title');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reinitializing guide HTML-elements
|
||||||
|
this.guide();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name HTML
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* The superpack content (HTML)
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#html = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name HTML (set)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Setter for `this.#html`
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
set html(value) {
|
||||||
|
// Writing into the hour cost
|
||||||
|
this.#html = value;
|
||||||
|
|
||||||
|
// Dispatching event: "system.superpack.write"
|
||||||
|
this.#shell.dispatchEvent(
|
||||||
|
new CustomEvent("system.superpack.write", {
|
||||||
|
detail: { name: 'html', value: value }
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (this.#html.length > 0) {
|
||||||
|
// Has a value
|
||||||
|
|
||||||
|
// Deleting from the stages registry
|
||||||
|
this.#stages.delete('html');
|
||||||
|
} else {
|
||||||
|
// Has no value
|
||||||
|
|
||||||
|
// Writing into the stages registry
|
||||||
|
this.#stages.add('html');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reinitializing guide HTML-elements
|
||||||
|
this.guide();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Text
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* The superpack content (text)
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#text = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Text (set)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Setter for `this.#text`
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
set text(value) {
|
||||||
|
// Writing into the hour cost
|
||||||
|
this.#text = value;
|
||||||
|
|
||||||
|
// Dispatching event: "system.superpack.write"
|
||||||
|
this.#shell.dispatchEvent(
|
||||||
|
new CustomEvent("system.superpack.write", {
|
||||||
|
detail: { name: 'text', value: value }
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (this.#text.length > 0) {
|
||||||
|
// Has a value
|
||||||
|
|
||||||
|
// Deleting from the stages registry
|
||||||
|
this.#stages.delete('text');
|
||||||
|
} else {
|
||||||
|
// Has no value
|
||||||
|
|
||||||
|
// Writing into the stages registry
|
||||||
|
this.#stages.add('text');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reinitializing guide text-elements
|
||||||
|
this.guide();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Supercost
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* The superpack content (supercost)
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
*
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
#supercost = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Supercost (set)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Setter for `this.#supercost`
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
|
set supercost(value) {
|
||||||
|
// Writing into the hour cost
|
||||||
|
this.#supercost = value;
|
||||||
|
|
||||||
|
// Dispatching event: "system.superpack.write"
|
||||||
|
this.#shell.dispatchEvent(
|
||||||
|
new CustomEvent("system.superpack.write", {
|
||||||
|
detail: { name: 'supercost', value: value }
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
if (this.#supercost > 0) {
|
||||||
|
// Has a value
|
||||||
|
|
||||||
|
// Deleting from the stages registry
|
||||||
|
this.#stages.delete('supercost');
|
||||||
|
} else {
|
||||||
|
// Has no value
|
||||||
|
|
||||||
|
// Writing into the stages registry
|
||||||
|
this.#stages.add('supercost');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reinitializing guide supercost-elements
|
||||||
|
this.guide();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Constructor
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Initialize an instance
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} shell The shell element
|
||||||
|
**/
|
||||||
|
constructor(
|
||||||
|
shell,
|
||||||
|
urn,
|
||||||
|
title,
|
||||||
|
html,
|
||||||
|
text,
|
||||||
|
supercost
|
||||||
|
) {
|
||||||
|
if (shell instanceof HTMLElement) {
|
||||||
|
// Initialized the shell
|
||||||
|
|
||||||
|
// Writing the shell HTML-element
|
||||||
|
this.#shell = shell;
|
||||||
|
|
||||||
|
if (urn instanceof HTMLElement) this.#elements.set('urn', urn);
|
||||||
|
if (title instanceof HTMLElement) this.#elements.set('title', title);
|
||||||
|
if (html instanceof HTMLElement) this.#elements.set('html', html);
|
||||||
|
if (text instanceof HTMLElement) this.#elements.set('text', text);
|
||||||
|
if (supercost instanceof HTMLElement) this.#elements.set('supercost', supercost);
|
||||||
|
|
||||||
|
Object.assign(
|
||||||
|
this.send,
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @name Send (system)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Send the superpack data to the server
|
||||||
|
*
|
||||||
|
* @memberof superpack.send
|
||||||
|
*
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
async system(request, resolve, reject) {
|
||||||
|
try {
|
||||||
|
if (
|
||||||
|
// typeof identifier === "string" ||
|
||||||
|
true
|
||||||
|
) {
|
||||||
|
// Validated all required arguments
|
||||||
|
|
||||||
|
return await core.request(
|
||||||
|
"/system/superpack/create",
|
||||||
|
request,
|
||||||
|
"PUT",
|
||||||
|
).then(
|
||||||
|
async (json) => {
|
||||||
|
if (json) {
|
||||||
|
// Received a JSON-response
|
||||||
|
|
||||||
|
if (
|
||||||
|
json.errors !== null &&
|
||||||
|
typeof json.errors === "object" &&
|
||||||
|
json.errors.length > 0
|
||||||
|
) {
|
||||||
|
// Fail (received errors)
|
||||||
|
|
||||||
|
// Exit (fail)
|
||||||
|
reject(json);
|
||||||
|
} else {
|
||||||
|
// Success (not received errors)
|
||||||
|
|
||||||
|
// Reloading the page @todo make something smarter
|
||||||
|
alert("Запрос доставлен");
|
||||||
|
|
||||||
|
if (json.redirect?.length > 0) {
|
||||||
|
// Received the redirect
|
||||||
|
|
||||||
|
// Redirect
|
||||||
|
window.location = json.redirect;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Exit (success)
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
() => reject(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
core?.modules.connect("damper").then((connected) => {
|
||||||
|
// Imported the damper.mjs module
|
||||||
|
|
||||||
|
Object.assign(
|
||||||
|
this.send,
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @name Send (damper)
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Send the superpack data to the server
|
||||||
|
*
|
||||||
|
* @memberof superpack.send
|
||||||
|
*
|
||||||
|
* @param {booleanean} [force=false] Ignore the damper?
|
||||||
|
*
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
damper: core.global.damper(
|
||||||
|
(...variables) => this.send.system(...variables),
|
||||||
|
300,
|
||||||
|
2,
|
||||||
|
),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Guide
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Set user interface help elements
|
||||||
|
*
|
||||||
|
* @param {(string|Set)} stages
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
**/
|
||||||
|
guide(stages) {
|
||||||
|
if (stages !== undefined) {
|
||||||
|
// Received stages
|
||||||
|
|
||||||
|
if (stages instanceof Set) {
|
||||||
|
// Set
|
||||||
|
|
||||||
|
// Reinitializing stages
|
||||||
|
this.#stages = stages;
|
||||||
|
} else {
|
||||||
|
// String (expected)
|
||||||
|
|
||||||
|
// Writing into stages
|
||||||
|
this.#stages.add(stages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const [parameter, element] of this.#elements) {
|
||||||
|
// Iterating over elements
|
||||||
|
|
||||||
|
// Initializing the guide HTML-element
|
||||||
|
const guide = element.querySelector('.guide');
|
||||||
|
|
||||||
|
if (guide instanceof HTMLElement) {
|
||||||
|
// Initialized the guide HTML-element
|
||||||
|
|
||||||
|
// Initializing the input HTML-element
|
||||||
|
const input = element.querySelector('.input');
|
||||||
|
|
||||||
|
if (input.value == "" || this.#stages.has(parameter)) {
|
||||||
|
// Requested guide
|
||||||
|
|
||||||
|
// Showing the guide
|
||||||
|
guide.classList.add('active');
|
||||||
|
} else {
|
||||||
|
// Not requested guide
|
||||||
|
|
||||||
|
// Hiding the guide
|
||||||
|
guide.classList.remove('active');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Pack
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Compose the superpack parameters
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*
|
||||||
|
* @returns {string} Parameters row for `application/x-www-form-urlencoded`
|
||||||
|
*/
|
||||||
|
pack() {
|
||||||
|
// Exit (success)
|
||||||
|
return "identifier=" + encodeURIComponent(new Date().valueOf())
|
||||||
|
+ "&urn=" + encodeURIComponent(this.#urn)
|
||||||
|
+ "&title=" + encodeURIComponent(this.#title)
|
||||||
|
+ "&html=" + encodeURIComponent(this.#html)
|
||||||
|
+ "&text=" + encodeURIComponent(this.#text)
|
||||||
|
+ "&supercost=" + encodeURIComponent(this.#supercost)
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name Send
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Compose the superpack and send to the server
|
||||||
|
*
|
||||||
|
* @public
|
||||||
|
*
|
||||||
|
* @param {boolean} [force=false] Ignore the damper?
|
||||||
|
*/
|
||||||
|
send(force = false) {
|
||||||
|
core.modules.connect("damper").then(
|
||||||
|
() => {
|
||||||
|
// Imported the damper module
|
||||||
|
|
||||||
|
// Processing under damper
|
||||||
|
this.send.damper(this.pack(), force);
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
// Not imported the damper module
|
||||||
|
|
||||||
|
// Processing
|
||||||
|
this.send.system(this.pack());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,28 +10,28 @@ core.modules.connect(["damper", "project"]).then((connected) => {
|
|||||||
const files = document.getElementById("project_files");
|
const files = document.getElementById("project_files");
|
||||||
|
|
||||||
// Initializing the instance of the project.mjs
|
// Initializing the instance of the project.mjs
|
||||||
core.project = new connected.project(
|
core.global.project = new connected.global.project(
|
||||||
document.querySelector('section[data-paginator-page="1"]'),
|
document.querySelector('section[data-paginator-page="2"]'),
|
||||||
document.getElementById("architecture"),
|
undefined,
|
||||||
document.getElementById("purpose"),
|
undefined,
|
||||||
document.getElementById("integrations"),
|
undefined,
|
||||||
document.getElementById("team"),
|
undefined,
|
||||||
document.getElementById("programmers"),
|
undefined,
|
||||||
document.getElementById("designers"),
|
undefined,
|
||||||
document.getElementById("boosters"),
|
undefined,
|
||||||
document.getElementById("reward"),
|
undefined,
|
||||||
document.getElementById("hour"),
|
undefined,
|
||||||
document.getElementById("hour_input_number"),
|
undefined,
|
||||||
document.getElementById("hour_input_range"),
|
undefined,
|
||||||
document.getElementById("result"),
|
undefined,
|
||||||
document.getElementById("calculated"),
|
undefined,
|
||||||
document.getElementById("hours"),
|
undefined,
|
||||||
document.getElementById("hours_output"),
|
undefined,
|
||||||
document.getElementById("days_output"),
|
undefined,
|
||||||
document.getElementById("payment"),
|
undefined,
|
||||||
document.getElementById("payment_output"),
|
undefined,
|
||||||
document.getElementById("prepayment"),
|
undefined,
|
||||||
document.getElementById("prepayment_output"),
|
undefined,
|
||||||
document.getElementById("project_name"),
|
document.getElementById("project_name"),
|
||||||
document.getElementById("project_description"),
|
document.getElementById("project_description"),
|
||||||
files,
|
files,
|
||||||
@@ -43,23 +43,6 @@ core.modules.connect(["damper", "project"]).then((connected) => {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
// Initializing the hour input number HTML-element
|
|
||||||
const hour_number = document.getElementById('hour_input_number');
|
|
||||||
|
|
||||||
// Initializing the hour input range HTML-element
|
|
||||||
const hour_range = document.getElementById('hour_input_range');
|
|
||||||
|
|
||||||
hour_range.addEventListener("input", () => {
|
|
||||||
hour_inputs_syncronize(hour_range, hour_number);
|
|
||||||
});
|
|
||||||
|
|
||||||
function hour_inputs_syncronize(range, number) {
|
|
||||||
const min = range.min ? range.min : 300;
|
|
||||||
const max = range.max ? range.max : 5000;
|
|
||||||
|
|
||||||
number.value = range.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initializing the "back" button
|
// Initializing the "back" button
|
||||||
const back = document.getElementById('back');
|
const back = document.getElementById('back');
|
||||||
|
|
||||||
@@ -70,17 +53,18 @@ core.modules.connect(["damper", "project"]).then((connected) => {
|
|||||||
const pages = document.querySelectorAll('section[data-paginator-page]');
|
const pages = document.querySelectorAll('section[data-paginator-page]');
|
||||||
|
|
||||||
// Initializing the instance of the paginator.mjs
|
// Initializing the instance of the paginator.mjs
|
||||||
core.paginator = new connected.paginator(
|
core.global.paginator = new connected.global.paginator(
|
||||||
document.getElementById('buttons'),
|
document.getElementById('buttons'),
|
||||||
pages
|
pages,
|
||||||
|
2
|
||||||
);
|
);
|
||||||
|
|
||||||
// Initializing the buttons
|
// Initializing the buttons
|
||||||
const buttons = core.paginator.shell.querySelectorAll('button[data-paginator-page-button]');
|
const buttons = core.global.paginator.shell.querySelectorAll('button[data-paginator-page-button]');
|
||||||
|
|
||||||
function menu(identifier) {
|
function menu(identifier) {
|
||||||
// Initializing the target page button HTML-element
|
// Initializing the target page button HTML-element
|
||||||
const active = core.paginator.shell.querySelector('button[data-paginator-page-button="' + identifier + '"]');
|
const active = core.global.paginator.shell.querySelector('button[data-paginator-page-button="' + identifier + '"]');
|
||||||
|
|
||||||
if (active instanceof HTMLElement) {
|
if (active instanceof HTMLElement) {
|
||||||
// Initialized the target page button HTML-element
|
// Initialized the target page button HTML-element
|
||||||
@@ -95,7 +79,7 @@ core.modules.connect(["damper", "project"]).then((connected) => {
|
|||||||
// Showing the target page button HTML-element
|
// Showing the target page button HTML-element
|
||||||
active.style.removeProperty('display');
|
active.style.removeProperty('display');
|
||||||
|
|
||||||
if (identifier > 1) {
|
if (identifier > core.global.paginator.initial) {
|
||||||
// Second or more page
|
// Second or more page
|
||||||
|
|
||||||
// Showing the "back" button
|
// Showing the "back" button
|
||||||
@@ -109,58 +93,58 @@ core.modules.connect(["damper", "project"]).then((connected) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initializing the page buttons menu
|
||||||
|
core.global.paginator.shell.addEventListener("paginator.page.opened", function (event) {
|
||||||
|
// Scrolling to the introdution HTML-element
|
||||||
|
introdution?.scrollIntoView({ behavior: 'smooth' });
|
||||||
|
|
||||||
|
// Initializing the page buttons menu
|
||||||
|
menu(event.detail.identifier);
|
||||||
|
});
|
||||||
|
|
||||||
// Connecting event listener for project calculation
|
// Connecting event listener for project calculation
|
||||||
core.project.shell.addEventListener("project.write", function() {
|
core.global.project.shell.addEventListener("project.write", function() {
|
||||||
// Initializing the "calculator" page button HTML-element
|
|
||||||
const calculator = core.paginator.shell.querySelector('button[data-paginator-page-button="1"]');
|
|
||||||
|
|
||||||
if (calculator instanceof HTMLElement) {
|
|
||||||
// Initialized the "calculator" page button HTML-element
|
|
||||||
|
|
||||||
// Showing or hiding the "calculator" page button HTML-element
|
|
||||||
calculator.disabled = !(core.project.architecture != null);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initializing the "project" page button HTML-element
|
// Initializing the "project" page button HTML-element
|
||||||
const project = core.paginator.shell.querySelector('button[data-paginator-page-button="2"]');
|
const project = core.global.paginator.shell.querySelector('button[data-paginator-page-button="2"]');
|
||||||
|
|
||||||
if (project instanceof HTMLElement) {
|
if (project instanceof HTMLElement) {
|
||||||
// Initialized the "project" page button HTML-element
|
// Initialized the "project" page button HTML-element
|
||||||
|
|
||||||
// Showing or hiding the "project" page button HTML-element
|
// Showing or hiding the "project" page button HTML-element
|
||||||
project.disabled =
|
project.disabled =
|
||||||
!(core.project.project.name
|
!(core.global.project.project.name
|
||||||
&& (
|
&& (
|
||||||
core.project.project.description != null
|
core.global.project.project.description != null
|
||||||
|| core.project.project.files.length > 0
|
|| core.global.project.project.files.length > 0
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initializing the "requester" page button HTML-element
|
// Initializing the "requester" page button HTML-element
|
||||||
const requester = core.paginator.shell.querySelector('button[data-paginator-page-button="3"]');
|
const requester = core.global.paginator.shell.querySelector('button[data-paginator-page-button="3"]');
|
||||||
|
|
||||||
if (requester instanceof HTMLElement) {
|
if (requester instanceof HTMLElement) {
|
||||||
// Initialized the "requester" page button HTML-element
|
// Initialized the "requester" page button HTML-element
|
||||||
|
|
||||||
// Showing or hiding the "requester" page button HTML-element
|
// Showing or hiding the "requester" page button HTML-element
|
||||||
requester.disabled =
|
requester.disabled =
|
||||||
!(core.project.requester.personal
|
!(core.global.project.requester.personal
|
||||||
&& (
|
&& (
|
||||||
core.project.requester.sim != null
|
core.global.project.requester.sim != null
|
||||||
|| core.project.requester.mail != null
|
|| core.global.project.requester.mail != null
|
||||||
|| core.project.requester.other != null
|
|| core.global.project.requester.other != null
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Connecting event listener for project calculation
|
// Connecting event listener for project calculation
|
||||||
core.project.shell.addEventListener("project.calculated", function() {
|
core.global.project.shell.addEventListener("project.calculated", function() {
|
||||||
// Showing the buttons HTML-element
|
// Showing the buttons HTML-element
|
||||||
core.paginator.shell?.style.removeProperty('display');
|
core.global.paginator.shell?.style.removeProperty('display');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Initializing the page buttons menu
|
// Initializing the page buttons menu
|
||||||
core.paginator.shell.addEventListener("paginator.page.opened", function (event) {
|
core.global.paginator.shell.addEventListener("paginator.page.opened", function (event) {
|
||||||
// Scrolling to the introdution HTML-element
|
// Scrolling to the introdution HTML-element
|
||||||
introdution?.scrollIntoView({ behavior: 'smooth' });
|
introdution?.scrollIntoView({ behavior: 'smooth' });
|
||||||
|
|
||||||
@@ -215,7 +199,7 @@ core.modules.connect(["damper", "project"]).then((connected) => {
|
|||||||
const index = Array.from(list.children).indexOf(element);
|
const index = Array.from(list.children).indexOf(element);
|
||||||
|
|
||||||
// Initializing the actual list of files
|
// Initializing the actual list of files
|
||||||
let files = core.project.project.files;
|
let files = core.global.project.project.files;
|
||||||
|
|
||||||
// Deleting the file
|
// Deleting the file
|
||||||
files.splice(index, 1);
|
files.splice(index, 1);
|
||||||
@@ -224,7 +208,7 @@ core.modules.connect(["damper", "project"]).then((connected) => {
|
|||||||
element.remove();
|
element.remove();
|
||||||
|
|
||||||
// Writing into the project property
|
// Writing into the project property
|
||||||
core.project.project.files = files;
|
core.global.project.project.files = files;
|
||||||
})
|
})
|
||||||
|
|
||||||
// Initializing the file label delete button image
|
// Initializing the file label delete button image
|
||||||
@@ -247,5 +231,5 @@ core.modules.connect(["damper", "project"]).then((connected) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
core.project.shell.parentElement.classList.remove('loading');
|
core.global.project.shell.parentElement.classList.remove('loading');
|
||||||
});
|
});
|
||||||
|
|||||||
251
kodorvan/site/system/public/js/pages/project/create.js
Executable file
251
kodorvan/site/system/public/js/pages/project/create.js
Executable file
@@ -0,0 +1,251 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
core.modules.connect(["damper", "project"]).then((connected) => {
|
||||||
|
// Imported modules
|
||||||
|
|
||||||
|
// Initializing the introdution HTML-element
|
||||||
|
const introdution = document.getElementById('introdution');
|
||||||
|
|
||||||
|
// Initializing the files input wrap HTML-element
|
||||||
|
const files = document.getElementById("project_files");
|
||||||
|
|
||||||
|
// Initializing the instance of the project.mjs
|
||||||
|
core.global.project = new connected.global.project(
|
||||||
|
document.querySelector('section[data-paginator-page="1"]'),
|
||||||
|
document.getElementById("architecture"),
|
||||||
|
document.getElementById("purpose"),
|
||||||
|
document.getElementById("integrations"),
|
||||||
|
document.getElementById("team"),
|
||||||
|
document.getElementById("programmers"),
|
||||||
|
document.getElementById("designers"),
|
||||||
|
document.getElementById("boosters"),
|
||||||
|
document.getElementById("reward"),
|
||||||
|
document.getElementById("hour"),
|
||||||
|
document.getElementById("hour_input_number"),
|
||||||
|
document.getElementById("hour_input_range"),
|
||||||
|
document.getElementById("result"),
|
||||||
|
document.getElementById("calculated"),
|
||||||
|
document.getElementById("hours"),
|
||||||
|
document.getElementById("hours_output"),
|
||||||
|
document.getElementById("days_output"),
|
||||||
|
document.getElementById("payment"),
|
||||||
|
document.getElementById("payment_output"),
|
||||||
|
document.getElementById("prepayment"),
|
||||||
|
document.getElementById("prepayment_output"),
|
||||||
|
document.getElementById("project_name"),
|
||||||
|
document.getElementById("project_description"),
|
||||||
|
files,
|
||||||
|
document.getElementById("requester_name"),
|
||||||
|
document.getElementById("requester_sim"),
|
||||||
|
document.getElementById("requester_mail"),
|
||||||
|
document.getElementById("requester_other"),
|
||||||
|
document.getElementById("requester_personal"),
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
// Initializing the hour input number HTML-element
|
||||||
|
const hour_number = document.getElementById('hour_input_number');
|
||||||
|
|
||||||
|
// Initializing the hour input range HTML-element
|
||||||
|
const hour_range = document.getElementById('hour_input_range');
|
||||||
|
|
||||||
|
hour_range.addEventListener("input", () => {
|
||||||
|
hour_inputs_syncronize(hour_range, hour_number);
|
||||||
|
});
|
||||||
|
|
||||||
|
function hour_inputs_syncronize(range, number) {
|
||||||
|
const min = range.min ? range.min : 300;
|
||||||
|
const max = range.max ? range.max : 5000;
|
||||||
|
|
||||||
|
number.value = range.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initializing the "back" button
|
||||||
|
const back = document.getElementById('back');
|
||||||
|
|
||||||
|
core.modules.connect(["paginator"]).then((connected) => {
|
||||||
|
// Imported the paginator.mjs module
|
||||||
|
|
||||||
|
// Initializing pages
|
||||||
|
const pages = document.querySelectorAll('section[data-paginator-page]');
|
||||||
|
|
||||||
|
// Initializing the instance of the paginator.mjs
|
||||||
|
core.global.paginator = new connected.global.paginator(
|
||||||
|
document.getElementById('buttons'),
|
||||||
|
pages
|
||||||
|
);
|
||||||
|
|
||||||
|
// Initializing the buttons
|
||||||
|
const buttons = core.global.paginator.shell.querySelectorAll('button[data-paginator-page-button]');
|
||||||
|
|
||||||
|
function menu(identifier) {
|
||||||
|
// Initializing the target page button HTML-element
|
||||||
|
const active = core.global.paginator.shell.querySelector('button[data-paginator-page-button="' + identifier + '"]');
|
||||||
|
|
||||||
|
if (active instanceof HTMLElement) {
|
||||||
|
// Initialized the target page button HTML-element
|
||||||
|
|
||||||
|
for (const inactive of buttons) {
|
||||||
|
// Iteration over pages
|
||||||
|
|
||||||
|
// Hiding the page button HTML-element
|
||||||
|
inactive.style.setProperty('display', 'none');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Showing the target page button HTML-element
|
||||||
|
active.style.removeProperty('display');
|
||||||
|
|
||||||
|
if (identifier > 1) {
|
||||||
|
// Second or more page
|
||||||
|
|
||||||
|
// Showing the "back" button
|
||||||
|
back.style.removeProperty('display');
|
||||||
|
} else {
|
||||||
|
// The first page
|
||||||
|
|
||||||
|
// Hiding the "back" button
|
||||||
|
back.style.setProperty('display', 'none');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Connecting event listener for project calculation
|
||||||
|
core.global.project.shell.addEventListener("project.write", function() {
|
||||||
|
// Initializing the "calculator" page button HTML-element
|
||||||
|
const calculator = core.global.paginator.shell.querySelector('button[data-paginator-page-button="1"]');
|
||||||
|
|
||||||
|
if (calculator instanceof HTMLElement) {
|
||||||
|
// Initialized the "calculator" page button HTML-element
|
||||||
|
|
||||||
|
// Showing or hiding the "calculator" page button HTML-element
|
||||||
|
calculator.disabled = !(core.global.project.architecture != null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initializing the "project" page button HTML-element
|
||||||
|
const project = core.global.paginator.shell.querySelector('button[data-paginator-page-button="2"]');
|
||||||
|
|
||||||
|
if (project instanceof HTMLElement) {
|
||||||
|
// Initialized the "project" page button HTML-element
|
||||||
|
|
||||||
|
// Showing or hiding the "project" page button HTML-element
|
||||||
|
project.disabled =
|
||||||
|
!(core.global.project.project.name
|
||||||
|
&& (
|
||||||
|
core.global.project.project.description != null
|
||||||
|
|| core.global.project.project.files.length > 0
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initializing the "requester" page button HTML-element
|
||||||
|
const requester = core.global.paginator.shell.querySelector('button[data-paginator-page-button="3"]');
|
||||||
|
|
||||||
|
if (requester instanceof HTMLElement) {
|
||||||
|
// Initialized the "requester" page button HTML-element
|
||||||
|
|
||||||
|
// Showing or hiding the "requester" page button HTML-element
|
||||||
|
requester.disabled =
|
||||||
|
!(core.global.project.requester.personal
|
||||||
|
&& (
|
||||||
|
core.global.project.requester.sim != null
|
||||||
|
|| core.global.project.requester.mail != null
|
||||||
|
|| core.global.project.requester.other != null
|
||||||
|
));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Connecting event listener for project calculation
|
||||||
|
core.global.project.shell.addEventListener("project.calculated", function() {
|
||||||
|
// Showing the buttons HTML-element
|
||||||
|
core.global.paginator.shell?.style.removeProperty('display');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initializing the page buttons menu
|
||||||
|
core.global.paginator.shell.addEventListener("paginator.page.opened", function (event) {
|
||||||
|
// Scrolling to the introdution HTML-element
|
||||||
|
introdution?.scrollIntoView({ behavior: 'smooth' });
|
||||||
|
|
||||||
|
// Initializing the page buttons menu
|
||||||
|
menu(event.detail.identifier);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Initializing the files list HTML-element
|
||||||
|
const list = files.querySelector('ol.files');
|
||||||
|
|
||||||
|
// Initializing the files input HTML-element
|
||||||
|
const files_input = files.querySelector('.input');
|
||||||
|
|
||||||
|
files_input.addEventListener('input', (event) => {
|
||||||
|
// Deleting every file label from the list
|
||||||
|
list.innerHTML = '';
|
||||||
|
|
||||||
|
if (files_input.files.length > 0) {
|
||||||
|
// Has files
|
||||||
|
|
||||||
|
// Showing the list HTML-element
|
||||||
|
list.style.removeProperty('display');
|
||||||
|
|
||||||
|
// Initializing the file index iterator
|
||||||
|
let index = 0;
|
||||||
|
|
||||||
|
for (const file of files_input.files) {
|
||||||
|
// Iterating over files
|
||||||
|
|
||||||
|
// Initializing the maximum length for the file label name
|
||||||
|
const maximum = 16;
|
||||||
|
|
||||||
|
// Initializing the end tail for the file label name
|
||||||
|
const tail = 8;
|
||||||
|
|
||||||
|
// Initializing the file label name
|
||||||
|
const name = file.name.length > maximum ? file.name.slice(0, maximum - tail).trim() + '...' + file.name.slice(-tail).trim() : file.name;
|
||||||
|
|
||||||
|
// Initializing the file label HTML-element
|
||||||
|
const element = document.createElement('li');
|
||||||
|
element.id = "project_files_input_" + index;
|
||||||
|
element.setAttribute('title', file.name);
|
||||||
|
element.innerText = name;
|
||||||
|
|
||||||
|
// Initializing the file label delete button
|
||||||
|
const button = document.createElement('button');
|
||||||
|
button.classList.add('delete');
|
||||||
|
|
||||||
|
button.addEventListener('click', (event) => {
|
||||||
|
// Initializing the file index
|
||||||
|
const index = Array.from(list.children).indexOf(element);
|
||||||
|
|
||||||
|
// Initializing the actual list of files
|
||||||
|
let files = core.global.project.project.files;
|
||||||
|
|
||||||
|
// Deleting the file
|
||||||
|
files.splice(index, 1);
|
||||||
|
|
||||||
|
// Deleting the file label HTML-element
|
||||||
|
element.remove();
|
||||||
|
|
||||||
|
// Writing into the project property
|
||||||
|
core.global.project.project.files = files;
|
||||||
|
})
|
||||||
|
|
||||||
|
// Initializing the file label delete button image
|
||||||
|
const image = document.createElement('img');
|
||||||
|
image.setAttribute('src', '/themes/default/images/icons/close.svg');
|
||||||
|
|
||||||
|
// Writing the file label into the list HTML-element
|
||||||
|
button.appendChild(image);
|
||||||
|
element.appendChild(button);
|
||||||
|
list.appendChild(element);
|
||||||
|
|
||||||
|
// Recalculating the index (postfix-incrementation)
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Has no files
|
||||||
|
|
||||||
|
// Hiding the list HTML-element
|
||||||
|
list.style.setProperty('display', 'none');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
core.global.project.shell.parentElement.classList.remove('loading');
|
||||||
|
});
|
||||||
15
kodorvan/site/system/public/js/pages/system/superpack.js
Normal file
15
kodorvan/site/system/public/js/pages/system/superpack.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
core.modules.connect(["damper"], ["superpack"]).then((connected) => {
|
||||||
|
// Imported modules
|
||||||
|
|
||||||
|
// Initializing the instance of the project.mjs
|
||||||
|
core.system.superpack = new connected.system.superpack(
|
||||||
|
document.getElementById('superpack'),
|
||||||
|
document.getElementById('superpack_urn'),
|
||||||
|
document.getElementById('superpack_title'),
|
||||||
|
document.getElementById('superpack_html'),
|
||||||
|
document.getElementById('superpack_text'),
|
||||||
|
document.getElementById('superpack_supercost'),
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
section#project {
|
section#project {
|
||||||
|
--margin-bottom: 0.8rem;
|
||||||
--width: 420px;
|
--width: 420px;
|
||||||
z-index: 200;
|
z-index: 200;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 2rem;
|
margin-top: 3rem;
|
||||||
margin-bottom: 5rem;
|
margin-bottom: 5rem;
|
||||||
min-width: var(--width);
|
min-width: var(--width);
|
||||||
max-width: var(--width);
|
max-width: var(--width);
|
||||||
@@ -32,6 +33,14 @@ section#project {
|
|||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&+span {
|
||||||
|
margin-top: 0.2em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
text-align: center;
|
||||||
|
color: #e9e8e2;
|
||||||
|
text-shadow: 0px 1px 3px #000C, 0px 1px 1px #000B;
|
||||||
|
}
|
||||||
|
|
||||||
&+small {
|
&+small {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -41,6 +50,22 @@ section#project {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
>section.promotion {
|
||||||
|
>p {
|
||||||
|
margin: unset;
|
||||||
|
margin: 0 0rem 0.4rem 0rem;
|
||||||
|
padding: 0.5rem 0.7rem;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #45ff01;
|
||||||
|
border-radius: 1.25rem;
|
||||||
|
border: 2px solid #45ff01;
|
||||||
|
text-shadow: 0px 1px 3px #000C, 0px 1px 1px #000B;
|
||||||
|
backdrop-filter: blur(1.2px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
>noscript {
|
>noscript {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -66,7 +91,7 @@ section#project {
|
|||||||
>article {
|
>article {
|
||||||
--shadow: 0px 6px 6px -2px rgba(0, 0, 0, 0.5), 0px 0px 14px 5px rgba(0, 0, 0, 0.4);
|
--shadow: 0px 6px 6px -2px rgba(0, 0, 0, 0.5), 0px 0px 14px 5px rgba(0, 0, 0, 0.4);
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 2rem 1.4rem;
|
padding: 2rem 1.7rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1.4rem;
|
gap: 1.4rem;
|
||||||
@@ -139,7 +164,7 @@ section#project {
|
|||||||
}
|
}
|
||||||
|
|
||||||
>section {
|
>section {
|
||||||
padding: 0 0.6rem;
|
padding: 0 0.6rem 0 0.2rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
@@ -847,23 +872,40 @@ section#project {
|
|||||||
}
|
}
|
||||||
|
|
||||||
>div.adaptive {
|
>div.adaptive {
|
||||||
display: contents;
|
/* display: contents; */
|
||||||
|
margin-bottom: var(--margin-bottom, 0.8rem);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 1rem;
|
||||||
|
|
||||||
|
>* {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
>button#back {
|
>button#back {
|
||||||
--diameter: 7ch;
|
--diameter: 7ch;
|
||||||
--radius: calc(var(--diameter, 4ch) / 2);
|
--radius: calc(var(--diameter, 4ch) / 2);
|
||||||
position: absolute;
|
/* position: absolute;
|
||||||
left: calc(-1.2rem - var(--diameter, 4ch));
|
left: calc(-1.2rem - var(--diameter, 4ch));
|
||||||
top: calc(7.4rem - var(--radius, 2ch));
|
top: calc(10rem - var(--radius, 2ch)); */
|
||||||
width: var(--diameter, 4ch);
|
/* width: var(--diameter, 4ch); */
|
||||||
height: var(--diameter, 4ch);
|
/* height: var(--diameter, 4ch); */
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-radius: 100%;
|
/* border-radius: 100%; */
|
||||||
border: unset;
|
border: unset;
|
||||||
background-color: var(--button-background-color, #fff);
|
background-color: var(--button-background-color, #fff);
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
left: unset;
|
||||||
|
top: unset;
|
||||||
|
margin: unset;
|
||||||
|
min-width: var(--diameter, 4ch);
|
||||||
|
width: 30%;
|
||||||
|
height: auto;
|
||||||
|
border-radius: 1.25rem;
|
||||||
|
|
||||||
&:is(:hover, :focus) {
|
&:is(:hover, :focus) {
|
||||||
background-color: var(--button-hover-background-color, #abc7c6);
|
background-color: var(--button-hover-background-color, #abc7c6);
|
||||||
}
|
}
|
||||||
@@ -874,10 +916,13 @@ section#project {
|
|||||||
|
|
||||||
>img {
|
>img {
|
||||||
padding-bottom: 0.15em;
|
padding-bottom: 0.15em;
|
||||||
|
scale: 1.2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
>section#buttons {
|
>section#buttons {
|
||||||
|
/* margin-bottom: var(--margin-bottom, 0.8rem); */
|
||||||
|
margin-bottom: unset;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
@@ -953,6 +998,70 @@ section#project {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
>small.description {
|
||||||
|
padding: 0.9em 1.2em;
|
||||||
|
text-align: left;
|
||||||
|
font-family: Nunito;
|
||||||
|
font-size: 0.9em;
|
||||||
|
color: #d6c1c1;
|
||||||
|
background: #a5c2c724;
|
||||||
|
border-radius: 1.25rem;
|
||||||
|
border-top: 1px solid #84d1d52e;
|
||||||
|
backdrop-filter: blur(2px) contrast(1.14);
|
||||||
|
/* text-shadow: 0px 1px 3px #000C, 0px 1px 1px #000B; */
|
||||||
|
text-shadow: unset;
|
||||||
|
|
||||||
|
>:is(strong, b) {
|
||||||
|
/* display: block; */
|
||||||
|
font-weight: 600;
|
||||||
|
color: #ebdada;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>small.guarantee {
|
||||||
|
padding: 0.9em 1.2em;
|
||||||
|
text-align: left;
|
||||||
|
font-family: Nunito;
|
||||||
|
font-size: 0.9em;
|
||||||
|
color: #d6c1c1;
|
||||||
|
background: #a5c2c724;
|
||||||
|
border-radius: 1.25rem;
|
||||||
|
border-top: 1px solid #84d1d52e;
|
||||||
|
backdrop-filter: blur(2px) contrast(1.14);
|
||||||
|
/* text-shadow: 0px 1px 3px #000C, 0px 1px 1px #000B; */
|
||||||
|
text-shadow: unset;
|
||||||
|
|
||||||
|
>:is(strong, b) {
|
||||||
|
/* display: block; */
|
||||||
|
font-weight: 600;
|
||||||
|
color: #ebdada;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>div.partners {
|
||||||
|
margin-top: 1.4rem;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
padding: 0 1em;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
>div.icon {
|
||||||
|
height: 24px;
|
||||||
|
scale: 1.2;
|
||||||
|
background: linear-gradient(#ffe24c 30%, #b89301 80%);
|
||||||
|
mask: var(--mask-image) no-repeat center bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
>b {
|
||||||
|
text-align: center;
|
||||||
|
font-family: Bahnschrift;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 1.2em;
|
||||||
|
color: #d6d327;
|
||||||
|
text-shadow: 0px 0px 5px #FFB54147, 0px 0px 2px #FFAF313D;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
>small.offer {
|
>small.offer {
|
||||||
margin-top: 1.2rem;
|
margin-top: 1.2rem;
|
||||||
padding: 0 1.5em;
|
padding: 0 1.5em;
|
||||||
@@ -998,12 +1107,13 @@ section#project {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (width < 550px) {
|
@media (width < 700px) {
|
||||||
section#project {
|
section#project {
|
||||||
--width: 100vw;
|
--width: 100vw;
|
||||||
padding: 0 2rem;
|
padding: 0 2rem;
|
||||||
|
|
||||||
>div.adaptive {
|
/* >div.adaptive {
|
||||||
|
margin-bottom: var(--margin-bottom, 0.8rem);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
@@ -1022,7 +1132,11 @@ section#project {
|
|||||||
height: auto;
|
height: auto;
|
||||||
border-radius: 1.25rem;
|
border-radius: 1.25rem;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
>section#buttons {
|
||||||
|
margin-bottom: unset;
|
||||||
|
}
|
||||||
|
} */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ body {
|
|||||||
|
|
||||||
>article#rofls {
|
>article#rofls {
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
width: min-content;
|
width: 100vw;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@@ -36,7 +36,11 @@ body {
|
|||||||
>img {
|
>img {
|
||||||
margin: unset;
|
margin: unset;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
cursor: grab;
|
||||||
|
|
||||||
|
&:is(:active) {
|
||||||
|
cursor: grabbing;
|
||||||
|
}
|
||||||
|
|
||||||
&:is(.noclick) {
|
&:is(.noclick) {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ footer {
|
|||||||
|
|
||||||
>article.contacts {
|
>article.contacts {
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
|
padding-left: 2rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: end;
|
align-items: end;
|
||||||
@@ -240,6 +241,7 @@ footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
>article.contacts {
|
>article.contacts {
|
||||||
|
padding: unset;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
h1#logotype {
|
h1#logotype {
|
||||||
z-index: 200;
|
z-index: 200;
|
||||||
margin: unset;
|
margin: unset;
|
||||||
margin-top: 4rem;
|
margin-top: 6rem;
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
width: max-content;
|
width: max-content;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ main {
|
|||||||
--scroll-px-hundred: calc(var(--scroll-px-ten) / 10);
|
--scroll-px-hundred: calc(var(--scroll-px-ten) / 10);
|
||||||
--scroll-px-thousand: calc(var(--scroll-px-hundred) / 10);
|
--scroll-px-thousand: calc(var(--scroll-px-hundred) / 10);
|
||||||
margin-top: var(--menu-height);
|
margin-top: var(--menu-height);
|
||||||
|
min-height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|||||||
36
kodorvan/site/system/public/themes/default/css/pages/article.css
Executable file
36
kodorvan/site/system/public/themes/default/css/pages/article.css
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
@charset "UTF-8";
|
||||||
|
|
||||||
|
body {
|
||||||
|
>main {
|
||||||
|
>article#article {
|
||||||
|
z-index: 500;
|
||||||
|
border-radius: 1.25rem;
|
||||||
|
margin: 3rem 0 8rem;
|
||||||
|
width: 880px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 3rem 4rem;
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
>h1 {
|
||||||
|
margin-top: unset;
|
||||||
|
margin-bottom: 2.5rem;
|
||||||
|
text-align: center;
|
||||||
|
font-family: "MT Sans";
|
||||||
|
font-size: 3rem;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (width < 1000px) {
|
||||||
|
body {
|
||||||
|
>main {
|
||||||
|
>article#article {
|
||||||
|
margin-bottom: unset;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: unset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,35 +23,4 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
>div.vignette {
|
|
||||||
z-index: 100;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
width: 100vw;
|
|
||||||
height: 100vh;
|
|
||||||
justify-self: center;
|
|
||||||
align-self: center;
|
|
||||||
pointer-events: none;
|
|
||||||
background: linear-gradient(90deg, #000B -20%, #0000 50%, #000B 120%);
|
|
||||||
}
|
|
||||||
|
|
||||||
>div.dots {
|
|
||||||
--dot-bg: #18333f;
|
|
||||||
--dot-color: #041825;
|
|
||||||
--dot-size: 23px;
|
|
||||||
--dot-space: 24px;
|
|
||||||
z-index: -50;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: min(-30vw, -300px);
|
|
||||||
justify-self: center;
|
|
||||||
align-self: center;
|
|
||||||
width: max(250vw, 600px);
|
|
||||||
height: 200vh;
|
|
||||||
rotate: -16deg;
|
|
||||||
pointer-events: none;
|
|
||||||
background: linear-gradient(90deg, var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space), linear-gradient(var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space), var(--dot-color);
|
|
||||||
transform-origin: top left;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,42 +2,6 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
>main {
|
>main {
|
||||||
>h1#title {
|
|
||||||
z-index: 200;
|
|
||||||
margin: unset;
|
|
||||||
margin-top: 4rem;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
width: max-content;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
text-align: center;
|
|
||||||
gap: 0.6rem;
|
|
||||||
font-family: "";
|
|
||||||
font-size: min(8vw, 4rem);
|
|
||||||
font-weight: 400;
|
|
||||||
/* scale: 0.8; */
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
>span.slogan {
|
|
||||||
line-height: 0.8em;
|
|
||||||
font-family: "GOST";
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 1.24em;
|
|
||||||
color: #3688a2;
|
|
||||||
}
|
|
||||||
|
|
||||||
>a.kodorvan {
|
|
||||||
line-height: 0.8em;
|
|
||||||
font-family: "MT Sans";
|
|
||||||
font-size: 2em;
|
|
||||||
text-decoration: unset;
|
|
||||||
color: #c2ff98;
|
|
||||||
/* text-shadow:
|
|
||||||
0px 0px 4px #ffff00b5,
|
|
||||||
0px 0px 11px #ffff008a */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
>article#offer {
|
>article#offer {
|
||||||
z-index: 500;
|
z-index: 500;
|
||||||
border-radius: 1.25rem;
|
border-radius: 1.25rem;
|
||||||
@@ -57,37 +21,6 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
>div.vignette {
|
|
||||||
z-index: 100;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
width: 100vw;
|
|
||||||
height: 100vh;
|
|
||||||
justify-self: center;
|
|
||||||
align-self: center;
|
|
||||||
pointer-events: none;
|
|
||||||
background: linear-gradient(90deg, #000B -20%, #0000 50%, #000B 120%);
|
|
||||||
}
|
|
||||||
|
|
||||||
>div.dots {
|
|
||||||
--dot-bg: #18333f;
|
|
||||||
--dot-color: #041825;
|
|
||||||
--dot-size: 23px;
|
|
||||||
--dot-space: 24px;
|
|
||||||
z-index: -50;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: min(-30vw, -300px);
|
|
||||||
justify-self: center;
|
|
||||||
align-self: center;
|
|
||||||
width: max(250vw, 600px);
|
|
||||||
height: 200vh;
|
|
||||||
rotate: -16deg;
|
|
||||||
pointer-events: none;
|
|
||||||
background: linear-gradient(90deg, var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space), linear-gradient(var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space), var(--dot-color);
|
|
||||||
transform-origin: top left;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (width < 1000px) {
|
@media (width < 1000px) {
|
||||||
|
|||||||
306
kodorvan/site/system/public/themes/default/css/pages/system/superpack/create.css
Executable file
306
kodorvan/site/system/public/themes/default/css/pages/system/superpack/create.css
Executable file
@@ -0,0 +1,306 @@
|
|||||||
|
@charset "UTF-8";
|
||||||
|
|
||||||
|
body {
|
||||||
|
>main {
|
||||||
|
>article#superpack {
|
||||||
|
z-index: 500;
|
||||||
|
border-radius: 1.25rem;
|
||||||
|
margin: 3rem 0 8rem;
|
||||||
|
width: 540px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 2rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.4rem;
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
>h1 {
|
||||||
|
margin-top: unset;
|
||||||
|
margin-bottom: 0.2rem;
|
||||||
|
text-align: center;
|
||||||
|
font-family: "MT Sans";
|
||||||
|
font-size: 2.6rem;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
&:is(.loading) {
|
||||||
|
>div.loading {
|
||||||
|
opacity: 1;
|
||||||
|
height: 100%;
|
||||||
|
transition: opacity 0.1s ease-in, height 0s linear 0s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>div.loading {
|
||||||
|
z-index: 1000;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 0%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: all;
|
||||||
|
background: #2c2c33d4;
|
||||||
|
backdrop-filter: blur(1.4px);
|
||||||
|
transition: opacity 0.2s ease-out, height 0s linear 0.2s;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
margin-top: 50px;
|
||||||
|
position: absolute;
|
||||||
|
content: var(--project-loading, "Loading");
|
||||||
|
width: max-content;
|
||||||
|
text-align: center;
|
||||||
|
font-family: "Geologica";
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 0.6rem;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
>i.icon.loading.spinner {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
small.guide {
|
||||||
|
padding: 0 0.2em;
|
||||||
|
display: none;
|
||||||
|
font-family: Bahnschrift;
|
||||||
|
font-size: 0.75em;
|
||||||
|
font-weight: 200;
|
||||||
|
color: #29262b;
|
||||||
|
|
||||||
|
&:is(.active) {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>section {
|
||||||
|
--shadow: 0px 10px 8px -4px rgba(0, 0, 0, 0.15);
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.8em;
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-family: Bahnschrift;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
>span {
|
||||||
|
font-size: 0.85em;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
margin-top: 0.2em;
|
||||||
|
min-width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 8ch;
|
||||||
|
max-height: 60vh;
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
>:is(label, div).input.icon {
|
||||||
|
--title-height: 0.9em;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1.3em auto;
|
||||||
|
grid-template-rows: var(--title-height, 1em) repeat(2, auto);
|
||||||
|
align-items: center;
|
||||||
|
grid-column-gap: 0.5em;
|
||||||
|
grid-row-gap: 0.2em;
|
||||||
|
|
||||||
|
>img.icon {
|
||||||
|
grid-column: 1;
|
||||||
|
grid-row: 2/3;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
>span.title {
|
||||||
|
grid-column: 2;
|
||||||
|
grid-row: 1;
|
||||||
|
/* margin-bottom: 0.2em; */
|
||||||
|
font-size: var(--title-height, 1em);
|
||||||
|
padding: 0 0.5em;
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: 'Cascadia Code';
|
||||||
|
}
|
||||||
|
|
||||||
|
>:is(input, select, textarea) {
|
||||||
|
grid-column: 2;
|
||||||
|
grid-row: 2;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
>small.guide {
|
||||||
|
grid-column: 2;
|
||||||
|
grid-row: 3;
|
||||||
|
margin-top: 0.2em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>div#superpack_image {
|
||||||
|
>img.icon {
|
||||||
|
grid-row: 1;
|
||||||
|
align-self: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
>div {
|
||||||
|
--padding-vertical: 1.7em;
|
||||||
|
grid-row: 1/3;
|
||||||
|
position: relative;
|
||||||
|
min-height: 6ch;
|
||||||
|
height: min-content;
|
||||||
|
padding: 0 1.3em var(--padding-vertical, 1em);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: start;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.2rem;
|
||||||
|
|
||||||
|
&:has(>input[type="file"]:is(:hover, :focus)) {
|
||||||
|
>label.pseudoinput {
|
||||||
|
background-color: #e7e6e0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:has(>input[type="file"]:active) {
|
||||||
|
>label.pseudoinput {
|
||||||
|
background-color: #c0bfb4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>span.title {
|
||||||
|
z-index: 60;
|
||||||
|
margin: unset;
|
||||||
|
margin-top: calc(var(--padding-vertical, 1em) + 0.3em);
|
||||||
|
font-family: Bahnschrift;
|
||||||
|
font-size: 0.9em;
|
||||||
|
font-weight: 400;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
>ol.files {
|
||||||
|
z-index: 50;
|
||||||
|
margin: unset;
|
||||||
|
margin-top: 0.2em;
|
||||||
|
padding: unset;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.2em;
|
||||||
|
font-size: 0.8em;
|
||||||
|
list-style: numbered;
|
||||||
|
|
||||||
|
&:empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
>li {
|
||||||
|
position: relative;
|
||||||
|
height: 1.3em;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 1.1em;
|
||||||
|
|
||||||
|
&:has(>button:is(:hover, :focus)) {
|
||||||
|
border-bottom: 1px dashed #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:has(>button:active) {
|
||||||
|
border-bottom: 1px solid #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
>button.delete {
|
||||||
|
position: absolute;
|
||||||
|
top: -0.05em;
|
||||||
|
right: -1.7em;
|
||||||
|
height: 1.3em;
|
||||||
|
padding: 0.15em;
|
||||||
|
border: unset;
|
||||||
|
background: unset;
|
||||||
|
|
||||||
|
>img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:is(:hover, :focus) {
|
||||||
|
background-color: #3302;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: #3304;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>small.guide {
|
||||||
|
z-index: 60;
|
||||||
|
text-align: center;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
>label.pseudoinput {
|
||||||
|
z-index: 0;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
cursor: context-menu;
|
||||||
|
border: 1px dashed #000;
|
||||||
|
|
||||||
|
&:is(:hover, :focus) {
|
||||||
|
>label.pseudoinput {
|
||||||
|
background-color: #e7e6e0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
>label.pseudoinput {
|
||||||
|
background-color: #c0bfb4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>input[type="file"] {
|
||||||
|
position: absolute;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
>button {
|
||||||
|
padding: 1.2rem 1rem;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
/* border: unset; */
|
||||||
|
|
||||||
|
&:first-of-type {
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (width < 1000px) {
|
||||||
|
body {
|
||||||
|
>main {
|
||||||
|
>article#superpack {
|
||||||
|
margin-bottom: unset;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: unset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -48,6 +48,40 @@ body {
|
|||||||
/* background: var(--background-color, #fff);
|
/* background: var(--background-color, #fff);
|
||||||
background: var(--background-gradient); */
|
background: var(--background-gradient); */
|
||||||
background-color: #020c13;
|
background-color: #020c13;
|
||||||
|
|
||||||
|
>div.vignette {
|
||||||
|
z-index: 100;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
width: 100vw;
|
||||||
|
min-height: 5000px;
|
||||||
|
height: 100vh;
|
||||||
|
justify-self: center;
|
||||||
|
align-self: center;
|
||||||
|
pointer-events: none;
|
||||||
|
background: linear-gradient(90deg, #000B -20%, #0000 50%, #000B 120%);
|
||||||
|
transform-origin: top center;
|
||||||
|
}
|
||||||
|
|
||||||
|
>div.dots {
|
||||||
|
--dot-bg: #18333f;
|
||||||
|
--dot-color: #041825;
|
||||||
|
--dot-size: 23px;
|
||||||
|
--dot-space: 24px;
|
||||||
|
z-index: -50;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: min(-30vw, -300px);
|
||||||
|
justify-self: center;
|
||||||
|
align-self: center;
|
||||||
|
width: max(250vw, 600px);
|
||||||
|
min-height: 5000px;
|
||||||
|
height: 200vh;
|
||||||
|
rotate: -16deg;
|
||||||
|
pointer-events: none;
|
||||||
|
background: linear-gradient(90deg, var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space), linear-gradient(var(--dot-bg) calc(var(--dot-space) - var(--dot-size)), transparent 1%) center / var(--dot-space) var(--dot-space), var(--dot-color);
|
||||||
|
transform-origin: top left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@@ -64,15 +98,27 @@ a {
|
|||||||
|
|
||||||
&::selection {
|
&::selection {
|
||||||
color: #094ef2;
|
color: #094ef2;
|
||||||
background: #FFF;
|
background: #dbd035;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-moz-selection {
|
&::-moz-selection {
|
||||||
color: #094ef2;
|
color: #094ef2;
|
||||||
background: #FFF;
|
background: #dbd035;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* &:is(.darked)::selection {
|
||||||
|
background: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:is(.darked)::-moz-selection {
|
||||||
|
background: #000;
|
||||||
|
} */
|
||||||
|
|
||||||
|
&:is(.tech) {
|
||||||
|
font-family: "Cascadia Code";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.unselectable {
|
.unselectable {
|
||||||
@@ -84,6 +130,10 @@ a {
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.underline {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
input[type="range"] {
|
input[type="range"] {
|
||||||
cursor: grab;
|
cursor: grab;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
fill-rule="evenodd"
|
||||||
|
clip-rule="evenodd"
|
||||||
|
d="M2.5 6.09143L7.21997 10.8114L12.0005 6.03088L16.7811 10.8114L21.5 6.09245V14.9691C21.5 16.626 20.1569 17.9691 18.5 17.9691H5.5C3.84314 17.9691 2.5 16.626 2.5 14.9691V6.09143ZM19.5 10.9087V14.9691C19.5 15.5214 19.0523 15.9691 18.5 15.9691H5.5C4.94771 15.9691 4.5 15.5214 4.5 14.9691V10.9077L7.21997 13.6277L12.0005 8.84717L16.7811 13.6277L19.5 10.9087Z"
|
||||||
|
fill="currentColor"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 558 B |
@@ -0,0 +1,14 @@
|
|||||||
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
fill-rule="evenodd"
|
||||||
|
clip-rule="evenodd"
|
||||||
|
d="M2.5 6.09143L7.21997 10.8114L12.0005 6.03088L16.7811 10.8114L21.5 6.09245V14.9691C21.5 16.626 20.1569 17.9691 18.5 17.9691H5.5C3.84314 17.9691 2.5 16.626 2.5 14.9691V6.09143ZM19.5 10.9087V14.9691C19.5 15.5214 19.0523 15.9691 18.5 15.9691H5.5C4.94771 15.9691 4.5 15.5214 4.5 14.9691V10.9077L7.21997 13.6277L12.0005 8.84717L16.7811 13.6277L19.5 10.9087Z"
|
||||||
|
fill="#fff"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 551 B |
@@ -0,0 +1,12 @@
|
|||||||
|
<svg
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M2.5 6.09143L7.21997 10.8114L12.0005 6.03088L16.7811 10.8114L21.5 6.09245V14.9691C21.5 16.626 20.1569 17.9691 18.5 17.9691H5.5C3.84314 17.9691 2.5 16.626 2.5 14.9691V6.09143ZM19.5 10.9087V14.9691C19.5 15.5214 19.0523 15.9691 18.5 15.9691H5.5C4.94771 15.9691 4.5 15.5214 4.5 14.9691V10.9077L7.21997 13.6277L12.0005 8.84717L16.7811 13.6277L19.5 10.9087Z"
|
||||||
|
fill="#fff"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 503 B |
@@ -51,7 +51,7 @@
|
|||||||
// Imported the hotline.mjs module
|
// Imported the hotline.mjs module
|
||||||
|
|
||||||
// Initializing an instance of the hotline.mjs
|
// Initializing an instance of the hotline.mjs
|
||||||
const instance = new connected.hotline(document.getElementById("cases"));
|
const instance = new connected.global.hotline(document.getElementById("cases"));
|
||||||
|
|
||||||
// Initializing settings of the hotline instance
|
// Initializing settings of the hotline instance
|
||||||
instance.alive = true;
|
instance.alive = true;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
// Imported the hotline.mjs module
|
// Imported the hotline.mjs module
|
||||||
|
|
||||||
// Initializing an instance of the hotline.mjs
|
// Initializing an instance of the hotline.mjs
|
||||||
const instance = new connected.hotline(document.getElementById("companies"));
|
const instance = new connected.global.hotline(document.getElementById("companies"));
|
||||||
|
|
||||||
// Initializing settings of the hotline instance
|
// Initializing settings of the hotline instance
|
||||||
instance.alive = true;
|
instance.alive = true;
|
||||||
|
|||||||
@@ -28,10 +28,10 @@
|
|||||||
class="input"
|
class="input"
|
||||||
name="architecture_input"
|
name="architecture_input"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
oninput="core.project.architecture = this.value"
|
oninput="core.global.project.architecture = this.value"
|
||||||
>
|
>
|
||||||
<option value="" selected="true" disabled="true" hidden="true" data-project-select-title="true">Выберите архитектуру</option>
|
<option value="" selected="true" disabled="true" hidden="true" data-project-select-title="true">Выберите архитектуру</option>
|
||||||
{% for value, label in project.architectures %}
|
{% for value, label in calculator.architectures %}
|
||||||
<option value="{{ value }}">{{ label }}</option>
|
<option value="{{ value }}">{{ label }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@@ -45,10 +45,10 @@
|
|||||||
class="input"
|
class="input"
|
||||||
name="purpose_input"
|
name="purpose_input"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
oninput="core.project.purpose = this.value"
|
oninput="core.global.project.purpose = this.value"
|
||||||
>
|
>
|
||||||
<option value="" selected="true" disabled="true" hidden="true" data-project-select-title="true">Выберите назначение</option>
|
<option value="" selected="true" disabled="true" hidden="true" data-project-select-title="true">Выберите назначение</option>
|
||||||
{% for value, label in project.purposes %}
|
{% for value, label in calculator.purposes %}
|
||||||
<option value="{{ value }}">{{ label }}</option>
|
<option value="{{ value }}">{{ label }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
<div id="integrations" style="display: none;">
|
<div id="integrations" style="display: none;">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Интеграции</legend>
|
<legend>Интеграции</legend>
|
||||||
{% for value, label in project.integrations %}
|
{% for value, label in calculator.integrations %}
|
||||||
<div class="integration hidden">
|
<div class="integration hidden">
|
||||||
<input
|
<input
|
||||||
id="integration_input_{{ value }}"
|
id="integration_input_{{ value }}"
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
value=""
|
value=""
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
onchange="this.checked ? core.project.integrate(this.value) : core.project.desintegrate(this.value)"
|
onchange="this.checked ? core.global.project.integrate(this.value) : core.global.project.desintegrate(this.value)"
|
||||||
/>
|
/>
|
||||||
<label for="integration_input_{{ value}}">{{ label }}</label>
|
<label for="integration_input_{{ value}}">{{ label }}</label>
|
||||||
</div>
|
</div>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
max="3"
|
max="3"
|
||||||
value="0"
|
value="0"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
onkeyup="core.project.programmers = this.value"
|
onkeyup="core.global.project.programmers = this.value"
|
||||||
/>
|
/>
|
||||||
<span>Программисты</span>
|
<span>Программисты</span>
|
||||||
</label>
|
</label>
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
max="4"
|
max="4"
|
||||||
value="0"
|
value="0"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
onkeyup="core.project.designers = this.value"
|
onkeyup="core.global.project.designers = this.value"
|
||||||
/>
|
/>
|
||||||
<span>Дизайнеры</span>
|
<span>Дизайнеры</span>
|
||||||
</label>
|
</label>
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
max="2"
|
max="2"
|
||||||
value="0"
|
value="0"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
onkeyup="core.project.boosters = this.value"
|
onkeyup="core.global.project.boosters = this.value"
|
||||||
/>
|
/>
|
||||||
<span>Бустеры</span>
|
<span>Бустеры</span>
|
||||||
</label>
|
</label>
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
max="5000"
|
max="5000"
|
||||||
value="1800"
|
value="1800"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
oninput="document.getElementById('hour_input_range').value = this.value; core.project.hour = this.value;"
|
oninput="document.getElementById('hour_input_range').value = this.value; core.global.project.hour = this.value;"
|
||||||
/>
|
/>
|
||||||
<span class="currency rubles"></span>
|
<span class="currency rubles"></span>
|
||||||
<input
|
<input
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
step="100"
|
step="100"
|
||||||
value="1800"
|
value="1800"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
oninput="document.getElementById('hour_input_number').value = this.value; core.project.hour = this.value;"
|
oninput="document.getElementById('hour_input_number').value = this.value; core.global.project.hour = this.value;"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<small class="guide">Введите предложение оплаты за рабочий час команды</small>
|
<small class="guide">Введите предложение оплаты за рабочий час команды</small>
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
placeholder="Проект А"
|
placeholder="Проект А"
|
||||||
value=""
|
value=""
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
onkeyup="core.project.project.name = this.value"
|
onkeyup="core.global.project.project.name = this.value"
|
||||||
/>
|
/>
|
||||||
<small class="guide active">Введите внутреннее название проекта</small>
|
<small class="guide active">Введите внутреннее название проекта</small>
|
||||||
</label>
|
</label>
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
value=""
|
value=""
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="Сделайте, чтобы всё было красиво, спасибо"
|
placeholder="Сделайте, чтобы всё было красиво, спасибо"
|
||||||
onkeyup="core.project.project.description = this.value"
|
onkeyup="core.global.project.project.description = this.value"
|
||||||
></textarea>
|
></textarea>
|
||||||
<small class="guide active">Опишите задачу в свободной форме</small>
|
<small class="guide active">Опишите задачу в свободной форме</small>
|
||||||
</label>
|
</label>
|
||||||
@@ -204,7 +204,7 @@
|
|||||||
multiple="true"
|
multiple="true"
|
||||||
value=""
|
value=""
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
oninput="core.project.project.files = this.files"
|
oninput="core.global.project.project.files = this.files"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
placeholder="Богдан"
|
placeholder="Богдан"
|
||||||
value=""
|
value=""
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
onkeyup="core.project.requester.name = this.value"
|
onkeyup="core.global.project.requester.name = this.value"
|
||||||
/>
|
/>
|
||||||
<small class="guide active">Введите ваши инициалы</small>
|
<small class="guide active">Введите ваши инициалы</small>
|
||||||
</label>
|
</label>
|
||||||
@@ -239,7 +239,7 @@
|
|||||||
placeholder="7 (000) 000 0000"
|
placeholder="7 (000) 000 0000"
|
||||||
value=""
|
value=""
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
onkeyup="core.project.requester.sim = this.value"
|
onkeyup="core.global.project.requester.sim = this.value"
|
||||||
/>
|
/>
|
||||||
<small class="guide active">Введите номер телефона для связи</small>
|
<small class="guide active">Введите номер телефона для связи</small>
|
||||||
</label>
|
</label>
|
||||||
@@ -254,7 +254,7 @@
|
|||||||
placeholder="project@company.org"
|
placeholder="project@company.org"
|
||||||
value=""
|
value=""
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
onkeyup="core.project.requester.mail = this.value"
|
onkeyup="core.global.project.requester.mail = this.value"
|
||||||
/>
|
/>
|
||||||
<small class="guide active">Введите почту для связи</small>
|
<small class="guide active">Введите почту для связи</small>
|
||||||
</label>
|
</label>
|
||||||
@@ -270,7 +270,7 @@
|
|||||||
value=""
|
value=""
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="Синяя программа: @zornhut"
|
placeholder="Синяя программа: @zornhut"
|
||||||
onkeyup="core.project.requester.other = this.value"
|
onkeyup="core.global.project.requester.other = this.value"
|
||||||
></textarea>
|
></textarea>
|
||||||
<small class="guide active">Введите дополнительные удобные способы связи</small>
|
<small class="guide active">Введите дополнительные удобные способы связи</small>
|
||||||
</label>
|
</label>
|
||||||
@@ -286,7 +286,7 @@
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
value=""
|
value=""
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
oninput="core.project.requester.personal = this.checked"
|
oninput="core.global.project.requester.personal = this.checked"
|
||||||
/>
|
/>
|
||||||
<img src="/themes/default/images/icons/circle.svg" alt="lock kodorvan" style="display: var(--display, none)" ondragstart="return false"/>
|
<img src="/themes/default/images/icons/circle.svg" alt="lock kodorvan" style="display: var(--display, none)" ondragstart="return false"/>
|
||||||
<img src="/themes/default/images/icons/circle_dot.svg" alt="unlock kodorvan" style="display: var(--display, none)" ondragstart="return false"/>
|
<img src="/themes/default/images/icons/circle_dot.svg" alt="unlock kodorvan" style="display: var(--display, none)" ondragstart="return false"/>
|
||||||
@@ -306,20 +306,20 @@
|
|||||||
</article>
|
</article>
|
||||||
|
|
||||||
<div class="adaptive">
|
<div class="adaptive">
|
||||||
<button id="back" class="unselectable" onclick="core.paginator.relative(-1)" style="display: none">
|
<button id="back" class="unselectable" onclick="core.global.paginator.relative(-1)" style="display: none">
|
||||||
<img src="/themes/default/images/icons/arrow_left.svg" alt="back button kodorvan" ondragstart="return false"/>
|
<img src="/themes/default/images/icons/arrow_left.svg" alt="back button kodorvan" ondragstart="return false"/>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<section id="buttons" style="display: none">
|
<section id="buttons" style="display: none">
|
||||||
<button onclick="core.paginator.relative(1)" data-paginator-page-button="1">ПРОДОЛЖИТЬ</button>
|
<button onclick="core.global.paginator.relative(1)" data-paginator-page-button="1">ПРОДОЛЖИТЬ</button>
|
||||||
<button onclick="core.paginator.relative(1)" style="display: none" data-paginator-page-button="2" disabled="true">ПРОДОЛЖИТЬ</button>
|
<button onclick="core.global.paginator.relative(1)" style="display: none" data-paginator-page-button="2" disabled="true">ПРОДОЛЖИТЬ</button>
|
||||||
<button
|
<button
|
||||||
id="send"
|
id="send"
|
||||||
style="display: none"
|
style="display: none"
|
||||||
onclick="core.project.send();"
|
onclick="core.global.project.send();"
|
||||||
data-paginator-page-button="3"
|
data-paginator-page-button="3"
|
||||||
disabled="true"
|
disabled="true"
|
||||||
>ОТПРАВИТЬ</button>
|
>СОЗДАТЬ ПРОЕКТ</button>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
202
kodorvan/site/system/views/themes/default/elements/project/short.html
Executable file
202
kodorvan/site/system/views/themes/default/elements/project/short.html
Executable file
@@ -0,0 +1,202 @@
|
|||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--project-loading: "{{ language.name == 'ru' or true ? 'Загрузка' : 'Loading' }}";
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<section id="project">
|
||||||
|
<div>
|
||||||
|
<h1 class="unselectable">СОЗДАНИЕ ПРОЕКТА</h1>
|
||||||
|
<span class="unselectable">Отправьте заявку и получите бесплатный<br/>расчёт с индивидуальными рекомендациями!</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section class="promotion unselectable">
|
||||||
|
<p>Скидка <b>10%</b> в честь запуска сайта <b>до 1 мая</b></p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<b>Калькулятор не загрузится в вашем браузере</b></br>
|
||||||
|
<i>Оформите заказ через звонок оператору по номеру {{ contacts.sim.requests.full ?? 'Ошибка' }}</i>
|
||||||
|
</noscript>
|
||||||
|
|
||||||
|
<article class="loading" aria-label="Конструктор проекта">
|
||||||
|
<div class="loading"><i class="icon loading spinner animated"></i></div>
|
||||||
|
|
||||||
|
<section data-paginator-page="2" data-paginator-page-focus="name_input" class="unselectable">
|
||||||
|
<section id="metadata">
|
||||||
|
<label id="project_name" class="input icon" for="project_name_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/nametag.svg" alt="nametag kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Название</span>
|
||||||
|
<input
|
||||||
|
id="project_name_input"
|
||||||
|
class="input"
|
||||||
|
name="project_name_input"
|
||||||
|
type="text"
|
||||||
|
placeholder="Проект А"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
onkeyup="core.global.project.project.name = this.value"
|
||||||
|
/>
|
||||||
|
<small class="guide active">Введите внутреннее название проекта</small>
|
||||||
|
</label>
|
||||||
|
<label id="project_description" class="input icon" for="project_description_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/notes.svg" alt="notes kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Описание</span>
|
||||||
|
<textarea
|
||||||
|
id="project_description_input"
|
||||||
|
class="input"
|
||||||
|
name="project_description_input"
|
||||||
|
cols="100%"
|
||||||
|
maxlength="4096"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
placeholder="Сделайте, чтобы всё было красиво, спасибо"
|
||||||
|
onkeyup="core.global.project.project.description = this.value"
|
||||||
|
></textarea>
|
||||||
|
<small class="guide active">Опишите задачу в свободной форме</small>
|
||||||
|
</label>
|
||||||
|
<div id="project_files" class="input icon">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/import.svg" alt="import kodorvan" ondragstart="return false"/>
|
||||||
|
<div>
|
||||||
|
<span class="title">Импорт</span>
|
||||||
|
<ol style="display: none;" class="files"></ol>
|
||||||
|
<small class="guide active">Загрузите документы и изображения</small>
|
||||||
|
<label class="pseudoinput" for="project_files_input"></label>
|
||||||
|
<input
|
||||||
|
id="project_files_input"
|
||||||
|
class="input"
|
||||||
|
name="project_files_input"
|
||||||
|
type="file",
|
||||||
|
accept="image/*,.pdf,pptx,.doc,.docx,.odt,.word,.pages,.rtf,.txt"
|
||||||
|
multiple="true"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
oninput="core.global.project.project.files = this.files"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section data-paginator-page="3" data-paginator-page-focus="requester_name_input" class="unselectable" style="display: none;">
|
||||||
|
<section id="requester">
|
||||||
|
<label id="requester_name" class="input icon" for="requester_name_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/smile.svg" alt="smile kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Представитель</span>
|
||||||
|
<input
|
||||||
|
id="requester_name_input"
|
||||||
|
class="input"
|
||||||
|
name="requester_name_input"
|
||||||
|
type="text"
|
||||||
|
placeholder="Богдан"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
onkeyup="core.global.project.requester.name = this.value"
|
||||||
|
/>
|
||||||
|
<small class="guide active">Введите ваши инициалы</small>
|
||||||
|
</label>
|
||||||
|
<label id="requester_sim" class="input icon" for="requester_sim_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/phone.svg" alt="phone kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">SIM-номер</span>
|
||||||
|
<input
|
||||||
|
id="requester_sim_input"
|
||||||
|
class="input"
|
||||||
|
name="requester_sim_input"
|
||||||
|
type="text"
|
||||||
|
placeholder="7 (000) 000 0000"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
onkeyup="core.global.project.requester.sim = this.value"
|
||||||
|
/>
|
||||||
|
<small class="guide active">Введите номер телефона для связи</small>
|
||||||
|
</label>
|
||||||
|
<label id="requester_mail" class="input icon" for="requester_mail_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/mail.svg" alt="mail kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Почта</span>
|
||||||
|
<input
|
||||||
|
id="requester_mail_input"
|
||||||
|
class="input"
|
||||||
|
name="requester_mail_input"
|
||||||
|
type="email"
|
||||||
|
placeholder="project@company.org"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
onkeyup="core.global.project.requester.mail = this.value"
|
||||||
|
/>
|
||||||
|
<small class="guide active">Введите почту для связи</small>
|
||||||
|
</label>
|
||||||
|
<label id="requester_other" class="input icon"for="requester_other_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/comment.svg" alt="comment kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Дополнительные контакты</span>
|
||||||
|
<textarea
|
||||||
|
id="requester_other_input"
|
||||||
|
class="input"
|
||||||
|
name="name_input"
|
||||||
|
cols="100%"
|
||||||
|
maxlength="2048"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
placeholder="Синяя программа: @zornhut"
|
||||||
|
onkeyup="core.global.project.requester.other = this.value"
|
||||||
|
></textarea>
|
||||||
|
<small class="guide active">Введите дополнительные удобные способы связи</small>
|
||||||
|
</label>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="confirmation">
|
||||||
|
<label id="requester_personal" for="requester_personal_input">
|
||||||
|
<div>
|
||||||
|
<input
|
||||||
|
id="requester_personal_input"
|
||||||
|
class="input"
|
||||||
|
name="requester_personal_input"
|
||||||
|
type="checkbox"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
oninput="core.global.project.requester.personal = this.checked"
|
||||||
|
/>
|
||||||
|
<img src="/themes/default/images/icons/circle.svg" alt="lock kodorvan" style="display: var(--display, none)" ondragstart="return false"/>
|
||||||
|
<img src="/themes/default/images/icons/circle_dot.svg" alt="unlock kodorvan" style="display: var(--display, none)" ondragstart="return false"/>
|
||||||
|
</div>
|
||||||
|
<span class="title">Разрешаю запись, обработку и хранение моих персональных данных, <span class="underline">без передачи третьим лицам</span></span>
|
||||||
|
</label>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<div class="adaptive">
|
||||||
|
<button id="back" class="unselectable" onclick="core.global.paginator.relative(-1)" style="display: none">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/arrow_left.svg" alt="back button kodorvan" ondragstart="return false"/>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<section id="buttons">
|
||||||
|
<button onclick="core.global.paginator.relative(1)" data-paginator-page-button="2" disabled="true">ПРОДОЛЖИТЬ</button>
|
||||||
|
<button
|
||||||
|
id="send"
|
||||||
|
style="display: none"
|
||||||
|
onclick="core.global.project.send();"
|
||||||
|
data-paginator-page-button="3"
|
||||||
|
disabled="true"
|
||||||
|
>СОЗДАТЬ ПРОЕКТ</button>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const send = document.getElementById('send');
|
||||||
|
let deg = 120;
|
||||||
|
setInterval(() => send.style.setProperty('--button-send-background-color', (deg += 43) + 'deg'), 1200);
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<small class="description unselectable" aria-label="Описание"><strong>Команда разработчиков</strong> - реальные исполнители! <wbr/>Передача кода заказчику в его полную собственность и подпись <b>NDA</b>. Не используем ИИ в разработке! <wbr/><b>Полная анонимность</b> проектов - никто не узнает кто разработчик. <wbr/><b>Не оставляем</b> блокировки и скрытую рекламу в коде! Собственные сервера в <strong>Перми</strong>!</small>
|
||||||
|
<small class="guarantee unselectable" aria-label="Гарантия"><strong>Гарантия качества</strong><b>:</b> небольшие и простые проекты мы передаём нашим студентам, но за качество кода и соблюдение сроков всегда отвечает наставник!</small>
|
||||||
|
<div class="partners unselectable" aria-label="Партнёры">
|
||||||
|
<div class="icon" style="--mask-image: url('/themes/default/images/icons/white/solid/crown.svg')"></div>
|
||||||
|
<b>Поддерживаем проекты наших<br/>партнёров с 2014 года!</b>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section id="contacts_shortcut">
|
||||||
|
{% include '/themes/default/interface/media.html' %}
|
||||||
|
{% include '/themes/default/interface/sim.html' %}
|
||||||
|
<small class="unselectable">ЗВОНИТЕ ПО НОМЕРУ</small>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
@@ -1,50 +1,50 @@
|
|||||||
<article id="rofls" class="unselectable" style="display: none;">
|
<article id="rofls" class="unselectable" style="display: none;">
|
||||||
<img class="construction" loading="lazy" src="https://lyra.horse/css-clicker/buttons/construction.gif"
|
<img class="construction" loading="lazy" src="https://lyra.horse/css-clicker/buttons/construction.gif" width="88px" height="31px"
|
||||||
ondragstart="return false;" />
|
ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://lyra.horse/css-clicker/buttons/css2.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://lyra.horse/css-clicker/buttons/css2.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://lyra.horse/css-clicker/buttons/dbd.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://lyra.horse/css-clicker/buttons/dbd.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<!-- <img loading="lazy" src="https://lyra.horse/css-clicker/buttons/gaywebring.gif" ondragstart="return false;" /> -->
|
<!-- <img loading="lazy" src="https://lyra.horse/css-clicker/buttons/gaywebring.gif" width="88px" height="31px" ondragstart="return false;" /> -->
|
||||||
<!-- <img loading="lazy" src="https://lyra.horse/css-clicker/buttons/miku.gif" ondragstart="return false;" /> -->
|
<!-- <img loading="lazy" src="https://lyra.horse/css-clicker/buttons/miku.gif" width="88px" height="31px" ondragstart="return false;" /> -->
|
||||||
<img loading="lazy" src="https://lyra.horse/css-clicker/buttons/mozbutd1.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://lyra.horse/css-clicker/buttons/mozbutd1.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://lyra.horse/css-clicker/buttons/nofuckingthanks.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://lyra.horse/css-clicker/buttons/nofuckingthanks.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img class="noclick" loading="lazy" src="https://maia.crimew.gay/badges/noclick.gif" onclick="alert('bruh');"
|
<img class="noclick" loading="lazy" src="https://maia.crimew.gay/badges/noclick.gif" width="88px" height="31px" onclick="alert('bruh');"
|
||||||
ondragstart="return false;" />
|
ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://cyber.dabamos.de/88x31/zanarkand.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://cyber.dabamos.de/88x31/zanarkand.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/antinazi.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/antinazi.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img class="hell" loading="lazy" src="https://cyber.dabamos.de/88x31/tohell.gif" ondragstart="return false;"
|
<img class="hell" loading="lazy" src="https://cyber.dabamos.de/88x31/tohell.gif" width="88px" height="31px" ondragstart="return false;"
|
||||||
ondragstart="return false;" />
|
ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/say-no-to-web3.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/say-no-to-web3.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/they-walk-among-us.png" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/they-walk-among-us.png" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img class="eye" loading="lazy" src="https://88x31.nl/gifs/uranohead.gif" ondragstart="return false;" />
|
<img class="eye" loading="lazy" src="https://88x31.nl/gifs/uranohead.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/discord-no-way.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/discord-no-way.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/chat.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/chat.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/upallnight%20(3).gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/upallnight%20(3).gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://lyra.horse/css-clicker/buttons/free-sex.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://lyra.horse/css-clicker/buttons/free-sex.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/virusalert.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/virusalert.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://cyber.dabamos.de/88x31/microsoft_stop.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://cyber.dabamos.de/88x31/microsoft_stop.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/linuxnow2.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/linuxnow2.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/vim.vialle.love.anim.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/vim.vialle.love.anim.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://cyber.dabamos.de/88x31/tummy.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://cyber.dabamos.de/88x31/tummy.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/anybrow%20(3).gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/anybrow%20(3).gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/camtime.png" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/camtime.png" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/reshirii.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/reshirii.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/alien2.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/alien2.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img class="antibuttons" loading="lazy" src="https://88x31.nl/gifs/anti_button.gif"
|
<img class="antibuttons" loading="lazy" src="https://88x31.nl/gifs/anti_button.gif" width="88px" height="31px"
|
||||||
onclick="alert('BUTTONS SUCKS!'); document.getElementById('buttons').remove();" ondragstart="return false;" />
|
onclick="alert('BUTTONS SUCKS!'); document.getElementById('buttons').remove();" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/fspeech96a.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/fspeech96a.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/saratov.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/saratov.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/thatpays2.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/thatpays2.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://lyra.horse/css-clicker/buttons/antinft.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://lyra.horse/css-clicker/buttons/antinft.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/tumblr_ptmmk6djdu1xwjivko5_100.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/tumblr_ptmmk6djdu1xwjivko5_100.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/ieshit.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/ieshit.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/underground.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/underground.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/volta.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/volta.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/ocartswap_2.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/ocartswap_2.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/f_ckfb.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/f_ckfb.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img class="cogs" loading="lazy" src="https://88x31.nl/gifs/cogs.gif" ondragstart="return false;" />
|
<img class="cogs" loading="lazy" src="https://88x31.nl/gifs/cogs.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://88x31.nl/gifs/antifa.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://88x31.nl/gifs/antifa.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img loading="lazy" src="https://cyber.dabamos.de/88x31/newbuttonone.gif" ondragstart="return false;" />
|
<img loading="lazy" src="https://cyber.dabamos.de/88x31/newbuttonone.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
<img class="colors" loading="lazy" src="https://88x31.nl/gifs/bestviewed16bit.gif" ondragstart="return false;" />
|
<img class="colors" loading="lazy" src="https://88x31.nl/gifs/bestviewed16bit.gif" width="88px" height="31px" ondragstart="return false;" />
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
// Imported the hotline.mjs module
|
// Imported the hotline.mjs module
|
||||||
|
|
||||||
// Initializing an instance of the hotline.mjs
|
// Initializing an instance of the hotline.mjs
|
||||||
const instance = new connected.hotline(document.getElementById("rofls"), true);
|
const instance = new connected.global.hotline(document.getElementById("rofls"), true);
|
||||||
|
|
||||||
// Initializing settings of the hotline instance
|
// Initializing settings of the hotline instance
|
||||||
instance.alive = true;
|
instance.alive = true;
|
||||||
|
|||||||
@@ -23,7 +23,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="information">
|
<div class="information">
|
||||||
<h1 class="name">{{ company.name.short }}</h1>
|
<h1 class="name">{{ company.name.short }}</h1>
|
||||||
<p class="column"><span class="tax row">{{ company.tax }}</span><span class="identifier row">{{ company.identifier }}</span></p>
|
<p class="column">
|
||||||
|
<span class="tax row">{{ company.tax }}</span>
|
||||||
|
<span class="identifier row">{{ company.identifier }}</span>
|
||||||
|
</p>
|
||||||
<p class="worktime unselectable">
|
<p class="worktime unselectable">
|
||||||
{% if company.address.full is not empty %}{{ company.address.full }}{% endif %},
|
{% if company.address.full is not empty %}{{ company.address.full }}{% endif %},
|
||||||
<span class="time from">{{ company.worktime.from }}</span>
|
<span class="time from">{{ company.worktime.from }}</span>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% block meta %}
|
{% block meta %}
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|
||||||
<link rel="canonical" href="{{ uri ?? domain ? ('https://' ~ domain) : '' }}" />
|
<link rel="canonical" href="{{ uri ?? (domain ? ('https://' ~ domain) : '') }}" />
|
||||||
|
|
||||||
<title>{{ title ?? 'Кодорвань - разработка сайтов в Перми' }}</title>
|
<title>{{ title ?? 'Кодорвань - разработка сайтов в Перми' }}</title>
|
||||||
<meta name="application-name" content="Кодорвань" />
|
<meta name="application-name" content="Кодорвань" />
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<meta property="og:description" content="{{ opengraph.description ?? 'Чистый код, авангардный дизайн, крепкий бустинг и юридическая броня! Заходи на сайт и посчитай проект за 2 минуты! Рвём шаблоны!' }}" />
|
<meta property="og:description" content="{{ opengraph.description ?? 'Чистый код, авангардный дизайн, крепкий бустинг и юридическая броня! Заходи на сайт и посчитай проект за 2 минуты! Рвём шаблоны!' }}" />
|
||||||
<meta property="og:locale" content="ru_RU" />
|
<meta property="og:locale" content="ru_RU" />
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:url" content="{{ uri ?? domain ? ('https://' ~ domain) : '' }}" />
|
<meta property="og:url" content="{{ uri ?? (domain ? ('https://' ~ domain) : '') }}" />
|
||||||
<meta property="og:logo" content="{{ opengraph.logo ?? 'https://kodorvan.tech/images/kodorvan.png' }}" />
|
<meta property="og:logo" content="{{ opengraph.logo ?? 'https://kodorvan.tech/images/kodorvan.png' }}" />
|
||||||
{% if opengraph.image.uri is not empty %}
|
{% if opengraph.image.uri is not empty %}
|
||||||
<meta property="og:image" content="{{ opengraph.image.uri }}" />
|
<meta property="og:image" content="{{ opengraph.image.uri }}" />
|
||||||
@@ -44,10 +44,10 @@
|
|||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
<meta name="twitter:creator" content="@mirzaev_sexy" />
|
<meta name="twitter:creator" content="@mirzaev_sexy" />
|
||||||
<meta name="twitter:site" content="@mirzaev_sexy" />
|
<meta name="twitter:site" content="@mirzaev_sexy" />
|
||||||
<meta name="twitter:url" content="https://kodorvan.tech/" />
|
<meta name="twitter:url" content="{{ uri ?? (domain ? ('https://' ~ domain) : '') }}" />
|
||||||
<meta name="twitter:title" content="Kodorvan" />
|
<meta name="twitter:title" content="{{ twitter.title ?? 'Кодорвань - разработка сайтов в Перми' }}" />
|
||||||
<meta name="twitter:description" content="Programming, design, boosting and legal armor!" />
|
<meta name="twitter:description" content="{{ twitter.description ?? 'Programming, design, boosting and legal armor!' }}" />
|
||||||
<meta name="twitter:image" content="https://kodorvan.tech/images/kodorvan_1200_630.webp" />
|
<meta name="twitter:image" content="{{ twitter.image.uri ?? 'https://kodorvan.tech/images/kodorvan_1200_630.webp' }}" />
|
||||||
|
|
||||||
<link rel="apple-touch-icon" sizes="57x57" href="/images/favicon/favicon-57x57.png" />
|
<link rel="apple-touch-icon" sizes="57x57" href="/images/favicon/favicon-57x57.png" />
|
||||||
<link rel="apple-touch-icon" sizes="60x60" href="/images/favicon/favicon-60x60.png" />
|
<link rel="apple-touch-icon" sizes="60x60" href="/images/favicon/favicon-60x60.png" />
|
||||||
@@ -77,22 +77,26 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
{
|
{% if ldjson is not empty %}
|
||||||
"@context": "https://schema.org",
|
{{ ldjson }}
|
||||||
"@type": "Organization",
|
{% else %}
|
||||||
"logo": "https://kodorvan.tech/images/kodorvan.png",
|
{
|
||||||
"name": "Кодорвань",
|
"@context": "https://schema.org",
|
||||||
"description": "Чистый код, авангардный дизайн, крепкий бустинг и юридическая броня! Заходи на сайт и посчитай проект за 2 минуты! Рвём шаблоны!",
|
"@type": "Organization",
|
||||||
"url": "https://kodorvan.tech",
|
"logo": "https://kodorvan.tech/images/kodorvan.png",
|
||||||
"contactPoint": [
|
"name": "Кодорвань",
|
||||||
{ "@type": "ContactPoint",
|
"description": "Чистый код, авангардный дизайн, крепкий бустинг и юридическая броня! Заходи на сайт и посчитай проект за 2 минуты! Рвём шаблоны!",
|
||||||
"telephone": "+7-901-592-4211",
|
"url": "https://kodorvan.tech",
|
||||||
"contactType": "Бесплатная консультация",
|
"contactPoint": [
|
||||||
"contactOption": "TollFree",
|
{ "@type": "ContactPoint",
|
||||||
"areaServed": "RU"
|
"telephone": "+7-901-592-4211",
|
||||||
}
|
"contactType": "Бесплатная консультация",
|
||||||
]
|
"contactOption": "TollFree",
|
||||||
}
|
"areaServed": "RU"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
{{ parent() }}
|
{{ parent() }}
|
||||||
|
|
||||||
<link type="text/css" rel="stylesheet" href="/css/icons/loading_spinner.css" />
|
<link type="text/css" rel="stylesheet" href="/css/icons/loading_spinner.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="/themes/default/css/pages/offer.css" />
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/pages/article.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="/themes/default/css/elements/cookies.css" />
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/elements/cookies.css" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@@ -12,12 +12,25 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{% include '/themes/default/interface/logotype.html %}
|
{% include '/themes/default/interface/logotype.html' %}
|
||||||
|
|
||||||
<article id="{{ article.identifier }}" aria-label="{{ article.title }}">
|
<article id="article" aria-label="Статья">
|
||||||
<h1>{{ article.title }}</h1>
|
<section class="head" aria-label="Верхний колонтинул статьи">
|
||||||
|
<h1 aria-label="Заголовок статьи">{{ article.head.title }}</h1>
|
||||||
|
{% if article.head.image.src is not empty %}
|
||||||
|
<img
|
||||||
|
src="{{ article.head.image.src }}"
|
||||||
|
{% if article.head.image.width is not empty %}width="{{ article.head.image.width }}"{% endif %}
|
||||||
|
{% if article.head.image.height is not empty %}height="{{ article.head.image.height }}"{% endif %}
|
||||||
|
{% if article.head.image.alt is not empty %}alt="{{ article.head.image.alt }}"{% endif %}
|
||||||
|
aria-label="Фоновое изображение верхнего колонтинула статьи"
|
||||||
|
/>
|
||||||
|
{% endif %}
|
||||||
|
</section>
|
||||||
|
|
||||||
{{ article.html|raw }}
|
<section class="body" aria-label="Содержимое статьи">
|
||||||
|
{{ article.body.html|raw }}
|
||||||
|
</section>
|
||||||
</article>
|
</article>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
{% block main %}
|
{% block main %}
|
||||||
{% include '/themes/default/interface/logotype.html' %}
|
{% include '/themes/default/interface/logotype.html' %}
|
||||||
|
|
||||||
{% include '/themes/default/elements/project.html' %}
|
{% include '/themes/default/elements/project/short.html' %}
|
||||||
|
|
||||||
{% include '/themes/default/elements/companies.html' %}
|
{% include '/themes/default/elements/companies.html' %}
|
||||||
{% include '/themes/default/elements/superpacks.html' %}
|
{% include '/themes/default/elements/superpacks.html' %}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
{% include '/themes/default/interface/logotype.html %}
|
{% include '/themes/default/interface/logotype.html' %}
|
||||||
|
|
||||||
|
|
||||||
<article id="offer" aria-label="Публичная оферта">
|
<article id="offer" aria-label="Публичная оферта">
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>Я уведомлен, что при необходимости я могу ознакомиться с актуальной версией Политики обработки
|
<p>Я уведомлен, что при необходимости я могу ознакомиться с актуальной версией Политики обработки
|
||||||
персональных данных {{ company.name.short }} по адресу <a href="/offer" rel="nofollow noopener">https://{{ domain }}/policy</a>.</p>
|
персональных данных {{ company.name.short }} по адресу <a class="tech" href="/offer" rel="nofollow noopener">https://{{ domain }}/policy</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
30
kodorvan/site/system/views/themes/default/pages/project/calculator.html
Executable file
30
kodorvan/site/system/views/themes/default/pages/project/calculator.html
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
{% extends "/themes/default/index.html" %}
|
||||||
|
|
||||||
|
{% block css %}
|
||||||
|
{{ parent() }}
|
||||||
|
|
||||||
|
<link type="text/css" rel="stylesheet" href="/css/icons/loading_spinner.css" />
|
||||||
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/pages/project.css" />
|
||||||
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/elements/project.css" />
|
||||||
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/elements/cookies.css" />
|
||||||
|
<link rel="preload" as="image" href="/themes/default/images/icons/close.svg" />
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block before %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
{% include '/themes/default/interface/logotype.html' %}
|
||||||
|
|
||||||
|
{% include '/themes/default/elements/project/full.html' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block after %}
|
||||||
|
<div class="vignette"></div>
|
||||||
|
<div class="dots"></div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block js %}
|
||||||
|
{{ parent() }}
|
||||||
|
<script src="/js/pages/project/create.js" type="module" defer></script>
|
||||||
|
{% endblock %}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
{% extends "/themes/default/index.html" %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block css %}
|
||||||
|
{{ parent() }}
|
||||||
|
|
||||||
|
<link type="text/css" rel="stylesheet" href="/css/icons/loading_spinner.css" />
|
||||||
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/pages/system/superpack/create.css" />
|
||||||
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/elements/cookies.css" />
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block before %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
{% include '/themes/default/interface/logotype.html' %}
|
||||||
|
|
||||||
|
<article id="superpack" aria-label="Форма создания суперпака">
|
||||||
|
<h1 class="unselectable">СОЗДАНИЕ СУПЕРПАКА</h1>
|
||||||
|
|
||||||
|
<section class="unselectable">
|
||||||
|
<label id="superpack_urn" class="input icon" for="superpack_urn_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/nametag.svg" alt="nametag kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">URN</span>
|
||||||
|
<input
|
||||||
|
id="superpack_urn_input"
|
||||||
|
class="input domain"
|
||||||
|
name="superpack_urn_input"
|
||||||
|
type="text"
|
||||||
|
placeholder="chat-bot-market"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
onkeyup="core.system.superpack.urn = this.value"
|
||||||
|
/>
|
||||||
|
<small class="guide active">Введите URN суперпака</small>
|
||||||
|
</label>
|
||||||
|
<label id="superpack_title" class="input icon" for="superpack_title_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/notes.svg" alt="notes kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Название</span>
|
||||||
|
<input
|
||||||
|
id="superpack_title_input"
|
||||||
|
class="input"
|
||||||
|
name="superpack_title_input"
|
||||||
|
type="text"
|
||||||
|
placeholder="Чат-бот для магазина"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
onkeyup="core.system.superpack.title = this.value"
|
||||||
|
/>
|
||||||
|
<small class="guide active">Введите название суперпака</small>
|
||||||
|
</label>
|
||||||
|
<div id="superpack_image" class="input icon">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/import.svg" alt="import kodorvan" ondragstart="return false"/>
|
||||||
|
<div>
|
||||||
|
<span class="title">Импорт</span>
|
||||||
|
<ol style="display: none;" class="files"></ol>
|
||||||
|
<small class="guide active">Загрузите фоновое изображение верхнего колонтинула</small>
|
||||||
|
<label class="pseudoinput" for="superpack_image_input"></label>
|
||||||
|
<input
|
||||||
|
id="superpack_image_input"
|
||||||
|
class="input"
|
||||||
|
name="superpack_image_input"
|
||||||
|
type="file",
|
||||||
|
accept="image/*"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
oninput="core.system.superpack.files = this.files"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<label id="superpack_text" class="input icon" for="superpack_text_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/notes.svg" alt="notes kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Описание</span>
|
||||||
|
<textarea
|
||||||
|
id="superpack_text_input"
|
||||||
|
class="input"
|
||||||
|
name="superpack_text_input"
|
||||||
|
cols="100%"
|
||||||
|
maxlength="4096"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
placeholder="Готовое техническое решение для открытия новой точки продаж в сети"
|
||||||
|
onkeyup="core.system.superpack.text = this.value"
|
||||||
|
></textarea>
|
||||||
|
<small class="guide active">Введите описание суперпака</small>
|
||||||
|
</label>
|
||||||
|
<label id="superpack_html" class="input icon" for="superpack_html_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/notes.svg" alt="notes kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Описание в формате HTML</span>
|
||||||
|
<textarea
|
||||||
|
id="superpack_html_input"
|
||||||
|
class="input"
|
||||||
|
name="superpack_html_input"
|
||||||
|
cols="100%"
|
||||||
|
maxlength="4096"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
placeholder="<p>Готовое техническое решение для открытия новой точки продаж в сети</p>"
|
||||||
|
onkeyup="core.system.superpack.html = this.value"
|
||||||
|
></textarea>
|
||||||
|
<small class="guide active">Введите описание суперпака в формате HTML</small>
|
||||||
|
</label>
|
||||||
|
<label id="superpack_supercost" class="input icon" for="superpack_supercost_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/notes.svg" alt="notes kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Стоимость</span>
|
||||||
|
<input
|
||||||
|
id="superpack_supercost_input"
|
||||||
|
class="input"
|
||||||
|
name="superpack_supercost_input"
|
||||||
|
type="number"
|
||||||
|
placeholder="2000"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
onkeyup="core.system.superpack.supercost = this.value"
|
||||||
|
/>
|
||||||
|
<small class="guide active">Введите стоимость суперпака</small>
|
||||||
|
</label>
|
||||||
|
<button
|
||||||
|
id="send"
|
||||||
|
onclick="core.system.superpack.send();"
|
||||||
|
>Отправить на сервер</button>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block after %}
|
||||||
|
<div class="vignette"></div>
|
||||||
|
<div class="dots"></div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block js %}
|
||||||
|
{{ parent() }}
|
||||||
|
<script src="/js/pages/system/superpack.js" type="module" defer></script>
|
||||||
|
{% endblock %}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
{% extends "/themes/default/index.html" %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block css %}
|
||||||
|
{{ parent() }}
|
||||||
|
|
||||||
|
<link type="text/css" rel="stylesheet" href="/css/icons/loading_spinner.css" />
|
||||||
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/pages/system/superpack/create.css" />
|
||||||
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/elements/cookies.css" />
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block before %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
{% include '/themes/default/interface/logotype.html' %}
|
||||||
|
|
||||||
|
<article id="superpack" aria-label="Форма создания суперпака">
|
||||||
|
<h1 class="unselectable">СОЗДАНИЕ СУПЕРПАКА</h1>
|
||||||
|
|
||||||
|
<section class="unselectable">
|
||||||
|
<label id="superpack_urn" class="input icon" for="superpack_urn_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/nametag.svg" alt="nametag kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">URN</span>
|
||||||
|
<input
|
||||||
|
id="superpack_urn_input"
|
||||||
|
class="input domain"
|
||||||
|
name="superpack_urn_input"
|
||||||
|
type="text"
|
||||||
|
placeholder="chat-bot-market"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
onkeyup="core.system.superpack.urn = this.value"
|
||||||
|
/>
|
||||||
|
<small class="guide active">Введите URN суперпака</small>
|
||||||
|
</label>
|
||||||
|
<label id="superpack_title" class="input icon" for="superpack_title_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/notes.svg" alt="notes kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Название</span>
|
||||||
|
<input
|
||||||
|
id="superpack_title_input"
|
||||||
|
class="input"
|
||||||
|
name="superpack_title_input"
|
||||||
|
type="text"
|
||||||
|
placeholder="Чат-бот для магазина"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
onkeyup="core.system.superpack.title = this.value"
|
||||||
|
/>
|
||||||
|
<small class="guide active">Введите название суперпака</small>
|
||||||
|
</label>
|
||||||
|
<label id="superpack_text" class="input icon" for="superpack_text_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/notes.svg" alt="notes kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Описание</span>
|
||||||
|
<textarea
|
||||||
|
id="superpack_text_input"
|
||||||
|
class="input"
|
||||||
|
name="superpack_text_input"
|
||||||
|
cols="100%"
|
||||||
|
maxlength="4096"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
placeholder="Готовое техническое решение для открытия новой точки продаж в сети"
|
||||||
|
onkeyup="core.system.superpack.text = this.value"
|
||||||
|
></textarea>
|
||||||
|
<small class="guide active">Введите описание суперпака</small>
|
||||||
|
</label>
|
||||||
|
<label id="superpack_html" class="input icon" for="superpack_html_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/notes.svg" alt="notes kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Описание в формате HTML</span>
|
||||||
|
<textarea
|
||||||
|
id="superpack_html_input"
|
||||||
|
class="input"
|
||||||
|
name="superpack_html_input"
|
||||||
|
cols="100%"
|
||||||
|
maxlength="4096"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
placeholder="<p>Готовое техническое решение для открытия новой точки продаж в сети</p>"
|
||||||
|
onkeyup="core.system.superpack.html = this.value"
|
||||||
|
></textarea>
|
||||||
|
<small class="guide active">Введите описание суперпака в формате HTML</small>
|
||||||
|
</label>
|
||||||
|
<label id="superpack_supercost" class="input icon" for="superpack_supercost_input">
|
||||||
|
<img class="icon" src="/themes/default/images/icons/notes.svg" alt="notes kodorvan" ondragstart="return false"/>
|
||||||
|
<span class="title">Стоимость</span>
|
||||||
|
<input
|
||||||
|
id="superpack_supercost_input"
|
||||||
|
class="input"
|
||||||
|
name="superpack_supercost_input"
|
||||||
|
type="number"
|
||||||
|
placeholder="2000"
|
||||||
|
value=""
|
||||||
|
autocomplete="off"
|
||||||
|
onkeyup="core.system.superpack.supercost = this.value"
|
||||||
|
/>
|
||||||
|
<small class="guide active">Введите стоимость суперпака</small>
|
||||||
|
</label>
|
||||||
|
<button
|
||||||
|
id="send"
|
||||||
|
onclick="core.system.superpack.send();"
|
||||||
|
>Отправить на сервер</button>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block after %}
|
||||||
|
<div class="vignette"></div>
|
||||||
|
<div class="dots"></div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block js %}
|
||||||
|
{{ parent() }}
|
||||||
|
<script src="/js/pages/system/superpack.js" type="module" defer></script>
|
||||||
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user