Compare commits
	
		
			21 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 1261738c3d | |||
| 9718bec887 | |||
| 7f8525789e | |||
| c6f7f65360 | |||
| c65f7d4055 | |||
| bdef194b68 | |||
| a3eeacc4b4 | |||
| da69b20491 | |||
| 1d4d3e5f24 | |||
| 2b417f1649 | |||
| 1ee4c9a7dd | |||
| ece40a8644 | |||
| 6e5339a7d9 | |||
| b989a89e2b | |||
| fbcb72a47b | |||
| 485ac59c69 | |||
| 315f9bb7e3 | |||
| 9baf88d93c | |||
| d3a47b04fb | |||
| 1a05a0413d | |||
| 8c777e72c7 | 
| @@ -6,9 +6,10 @@ namespace ${REPO_OWNER}\${REPO_NAME}\controllers; | ||||
|  | ||||
| // Files of the project | ||||
| use ${REPO_OWNER}\${REPO_NAME}\views\templater, | ||||
| 	${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\core as models; | ||||
|  | ||||
| // Library for languages support | ||||
| use mirzaev\languages\language; | ||||
|  | ||||
| // Framework for PHP | ||||
| use mirzaev\minimal\core as minimal, | ||||
| @@ -29,7 +30,6 @@ use mirzaev\minimal\core as minimal, | ||||
|  * | ||||
|  * @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License | ||||
|  * @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy> | ||||
|  * @author ${REPO_OWNER} <mail@domain.zone> | ||||
|  */ | ||||
| class core extends controller | ||||
| { | ||||
| @@ -74,6 +74,9 @@ class core extends controller | ||||
| 		// 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; | ||||
|  | ||||
| 		// Initializing the view template engine instance | ||||
| 		$$this->view = new templater(); | ||||
|  | ||||
| 		// For the extends system | ||||
| 		parent::__construct(core: $$core); | ||||
| 	} | ||||
|   | ||||
| @@ -22,7 +22,6 @@ use mirzaev\minimal\http\enumerations\content, | ||||
|  * | ||||
|  * @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License | ||||
|  * @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy> | ||||
|  * @author ${REPO_OWNER} <mail@domain.zone> | ||||
|  */ | ||||
| final class index extends 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 [ | ||||
|     '' => '' | ||||
| ] | ||||
| @@ -20,7 +20,6 @@ use exception; | ||||
|  * | ||||
|  * @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License | ||||
|  * @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy> | ||||
|  * @author ${REPO_OWNER} <mail@domain.zone> | ||||
|  */ | ||||
| class core extends model | ||||
| { | ||||
|   | ||||
| @@ -1,62 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace ${REPO_OWNER}\${REPO_NAME}\models\enumerations; | ||||
|  | ||||
| /** | ||||
|  * Language | ||||
|  * | ||||
|  * Types of languages by ISO 639-1 standart | ||||
|  * | ||||
|  * @package ${REPO_OWNER}\${REPO_NAME}\models\enumerations | ||||
|  * | ||||
|  * @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License | ||||
|  * @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy> | ||||
|  * @author ${REPO_OWNER} <mail@domain.zone> | ||||
|  */ | ||||
| enum language | ||||
| { | ||||
| 	case en; | ||||
| 	case ru; | ||||
|  | ||||
| 	/** | ||||
|    * Label | ||||
|    * | ||||
| 	 * Initialize label of the language | ||||
| 	 * | ||||
| 	 * @param language|null $language Language into which to translate | ||||
| 	 * | ||||
| 	 * @return string Translated label of the language | ||||
| 	 */ | ||||
| 	public function label(?language $language = language::en): string | ||||
| 	{ | ||||
| 		// Exit (success) | ||||
| 		return match ($this) { | ||||
| 			language::en =>	match ($language) { | ||||
| 				language::en => 'English', | ||||
| 				language::ru => 'Английский' | ||||
| 			}, | ||||
| 			language::ru => match ($language) { | ||||
| 				language::en => 'Russian', | ||||
| 				language::ru => 'Русский' | ||||
| 			} | ||||
| 		}; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
|    * Flag | ||||
|    * | ||||
| 	 * Initialize the flag emoji of the language | ||||
| 	 * | ||||
| 	 * @return string The flag emoji of the language | ||||
| 	 */ | ||||
| 	public function flag(): string | ||||
| 	{ | ||||
| 		// Exit (success) | ||||
| 		return match ($this) { | ||||
| 			language::en => '🇺🇸', | ||||
| 			language::ru => '🇷🇺'		 | ||||
| 		}; | ||||
| 	} | ||||
| } | ||||
| @@ -18,7 +18,6 @@ use exception; | ||||
|  * | ||||
|  * @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License | ||||
|  * @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy> | ||||
|  * @author ${REPO_OWNER} <mail@domain.zone> | ||||
|  */ | ||||
| trait files | ||||
| { | ||||
|   | ||||
| @@ -34,6 +34,9 @@ define('STORAGE', INDEX . DIRECTORY_SEPARATOR	. '..' . DIRECTORY_SEPARATOR . 'st | ||||
| // Initializing path to the databases directory | ||||
| define('DATABASES', INDEX . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'databases'); | ||||
|  | ||||
| // Initializing path to the localizations directory | ||||
| define('LOCALIZATIONS', INDEX . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'localizations'); | ||||
|  | ||||
| // Initializing dependencies | ||||
| require ROOT . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; | ||||
|  | ||||
|   | ||||
| @@ -1,4 +1,7 @@ | ||||
| @charset "UTF-8"; | ||||
|  | ||||
| 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"; | ||||
|  | ||||
| footer { | ||||
|     &:not(:has(*)) { | ||||
|         display: none; | ||||
|     } | ||||
| } | ||||
| @@ -1,4 +1,7 @@ | ||||
| @charset "UTF-8"; | ||||
|  | ||||
| header { | ||||
|     &:not(:has(*)) { | ||||
|         display: none; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,6 +1,11 @@ | ||||
| @charset "UTF-8"; | ||||
|  | ||||
| body { | ||||
| 	margin: unset; | ||||
| } | ||||
|  | ||||
| main { | ||||
| 	flex-grow: 1; | ||||
| 	display: flex; | ||||
| 	flex-direction: column; | ||||
| 	align-items: center; | ||||
|   | ||||
| @@ -1,8 +0,0 @@ | ||||
| <?php | ||||
|  | ||||
| return [ | ||||
|     'endpoint' => 'unix:///var/run/arangodb3/arango.sock', | ||||
|     'database' => '${REPO_NAME}', | ||||
|     'name' => '${REPO_NAME}', | ||||
|     'password' => '' | ||||
| ]; | ||||
| @@ -4,8 +4,8 @@ declare(strict_types=1); | ||||
|  | ||||
| namespace ${REPO_OWNER}\${REPO_NAME}\views; | ||||
|  | ||||
| // Files of the project | ||||
| use ${REPO_OWNER}\${REPO_NAME}\models\enumerations\language; | ||||
| // Library for languages support | ||||
| use mirzaev\languages\language; | ||||
|  | ||||
| // Framework for PHP | ||||
| use mirzaev\minimal\controller; | ||||
| @@ -34,7 +34,6 @@ use ArrayAccess as array_access, | ||||
|  * | ||||
|  * @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License | ||||
|  * @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy> | ||||
|  * @author ${REPO_OWNER} <mail@domain.zone> | ||||
|  */ | ||||
| final class templater extends controller implements array_access | ||||
| { | ||||
|   | ||||
| @@ -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/main.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/themes/default/colors.css" /> | ||||
| <link type="text/css" rel="stylesheet" href="/themes/default/css/footer.css" /> | ||||
| <style id="theme"> | ||||
|     @import url('/themes/default/css/themes/default/colorscheme.css'); | ||||
| </style> | ||||
| {% endblock %} | ||||
|   | ||||
| @@ -5,24 +5,27 @@ | ||||
| {% use "/themes/default/footer.html" with css as footer_css, body as footer, js as footer_js %} | ||||
|  | ||||
| {% block css %} | ||||
| {{ block('header_css') }} | ||||
| {{ block('aside_css') }} | ||||
| {{ block('footer_css') }} | ||||
|         {{ block('header_css') }} | ||||
|         {{ block('aside_css') }} | ||||
|         {{ block('footer_css') }} | ||||
| {% endblock %} | ||||
|  | ||||
| {% block body %} | ||||
| {{ block('header') }} | ||||
| {{ block('aside') }} | ||||
| <main> | ||||
| 	{% block main %} | ||||
| 	{{ main|raw }} | ||||
| 	{% endblock %} | ||||
| </main> | ||||
| {{ block('footer') }} | ||||
|         {{ block('header') }} | ||||
|  | ||||
|         {{ block('aside') }} | ||||
|  | ||||
|         <main> | ||||
|                 {% block main %} | ||||
|                 {{ main|raw }} | ||||
|                 {% endblock %} | ||||
|         </main> | ||||
|  | ||||
|         {{ block('footer') }} | ||||
| {% endblock %} | ||||
|  | ||||
| {% block js %} | ||||
| {{ block('footer_js') }} | ||||
| {{ block('header_js') }} | ||||
| {{ block('aside_js') }} | ||||
|         {{ block('header_js') }} | ||||
|         {{ block('aside_js') }} | ||||
|         {{ block('footer_js') }} | ||||
| {% endblock %} | ||||
|   | ||||
| @@ -23,9 +23,11 @@ | ||||
| 	}, | ||||
| 	"require": { | ||||
| 		"php": "^8.4", | ||||
| 		"mirzaev/minimal": "^3.4", | ||||
| 		"mirzaev/minimal": "^3.7", | ||||
| 		"mirzaev/baza": "^3.3",		 | ||||
| 		"twig/twig": "^3.10", | ||||
| 		"mirzaev/languages": "^1",		 | ||||
| 		"mirzaev/currencies": "^1",		 | ||||
| 		"twig/twig": "^3.2", | ||||
| 		"twig/extra-bundle": "^3.7", | ||||
| 		"twig/intl-extra": "^3.10" | ||||
| 	}, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user