diff --git a/application/logintwig.class.inc.php b/application/logintwig.class.inc.php index 249bbcc3d..41766a822 100644 --- a/application/logintwig.class.inc.php +++ b/application/logintwig.class.inc.php @@ -224,7 +224,7 @@ class LoginTwigRenderer } $oCoreLoader = new Twig_Loader_Filesystem(array(), APPROOT.'templates'); - $aCoreTemplatesPaths = array('login', 'login/password'); + $aCoreTemplatesPaths = array('pages/login', 'pages/login/password'); // Having this path declared after the plugins let the plugins replace the core templates $oCoreLoader->setPaths($aCoreTemplatesPaths); // Having the core templates accessible within a different namespace offer the possibility to extend them while replacing them diff --git a/css/README.md b/css/README.md new file mode 100644 index 000000000..b4c22aac5 --- /dev/null +++ b/css/README.md @@ -0,0 +1,5 @@ +In order to better separate our developments from the embedded third-party libs, files should be moved in either the /backoffice, /lib or something new folders. + +IMPORTANT: Before moving a file, we should first consider if: +- The file is used in an iTop extension that should be compatible with the iTop version currently under developments +- The file is still used in iTop itself (or if we can consider removing it for clean up) \ No newline at end of file diff --git a/css/backoffice/README.md b/css/backoffice/README.md new file mode 100644 index 000000000..b37e2731e --- /dev/null +++ b/css/backoffice/README.md @@ -0,0 +1,71 @@ +## Description +This is a brief description of the SASS 7-1 system and how to use it. +- [File structure](#file-structure) +- [Usage](#usage) + +## File structure +SCSS files are structured following the [7-1 pattern](https://sass-guidelin.es/#the-7-1-pattern). \ +@rveitch made a great summary with the following, which can also be found [here](https://gist.github.com/rveitch/84cea9650092119527bc). + +``` +css/backoffice/ +| +|– base/ +| |– _reset.scss # Reset/normalize +| |– _typography.scss # Typography rules +| ... # Etc… +| +|– components/ +| |– _buttons.scss # Buttons +| |– _carousel.scss # Carousel +| |– _cover.scss # Cover +| |– _dropdown.scss # Dropdown +| ... # Etc… +| +|– layout/ +| |– _navigation.scss # Navigation +| |– _grid.scss # Grid system +| |– _header.scss # Header +| |– _footer.scss # Footer +| |– _sidebar.scss # Sidebar +| |– _forms.scss # Forms +| ... # Etc… +| +|– pages/ +| |– _home.scss # Home specific styles +| |– _contact.scss # Contact specific styles +| ... # Etc… +| +|– themes/ +| |– _theme.scss # Default theme +| |– _admin.scss # Admin theme +| ... # Etc… +| +|– utils/ +| |– _variables.scss # Sass Variables +| |– _functions.scss # Sass Functions +| |– _mixins.scss # Sass Mixins +| |– _helpers.scss # Class & placeholders helpers +| +|– vendors/ +| |– _bootstrap.scss # Bootstrap +| |– _jquery-ui.scss # jQuery UI +| ... # Etc… +| +| +`– main.scss # Main Sass file +``` + +## Usage +To avoid common errors, files should be imported in the final file in the following order. Again those are just following the SASS guidelines: +- Utils + - Variables + - Functions + - Mixins + - Helpers +- Vendors +- Base +- Components +- Layout +- Pages +- Themes \ No newline at end of file diff --git a/js/README.md b/js/README.md new file mode 100644 index 000000000..750bfc546 --- /dev/null +++ b/js/README.md @@ -0,0 +1,5 @@ +In order to better separate our developments from the embedded third-party libs, files should be moved in either the /components or /lib folders. + +IMPORTANT: Before moving a file, we should first consider if: +- The file is used in an iTop extension that should be compatible with the iTop version currently under developments +- The file is still used in iTop itself (or if we can consider removing it for clean up) \ No newline at end of file diff --git a/templates/login/base.html.twig b/templates/pages/login/base.html.twig similarity index 100% rename from templates/login/base.html.twig rename to templates/pages/login/base.html.twig diff --git a/templates/login/extensionblock/loginformfooter.html.twig b/templates/pages/login/extensionblock/loginformfooter.html.twig similarity index 100% rename from templates/login/extensionblock/loginformfooter.html.twig rename to templates/pages/login/extensionblock/loginformfooter.html.twig diff --git a/templates/login/extensionblock/loginforminput.html.twig b/templates/pages/login/extensionblock/loginforminput.html.twig similarity index 100% rename from templates/login/extensionblock/loginforminput.html.twig rename to templates/pages/login/extensionblock/loginforminput.html.twig diff --git a/templates/login/extensionblock/loginformlinks.html.twig b/templates/pages/login/extensionblock/loginformlinks.html.twig similarity index 100% rename from templates/login/extensionblock/loginformlinks.html.twig rename to templates/pages/login/extensionblock/loginformlinks.html.twig diff --git a/templates/login/extensionblock/loginformsubmit.html.twig b/templates/pages/login/extensionblock/loginformsubmit.html.twig similarity index 100% rename from templates/login/extensionblock/loginformsubmit.html.twig rename to templates/pages/login/extensionblock/loginformsubmit.html.twig diff --git a/templates/login/login.html.twig b/templates/pages/login/login.html.twig similarity index 100% rename from templates/login/login.html.twig rename to templates/pages/login/login.html.twig diff --git a/templates/login/logout.html.twig b/templates/pages/login/logout.html.twig similarity index 100% rename from templates/login/logout.html.twig rename to templates/pages/login/logout.html.twig diff --git a/templates/login/macros.twig b/templates/pages/login/macros.twig similarity index 100% rename from templates/login/macros.twig rename to templates/pages/login/macros.twig diff --git a/templates/login/password/changepwdform.html.twig b/templates/pages/login/password/changepwdform.html.twig similarity index 100% rename from templates/login/password/changepwdform.html.twig rename to templates/pages/login/password/changepwdform.html.twig diff --git a/templates/login/password/changepwdform.js.twig b/templates/pages/login/password/changepwdform.js.twig similarity index 100% rename from templates/login/password/changepwdform.js.twig rename to templates/pages/login/password/changepwdform.js.twig diff --git a/templates/login/password/forgotpwdform.html.twig b/templates/pages/login/password/forgotpwdform.html.twig similarity index 100% rename from templates/login/password/forgotpwdform.html.twig rename to templates/pages/login/password/forgotpwdform.html.twig diff --git a/templates/login/password/forgotpwdform.ready.js.twig b/templates/pages/login/password/forgotpwdform.ready.js.twig similarity index 100% rename from templates/login/password/forgotpwdform.ready.js.twig rename to templates/pages/login/password/forgotpwdform.ready.js.twig diff --git a/templates/login/password/forgotpwdsent.html.twig b/templates/pages/login/password/forgotpwdsent.html.twig similarity index 100% rename from templates/login/password/forgotpwdsent.html.twig rename to templates/pages/login/password/forgotpwdsent.html.twig diff --git a/templates/login/password/resetpwddone.html.twig b/templates/pages/login/password/resetpwddone.html.twig similarity index 100% rename from templates/login/password/resetpwddone.html.twig rename to templates/pages/login/password/resetpwddone.html.twig diff --git a/templates/login/password/resetpwdform.html.twig b/templates/pages/login/password/resetpwdform.html.twig similarity index 100% rename from templates/login/password/resetpwdform.html.twig rename to templates/pages/login/password/resetpwdform.html.twig diff --git a/templates/login/password/resetpwdform.js.twig b/templates/pages/login/password/resetpwdform.js.twig similarity index 100% rename from templates/login/password/resetpwdform.js.twig rename to templates/pages/login/password/resetpwdform.js.twig