Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
c6f7f65360 | |||
c65f7d4055 | |||
bdef194b68 | |||
a3eeacc4b4 | |||
da69b20491 | |||
1d4d3e5f24 | |||
2b417f1649 | |||
1ee4c9a7dd | |||
ece40a8644 | |||
6e5339a7d9 | |||
b989a89e2b | |||
fbcb72a47b | |||
485ac59c69 | |||
315f9bb7e3 | |||
9baf88d93c | |||
d3a47b04fb | |||
1a05a0413d | |||
8c777e72c7 |
@@ -7,7 +7,6 @@ namespace ${REPO_OWNER}\${REPO_NAME}\controllers;
|
|||||||
// Files of the project
|
// Files of the project
|
||||||
use ${REPO_OWNER}\${REPO_NAME}\views\templater,
|
use ${REPO_OWNER}\${REPO_NAME}\views\templater,
|
||||||
${REPO_OWNER}\${REPO_NAME}\models\core as models,
|
${REPO_OWNER}\${REPO_NAME}\models\core as models,
|
||||||
${REPO_OWNER}\${REPO_NAME}\models\session,
|
|
||||||
${REPO_OWNER}\${REPO_NAME}\models\enumerations\language;
|
${REPO_OWNER}\${REPO_NAME}\models\enumerations\language;
|
||||||
|
|
||||||
// Framework for PHP
|
// Framework for PHP
|
||||||
@@ -74,6 +73,9 @@ class core extends controller
|
|||||||
// Blocking requests from CloudFlare (better to write this blocking into nginx config file)
|
// Blocking requests from CloudFlare (better to write this blocking into nginx config file)
|
||||||
if (isset($$_SERVER['HTTP_USER_AGENT']) && $$_SERVER['HTTP_USER_AGENT'] === 'nginx-ssl early hints') return status::bruh->label;
|
if (isset($$_SERVER['HTTP_USER_AGENT']) && $$_SERVER['HTTP_USER_AGENT'] === 'nginx-ssl early hints') return status::bruh->label;
|
||||||
|
|
||||||
|
// Initializing the view template engine instance
|
||||||
|
$$this->view = new templater();
|
||||||
|
|
||||||
// For the extends system
|
// For the extends system
|
||||||
parent::__construct(core: $$core);
|
parent::__construct(core: $$core);
|
||||||
}
|
}
|
||||||
|
6
author/project/system/localizations/english.php
Normal file
6
author/project/system/localizations/english.php
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// Exit (success)
|
||||||
|
return [
|
||||||
|
'' => ''
|
||||||
|
]
|
6
author/project/system/localizations/russian.php
Normal file
6
author/project/system/localizations/russian.php
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// Exit (success)
|
||||||
|
return [
|
||||||
|
'' => ''
|
||||||
|
]
|
@@ -29,15 +29,15 @@ enum language
|
|||||||
*
|
*
|
||||||
* @return string Translated label of the language
|
* @return string Translated label of the language
|
||||||
*/
|
*/
|
||||||
public function label(?language $language = language::en): string
|
public function label(?language $$language = language::en): string
|
||||||
{
|
{
|
||||||
// Exit (success)
|
// Exit (success)
|
||||||
return match ($this) {
|
return match ($$this) {
|
||||||
language::en => match ($language) {
|
language::en => match ($$language) {
|
||||||
language::en => 'English',
|
language::en => 'English',
|
||||||
language::ru => 'Английский'
|
language::ru => 'Английский'
|
||||||
},
|
},
|
||||||
language::ru => match ($language) {
|
language::ru => match ($$language) {
|
||||||
language::en => 'Russian',
|
language::en => 'Russian',
|
||||||
language::ru => 'Русский'
|
language::ru => 'Русский'
|
||||||
}
|
}
|
||||||
@@ -54,7 +54,7 @@ enum language
|
|||||||
public function flag(): string
|
public function flag(): string
|
||||||
{
|
{
|
||||||
// Exit (success)
|
// Exit (success)
|
||||||
return match ($this) {
|
return match ($$this) {
|
||||||
language::en => '🇺🇸',
|
language::en => '🇺🇸',
|
||||||
language::ru => '🇷🇺'
|
language::ru => '🇷🇺'
|
||||||
};
|
};
|
||||||
|
@@ -34,6 +34,9 @@ define('STORAGE', INDEX . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'st
|
|||||||
// Initializing path to the databases directory
|
// Initializing path to the databases directory
|
||||||
define('DATABASES', INDEX . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'databases');
|
define('DATABASES', INDEX . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'databases');
|
||||||
|
|
||||||
|
// Initializing path to the localizations directory
|
||||||
|
define('LOCALIZATIONS', INDEX . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'localizations');
|
||||||
|
|
||||||
// Initializing dependencies
|
// Initializing dependencies
|
||||||
require ROOT . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
|
require ROOT . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||||
|
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
aside {
|
aside {
|
||||||
|
&:not(:has(*)) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,37 +0,0 @@
|
|||||||
@charset "UTF-8";
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root {
|
|
||||||
--text-color: initial;
|
|
||||||
--text-color-hover: initial;
|
|
||||||
--text-color-active: initial;
|
|
||||||
--text-notice-color: initial;
|
|
||||||
--text-warning-color: initial;
|
|
||||||
--text-selected-color: initial;
|
|
||||||
--text-selected-background-color: initial;
|
|
||||||
|
|
||||||
--link-color: initial;
|
|
||||||
--link-color-hover: initial;
|
|
||||||
--link-color-active: initial;
|
|
||||||
|
|
||||||
color: var(--text-color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) {
|
|
||||||
:root {
|
|
||||||
--text-color: initial;
|
|
||||||
--text-color-hover: initial;
|
|
||||||
--text-color-active: initial;
|
|
||||||
--text-notice-color: initial;
|
|
||||||
--text-warning-color: initial;
|
|
||||||
--text-selected-color: initial;
|
|
||||||
--text-selected-background-color: initial;
|
|
||||||
|
|
||||||
--link-color: initial;
|
|
||||||
--link-color-hover: initial;
|
|
||||||
--link-color-active: initial;
|
|
||||||
|
|
||||||
color: var(--text-color);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,45 @@
|
|||||||
|
@charset "UTF-8";
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--text-color: #fff;
|
||||||
|
--text-color-inverted: #000;
|
||||||
|
--button-background-color-inverted: #fff;
|
||||||
|
--button-background-color: #000;
|
||||||
|
--section-background-color-inverted: #fff;
|
||||||
|
--section-background-color: #000;
|
||||||
|
--background-color: #000;
|
||||||
|
--background-color-inverted: #fff;
|
||||||
|
|
||||||
|
--interface-top-background-color: var(--background-color, #000);
|
||||||
|
--interface-background-color: var(--background-color, #000);
|
||||||
|
--interface-bottom-background-color: var(--background-color, #000);
|
||||||
|
|
||||||
|
--red: red;
|
||||||
|
--white: #fff;
|
||||||
|
|
||||||
|
--paper: var(--white);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
:root {
|
||||||
|
--text-color: #fff;
|
||||||
|
--text-color-inverted: #000;
|
||||||
|
--button-background-color-inverted: #fff;
|
||||||
|
--button-background-color: #000;
|
||||||
|
--section-background-color-inverted: #fff;
|
||||||
|
--section-background-color: #000;
|
||||||
|
--background-color: #000;
|
||||||
|
--background-color-inverted: #fff;
|
||||||
|
|
||||||
|
--interface-top-background-color: var(--background-color, #000);
|
||||||
|
--interface-background-color: var(--background-color, #000);
|
||||||
|
--interface-bottom-background-color: var(--background-color, #000);
|
||||||
|
|
||||||
|
--red: red;
|
||||||
|
--white: #fff;
|
||||||
|
|
||||||
|
--paper: var(--white);
|
||||||
|
}
|
||||||
|
}
|
@@ -1,4 +1,7 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
|
&:not(:has(*)) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
@@ -1,4 +1,7 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
header {
|
header {
|
||||||
|
&:not(:has(*)) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,11 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: unset;
|
||||||
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
|
flex-grow: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
'endpoint' => 'unix:///var/run/arangodb3/arango.sock',
|
|
||||||
'database' => '${REPO_NAME}',
|
|
||||||
'name' => '${REPO_NAME}',
|
|
||||||
'password' => ''
|
|
||||||
];
|
|
@@ -19,6 +19,8 @@
|
|||||||
<link type="text/css" rel="stylesheet" href="/themes/default/css/header.css" />
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/header.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="/themes/default/css/main.css" />
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/main.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="/themes/default/css/aside.css" />
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/aside.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="/themes/default/css/themes/default/footer.css" />
|
<link type="text/css" rel="stylesheet" href="/themes/default/css/footer.css" />
|
||||||
<link type="text/css" rel="stylesheet" href="/themes/default/css/themes/default/colors.css" />
|
<style id="theme">
|
||||||
|
@import url('/themes/default/css/themes/default/colorscheme.css');
|
||||||
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -5,24 +5,27 @@
|
|||||||
{% use "/themes/default/footer.html" with css as footer_css, body as footer, js as footer_js %}
|
{% use "/themes/default/footer.html" with css as footer_css, body as footer, js as footer_js %}
|
||||||
|
|
||||||
{% block css %}
|
{% block css %}
|
||||||
{{ block('header_css') }}
|
{{ block('header_css') }}
|
||||||
{{ block('aside_css') }}
|
{{ block('aside_css') }}
|
||||||
{{ block('footer_css') }}
|
{{ block('footer_css') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{{ block('header') }}
|
{{ block('header') }}
|
||||||
{{ block('aside') }}
|
|
||||||
<main>
|
{{ block('aside') }}
|
||||||
{% block main %}
|
|
||||||
{{ main|raw }}
|
<main>
|
||||||
{% endblock %}
|
{% block main %}
|
||||||
</main>
|
{{ main|raw }}
|
||||||
{{ block('footer') }}
|
{% endblock %}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
{{ block('footer') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
{{ block('footer_js') }}
|
{{ block('header_js') }}
|
||||||
{{ block('header_js') }}
|
{{ block('aside_js') }}
|
||||||
{{ block('aside_js') }}
|
{{ block('footer_js') }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -23,9 +23,9 @@
|
|||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.4",
|
"php": "^8.4",
|
||||||
"mirzaev/minimal": "^3.4",
|
"mirzaev/minimal": "^3.6",
|
||||||
"mirzaev/baza": "^3.3",
|
"mirzaev/baza": "^3.3",
|
||||||
"twig/twig": "^3.10",
|
"twig/twig": "^3.2",
|
||||||
"twig/extra-bundle": "^3.7",
|
"twig/extra-bundle": "^3.7",
|
||||||
"twig/intl-extra": "^3.10"
|
"twig/intl-extra": "^3.10"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user