commit 26127bf736b4d2798f62d488c2bc5d52ed45b7fd Author: Claude Date: Fri Jul 3 15:34:10 2026 -0300 Baseline: plugin butterfly v2.1.0 como recebido (pré-fixes GLPI 11) Estado original vindo do servidor de origem via tar.gz, antes da rodada de conformidade com a knowledge-base e fixes de GLPI 11. Co-Authored-By: Claude Fable 5 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ce5ed85 --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# Dependências +vendor/ +node_modules/ + +# macOS +.DS_Store +**/.DS_Store + +# IDE +.idea/ +.vscode/ + +# Logs +*.log + +# Build artifacts +*.zip +*.tar.gz + +# Arquivos de teste (não publicar) +front/test*.php +ajax/test*.php diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..d23e014 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# Butterfly for GLPI >= 10.0 (Compatible with GLPI 11.x) + +Allow customization of logos, background and custom CSSs + +# Installation + * Uncompress the archive to the `/plugins/butterfly` directory + * Navigate to the Configuration > Plugins page, + * Install and activate the plugin. diff --git a/RoboFile.php b/RoboFile.php new file mode 100644 index 0000000..a1df7cb --- /dev/null +++ b/RoboFile.php @@ -0,0 +1,199 @@ +files() + ->name('*.po') + ->in('locales'); + + $files = []; + foreach ($finder as $file) { + $files[] = str_replace('\\', '/', $file->getRelativePathname()); + } + + return $files; + } + + public function compile_locales() { + $files = $this->getLocaleFiles(); + + foreach ($files as $file) { + $lang = basename($file, ".po"); + + $this->taskExec('msgfmt')->args([ + "locales/$lang.po", + "-o", + "locales/$lang.mo", + ])->run(); + } + } + + public function update_locales() { + $finder = new Finder(); + $finder + ->files() + ->name('*.php') + ->in(__DIR__) + ->exclude([ + 'vendor' + ]) + ->sortByName(); + + if (!$finder->hasResults()) { + return false; + } + + $args = []; + + foreach ($finder as $file) { + $args[] = str_replace('\\', '/', $file->getRelativePathname()); + } + + $args[] = '-D'; + $args[] = '.'; + $args[] = '-o'; + $args[] = "locales/{$this->name}.pot"; + $args[] = '-L'; + $args[] = 'PHP'; + $args[] = '--add-comments=TRANS'; + $args[] = '--from-code=UTF-8'; + $args[] = '--force-po'; + $args[] = "--keyword={$this->locale_keywords}"; + $args[] = "--package-name={$this->name}"; + + if ($this->issues) { + $args[] = "--msgid-bugs-address={$this->issues}"; + } + + try { + $content = file_get_contents('setup.php'); + $name = 'PLUGIN_' . strtoupper($this->name) . '_VERSION'; + preg_match("/'$name',\s*'([\w\.]+)'/", $content, $matches); + $args[] = '--package-version=' . $matches[1]; + } catch (\Exception $ex) { + echo $ex->getMessage(); + } + + putenv("LANG=C"); + + $this->taskExec('xgettext')->args($args)->run(); + + $this->taskReplaceInFile("locales/{$this->name}.pot") + ->from('CHARSET') + ->to('UTF-8') + ->run(); + + $this->taskExec('msginit')->args([ + '--no-translator', + '-i', + "locales/{$this->name}.pot", + '-l', + 'en_GB.UTF8', + '-o', + 'locales/en_GB.po', + ])->run(); + + $files = $this->getLocaleFiles(); + + foreach ($files as $file) { + $lang = basename($file, ".po"); + + if ($lang === "en_GB") { + continue; + } + + $this->taskExec('msgmerge')->args([ + "--update", + "locales/$lang.po", + "locales/{$this->name}.pot", + "--lang=$lang", + "--backup=off", + ])->run(); + } + + $this->compile_locales(); + } + + public function build() { + $this->_remove(["$this->name.zip", "$this->name.tgz"]); + + $this->compile_locales(); + $this->compile_themes(); + + $tmpPath = $this->_tmpDir(); + + $exclude = glob(__DIR__ . '/.*'); + $exclude[] = 'plugin.xml'; + $exclude[] = 'screenshots'; + $exclude[] = 'tools'; + $exclude[] = 'vendor'; + $exclude[] = "$this->name.zip"; + $exclude[] = "$this->name.tgz"; + + $this->taskCopyDir([__DIR__ => $tmpPath]) + ->exclude($exclude) + ->run(); + + $composer_file = "$tmpPath/composer.json"; + if (file_exists($composer_file)) { + $hasDep = false; + try { + $data = json_decode(file_get_contents($composer_file), true); + $hasDep = isset($data['require']) && count($data['require']) > 0; + } catch (\Exception $ex) { + $hasDep = true; + } + + if ($hasDep) { + $this->taskComposerInstall() + ->workingDir($tmpPath) + ->noDev() + ->run(); + } + } + + $this->_remove("$tmpPath/composer.lock"); + + // Pack + $this->taskPack("$this->name.zip") + ->addDir($this->name, $tmpPath) + ->run(); + + $this->taskPack("$this->name.tgz") + ->addDir($this->name, $tmpPath) + ->run(); + } + + public function compile_themes() { + $finder = new Finder(); + $finder + ->files() + ->name('*.scss') + ->in('themes'); + + $files = []; + foreach ($finder as $file) { + $fullPath = $file->getPath(); + // var_dump($fullPath);die; + $fullPath .= '/' . $file->getFilenameWithoutExtension(); + $fullPath .= '.css'; + $files[$file->getRealPath()] = $fullPath; + } + + $this->taskScss($files)->run(); + } +} diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..08cafe9 --- /dev/null +++ b/composer.json @@ -0,0 +1,27 @@ +{ + "name": "rodolpholopes/glpi-butterfly", + "description": "Customize GLPI login branding with themes, logos, and CSS.", + "license": "GPL v2+", + "require-dev": { + "consolidation/robo": "^2.2", + "glpi-project/coding-standard": "^0.8", + "pear/archive_tar": "^1.4", + "phpcompatibility/php-compatibility": "^9.3", + "scssphp/scssphp": "^1.10", + "squizlabs/php_codesniffer": "^3.5" + }, + "scripts": { + "build": "robo build", + "lint": "phpcs", + "lint:fix": "phpcbf" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + }, + "platform": { + "php": "7.4.0" + }, + "sort-packages": true + } +} diff --git a/css/login.base.css b/css/login.base.css new file mode 100644 index 0000000..6f86054 --- /dev/null +++ b/css/login.base.css @@ -0,0 +1,11 @@ +#logo_login { + background: none; + margin: 0; + padding: 38px 0; + text-align: center; +} + +#logo_login img { + display: block; + margin: 0 auto; +} diff --git a/front/internal.css.php b/front/internal.css.php new file mode 100644 index 0000000..00f1121 --- /dev/null +++ b/front/internal.css.php @@ -0,0 +1,84 @@ +handleException($th); + } else { + // Fallback error logging + error_log('Butterfly Plugin SCSS Error: ' . $th->getMessage()); + } + } +} else if ($css_type === 'css') { + $css .= $css_custom; +} + +header('Content-Type: text/css'); + +$is_cacheable = !isset($_GET['debug']) && !isset($_GET['nocache']); +if ($is_cacheable) { + // Makes CSS cacheable by browsers and proxies + $max_age = WEEK_TIMESTAMP; + header_remove('Pragma'); + header('Cache-Control: public'); + header('Cache-Control: max-age=' . $max_age); + header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + $max_age)); +} + +echo $css; diff --git a/front/internal.js.php b/front/internal.js.php new file mode 100644 index 0000000..5dbd137 --- /dev/null +++ b/front/internal.js.php @@ -0,0 +1,90 @@ + + + PLUGIN_BUTTERFLY_VERSION, + ]); + } + + $loginCss = PluginButterflyScss::getLoginCSS($_GET['theme'] ?? null); + if (!empty($loginCss)) { + echo ""; + } + + ?> + + + + + + getEmpty(); + $config->fields = array_merge($config->fields, Config::getConfigurationValues('butterfly')); + + self::$_cache = $config->fields; + } + + if (isset(self::$_cache[$name]) && self::$_cache[$name] !== '') { + return self::$_cache[$name]; + } + return $defaultValue; + } + + function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { + switch (get_class($item)) { + case 'Config': + return [1 => t_butterfly('Butterfly')]; + default: + return ''; + } + } + + static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { + switch (get_class($item)) { + case 'Config': + $config = new self(); + $config->showFormDisplay(); + break; + } + return true; + } + + protected static function checkPicture($name, $input, $old, $width = 0, $height = 0, $max_size = 500) { + + $blank = "_blank_$name"; + $new = "_$name"; + + if (isset($input[$blank]) && $input[$blank]) { + unset($input[$blank]); + if (isset($old[$name]) && $old[$name]) { + PluginButterflyToolbox::deletePicture($old[$name]); + } + $input[$name] = ''; + } else if (isset($input[$new]) && !empty($input[$new]) && !empty($input[$new][0])) { + $picName = array_shift($input[$new]); + // Use GLPI temp directory if available, fallback to system temp + $glpiTmpConstant = 'GLPI_TMP_DIR'; + $tmpDir = (defined($glpiTmpConstant) && constant($glpiTmpConstant)) ? constant($glpiTmpConstant) : sys_get_temp_dir(); + $picPath = $tmpDir . '/' . $picName; + $picResizedPath = $tmpDir . '/resized_' . $picName; + + if ($width || $height) { + if (PluginButterflyToolbox::resizePicture($picPath, $picResizedPath, $width, $height, 0, 0, 0, 0, $max_size)) { + $picPath = $picResizedPath; + } + } + + if ($dest = PluginButterflyToolbox::savePicture($picPath)) { + $input[$name] = $dest; + } else { + Session::addMessageAfterRedirect(__('Unable to save picture file.'), true, ERROR); + } + + if (isset($old[$name]) && $old[$name]) { + PluginButterflyToolbox::deletePicture($old[$name]); + } + } + + unset($input["_$name"]); + unset($input["_prefix_$name"]); + unset($input["_prefix_new_$name"]); + unset($input["_tag_$name"]); + unset($input["_tag_new_$name"]); + unset($input["_uploader_$name"]); + unset($input["new_$name"]); + unset($input[$blank]); + unset($input[$new]); + + return $input; + } + + protected static function checkCSS($name, $label, $input, $old) { + $fullName = "{$name}_css_custom"; + $type = "{$name}_css_type"; + + if (!isset($input[$type])) { + $input[$type] = 'css'; + } + + if (isset($input[$fullName])) { + $input[$fullName] = html_entity_decode($input[$fullName]); + $input[$fullName] = preg_replace('/\\\\r\\\\n/', "\n", $input[$fullName]); + $input[$fullName] = preg_replace('/\\\\n/', "\n", $input[$fullName]); + + if ($input[$type] === 'scss' && PluginButterflyScss::hasScssSuport()) { + try { + $variables = []; + $variables['butterfly_timestamp'] = PluginButterflyToolbox::getTimestamp(); + + PluginButterflyScss::compileScss($input[$fullName], $variables); + } catch (\Throwable $th) { + $message = sprintf(t_butterfly('Unable to compile the SCSS (%1$s). Message: '), $label); + Session::addMessageAfterRedirect($message . $th->getMessage(), true, ERROR); + } + } + } + + return $input; + } + + static function configUpdate($input) { + $old = Config::getConfigurationValues('butterfly'); + + unset($input['_no_history']); + + $input = self::checkPicture('favicon_picture', $input, $old, 192, 192, 192); + $input = self::checkPicture('login_picture', $input, $old, 145, 80, 300); + $input = self::checkPicture('internal_picture', $input, $old, 100, 55, 300); + $input = self::checkPicture('login_background_picture', $input, $old); + + $input = self::checkCSS('login', t_butterfly('Login Page'), $input, $old); + $input = self::checkCSS('internal', t_butterfly('Internal Page'), $input, $old); + + foreach ($input as $key => $value) { + if ($value && strpos($key, '_blank_') === 0) { + $name = substr($key, 7); + $input[$name] = ''; + } + } + + $input['timestamp'] = time(); + + PluginButterflyToolbox::setTimestamp($input['timestamp']); + + Session::addMessageAfterRedirect(__('Item successfully updated'), false, INFO); + + return $input; + } + + function getEmpty() { + + $defaultCss = 'css'; + + if (PluginButterflyScss::hasScssSuport()) { + $defaultCss = 'scss'; + } + + $this->fields = [ + 'favicon_picture' => '', + 'page_title' => '', + 'page_footer_display' => 'original', + 'page_footer_text' => '', + 'login_picture' => '', + 'login_picture_max_width' => '240px', + 'login_picture_max_height' => '130px', + 'login_css_custom' => '', + 'login_css_type' => $defaultCss, + 'login_theme' => '', + 'internal_picture' => '', + 'internal_picture_width' => '100px', + 'internal_picture_height' => '55px', + 'internal_css_custom' => '', + 'internal_css_type' => $defaultCss, + ]; + } + + protected function buildPictureLine($name, $recommendedSize = null) { + if (!empty($this->fields[$name])) { + echo ''; + echo Html::image(PluginButterflyToolbox::getPictureUrl($this->fields[$name]), [ + 'style' => ' + max-width: 100px; + max-height: 100px; + background-image: linear-gradient(45deg, #b0b0b0 25%, transparent 25%), linear-gradient(-45deg, #b0b0b0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #b0b0b0 75%), linear-gradient(-45deg, transparent 75%, #b0b0b0 75%); + background-size: 10px 10px; + background-position: 0 0, 0 5px, 5px -5px, -5px 0px;', + 'class' => 'picture_square' + ]); + echo " "; + echo Html::getCheckbox([ + 'title' => t_butterfly('Reset'), + 'name' => "_blank_$name" + ]); + echo " " . t_butterfly('Reset'); + echo ''; + echo ''; + } else { + echo ''; + } + Html::file([ + 'name' => $name, + 'onlyimages' => true, + 'min_file_size' => 1, + ]); + if ($recommendedSize) { + echo ''; + echo sprintf(t_butterfly('Recommended size: %1$s'), $recommendedSize); + echo ''; + } + echo ''; + } + + protected function buildCssLine($name, $label) { + $fullName = "{$name}_css_custom"; + $type = "{$name}_css_type"; + + echo "" . sprintf(t_butterfly('Custom CSS for %1$s'), $label) . ""; + echo ""; + echo ""; + echo t_butterfly('CSS Type') . ':'; + echo ""; + echo ""; + + $css_type = [ + 'off' => __('Disabled'), + 'css' => 'CSS', + ]; + + if (PluginButterflyScss::hasScssSuport()) { + $css_type['scss'] = 'SCSS'; + } + Dropdown::showFromArray($type, $css_type, ['value' => $this->fields[$type]]); + echo ""; + echo ""; + echo ""; + echo ""; + $rand = mt_rand(); + + echo sprintf( + ''; + + echo Html::scriptBlock(' + $(function() { + var textarea = document.getElementById("' . $fullName . '_' . $rand . '"); + var editorCode = CodeMirror.fromTextArea(textarea, { + mode: "text/x-scss", + lineNumbers: true, + viewportMargin: Infinity, + extraKeys: { + "Ctrl-Space": "autocomplete" + }, + foldGutter: true, + gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"] + }); + $("#' . $fullName . '_' . $rand . '").data("CodeMirrorInstance", editorCode); + + // Fix bad display of gutter (see https://github.com/codemirror/CodeMirror/issues/3098 ) + setTimeout(function () {editorCode.refresh();}, ' . (500 + self::$_i++ * 100) . '); + }); + '); + echo ""; + echo "\n"; + } + + /** + * Print the config form for display + * + * @return Nothing (display) + * */ + function showFormDisplay() { + global $CFG_GLPI; + if (!Config::canView()) { + return false; + } + + $this->getEmpty(); + + $this->fields = array_merge($this->fields, Config::getConfigurationValues('butterfly')); + + $canedit = Session::haveRight(Config::$rightname, UPDATE); + if ($canedit) { + echo "
"; + } + echo Html::hidden('config_context', ['value' => 'butterfly']); + echo Html::hidden('config_class', ['value' => __CLASS__]); + + echo "
"; + + $rand = mt_rand(); + echo ""; + + // echo "
"; + // echo ""; + + // General + echo "
"; + echo ""; + + echo ""; + echo ""; + echo ""; + $this->buildPictureLine('favicon_picture', '192px x 192px'); + echo "\n"; + + echo ""; + echo ""; + echo ""; + echo "\n"; + + echo ""; + echo ""; + echo ""; + echo "\n"; + + echo ""; + echo ""; + echo "\n"; + + echo "
" . t_butterfly('Favicon and Title') . "
" . __('Picture') . "
" . __('Title') . ""; + echo sprintf( + '', + Html::parseAttributes([ + 'name' => 'page_title', + 'value' => $this->fields['page_title'], + 'style' => 'width: 98%', + ]) + ); + echo "
" . t_butterfly('Footer') . ""; + Dropdown::showFromArray('page_footer_display', [ + 'original' => __('Original'), + 'hide' => t_butterfly('Hide'), + 'custom' => t_butterfly('Custom'), + ], ['value' => $this->fields['page_footer_display']]); + echo "
" . t_butterfly('Footer text') . ""; + Html::textarea([ + 'rand' => $rand, + 'editor_id' => 'text' . $rand, + 'name' => 'page_footer_text', + 'value' => $this->fields['page_footer_text'], + 'style' => 'width: 98%', + 'rows' => 1, + 'enable_richtext' => true, + 'enable_fileupload' => false, + 'enable_images' => false, + ]); + ?> + + "; + echo "
"; + echo "
"; + + // Login + echo "
"; + echo ""; + + echo ""; + echo ""; + echo ""; + echo "\n"; + + $themeInfo = PluginButterflyTheme::getThemeInfo($this->fields['login_theme']); + if ($themeInfo && isset($themeInfo['variables'])) { + foreach ($themeInfo['variables'] as $k => $v) { + $themeId = $themeInfo['id']; + $fieldName = "login_theme-$themeId-$k"; + $fieldValue = $v['default']; + if (isset($this->fields[$fieldName]) && $this->fields[$fieldName]) { + $fieldValue = $this->fields[$fieldName]; + } + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + } + } + + echo ""; + echo ""; + $this->buildPictureLine('login_picture', '145px x 80px'); + echo "\n"; + + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + + echo ""; + echo ""; + $this->buildPictureLine('login_background_picture', '1920px x 1080px'); + echo "\n"; + + // Custom CSS Login + $this->buildCssLine('login', t_butterfly('Login Page')); + echo "
" . t_butterfly('Login Page') . "
" . t_butterfly('Theme') . ""; + echo sprintf( + ''; + ?> + + "; + echo ""; + echo '' . __('Preview') . ''; + ?> + + "; + echo "
" . t_butterfly($v['name']) . ""; + Html::showColorField($fieldName, [ + 'value' => $fieldValue + ]); + echo " "; + echo Html::getCheckbox([ + 'title' => t_butterfly('Reset'), + 'name' => "_blank_$fieldName" + ]); + echo " " . t_butterfly('Reset'); + echo "
" . __('Picture') . "
" . __('Width') . ""; + echo sprintf( + '', + Html::parseAttributes([ + 'name' => 'login_picture_max_width', + 'value' => $this->fields['login_picture_max_width'], + ]) + ); + echo "" . __('Height') . ""; + echo sprintf( + '', + Html::parseAttributes([ + 'name' => 'login_picture_max_height', + 'value' => $this->fields['login_picture_max_height'], + ]) + ); + echo "
" . t_butterfly('Background picture') . "
"; + echo "
"; + + // Internal Page + echo "
"; + echo ""; + + echo ""; + echo ""; + echo ""; + $this->buildPictureLine('internal_picture', '100px x 55px'); + echo "\n"; + + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + + // Custom CSS Internal + $this->buildCssLine('internal', t_butterfly('Internal Page')); + echo "
" . t_butterfly('Internal Page') . "
" . __('Picture') . "
" . __('Width') . ""; + echo sprintf( + '', + Html::parseAttributes([ + 'name' => 'internal_picture_width', + 'value' => $this->fields['internal_picture_width'], + ]) + ); + echo "" . __('Height') . ""; + echo sprintf( + '', + Html::parseAttributes([ + 'name' => 'internal_picture_height', + 'value' => $this->fields['internal_picture_height'], + ]) + ); + echo "
"; + echo "
"; + + // echo "
"; + + echo Html::scriptBlock("$('#tabs$rand').tabs({ + activate: function(event, ui) { + localStorage['butterfly_last_tab'] = $('#tabs$rand').tabs('option', 'active'); + var editor = ui.newPanel.find('.butterfly-codemirror').data('CodeMirrorInstance'); + if (editor) { + editor.refresh(); + } + }, + active: localStorage['butterfly_last_tab'] + });"); + + if ($canedit) { + echo ""; + echo ""; + echo ""; + echo "
"; + echo ""; + echo "
"; + } + + Html::closeForm(); + } +} diff --git a/inc/fileversion.class.php b/inc/fileversion.class.php new file mode 100644 index 0000000..c4a694c --- /dev/null +++ b/inc/fileversion.class.php @@ -0,0 +1,25 @@ +_file = $file; + } + + public function __toString() { + // First call is inside of "file_exists", so it is necessary to return a valid file + if (!$this->_initialized) { + $this->_initialized = true; + return $this->_file; + } + + // Second call is inside concatenation + + $timestamp = PluginButterflyToolbox::getTimestamp(); + + return $this->_file . "?_=" . $timestamp; + } +} diff --git a/inc/scss.class.php b/inc/scss.class.php new file mode 100644 index 0000000..c8e845c --- /dev/null +++ b/inc/scss.class.php @@ -0,0 +1,193 @@ +setOutputStyle(\ScssPhp\ScssPhp\OutputStyle::COMPRESSED); + $scss->setSourceMap(\ScssPhp\ScssPhp\Compiler::SOURCE_MAP_NONE); + + // Convert variables using ValueConverter + if (!empty($variables)) { + $convertedVariables = []; + foreach ($variables as $key => $value) { + $convertedVariables[$key] = \ScssPhp\ScssPhp\ValueConverter::fromPhp($value); + } + $scss->addVariables($convertedVariables); + } + + $scss->addImportPath(GLPI_ROOT); + + $scss->addImportPath( + function ($path) { + $file_chunks = []; + if (!preg_match('/^~@?(?.*)\/(?[^\/]+)(?:(\.scss)?)/', $path, $file_chunks)) { + return null; + } + + $possible_filenames = [ + sprintf('%s/css/lib/%s/%s.scss', GLPI_ROOT, $file_chunks['directory'], $file_chunks['file']), + sprintf('%s/css/lib/%s/_%s.scss', GLPI_ROOT, $file_chunks['directory'], $file_chunks['file']), + ]; + foreach ($possible_filenames as $filename) { + if (file_exists($filename)) { + return $filename; + } + } + + return null; + } + ); + + $content = str_replace('\"', '"', $content); + + $ckey = md5($content . json_encode($variables)); + + if ($GLPI_CACHE->has($ckey) && !isset($_GET['reload']) && !isset($_GET['nocache'])) { + $css = $GLPI_CACHE->get($ckey); + } else { + $css = $scss->compileString($content, GLPI_ROOT . '/butterfly.scss')->getCss(); + if (!isset($_GET['nocache'])) { + $GLPI_CACHE->set($ckey, $css); + } + } + + return $css; + } + + static function getLoginCSS($theme = null, $variables = []) { + if (!$theme) { + $theme = PluginButterflyConfig::getConfig("login_theme", ''); + } + $themeInfo = null; + if ($theme) { + $themeInfo = PluginButterflyTheme::getThemeInfo($theme); + } + + $picture = PluginButterflyConfig::getConfig("login_background_picture", ''); + + if (!$picture && $themeInfo && !empty($themeInfo['login-background'])) { + $picture = $themeInfo['login-background'] . '&theme=' . $themeInfo['id']; + } + + $css = ''; + if ($picture) { + $pictureUrl = PluginButterflyToolbox::getPictureUrl($picture); + + $css .= "#firstboxlogin, #text-login, #logo_login, .login-container, .login-card, .glpi-login__wrapper, .main-content-card {"; + $css .= " background-color: transparent !important;"; + $css .= "}"; + $css .= "html, body {"; + $css .= " height: 100%;"; + $css .= "}"; + $css .= "body, body.login-page, body.welcome-anonymous {"; + $css .= " background-size: cover;"; + $css .= " background-repeat: no-repeat;"; + $css .= " background-position: center;"; + $css .= " background-image: url(\"" . $pictureUrl . "\");"; + $css .= "}"; + $css .= ".login-page__container::before, .login-page__illustration, .welcome-layout__background {"; + $css .= " background-image: none !important;"; + $css .= "}"; + } + + $css_type = PluginButterflyConfig::getConfig("login_css_type", 'scss'); + $css_custom = PluginButterflyConfig::getConfig("login_css_custom", ''); + + $themeVariables = []; + + $css_custom = html_entity_decode($css_custom); + + if ($css_type === 'scss' && PluginButterflyScss::hasScssSuport()) { + $variables = []; + if ($themeInfo && isset($themeInfo['variables'])) { + foreach ($themeInfo['variables'] as $k => $v) { + $themeId = $themeInfo['id']; + $fieldName = "login_theme-$themeId-$k"; + $fieldValue = PluginButterflyConfig::getConfig($fieldName, $v['default']); + $variables[$k] = $fieldValue; + $themeVariables[$k] = $fieldValue; + } + } + + if ($themeInfo && $themeInfo['login-scss']) { + $scssPath = str_replace('\\', '/', $themeInfo['path'] . '/' . $themeInfo['login-scss']); + $css_custom = "@import '" . $scssPath . "';\n" . $css_custom; + } + + $variables['butterfly_timestamp'] = PluginButterflyToolbox::getTimestamp(); + + try { + $css .= PluginButterflyScss::compileScss($css_custom, $variables); + } catch (\Throwable $th) { + // Log error and continue with basic CSS + error_log("SCSS compilation error: " . $th->getMessage()); + } + } else { + if ($themeInfo && $themeInfo['login-css']) { + $css .= file_get_contents($themeInfo['path'] . '/' . $themeInfo['login-css']) . "\n"; + } + + if ($css_type === 'css') { + $css .= $css_custom; + } + + if ($themeInfo && isset($themeInfo['variables'])) { + foreach ($themeInfo['variables'] as $k => $v) { + $themeId = $themeInfo['id']; + $fieldName = "login_theme-$themeId-$k"; + $fieldValue = PluginButterflyConfig::getConfig($fieldName, $v['default']); + $themeVariables[$k] = $fieldValue; + } + } + } + + $cardBg = null; + + if (!empty($themeVariables)) { + $btnBg = $themeVariables['btn-background-color'] ?? null; + $btnFg = $themeVariables['btn-foreground-color'] ?? null; + if (isset($themeVariables['card-background-color']) && $themeVariables['card-background-color'] !== '') { + $cardBg = Html::cleanInputText($themeVariables['card-background-color']); + } + + if ($btnBg) { + $btnBg = Html::cleanInputText($btnBg); + $css .= ".form-footer .btn.btn-primary, .form-footer .btn-primary.w-100, .glpi-login__wrapper .btn.btn-primary {"; + $css .= " background-color: {$btnBg} !important;"; + $css .= " border-color: {$btnBg} !important;"; + $css .= "}"; + $css .= ".form-footer .btn.btn-primary:hover, .glpi-login__wrapper .btn.btn-primary:hover {"; + $css .= " filter: brightness(0.9);"; + $css .= "}"; + } + if ($btnFg) { + $btnFg = Html::cleanInputText($btnFg); + $css .= ".form-footer .btn.btn-primary, .glpi-login__wrapper .btn.btn-primary {"; + $css .= " color: {$btnFg} !important;"; + $css .= "}"; + } + if ($cardBg) { + $css .= ".page-anonymous .main-content-card {"; + $css .= " background-color: {$cardBg} !important;"; + $css .= "}"; + } + } + + if (!$cardBg && ($themeInfo || $picture)) { + $css .= ".page-anonymous .main-content-card {"; + $css .= " background-color: transparent !important;"; + $css .= " border: 0;"; + $css .= " box-shadow: none;"; + $css .= "}"; + } + + return $css; + } +} diff --git a/inc/theme.class.php b/inc/theme.class.php new file mode 100644 index 0000000..bdfba5f --- /dev/null +++ b/inc/theme.class.php @@ -0,0 +1,78 @@ +get('butterfly_timestamp'); + if (!$timestamp) { + $timestamp = time(); + $GLPI_CACHE->set('butterfly_timestamp', $timestamp); + } + return $timestamp; + } + + static public function setTimestamp($timestamp = null) { + global $GLPI_CACHE; + + if (!$timestamp) { + $timestamp = time(); + } + + if (!$GLPI_CACHE) { + Config::setConfigurationValues('butterfly', [ + 'timestamp' => $timestamp, + ]); + return; + } + + $GLPI_CACHE->set('butterfly_timestamp', $timestamp); + } + + static public function startsWith($haystack, $needle) { + $length = strlen($needle); + return (substr($haystack, 0, $length) === $needle); + } + + static function getPictureUrl($path) { + $rawPath = trim((string)$path); + + if ($rawPath === '') { + return null; + } + + // If the value already looks like an URL just return it untouched + if (preg_match('#^(https?:)?//#', $rawPath)) { + return $rawPath; + } + + if (strpos($rawPath, '.php?') !== false) { + $normalized = (strpos($rawPath, '/') === 0) ? $rawPath : '/' . $rawPath; + return Html::getPrefixedUrl($normalized); + } + + $endpoint = '/plugins/butterfly/front/picture.send.php'; + + // Check if this is a theme image (contains &theme= parameter) + if (strpos($rawPath, '&theme=') !== false) { + [$filePath, $theme] = explode('&theme=', $rawPath, 2); + $filePath = trim($filePath); + $theme = trim($theme); + + if ($filePath !== '' && $theme !== '') { + return Html::getPrefixedUrl( + $endpoint . '?path=' . rawurlencode($filePath) . '&theme=' . rawurlencode($theme) + ); + } + } + + return Html::getPrefixedUrl($endpoint . '?path=' . rawurlencode($rawPath)); + } + + public static function getStorageBasePath() { + if (defined('GLPI_PLUGIN_DOC_DIR')) { + return rtrim(constant('GLPI_PLUGIN_DOC_DIR'), '/') . "/butterfly"; + } + if (defined('GLPI_VAR_DIR')) { + return rtrim(constant('GLPI_VAR_DIR'), '/') . "/_plugins/butterfly"; + } + + return dirname(dirname(dirname(__DIR__))) . "/glpi_data/_plugins/butterfly"; + } + + static public function savePicture($src, $uniq_prefix = null) { + $basePath = static::getStorageBasePath(); + + if (class_exists('Document') && method_exists('Document', 'isPicture') && !Document::isPicture($src)) { + return false; + } + + $filename = uniqid($uniq_prefix); + $ext = pathinfo($src, PATHINFO_EXTENSION); + $subdirectory = substr($filename, -2); // subdirectory based on last 2 hex digit + + $i = 0; + do { + // Iterate on possible suffix while dest exists. + // This case will almost never exists as dest is based on an unique id. + $dest = $basePath + . '/' . $subdirectory + . '/' . $filename . ($i > 0 ? '_' . $i : '') . '.' . $ext; + $i++; + } while (file_exists($dest)); + + if (!is_dir($basePath . '/' . $subdirectory) && !mkdir($basePath . '/' . $subdirectory, 0777, true)) { + return false; + } + + if (!rename($src, $dest)) { + return false; + } + + return substr($dest, strlen($basePath . '/')); // Return dest relative to GLPI_PICTURE_DIR + } + + public static function deletePicture($path) { + $basePath = static::getStorageBasePath(); + $fullpath = $basePath . '/' . $path; + + if (!file_exists($fullpath)) { + return false; + } + + $fullpath = realpath($fullpath); + if (!static::startsWith($fullpath, realpath($basePath))) { + return false; + } + + return @unlink($fullpath); + } + + /** + * Resize a picture to the new size + * Always produce a JPG file! + * + * @since 0.85 + * + * @param string $source_path path of the picture to be resized + * @param string $dest_path path of the new resized picture + * @param integer $new_width new width after resized (default 71) + * @param integer $new_height new height after resized (default 71) + * @param integer $img_y y axis of picture (default 0) + * @param integer $img_x x axis of picture (default 0) + * @param integer $img_width width of picture (default 0) + * @param integer $img_height height of picture (default 0) + * @param integer $max_size max size of the picture (default 500, is set to 0 no resize) + * + * @return boolean + **/ + static function resizePicture( + $source_path, + $dest_path, + $new_width = 71, + $new_height = 71, + $img_y = 0, + $img_x = 0, + $img_width = 0, + $img_height = 0, + $max_size = 500 + ) { + + //get img informations (dimensions and extension) + $img_infos = getimagesize($source_path); + if (empty($img_width)) { + $img_width = $img_infos[0]; + } + if (empty($img_height)) { + $img_height = $img_infos[1]; + } + if (empty($new_width)) { + $new_width = $img_infos[0]; + } + if (empty($new_height)) { + $new_height = $img_infos[1]; + } + + // Image max size is 500 pixels : is set to 0 no resize + if ($max_size > 0) { + if (($img_width > $max_size) + || ($img_height > $max_size) + ) { + $source_aspect_ratio = $img_width / $img_height; + if ($source_aspect_ratio < 1) { + $new_width = $max_size * $source_aspect_ratio; + $new_height = $max_size; + } else { + $new_width = $max_size; + $new_height = $max_size / $source_aspect_ratio; + } + } + } + + $img_type = $img_infos[2]; + + switch ($img_type) { + case IMAGETYPE_BMP: + $source_res = imagecreatefromwbmp($source_path); + break; + + case IMAGETYPE_GIF: + $source_res = imagecreatefromgif($source_path); + break; + + case IMAGETYPE_JPEG: + $source_res = imagecreatefromjpeg($source_path); + break; + + case IMAGETYPE_PNG: + $source_res = imagecreatefrompng($source_path); + break; + + default: + return false; + } + + //create new img resource for store thumbnail + $source_dest = imagecreatetruecolor($new_width, $new_height); + + // set transparent background for PNG/GIF + if ($img_type === IMAGETYPE_GIF || $img_type === IMAGETYPE_PNG) { + imagecolortransparent($source_dest, imagecolorallocatealpha($source_dest, 0, 0, 0, 127)); + imagealphablending($source_dest, false); + imagesavealpha($source_dest, true); + } + + //resize image + imagecopyresampled( + $source_dest, + $source_res, + 0, + 0, + $img_x, + $img_y, + $new_width, + $new_height, + $img_width, + $img_height + ); + + //output img + $result = null; + switch ($img_type) { + case IMAGETYPE_GIF: + case IMAGETYPE_PNG: + $result = imagepng($source_dest, $dest_path); + break; + + case IMAGETYPE_JPEG: + default: + $result = imagejpeg($source_dest, $dest_path, 90); + break; + } + return $result; + } +} diff --git a/locales/butterfly.pot b/locales/butterfly.pot new file mode 100644 index 0000000..f400158 --- /dev/null +++ b/locales/butterfly.pot @@ -0,0 +1,82 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the butterfly package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Butterfly\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-02-17 13:42-0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: inc/config.class.php:27 setup.php:53 +msgid "Butterfly" +msgstr "" + +#: inc/config.class.php:105 +#, php-format +msgid "Unable to compile the SCSS (%1$s). Message: " +msgstr "" + +#: inc/config.class.php:124 inc/config.class.php:338 inc/config.class.php:545 +msgid "Login Page" +msgstr "" + +#: inc/config.class.php:125 inc/config.class.php:339 inc/config.class.php:582 +msgid "Internal Page" +msgstr "" + +#: inc/config.class.php:184 inc/config.class.php:187 inc/config.class.php:500 +#: inc/config.class.php:503 +msgid "Reset" +msgstr "" + +#: inc/config.class.php:199 +#, php-format +msgid "Recommended size: %1$s" +msgstr "" + +#: inc/config.class.php:209 +#, php-format +msgid "Custom CSS for %1$s" +msgstr "" + +#: inc/config.class.php:212 +msgid "CSS Type" +msgstr "" + +#: inc/config.class.php:337 +msgid "Favicon and Title" +msgstr "" + +#: inc/config.class.php:366 +msgid "Footer" +msgstr "" + +#: inc/config.class.php:370 +msgid "Hide" +msgstr "" + +#: inc/config.class.php:371 +msgid "Custom" +msgstr "" + +#: inc/config.class.php:377 +msgid "Footer text" +msgstr "" + +#: inc/config.class.php:409 +msgid "Theme" +msgstr "" + +#: inc/config.class.php:540 +msgid "Background picture" +msgstr "" diff --git a/locales/en_GB.mo b/locales/en_GB.mo new file mode 100644 index 0000000..dfd79f3 Binary files /dev/null and b/locales/en_GB.mo differ diff --git a/locales/en_GB.po b/locales/en_GB.po new file mode 100644 index 0000000..1353cd6 --- /dev/null +++ b/locales/en_GB.po @@ -0,0 +1,82 @@ +# English translations for butterfly package. +# Copyright (C) 2021 THE butterfly'S COPYRIGHT HOLDER +# This file is distributed under the same license as the butterfly package. +# Automatically generated, 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: Butterfly\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-02-17 13:42-0300\n" +"PO-Revision-Date: 2021-02-17 13:42-0300\n" +"Last-Translator: Automatically generated\n" +"Language-Team: \n" +"Language: en_GB\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: inc/config.class.php:27 setup.php:53 +msgid "Butterfly" +msgstr "Butterfly" + +#: inc/config.class.php:105 +#, php-format +msgid "Unable to compile the SCSS (%1$s). Message: " +msgstr "Unable to compile the SCSS (%1$s). Message: " + +#: inc/config.class.php:124 inc/config.class.php:338 inc/config.class.php:545 +msgid "Login Page" +msgstr "Login Page" + +#: inc/config.class.php:125 inc/config.class.php:339 inc/config.class.php:582 +msgid "Internal Page" +msgstr "Internal Page" + +#: inc/config.class.php:184 inc/config.class.php:187 inc/config.class.php:500 +#: inc/config.class.php:503 +msgid "Reset" +msgstr "Reset" + +#: inc/config.class.php:199 +#, php-format +msgid "Recommended size: %1$s" +msgstr "Recommended size: %1$s" + +#: inc/config.class.php:209 +#, php-format +msgid "Custom CSS for %1$s" +msgstr "Custom CSS for %1$s" + +#: inc/config.class.php:212 +msgid "CSS Type" +msgstr "CSS Type" + +#: inc/config.class.php:337 +msgid "Favicon and Title" +msgstr "Favicon and Title" + +#: inc/config.class.php:366 +msgid "Footer" +msgstr "Footer" + +#: inc/config.class.php:370 +msgid "Hide" +msgstr "Hide" + +#: inc/config.class.php:371 +msgid "Custom" +msgstr "Custom" + +#: inc/config.class.php:377 +msgid "Footer text" +msgstr "Footer text" + +#: inc/config.class.php:409 +msgid "Theme" +msgstr "Theme" + +#: inc/config.class.php:540 +msgid "Background picture" +msgstr "Background picture" diff --git a/locales/pt_BR.mo b/locales/pt_BR.mo new file mode 100644 index 0000000..c158736 Binary files /dev/null and b/locales/pt_BR.mo differ diff --git a/locales/pt_BR.po b/locales/pt_BR.po new file mode 100644 index 0000000..777a69e --- /dev/null +++ b/locales/pt_BR.po @@ -0,0 +1,82 @@ +# Tradução em português para o pacote butterfly. +# Copyright (C) 2021 THE butterfly'S COPYRIGHT HOLDER +# This file is distributed under the same license as the butterfly package. +# Automatically generated, 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: Butterfly\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-02-17 13:42-0300\n" +"PO-Revision-Date: 2021-01-30 16:27-0300\n" +"Last-Translator: Automatically generated\n" +"Language-Team: \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: inc/config.class.php:27 setup.php:53 +msgid "Butterfly" +msgstr "Butterfly" + +#: inc/config.class.php:105 +#, php-format +msgid "Unable to compile the SCSS (%1$s). Message: " +msgstr "Incapaz de compilar o SCSS (%1$s). Mensagem: " + +#: inc/config.class.php:124 inc/config.class.php:338 inc/config.class.php:545 +msgid "Login Page" +msgstr "Página de Login" + +#: inc/config.class.php:125 inc/config.class.php:339 inc/config.class.php:582 +msgid "Internal Page" +msgstr "Página Interna" + +#: inc/config.class.php:184 inc/config.class.php:187 inc/config.class.php:500 +#: inc/config.class.php:503 +msgid "Reset" +msgstr "Redefinir" + +#: inc/config.class.php:199 +#, php-format +msgid "Recommended size: %1$s" +msgstr "Tamanho recomendado: %1$s" + +#: inc/config.class.php:209 +#, php-format +msgid "Custom CSS for %1$s" +msgstr "CSS personalizado para %1$s" + +#: inc/config.class.php:212 +msgid "CSS Type" +msgstr "Tipo de CSS" + +#: inc/config.class.php:337 +msgid "Favicon and Title" +msgstr "Favicon e Título" + +#: inc/config.class.php:366 +msgid "Footer" +msgstr "Rodapé" + +#: inc/config.class.php:370 +msgid "Hide" +msgstr "Ocultar" + +#: inc/config.class.php:371 +msgid "Custom" +msgstr "Personalizado" + +#: inc/config.class.php:377 +msgid "Footer text" +msgstr "Texto do rodapé" + +#: inc/config.class.php:409 +msgid "Theme" +msgstr "Tema" + +#: inc/config.class.php:540 +msgid "Background picture" +msgstr "Imagem de fundo" diff --git a/pics/login.preview.png b/pics/login.preview.png new file mode 100644 index 0000000..7d02321 Binary files /dev/null and b/pics/login.preview.png differ diff --git a/plugin.png b/plugin.png new file mode 100644 index 0000000..faeb566 Binary files /dev/null and b/plugin.png differ diff --git a/public/themes/aurora-boreal/login.background.jpg b/public/themes/aurora-boreal/login.background.jpg new file mode 100644 index 0000000..6aea8c1 Binary files /dev/null and b/public/themes/aurora-boreal/login.background.jpg differ diff --git a/public/themes/aurora-boreal/login.css b/public/themes/aurora-boreal/login.css new file mode 100644 index 0000000..35be142 --- /dev/null +++ b/public/themes/aurora-boreal/login.css @@ -0,0 +1,108 @@ +@charset "UTF-8"; +/*Tema 7 - Aurora Boreal*/ +body .card { + border: 0; + background: transparent; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 525px; + background: transparent; + margin: 0px auto !important; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + min-height: 711px; + width: 525px; + background: transparent; + border-radius: 0; + box-shadow: 0 4px 30pxrgba 0, 0, 0, 0.1; + -webkit-backdrop-filter: blur(5px); + border: 1pxsolidrgba 255, 255, 255, 0.3; + margin: 0px auto !important; + height: 100% !important; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +body .form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #1b5ca3c2; + outline: 0; + box-shadow: 0 0 0 0.25rem #1b5ca3c2; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +body .form-control { + display: block; + width: 100%; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 1px solid #d9dbde; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +button.btn.btn-primary.w-100 { + background: transparent; + color: #ffffff; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; +} +label.form-label { + color: #fff; +} +a { + color: #73fff9 !important; + text-decoration: none; +} +label.form-label { + display: none; + color: #fff; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} diff --git a/public/themes/aurora-boreal/login.logo.png b/public/themes/aurora-boreal/login.logo.png new file mode 100644 index 0000000..31324fb Binary files /dev/null and b/public/themes/aurora-boreal/login.logo.png differ diff --git a/public/themes/aurora-boreal/login.preview.jpg b/public/themes/aurora-boreal/login.preview.jpg new file mode 100644 index 0000000..b6311b1 Binary files /dev/null and b/public/themes/aurora-boreal/login.preview.jpg differ diff --git a/public/themes/aurora-boreal/login.scss b/public/themes/aurora-boreal/login.scss new file mode 100644 index 0000000..c42d26c --- /dev/null +++ b/public/themes/aurora-boreal/login.scss @@ -0,0 +1,129 @@ +/*Tema 7 - Aurora Boreal*/ + +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 525px; + background: transparent; + margin: 0px auto !important; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + min-height: 711px; + width: 525px; + background: transparent; + border-radius: 0; + box-shadow: 0 4px 30pxrgba (0, 0, 0, 0.1); + -webkit-backdrop-filter: blur(5px); + border: 1pxsolidrgba (255, 255, 255, 0.3); + margin: 0px auto !important; + height: 100% !important; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +body .form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #1b5ca3c2; + outline: 0; + box-shadow: 0 0 0 0.25rem #1b5ca3c2; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +body .form-control { + display: block; + width: 100%; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 1px solid #d9dbde; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +button.btn.btn-primary.w-100 { + background: transparent; + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; +} + +label.form-label { + color: #fff; +} + +a { + color: #73fff9 !important; + text-decoration: none; +} +label.form-label { + display: none; + color: #fff; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} diff --git a/public/themes/aurora-boreal/theme.json b/public/themes/aurora-boreal/theme.json new file mode 100644 index 0000000..87b0739 --- /dev/null +++ b/public/themes/aurora-boreal/theme.json @@ -0,0 +1,14 @@ +{ + "name": "Aurora Boreal", + "description": "Aurora Boreal Theme", + "variables": { + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/public/themes/baloons/login.background.jpg b/public/themes/baloons/login.background.jpg new file mode 100644 index 0000000..ecfea95 Binary files /dev/null and b/public/themes/baloons/login.background.jpg differ diff --git a/public/themes/baloons/login.css b/public/themes/baloons/login.css new file mode 100644 index 0000000..096ff48 --- /dev/null +++ b/public/themes/baloons/login.css @@ -0,0 +1,114 @@ +@charset "UTF-8"; +/*Tema 9 - Baloons*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +label.form-label { + color: #a6abb1; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 383px; + background: #e6eef8; + border-radius: 0; + margin: 114px auto !important; + outline: 28px solid #ffffff30; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + height: 100% !important; +} +button.btn.btn-primary.w-100 { + background: transparent; + color: #ffffff; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: #593a90; + background: linear-gradient(0deg, #593a90 0%, #7551b5 48%, 1 100%); +} +a { + color: #7551b5 !important; + text-decoration: none; +} +body .form-control { + display: block; + width: 100%; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: linear-gradient(0deg, #e6eef8, #e6eef8), #cfd8dc; + box-shadow: inset -4px -4px 12px rgba(253, 255, 255, 0.8), inset 4px 4px 12px rgba(187, 195, 206, 0.6); + border-radius: 16px; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #673ab7; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(103, 58, 183, 0.26); +} diff --git a/public/themes/baloons/login.logo.png b/public/themes/baloons/login.logo.png new file mode 100644 index 0000000..407a903 Binary files /dev/null and b/public/themes/baloons/login.logo.png differ diff --git a/public/themes/baloons/login.preview.jpg b/public/themes/baloons/login.preview.jpg new file mode 100644 index 0000000..72967c8 Binary files /dev/null and b/public/themes/baloons/login.preview.jpg differ diff --git a/public/themes/baloons/login.scss b/public/themes/baloons/login.scss new file mode 100644 index 0000000..bc6ba28 --- /dev/null +++ b/public/themes/baloons/login.scss @@ -0,0 +1,137 @@ +/*Tema 9 - Baloons*/ + +$btn-background-color1: #593a90 !default; +$btn-background-color2: #7551b5 !default; +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +label.form-label { + color: #a6abb1; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 383px; + background: rgb(230 238 248); + border-radius: 0; + margin: 114px auto !important; + outline: 28px solid #ffffff30; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + height: 100% !important; +} + +button.btn.btn-primary.w-100 { + background: transparent; + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: $btn-background-color1; + background: linear-gradient(0deg, $btn-background-color1 0%, $btn-background-color2 48%, 1 100%); +} + +a { + color: #7551b5 !important; + text-decoration: none; +} + +body .form-control { + display: block; + width: 100%; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: linear-gradient(0deg, #e6eef8, #e6eef8), #cfd8dc; + box-shadow: inset -4px -4px 12px rgb(253 255 255 / 80%), + inset 4px 4px 12px rgb(187 195 206 / 60%); + border-radius: 16px; +} + +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #673ab7; + outline: 0; + box-shadow: 0 0 0 0.25rem rgb(103 58 183 / 26%); +} diff --git a/public/themes/baloons/theme.json b/public/themes/baloons/theme.json new file mode 100644 index 0000000..36e6b95 --- /dev/null +++ b/public/themes/baloons/theme.json @@ -0,0 +1,22 @@ +{ + "name": "Ballons", + "description": "Ballons Theme", + "variables": { + "btn-background-color1": { + "name": "Cor de fundo 1 dos Botões", + "default": "#593a90" + }, + "btn-background-color2": { + "name": "Cor de fundo 2 dos Botões", + "default": "#7551b5" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/public/themes/cloud/login.background.jpg b/public/themes/cloud/login.background.jpg new file mode 100644 index 0000000..54c4318 Binary files /dev/null and b/public/themes/cloud/login.background.jpg differ diff --git a/public/themes/cloud/login.css b/public/themes/cloud/login.css new file mode 100644 index 0000000..3bf0970 --- /dev/null +++ b/public/themes/cloud/login.css @@ -0,0 +1,119 @@ +@charset "UTF-8"; +/*Tema 3 - Cloud*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +label.form-label { + color: #a6abb1; +} +.card-body { + padding: 0px !important; + margin: auto; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 383px; + background: #ffffff; + border-radius: 30px; + margin: 114px auto !important; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + height: 100% !important; +} +button.btn.btn-primary.w-100 { + color: #ffffff; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: #000000; +} +a { + color: #000000 !important; + text-decoration: underline; +} +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #fff; + border-radius: 0; + border-bottom: 1px solid; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/public/themes/cloud/login.logo.png b/public/themes/cloud/login.logo.png new file mode 100644 index 0000000..0edaf00 Binary files /dev/null and b/public/themes/cloud/login.logo.png differ diff --git a/public/themes/cloud/login.preview.jpg b/public/themes/cloud/login.preview.jpg new file mode 100644 index 0000000..9c2b088 Binary files /dev/null and b/public/themes/cloud/login.preview.jpg differ diff --git a/public/themes/cloud/login.scss b/public/themes/cloud/login.scss new file mode 100644 index 0000000..4bbd925 --- /dev/null +++ b/public/themes/cloud/login.scss @@ -0,0 +1,140 @@ +/*Tema 3 - Cloud*/ + +$btn-background-color: #000000 !default; +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +label.form-label { + color: #a6abb1; +} + +.card-body { + padding: 0px !important; + margin: auto; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 383px; + background: #ffffff; + border-radius: 30px; + margin: 114px auto !important; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + height: 100% !important; +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: $btn-background-color; +} + +a { + color: #000000 !important; + text-decoration: underline; +} + +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #fff; + border-radius: 0; + border-bottom: 1px solid; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/public/themes/cloud/theme.json b/public/themes/cloud/theme.json new file mode 100644 index 0000000..cb900dd --- /dev/null +++ b/public/themes/cloud/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Cloud", + "description": "Cloud Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#000000" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/public/themes/desktop/login.background.jpg b/public/themes/desktop/login.background.jpg new file mode 100644 index 0000000..7364c0a Binary files /dev/null and b/public/themes/desktop/login.background.jpg differ diff --git a/public/themes/desktop/login.css b/public/themes/desktop/login.css new file mode 100644 index 0000000..956bfb9 --- /dev/null +++ b/public/themes/desktop/login.css @@ -0,0 +1,125 @@ +@charset "UTF-8"; +/*Tema 1 - Desktop*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +label.form-label { + color: #a6abb1; +} +.card-body { + padding: 0px !important; + margin: auto; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: #ffffffc9; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + left: 0; + height: 100% !important; + top: -32px; + border-radius: 0; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; +} +button.btn.btn-primary.w-100 { + color: #ffffff; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: #000000; +} +a { + color: #000000 !important; + text-decoration: underline; +} +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #fff; + border-radius: 0; + border-bottom: 1px solid; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/public/themes/desktop/login.logo.png b/public/themes/desktop/login.logo.png new file mode 100644 index 0000000..0edaf00 Binary files /dev/null and b/public/themes/desktop/login.logo.png differ diff --git a/public/themes/desktop/login.preview.jpg b/public/themes/desktop/login.preview.jpg new file mode 100644 index 0000000..b4ae88c Binary files /dev/null and b/public/themes/desktop/login.preview.jpg differ diff --git a/public/themes/desktop/login.scss b/public/themes/desktop/login.scss new file mode 100644 index 0000000..3ab0fd6 --- /dev/null +++ b/public/themes/desktop/login.scss @@ -0,0 +1,147 @@ +/*Tema 1 - Desktop*/ + +$btn-background-color: #000000 !default; +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +label.form-label { + color: #a6abb1; +} + +.card-body { + padding: 0px !important; + margin: auto; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: #ffffffc9; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + left: 0; + height: 100% !important; + top: -32px; + border-radius: 0; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: $btn-background-color; +} + +a { + color: #000000 !important; + text-decoration: underline; +} + +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #fff; + border-radius: 0; + border-bottom: 1px solid; +} + +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/public/themes/desktop/theme.json b/public/themes/desktop/theme.json new file mode 100644 index 0000000..8aeb1f5 --- /dev/null +++ b/public/themes/desktop/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Desktop", + "description": "Desktop Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#000000" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/public/themes/light/login.background.jpg b/public/themes/light/login.background.jpg new file mode 100644 index 0000000..02b002d Binary files /dev/null and b/public/themes/light/login.background.jpg differ diff --git a/public/themes/light/login.css b/public/themes/light/login.css new file mode 100644 index 0000000..095e95d --- /dev/null +++ b/public/themes/light/login.css @@ -0,0 +1,117 @@ +@charset "UTF-8"; +/*Tema 8 - Light*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #013453; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #013453; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +button.btn.btn-primary.w-100 { + color: #ffffff; + padding: 11px; + border-radius: 30px; + background: #013453; +} +label.form-label { + color: #023454; +} +.card-body { + padding: 0px !important; + margin: auto; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + height: 100% !important; + border-radius: 0; + padding-bottom: 10px !important; + width: 320px; + margin: 0 auto; +} +a { + color: #000000 !important; + text-decoration: underline; +} +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #fff; + border-radius: 0; + border-bottom: 1px solid; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #0133533b; +} diff --git a/public/themes/light/login.logo.png b/public/themes/light/login.logo.png new file mode 100644 index 0000000..fb04646 Binary files /dev/null and b/public/themes/light/login.logo.png differ diff --git a/public/themes/light/login.preview.jpg b/public/themes/light/login.preview.jpg new file mode 100644 index 0000000..b55fd68 Binary files /dev/null and b/public/themes/light/login.preview.jpg differ diff --git a/public/themes/light/login.scss b/public/themes/light/login.scss new file mode 100644 index 0000000..edc8d31 --- /dev/null +++ b/public/themes/light/login.scss @@ -0,0 +1,138 @@ +/*Tema 8 - Light*/ + +$btn-background-color: #013453 !default; +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #013453; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #013453; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + background: $btn-background-color; +} + +label.form-label { + color: #023454; +} + +.card-body { + padding: 0px !important; + margin: auto; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + height: 100% !important; + border-radius: 0; + padding-bottom: 10px !important; + width: 320px; + margin: 0 auto; +} + +a { + color: #000000 !important; + text-decoration: underline; +} + +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #fff; + border-radius: 0; + border-bottom: 1px solid; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #0133533b; +} diff --git a/public/themes/light/theme.json b/public/themes/light/theme.json new file mode 100644 index 0000000..bc2ff97 --- /dev/null +++ b/public/themes/light/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Light", + "description": "Light Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#013453" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/public/themes/neon/login.background.jpg b/public/themes/neon/login.background.jpg new file mode 100644 index 0000000..3ae1d9c Binary files /dev/null and b/public/themes/neon/login.background.jpg differ diff --git a/public/themes/neon/login.css b/public/themes/neon/login.css new file mode 100644 index 0000000..fa0be97 --- /dev/null +++ b/public/themes/neon/login.css @@ -0,0 +1,122 @@ +@charset "UTF-8"; +/*Tema 5 - Neon*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +label.form-label { + color: #fff; +} +.card-body { + padding: 0px !important; + margin: auto; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + left: 0; + height: 100% !important; + top: -32px; + border-radius: 0; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; +} +button.btn.btn-primary.w-100 { + color: #ffffff; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: #000000; +} +a { + color: #ffffff !important; + text-decoration: underline; +} +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + border: 0; + appearance: none; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #ffffff05; + border-radius: 0; + border-bottom: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/public/themes/neon/login.logo.png b/public/themes/neon/login.logo.png new file mode 100644 index 0000000..31324fb Binary files /dev/null and b/public/themes/neon/login.logo.png differ diff --git a/public/themes/neon/login.preview.jpg b/public/themes/neon/login.preview.jpg new file mode 100644 index 0000000..d42006f Binary files /dev/null and b/public/themes/neon/login.preview.jpg differ diff --git a/public/themes/neon/login.scss b/public/themes/neon/login.scss new file mode 100644 index 0000000..a9b13d3 --- /dev/null +++ b/public/themes/neon/login.scss @@ -0,0 +1,143 @@ +/*Tema 5 - Neon*/ + +$btn-background-color: #000000 !default; +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +label.form-label { + color: #fff; +} + +.card-body { + padding: 0px !important; + margin: auto; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + left: 0; + height: 100% !important; + top: -32px; + border-radius: 0; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: $btn-background-color; +} + +a { + color: #ffffff !important; + text-decoration: underline; +} + +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + border: 0; + appearance: none; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #ffffff05; + border-radius: 0; + border-bottom: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/public/themes/neon/theme.json b/public/themes/neon/theme.json new file mode 100644 index 0000000..c4962f2 --- /dev/null +++ b/public/themes/neon/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Neon", + "description": "Neon Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#000000" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/public/themes/night/login.background.jpg b/public/themes/night/login.background.jpg new file mode 100644 index 0000000..00703ad Binary files /dev/null and b/public/themes/night/login.background.jpg differ diff --git a/public/themes/night/login.css b/public/themes/night/login.css new file mode 100644 index 0000000..efa6aca --- /dev/null +++ b/public/themes/night/login.css @@ -0,0 +1,127 @@ +@charset "UTF-8"; +/*Tema 4 - Night*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +label.form-label { + color: #fff; +} +.card-body { + padding: 0px !important; + margin: auto; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + left: 0; + height: 100% !important; + top: -32px; + border-radius: 0; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; + background: rgba(255, 255, 255, 0.04); + box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.3); +} +button.btn.btn-primary.w-100 { + color: #000000; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: #ffffff; +} +a { + color: #ffffff !important; + text-decoration: underline; +} +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + border: 0; + appearance: none; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #ffffff05; + border-radius: 0; + border-bottom: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/public/themes/night/login.logo.png b/public/themes/night/login.logo.png new file mode 100644 index 0000000..31324fb Binary files /dev/null and b/public/themes/night/login.logo.png differ diff --git a/public/themes/night/login.preview.jpg b/public/themes/night/login.preview.jpg new file mode 100644 index 0000000..d1f5244 Binary files /dev/null and b/public/themes/night/login.preview.jpg differ diff --git a/public/themes/night/login.scss b/public/themes/night/login.scss new file mode 100644 index 0000000..173d4c7 --- /dev/null +++ b/public/themes/night/login.scss @@ -0,0 +1,151 @@ +/*Tema 4 - Night*/ + +$btn-background-color: #ffffff !default; +$btn-foreground-color: #000000 !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +label.form-label { + color: #fff; +} + +.card-body { + padding: 0px !important; + margin: auto; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + left: 0; + height: 100% !important; + top: -32px; + border-radius: 0; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; + background: rgb(255 255 255 / 4%); + box-shadow: 0 4px 30px rgb(0 0 0 / 10%); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.3); +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: $btn-background-color; +} + +a { + color: #ffffff !important; + text-decoration: underline; +} + +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + border: 0; + appearance: none; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #ffffff05; + border-radius: 0; + border-bottom: 1px solid #fff; +} + +label.form-label { + display: none; + color: #fff; +} + +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} + +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/public/themes/night/theme.json b/public/themes/night/theme.json new file mode 100644 index 0000000..64033b2 --- /dev/null +++ b/public/themes/night/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Night", + "description": "Night Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#ffffff" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#000000" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/public/themes/original/login.css b/public/themes/original/login.css new file mode 100644 index 0000000..ec80a67 --- /dev/null +++ b/public/themes/original/login.css @@ -0,0 +1,112 @@ +@charset "UTF-8"; +/*Tema 10 - Original*/ +body .card { + border: 0; + background: transparent; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 525px; + background: transparent; + margin: 0px auto !important; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + min-height: 711px; + width: 525px; + background: transparent; + border-radius: 0; + box-shadow: 0 4px 30pxrgba 0, 0, 0, 0.1; + -webkit-backdrop-filter: blur(5px); + border: 1pxsolidrgba 255, 255, 255, 0.3; + margin: 0px auto !important; + height: 100% !important; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +body .form-control { + display: block; + width: 100%; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 1px solid #d9dbde; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +label.form-label { + color: #fff; +} +a { + color: #73fff9 !important; + text-decoration: none; +} +body { + background: #1c2e63; + background: linear-gradient(360deg, #1c2e63 65%, #3a5693 65%); +} +button.btn.btn-primary.w-100 { + background: #fdc95c; + color: #1c2e63; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} diff --git a/public/themes/original/login.logo.png b/public/themes/original/login.logo.png new file mode 100644 index 0000000..31324fb Binary files /dev/null and b/public/themes/original/login.logo.png differ diff --git a/public/themes/original/login.preview.jpg b/public/themes/original/login.preview.jpg new file mode 100644 index 0000000..7df9240 Binary files /dev/null and b/public/themes/original/login.preview.jpg differ diff --git a/public/themes/original/login.scss b/public/themes/original/login.scss new file mode 100644 index 0000000..3d0ec19 --- /dev/null +++ b/public/themes/original/login.scss @@ -0,0 +1,136 @@ +/*Tema 10 - Original*/ + +$btn-background-color: #fdc95c !default; +$btn-foreground-color: #1c2e63 !default; + +body .card { + border: 0; + background: transparent; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 525px; + background: transparent; + margin: 0px auto !important; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + min-height: 711px; + width: 525px; + background: transparent; + border-radius: 0; + box-shadow: 0 4px 30pxrgba (0, 0, 0, 0.1); + -webkit-backdrop-filter: blur(5px); + border: 1pxsolidrgba (255, 255, 255, 0.3); + margin: 0px auto !important; + height: 100% !important; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +body .form-control { + display: block; + width: 100%; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 1px solid #d9dbde; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +label.form-label { + color: #fff; +} + +a { + color: #73fff9 !important; + text-decoration: none; +} + +body { + background: #1c2e63; + background: linear-gradient(360deg, #1c2e63 65%, #3a5693 65%); +} + +button.btn.btn-primary.w-100 { + background: $btn-background-color; + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} + +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} + +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} diff --git a/public/themes/original/theme.json b/public/themes/original/theme.json new file mode 100644 index 0000000..2c284f7 --- /dev/null +++ b/public/themes/original/theme.json @@ -0,0 +1,18 @@ +{ + "name": "GLPI Original", + "description": "GLPI Original Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#fdc95c" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#1c2e63" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/public/themes/power-red/login.background.jpg b/public/themes/power-red/login.background.jpg new file mode 100644 index 0000000..e3822a2 Binary files /dev/null and b/public/themes/power-red/login.background.jpg differ diff --git a/public/themes/power-red/login.css b/public/themes/power-red/login.css new file mode 100644 index 0000000..927c63c --- /dev/null +++ b/public/themes/power-red/login.css @@ -0,0 +1,94 @@ +@charset "UTF-8"; +/*Tema 2 - PowerRed*/ +body .card { + border: 0; + background: transparent; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 525px; + background: #ffffffde; + margin: 0px auto !important; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + min-height: 711px; + width: 525px; + background: rgba(255, 255, 255, 0.9); + border-radius: 0; + box-shadow: 0 4px 30pxrgba 0, 0, 0, 0.1; + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1pxsolidrgba 255, 255, 255, 0.3; + margin: 0px auto !important; + height: 100% !important; + top: 0 !important; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +button.btn.btn-primary.w-100 { + color: #ffffff; + padding: 11px; + border-radius: 30px; + background: #013453; + border: 0; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +body .form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #b90e16; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(185, 14, 22, 0.27); +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a6969; + top: 8px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a6969; + top: 8px; +} +body .card { + border: 0 none; + box-shadow: none !important; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} diff --git a/public/themes/power-red/login.logo.png b/public/themes/power-red/login.logo.png new file mode 100644 index 0000000..772ac73 Binary files /dev/null and b/public/themes/power-red/login.logo.png differ diff --git a/public/themes/power-red/login.preview.jpg b/public/themes/power-red/login.preview.jpg new file mode 100644 index 0000000..42cd614 Binary files /dev/null and b/public/themes/power-red/login.preview.jpg differ diff --git a/public/themes/power-red/login.scss b/public/themes/power-red/login.scss new file mode 100644 index 0000000..cbc1822 --- /dev/null +++ b/public/themes/power-red/login.scss @@ -0,0 +1,113 @@ +/*Tema 2 - PowerRed*/ + +$btn-background-color: #013453 !default; +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 525px; + background: #ffffffde; + margin: 0px auto !important; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + min-height: 711px; + width: 525px; + background: rgb(255 255 255 / 90%); + border-radius: 0; + box-shadow: 0 4px 30pxrgba (0, 0, 0, 0.1); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1pxsolidrgba (255, 255, 255, 0.3); + margin: 0px auto !important; + height: 100% !important; + top: 0 !important; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + background: $btn-background-color; + border: 0; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +body .form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #b90e16; + outline: 0; + box-shadow: 0 0 0 0.25rem rgb(185 14 22 / 27%); +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #6a6969; + top: 8px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #6a6969; + top: 8px; +} + +body .card { + border: 0 none; + box-shadow: none !important; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} diff --git a/public/themes/power-red/theme.json b/public/themes/power-red/theme.json new file mode 100644 index 0000000..b123eda --- /dev/null +++ b/public/themes/power-red/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Power Red", + "description": "Power Red Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#013453" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/public/themes/prompt-developer/login.background.jpg b/public/themes/prompt-developer/login.background.jpg new file mode 100644 index 0000000..6acfb81 Binary files /dev/null and b/public/themes/prompt-developer/login.background.jpg differ diff --git a/public/themes/prompt-developer/login.css b/public/themes/prompt-developer/login.css new file mode 100644 index 0000000..b2d21be --- /dev/null +++ b/public/themes/prompt-developer/login.css @@ -0,0 +1,127 @@ +@charset "UTF-8"; +/*Tema 6 - Prompt Developer*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +label.form-label { + color: #fff; +} +.card-body { + padding: 0px !important; + margin: auto; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + height: 100% !important; + top: -32px; + border-radius: 0; + right: 1px !important; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; + background: rgba(0, 0, 0, 0.38); + box-shadow: 0 4px 30pxrgba 0, 0, 0, 0.1; + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1pxsolidrgba 255, 255, 255, 0.3; +} +button.btn.btn-primary.w-100 { + color: #000000; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: #ffffff; +} +a { + color: #ffffff !important; + text-decoration: underline; +} +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + border: 0; + appearance: none; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #ffffff05; + border-radius: 0; + border-bottom: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/public/themes/prompt-developer/login.logo.png b/public/themes/prompt-developer/login.logo.png new file mode 100644 index 0000000..31324fb Binary files /dev/null and b/public/themes/prompt-developer/login.logo.png differ diff --git a/public/themes/prompt-developer/login.preview.jpg b/public/themes/prompt-developer/login.preview.jpg new file mode 100644 index 0000000..d2493e6 Binary files /dev/null and b/public/themes/prompt-developer/login.preview.jpg differ diff --git a/public/themes/prompt-developer/login.scss b/public/themes/prompt-developer/login.scss new file mode 100644 index 0000000..5d55246 --- /dev/null +++ b/public/themes/prompt-developer/login.scss @@ -0,0 +1,148 @@ +/*Tema 6 - Prompt Developer*/ + +$btn-background-color: #ffffff !default; +$btn-foreground-color: #000000 !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +label.form-label { + color: #fff; +} + +.card-body { + padding: 0px !important; + margin: auto; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + height: 100% !important; + top: -32px; + border-radius: 0; + right: 1px !important; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; + background: rgb(0 0 0 / 38%); + box-shadow: 0 4px 30pxrgba (0, 0, 0, 0.1); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1pxsolidrgba (255, 255, 255, 0.3); +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: $btn-background-color; +} + +a { + color: #ffffff !important; + text-decoration: underline; +} + +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + border: 0; + appearance: none; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #ffffff05; + border-radius: 0; + border-bottom: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/public/themes/prompt-developer/theme.json b/public/themes/prompt-developer/theme.json new file mode 100644 index 0000000..973c92f --- /dev/null +++ b/public/themes/prompt-developer/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Prompt Developer", + "description": "Prompt Developer Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#0000003b" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/setup.php b/setup.php new file mode 100644 index 0000000..560041c --- /dev/null +++ b/setup.php @@ -0,0 +1,117 @@ +isInstalled('butterfly') && $plugin->isActivated('butterfly')) { + + $autoload = __DIR__ . '/vendor/autoload.php'; + if (file_exists($autoload)) { + include_once $autoload; + } + ; + + Plugin::registerClass('PluginButterflyConfig', [ + 'addtabon' => ['Config'] + ]); + + // Register config page only when installed & activated + $PLUGIN_HOOKS['config_page']['butterfly'] = '../../front/config.form.php?itemtype=Config&glpi_tab=PluginButterflyConfig$1'; + + $PLUGIN_HOOKS['display_login']['butterfly'] = "plugin_butterfly_display_login"; + + // Tip Trick to add version in css output + $PLUGIN_HOOKS["add_css"]['butterfly'] = new PluginButterflyFileVersion('front/internal.css.php'); + $PLUGIN_HOOKS["add_javascript"]['butterfly'] = new PluginButterflyFileVersion('front/internal.js.php'); + + $CFG_GLPI['javascript']['config']['config'][] = 'codemirror'; + $CFG_GLPI['javascript']['config']['config'][] = 'tinymce'; + } +} + +// Get the name and the version of the plugin - Needed +function plugin_version_butterfly() +{ + return [ + 'name' => t_butterfly('Butterfly'), + 'version' => PLUGIN_BUTTERFLY_VERSION, + 'author' => 'Rodolpho Lopes', + 'homepage' => 'https://github.com/rodolpholopes', + 'license' => 'GPL v2+', + 'minGlpiVersion' => PLUGIN_BUTTERFLY_MIN_GLPI_VERSION, + 'requirements' => [ + 'glpi' => [ + 'min' => PLUGIN_BUTTERFLY_MIN_GLPI_VERSION, + 'max' => PLUGIN_BUTTERFLY_MAX_GLPI_VERSION, + ] + ] + ]; +} + +// Optional : check prerequisites before install : may print errors or add to message after redirect +function plugin_butterfly_check_prerequisites() +{ + if (version_compare(GLPI_VERSION, PLUGIN_BUTTERFLY_MIN_GLPI_VERSION, 'lt')) { + echo "This plugin requires GLPI >= " . PLUGIN_BUTTERFLY_MIN_GLPI_VERSION; + return false; + } else { + return true; + } +} + +function plugin_butterfly_check_config() +{ + return true; +} + +function t_butterfly($str) +{ + return __($str, 'butterfly'); +} diff --git a/themes/.htaccess b/themes/.htaccess new file mode 100644 index 0000000..14c52a5 --- /dev/null +++ b/themes/.htaccess @@ -0,0 +1,12 @@ +# Allow direct access to theme files + + Order allow,deny + Allow from all + Satisfy any + + +# Disable PHP execution in themes directory + + Order deny,allow + Deny from all + \ No newline at end of file diff --git a/themes/aurora-boreal/login.background.jpg b/themes/aurora-boreal/login.background.jpg new file mode 100644 index 0000000..6aea8c1 Binary files /dev/null and b/themes/aurora-boreal/login.background.jpg differ diff --git a/themes/aurora-boreal/login.css b/themes/aurora-boreal/login.css new file mode 100644 index 0000000..636f8ae --- /dev/null +++ b/themes/aurora-boreal/login.css @@ -0,0 +1,108 @@ +@charset "UTF-8"; +/*Tema - Aurora Boreal*/ +body .card { + border: 0; + background: transparent; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 525px; + background: transparent; + margin: 0px auto !important; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + min-height: 711px; + width: 525px; + background: transparent; + border-radius: 0; + box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); + -webkit-backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.3); + margin: 0px auto !important; + height: 100% !important; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +body .form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #1b5ca3c2; + outline: 0; + box-shadow: 0 0 0 0.25rem #1b5ca3c2; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +body .form-control { + display: block; + width: 100%; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 1px solid #d9dbde; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +button.btn.btn-primary.w-100 { + background: transparent; + color: #ffffff; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; +} +label.form-label { + color: #fff; +} +a { + color: #73fff9 !important; + text-decoration: none; +} +label.form-label { + display: none; + color: #fff; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} diff --git a/themes/aurora-boreal/login.logo.png b/themes/aurora-boreal/login.logo.png new file mode 100644 index 0000000..31324fb Binary files /dev/null and b/themes/aurora-boreal/login.logo.png differ diff --git a/themes/aurora-boreal/login.preview.jpg b/themes/aurora-boreal/login.preview.jpg new file mode 100644 index 0000000..b6311b1 Binary files /dev/null and b/themes/aurora-boreal/login.preview.jpg differ diff --git a/themes/aurora-boreal/login.scss b/themes/aurora-boreal/login.scss new file mode 100644 index 0000000..fcabbf8 --- /dev/null +++ b/themes/aurora-boreal/login.scss @@ -0,0 +1,129 @@ +/*Tema - Aurora Boreal*/ + +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 525px; + background: transparent; + margin: 0px auto !important; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + min-height: 711px; + width: 525px; + background: transparent; + border-radius: 0; + box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); + -webkit-backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.3); + margin: 0px auto !important; + height: 100% !important; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +body .form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #1b5ca3c2; + outline: 0; + box-shadow: 0 0 0 0.25rem #1b5ca3c2; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +body .form-control { + display: block; + width: 100%; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 1px solid #d9dbde; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +button.btn.btn-primary.w-100 { + background: transparent; + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; +} + +label.form-label { + color: #fff; +} + +a { + color: #73fff9 !important; + text-decoration: none; +} +label.form-label { + display: none; + color: #fff; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} diff --git a/themes/aurora-boreal/theme.json b/themes/aurora-boreal/theme.json new file mode 100644 index 0000000..87b0739 --- /dev/null +++ b/themes/aurora-boreal/theme.json @@ -0,0 +1,14 @@ +{ + "name": "Aurora Boreal", + "description": "Aurora Boreal Theme", + "variables": { + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/themes/baloons/login.background.jpg b/themes/baloons/login.background.jpg new file mode 100644 index 0000000..ecfea95 Binary files /dev/null and b/themes/baloons/login.background.jpg differ diff --git a/themes/baloons/login.css b/themes/baloons/login.css new file mode 100644 index 0000000..096ff48 --- /dev/null +++ b/themes/baloons/login.css @@ -0,0 +1,114 @@ +@charset "UTF-8"; +/*Tema 9 - Baloons*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +label.form-label { + color: #a6abb1; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 383px; + background: #e6eef8; + border-radius: 0; + margin: 114px auto !important; + outline: 28px solid #ffffff30; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + height: 100% !important; +} +button.btn.btn-primary.w-100 { + background: transparent; + color: #ffffff; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: #593a90; + background: linear-gradient(0deg, #593a90 0%, #7551b5 48%, 1 100%); +} +a { + color: #7551b5 !important; + text-decoration: none; +} +body .form-control { + display: block; + width: 100%; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: linear-gradient(0deg, #e6eef8, #e6eef8), #cfd8dc; + box-shadow: inset -4px -4px 12px rgba(253, 255, 255, 0.8), inset 4px 4px 12px rgba(187, 195, 206, 0.6); + border-radius: 16px; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #673ab7; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(103, 58, 183, 0.26); +} diff --git a/themes/baloons/login.logo.png b/themes/baloons/login.logo.png new file mode 100644 index 0000000..407a903 Binary files /dev/null and b/themes/baloons/login.logo.png differ diff --git a/themes/baloons/login.preview.jpg b/themes/baloons/login.preview.jpg new file mode 100644 index 0000000..72967c8 Binary files /dev/null and b/themes/baloons/login.preview.jpg differ diff --git a/themes/baloons/login.scss b/themes/baloons/login.scss new file mode 100644 index 0000000..bc6ba28 --- /dev/null +++ b/themes/baloons/login.scss @@ -0,0 +1,137 @@ +/*Tema 9 - Baloons*/ + +$btn-background-color1: #593a90 !default; +$btn-background-color2: #7551b5 !default; +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +label.form-label { + color: #a6abb1; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 383px; + background: rgb(230 238 248); + border-radius: 0; + margin: 114px auto !important; + outline: 28px solid #ffffff30; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + height: 100% !important; +} + +button.btn.btn-primary.w-100 { + background: transparent; + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: $btn-background-color1; + background: linear-gradient(0deg, $btn-background-color1 0%, $btn-background-color2 48%, 1 100%); +} + +a { + color: #7551b5 !important; + text-decoration: none; +} + +body .form-control { + display: block; + width: 100%; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: linear-gradient(0deg, #e6eef8, #e6eef8), #cfd8dc; + box-shadow: inset -4px -4px 12px rgb(253 255 255 / 80%), + inset 4px 4px 12px rgb(187 195 206 / 60%); + border-radius: 16px; +} + +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #673ab7; + outline: 0; + box-shadow: 0 0 0 0.25rem rgb(103 58 183 / 26%); +} diff --git a/themes/baloons/theme.json b/themes/baloons/theme.json new file mode 100644 index 0000000..36e6b95 --- /dev/null +++ b/themes/baloons/theme.json @@ -0,0 +1,22 @@ +{ + "name": "Ballons", + "description": "Ballons Theme", + "variables": { + "btn-background-color1": { + "name": "Cor de fundo 1 dos Botões", + "default": "#593a90" + }, + "btn-background-color2": { + "name": "Cor de fundo 2 dos Botões", + "default": "#7551b5" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/themes/cloud/login.background.jpg b/themes/cloud/login.background.jpg new file mode 100644 index 0000000..54c4318 Binary files /dev/null and b/themes/cloud/login.background.jpg differ diff --git a/themes/cloud/login.css b/themes/cloud/login.css new file mode 100644 index 0000000..3bf0970 --- /dev/null +++ b/themes/cloud/login.css @@ -0,0 +1,119 @@ +@charset "UTF-8"; +/*Tema 3 - Cloud*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +label.form-label { + color: #a6abb1; +} +.card-body { + padding: 0px !important; + margin: auto; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 383px; + background: #ffffff; + border-radius: 30px; + margin: 114px auto !important; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + height: 100% !important; +} +button.btn.btn-primary.w-100 { + color: #ffffff; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: #000000; +} +a { + color: #000000 !important; + text-decoration: underline; +} +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #fff; + border-radius: 0; + border-bottom: 1px solid; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/themes/cloud/login.logo.png b/themes/cloud/login.logo.png new file mode 100644 index 0000000..0edaf00 Binary files /dev/null and b/themes/cloud/login.logo.png differ diff --git a/themes/cloud/login.preview.jpg b/themes/cloud/login.preview.jpg new file mode 100644 index 0000000..9c2b088 Binary files /dev/null and b/themes/cloud/login.preview.jpg differ diff --git a/themes/cloud/login.scss b/themes/cloud/login.scss new file mode 100644 index 0000000..4bbd925 --- /dev/null +++ b/themes/cloud/login.scss @@ -0,0 +1,140 @@ +/*Tema 3 - Cloud*/ + +$btn-background-color: #000000 !default; +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +label.form-label { + color: #a6abb1; +} + +.card-body { + padding: 0px !important; + margin: auto; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 383px; + background: #ffffff; + border-radius: 30px; + margin: 114px auto !important; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + height: 100% !important; +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: $btn-background-color; +} + +a { + color: #000000 !important; + text-decoration: underline; +} + +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #fff; + border-radius: 0; + border-bottom: 1px solid; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/themes/cloud/theme.json b/themes/cloud/theme.json new file mode 100644 index 0000000..cb900dd --- /dev/null +++ b/themes/cloud/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Cloud", + "description": "Cloud Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#000000" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/themes/desktop/login.background.jpg b/themes/desktop/login.background.jpg new file mode 100644 index 0000000..7364c0a Binary files /dev/null and b/themes/desktop/login.background.jpg differ diff --git a/themes/desktop/login.css b/themes/desktop/login.css new file mode 100644 index 0000000..956bfb9 --- /dev/null +++ b/themes/desktop/login.css @@ -0,0 +1,125 @@ +@charset "UTF-8"; +/*Tema 1 - Desktop*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +label.form-label { + color: #a6abb1; +} +.card-body { + padding: 0px !important; + margin: auto; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: #ffffffc9; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + left: 0; + height: 100% !important; + top: -32px; + border-radius: 0; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; +} +button.btn.btn-primary.w-100 { + color: #ffffff; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: #000000; +} +a { + color: #000000 !important; + text-decoration: underline; +} +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #fff; + border-radius: 0; + border-bottom: 1px solid; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/themes/desktop/login.logo.png b/themes/desktop/login.logo.png new file mode 100644 index 0000000..0edaf00 Binary files /dev/null and b/themes/desktop/login.logo.png differ diff --git a/themes/desktop/login.preview.jpg b/themes/desktop/login.preview.jpg new file mode 100644 index 0000000..b4ae88c Binary files /dev/null and b/themes/desktop/login.preview.jpg differ diff --git a/themes/desktop/login.scss b/themes/desktop/login.scss new file mode 100644 index 0000000..3ab0fd6 --- /dev/null +++ b/themes/desktop/login.scss @@ -0,0 +1,147 @@ +/*Tema 1 - Desktop*/ + +$btn-background-color: #000000 !default; +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +label.form-label { + color: #a6abb1; +} + +.card-body { + padding: 0px !important; + margin: auto; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: #ffffffc9; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + left: 0; + height: 100% !important; + top: -32px; + border-radius: 0; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: $btn-background-color; +} + +a { + color: #000000 !important; + text-decoration: underline; +} + +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #fff; + border-radius: 0; + border-bottom: 1px solid; +} + +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/themes/desktop/theme.json b/themes/desktop/theme.json new file mode 100644 index 0000000..8aeb1f5 --- /dev/null +++ b/themes/desktop/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Desktop", + "description": "Desktop Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#000000" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/themes/light/login.background.jpg b/themes/light/login.background.jpg new file mode 100644 index 0000000..02b002d Binary files /dev/null and b/themes/light/login.background.jpg differ diff --git a/themes/light/login.css b/themes/light/login.css new file mode 100644 index 0000000..095e95d --- /dev/null +++ b/themes/light/login.css @@ -0,0 +1,117 @@ +@charset "UTF-8"; +/*Tema 8 - Light*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #013453; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #013453; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +button.btn.btn-primary.w-100 { + color: #ffffff; + padding: 11px; + border-radius: 30px; + background: #013453; +} +label.form-label { + color: #023454; +} +.card-body { + padding: 0px !important; + margin: auto; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + height: 100% !important; + border-radius: 0; + padding-bottom: 10px !important; + width: 320px; + margin: 0 auto; +} +a { + color: #000000 !important; + text-decoration: underline; +} +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #fff; + border-radius: 0; + border-bottom: 1px solid; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #0133533b; +} diff --git a/themes/light/login.logo.png b/themes/light/login.logo.png new file mode 100644 index 0000000..fb04646 Binary files /dev/null and b/themes/light/login.logo.png differ diff --git a/themes/light/login.preview.jpg b/themes/light/login.preview.jpg new file mode 100644 index 0000000..b55fd68 Binary files /dev/null and b/themes/light/login.preview.jpg differ diff --git a/themes/light/login.scss b/themes/light/login.scss new file mode 100644 index 0000000..edc8d31 --- /dev/null +++ b/themes/light/login.scss @@ -0,0 +1,138 @@ +/*Tema 8 - Light*/ + +$btn-background-color: #013453 !default; +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #013453; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #013453; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + background: $btn-background-color; +} + +label.form-label { + color: #023454; +} + +.card-body { + padding: 0px !important; + margin: auto; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + height: 100% !important; + border-radius: 0; + padding-bottom: 10px !important; + width: 320px; + margin: 0 auto; +} + +a { + color: #000000 !important; + text-decoration: underline; +} + +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 0; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #fff; + border-radius: 0; + border-bottom: 1px solid; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #0133533b; +} diff --git a/themes/light/theme.json b/themes/light/theme.json new file mode 100644 index 0000000..bc2ff97 --- /dev/null +++ b/themes/light/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Light", + "description": "Light Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#013453" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/themes/neon/login.background.jpg b/themes/neon/login.background.jpg new file mode 100644 index 0000000..3ae1d9c Binary files /dev/null and b/themes/neon/login.background.jpg differ diff --git a/themes/neon/login.css b/themes/neon/login.css new file mode 100644 index 0000000..fa0be97 --- /dev/null +++ b/themes/neon/login.css @@ -0,0 +1,122 @@ +@charset "UTF-8"; +/*Tema 5 - Neon*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +label.form-label { + color: #fff; +} +.card-body { + padding: 0px !important; + margin: auto; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + left: 0; + height: 100% !important; + top: -32px; + border-radius: 0; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; +} +button.btn.btn-primary.w-100 { + color: #ffffff; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: #000000; +} +a { + color: #ffffff !important; + text-decoration: underline; +} +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + border: 0; + appearance: none; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #ffffff05; + border-radius: 0; + border-bottom: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/themes/neon/login.logo.png b/themes/neon/login.logo.png new file mode 100644 index 0000000..31324fb Binary files /dev/null and b/themes/neon/login.logo.png differ diff --git a/themes/neon/login.preview.jpg b/themes/neon/login.preview.jpg new file mode 100644 index 0000000..d42006f Binary files /dev/null and b/themes/neon/login.preview.jpg differ diff --git a/themes/neon/login.scss b/themes/neon/login.scss new file mode 100644 index 0000000..a9b13d3 --- /dev/null +++ b/themes/neon/login.scss @@ -0,0 +1,143 @@ +/*Tema 5 - Neon*/ + +$btn-background-color: #000000 !default; +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +label.form-label { + color: #fff; +} + +.card-body { + padding: 0px !important; + margin: auto; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + left: 0; + height: 100% !important; + top: -32px; + border-radius: 0; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: $btn-background-color; +} + +a { + color: #ffffff !important; + text-decoration: underline; +} + +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + border: 0; + appearance: none; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #ffffff05; + border-radius: 0; + border-bottom: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/themes/neon/theme.json b/themes/neon/theme.json new file mode 100644 index 0000000..c4962f2 --- /dev/null +++ b/themes/neon/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Neon", + "description": "Neon Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#000000" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/themes/night/login.background.jpg b/themes/night/login.background.jpg new file mode 100644 index 0000000..00703ad Binary files /dev/null and b/themes/night/login.background.jpg differ diff --git a/themes/night/login.css b/themes/night/login.css new file mode 100644 index 0000000..efa6aca --- /dev/null +++ b/themes/night/login.css @@ -0,0 +1,127 @@ +@charset "UTF-8"; +/*Tema 4 - Night*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +label.form-label { + color: #fff; +} +.card-body { + padding: 0px !important; + margin: auto; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + left: 0; + height: 100% !important; + top: -32px; + border-radius: 0; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; + background: rgba(255, 255, 255, 0.04); + box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.3); +} +button.btn.btn-primary.w-100 { + color: #000000; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: #ffffff; +} +a { + color: #ffffff !important; + text-decoration: underline; +} +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + border: 0; + appearance: none; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #ffffff05; + border-radius: 0; + border-bottom: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/themes/night/login.logo.png b/themes/night/login.logo.png new file mode 100644 index 0000000..31324fb Binary files /dev/null and b/themes/night/login.logo.png differ diff --git a/themes/night/login.preview.jpg b/themes/night/login.preview.jpg new file mode 100644 index 0000000..d1f5244 Binary files /dev/null and b/themes/night/login.preview.jpg differ diff --git a/themes/night/login.scss b/themes/night/login.scss new file mode 100644 index 0000000..173d4c7 --- /dev/null +++ b/themes/night/login.scss @@ -0,0 +1,151 @@ +/*Tema 4 - Night*/ + +$btn-background-color: #ffffff !default; +$btn-foreground-color: #000000 !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +label.form-label { + color: #fff; +} + +.card-body { + padding: 0px !important; + margin: auto; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + left: 0; + height: 100% !important; + top: -32px; + border-radius: 0; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; + background: rgb(255 255 255 / 4%); + box-shadow: 0 4px 30px rgb(0 0 0 / 10%); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.3); +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: $btn-background-color; +} + +a { + color: #ffffff !important; + text-decoration: underline; +} + +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + border: 0; + appearance: none; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #ffffff05; + border-radius: 0; + border-bottom: 1px solid #fff; +} + +label.form-label { + display: none; + color: #fff; +} + +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} + +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/themes/night/theme.json b/themes/night/theme.json new file mode 100644 index 0000000..64033b2 --- /dev/null +++ b/themes/night/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Night", + "description": "Night Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#ffffff" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#000000" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/themes/original/login.css b/themes/original/login.css new file mode 100644 index 0000000..f7cf1c3 --- /dev/null +++ b/themes/original/login.css @@ -0,0 +1,113 @@ +@charset "UTF-8"; +/*Tema 10 - Original*/ +body .card { + border: 0; + background: transparent; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 525px; + background: transparent; + margin: 0px auto !important; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + min-height: 711px; + width: 525px; + background: transparent; + border-radius: 0; + box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.3); + margin: 0px auto !important; + height: 100% !important; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +body .form-control { + display: block; + width: 100%; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 1px solid #d9dbde; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +label.form-label { + color: #fff; +} +a { + color: #73fff9 !important; + text-decoration: none; +} +body { + background: #1c2e63; + background: linear-gradient(360deg, #1c2e63 65%, #3a5693 65%); +} +button.btn.btn-primary.w-100 { + background: #fdc95c; + color: #1c2e63; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} diff --git a/themes/original/login.logo.png b/themes/original/login.logo.png new file mode 100644 index 0000000..31324fb Binary files /dev/null and b/themes/original/login.logo.png differ diff --git a/themes/original/login.preview.jpg b/themes/original/login.preview.jpg new file mode 100644 index 0000000..7df9240 Binary files /dev/null and b/themes/original/login.preview.jpg differ diff --git a/themes/original/login.scss b/themes/original/login.scss new file mode 100644 index 0000000..d308590 --- /dev/null +++ b/themes/original/login.scss @@ -0,0 +1,136 @@ +/*Tema 10 - Original*/ + +$btn-background-color: #fdc95c !default; +$btn-foreground-color: #1c2e63 !default; + +body .card { + border: 0; + background: transparent; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 525px; + background: transparent; + margin: 0px auto !important; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + min-height: 711px; + width: 525px; + background: transparent; + border-radius: 0; + box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); + -webkit-backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.3); + margin: 0px auto !important; + height: 100% !important; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #6a696982; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +body .form-control { + display: block; + width: 100%; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + background-color: #fdfdfd; + background-clip: padding-box; + border: 1px solid #d9dbde; + appearance: none; + border-radius: 34px; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +label.form-label { + color: #fff; +} + +a { + color: #73fff9 !important; + text-decoration: none; +} + +body { + background: #1c2e63; + background: linear-gradient(360deg, #1c2e63 65%, #3a5693 65%); +} + +button.btn.btn-primary.w-100 { + background: $btn-background-color; + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} + +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} + +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} diff --git a/themes/original/theme.json b/themes/original/theme.json new file mode 100644 index 0000000..2c284f7 --- /dev/null +++ b/themes/original/theme.json @@ -0,0 +1,18 @@ +{ + "name": "GLPI Original", + "description": "GLPI Original Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#fdc95c" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#1c2e63" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/themes/power-red/login.background.jpg b/themes/power-red/login.background.jpg new file mode 100644 index 0000000..e3822a2 Binary files /dev/null and b/themes/power-red/login.background.jpg differ diff --git a/themes/power-red/login.css b/themes/power-red/login.css new file mode 100644 index 0000000..786838f --- /dev/null +++ b/themes/power-red/login.css @@ -0,0 +1,94 @@ +@charset "UTF-8"; +/*Tema - Power Red*/ +body .card { + border: 0; + background: transparent; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 525px; + background: #ffffffde; + margin: 0px auto !important; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + min-height: 711px; + width: 525px; + background: rgba(255, 255, 255, 0.9); + border-radius: 0; + box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.3); + margin: 0px auto !important; + height: 100% !important; + top: 0 !important; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +button.btn.btn-primary.w-100 { + color: #ffffff; + padding: 11px; + border-radius: 30px; + background: #013453; + border: 0; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +body .form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #b90e16; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(185, 14, 22, 0.27); +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a6969; + top: 8px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #6a6969; + top: 8px; +} +body .card { + border: 0 none; + box-shadow: none !important; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} diff --git a/themes/power-red/login.logo.png b/themes/power-red/login.logo.png new file mode 100644 index 0000000..772ac73 Binary files /dev/null and b/themes/power-red/login.logo.png differ diff --git a/themes/power-red/login.preview.jpg b/themes/power-red/login.preview.jpg new file mode 100644 index 0000000..42cd614 Binary files /dev/null and b/themes/power-red/login.preview.jpg differ diff --git a/themes/power-red/login.scss b/themes/power-red/login.scss new file mode 100644 index 0000000..fabd1e7 --- /dev/null +++ b/themes/power-red/login.scss @@ -0,0 +1,113 @@ +/*Tema - Power Red*/ + +$btn-background-color: #013453 !default; +$btn-foreground-color: #ffffff !default; + +body .card { + border: 0; + background: transparent; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 525px; + background: #ffffffde; + margin: 0px auto !important; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + min-height: 711px; + width: 525px; + background: rgb(255 255 255 / 90%); + border-radius: 0; + box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.3); + margin: 0px auto !important; + height: 100% !important; + top: 0 !important; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + background: $btn-background-color; + border: 0; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +body .form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #b90e16; + outline: 0; + box-shadow: 0 0 0 0.25rem rgb(185 14 22 / 27%); +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #6a6969; + top: 8px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #6a6969; + top: 8px; +} + +body .card { + border: 0 none; + box-shadow: none !important; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} diff --git a/themes/power-red/theme.json b/themes/power-red/theme.json new file mode 100644 index 0000000..b123eda --- /dev/null +++ b/themes/power-red/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Power Red", + "description": "Power Red Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#013453" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +} diff --git a/themes/prompt-developer/login.background.jpg b/themes/prompt-developer/login.background.jpg new file mode 100644 index 0000000..6acfb81 Binary files /dev/null and b/themes/prompt-developer/login.background.jpg differ diff --git a/themes/prompt-developer/login.css b/themes/prompt-developer/login.css new file mode 100644 index 0000000..24efb33 --- /dev/null +++ b/themes/prompt-developer/login.css @@ -0,0 +1,127 @@ +@charset "UTF-8"; +/*Tema - Prompt Developer*/ +body .card { + border: 0; + background: transparent; +} +.col-md-5 { + margin: 0 !important; + width: 100%; +} +h2.card-header.text-center.mb-4, div.card-header:has(.mx-auto) { + display: none; +} +span.glpi-logo.mb-4 { + margin: 0 !important; +} +.btn-primary, .btn-outline-primary, .btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} +.mb-3, .mb-4 { + position: relative; +} +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: ""; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} +label.form-label { + color: #fff; +} +.card-body { + padding: 0px !important; + margin: auto; +} +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + height: 100% !important; + top: -32px; + border-radius: 0; + right: 1px !important; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; + background: rgba(0, 0, 0, 0.38); + box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.3); +} +button.btn.btn-primary.w-100 { + color: #000000; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: #ffffff; +} +a { + color: #ffffff !important; + text-decoration: underline; +} +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + border: 0; + appearance: none; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #ffffff05; + border-radius: 0; + border-bottom: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/themes/prompt-developer/login.logo.png b/themes/prompt-developer/login.logo.png new file mode 100644 index 0000000..31324fb Binary files /dev/null and b/themes/prompt-developer/login.logo.png differ diff --git a/themes/prompt-developer/login.preview.jpg b/themes/prompt-developer/login.preview.jpg new file mode 100644 index 0000000..d2493e6 Binary files /dev/null and b/themes/prompt-developer/login.preview.jpg differ diff --git a/themes/prompt-developer/login.scss b/themes/prompt-developer/login.scss new file mode 100644 index 0000000..e80a726 --- /dev/null +++ b/themes/prompt-developer/login.scss @@ -0,0 +1,148 @@ +/*Tema - Prompt Developer*/ + +$btn-background-color: #ffffff !default; +$btn-foreground-color: #000000 !default; + +body .card { + border: 0; + background: transparent; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; +} + +h2.card-header.text-center.mb-4, +div.card-header:has(.mx-auto) { + display: none; +} + +span.glpi-logo.mb-4 { + margin: 0 !important; +} + +.btn-primary, +.btn-outline-primary, +.btn-ghost-primary { + --tblr-btn-color: #71090e; + --tblr-btn-color-interactive: #8d0a10; + --tblr-btn-color-text: #1e293b; +} + +.mb-3, +.mb-4 { + position: relative; +} + +.mb-3:after { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f007"; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} + +.mb-4:before { + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f023"; + position: absolute; + right: 20px; + color: #fff; + top: 12px; +} + +.col-md-5 { + margin: 0 !important; + width: 100%; + max-width: 289px; +} + +label.form-label { + color: #fff; +} + +.card-body { + padding: 0px !important; + margin: auto; +} + +.flex-fill.d-flex.flex-column.justify-content-center.py-4.mt-4 { + width: 50%; + background: transparent; + border-radius: 30px; + margin: 0; + outline-offset: 0; + box-shadow: 0px 6px 13px 1px #00000047; + height: 100% !important; + top: -32px; + border-radius: 0; + right: 1px !important; + position: absolute; + padding-top: 130px !important; + padding-bottom: 110px !important; + background: rgb(0 0 0 / 38%); + box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + border: 1px solid rgba(255, 255, 255, 0.3); +} + +button.btn.btn-primary.w-100 { + color: $btn-foreground-color; + padding: 11px; + border-radius: 30px; + border: 1px solid #fff; + background: $btn-background-color; +} + +a { + color: #ffffff !important; + text-decoration: underline; +} + +body .form-control { + display: block; + width: 100%; + min-width: 250px; + padding: 0.7375rem 0.75rem; + font-size: 0.875rem; + font-weight: 400; + line-height: 1.4285714286; + color: inherit; + border: 0; + appearance: none; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + background: #ffffff05; + border-radius: 0; + border-bottom: 1px solid #fff; +} +label.form-label { + display: none; + color: #fff; +} +span.form-label-description { + margin-top: 10px; + margin-bottom: 10px; + text-align: left; + width: 100%; + display: block; +} +.card-body { + margin: 0 auto; + width: 350px; + max-width: 100%; +} +.col-auto.offset-md-1.p-2.text-center { + display: none; +} +.form-control:focus { + color: inherit; + background-color: #fdfdfd; + border-color: #013453; + outline: 0; + box-shadow: 0 0 0 0.25rem #5e5e5e3b; +} diff --git a/themes/prompt-developer/theme.json b/themes/prompt-developer/theme.json new file mode 100644 index 0000000..973c92f --- /dev/null +++ b/themes/prompt-developer/theme.json @@ -0,0 +1,18 @@ +{ + "name": "Prompt Developer", + "description": "Prompt Developer Theme", + "variables": { + "btn-background-color": { + "name": "Cor de fundo dos Botões", + "default": "#0000003b" + }, + "btn-foreground-color": { + "name": "Cor do texto dos Botões", + "default": "#ffffff" + }, + "card-background-color": { + "name": "Cor do cartão", + "default": "" + } + } +}