{"id":20022157,"url":"https://github.com/modxcms/baseline-mgr","last_synced_at":"2025-05-05T01:31:16.111Z","repository":{"id":17996453,"uuid":"21007923","full_name":"modxcms/baseline-mgr","owner":"modxcms","description":null,"archived":false,"fork":false,"pushed_at":"2014-07-16T14:05:10.000Z","size":940,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-28T12:21:37.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/modxcms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-19T16:43:22.000Z","updated_at":"2022-08-31T18:45:38.000Z","dependencies_parsed_at":"2022-09-04T15:40:36.991Z","dependency_job_id":null,"html_url":"https://github.com/modxcms/baseline-mgr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modxcms%2Fbaseline-mgr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modxcms%2Fbaseline-mgr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modxcms%2Fbaseline-mgr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modxcms%2Fbaseline-mgr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modxcms","download_url":"https://codeload.github.com/modxcms/baseline-mgr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252423084,"owners_count":21745543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T08:39:22.430Z","updated_at":"2025-05-05T01:31:11.097Z","avatar_url":"https://github.com/modxcms.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"baseline-mgr\n============\n\n#Sass in the MODX 2.3 Manager \u0026 MODX Cloud\n\n\n\u003e Written by [Wayne Roddy](wayne@modx.com) and [Ryan Thrash](ryan@modx.com). July 7, 2014\n\n## Overview\n\nThe MODX Manager theme is straightforward to customize and change to suit your preferences. Drastic alterations for branding are relatively quick, because the Manager has been rebuilt in 2.3 and above using Sass for its styling. This readme file provides an overview of the files that make up a Manager theme, and the files you need to adjust in order to create a custom MODX Manager theme. \n\nIn order to work with Manager themes, you typically have to clone the project from the MODX Github repository and to be able to have Ruby and Node.js running for the dependencies. However, there is an alternate way to work on Manager themes without having to install additional dependencies on your server or in your local dev machine by using MODX Cloud, as outlined below. \n\n---\n\n###Manager Theme Files\nManager Themes can be highly customized, replacing every file in the Default theme, or you can just use a few styles and make selective overrides. You can even change the way the Manager works by including custome ExtJS files, but that is beyond the scope of this introductory overview. Manager themes are located in the `manager/templates/` directory, and the MODX Manager automatically scans the `manager/templates/` directory and lists any directories located there in the Manager Theme System Setting. \n\nA custom Manager theme will usually contains the following directories:\n\n* `sass/` – the baseline Sass files used to build the custom styling\n* `css/` – where `index.css` and `login.css` stylesheets are generated\n* `images/` – a copy of all images needed for the theme\n* `js/` (optional) – overrides for the overall layout of the MODX Manager, for instance to use a full-height tree menu, instead of it being nested underneath the top navigation. (see below)\n\nThere are many other directories located in the `default` manager theme, most of them being the layout templates, ending in `.tpl`. You can create custom .tpl files should you wish, but it's not needed most of the time.\n\n###The `sass` Directory\n\nThe Sass files are probably the most imortant files when it comes to creating a custom theme. For example, a clients might want branded colors and their logo in their Manager. This is where those changes would get made. The main Sass files you'll modify are as follows:\n\n* `index.scss` – the styles for the MODX Manager after logging in. This includes the majority of the _xxx.scss files inside.\n* `login.scss` – the styles for the MODX Manager login\n* `_colors-and-vars.scss` – probably the first starting point for your MODX Manager theming work. This is where all your baseline colors, font sets and other baseline styles are set that are used throughout the other Sass files.\n\nThe additional Sass files that you may also wish to work with include:\n\n* `_buttons.scss` – the button styles used throughout the Manager \n* `_forms.scss` – the styles that control how forms appear\n* `_help.scss` – the styles for the MODX help page inside the Manager\n* `_navbar.scss` – the styles for the top navigation\n* `_tabs.scss` – the styles for tabs, both horizontal and vertical\n* `_tree.scss` – the styles for the trees\n* `_uberbar.scss` – the styling for the überbar search and keyboard navigation tool\n* `_xtheme-modx.scss` – a custom version of the default ExtJS 3.x styles (in which we'd love your assistance in performing additional cleanup and purging of unused styles)\n\nIn addition, there are a few mixin and helper/utility Sass files:\n\n* `_box-sizing.scss` – a simple box sizing mixin helper file\n* `_image-set.scss` – a mixin used to create multiple background images\n* `_utility.scss` – mixins that don't output directly, but that can be used as helpers for things like image replacement, Font Awesome calls, hiding things visually, etc., via Sass extends functions.\n\n\n##Manager Theming with Sass in MODX Cloud\n\nBy adjusting a few variables, you can make significant changes in how it looks. While the steps that follow may seem intimidating, they're actually quite simple and fast to do. In fact, getting ready to create a custom MODX Manager theme consists of just four steps:\n\n1. Get Sass running in your MODX Cloud instance\n2. Bootstrap the starting point for your Custom Theme and pick a name for your theme\n3. Start `compass watch` to compile your Sass changes into new CSS files\n4. Selecting your new theme in the System Settings and making changes to the Sass files\n\nThat's all it takes before you can start seeing your Sass changes in a live MODX Manager just by hitting `⌘R` or `⇧F5` to see your changes in near real time.  \n\n---\n\n###1. Request Sass in your MODX Cloud Account\n\n1. Create a new MODX 2.3 project in MODX Cloud. \n2. Note the name of the internal Cloud URL where you would like to work on a Manager theme. It will look like **cNNNN.paas1.tx.modxcloud.com** where **NNNN** is actually a 4-digit number. _Note: \"paas1\" might be \"paas2\", and \"tx\" might be \"ams\"._ \n3. Open a ticket from the MODX Cloud Dashboard, by clicking the Green “Help” button, substituting the real location from step 2 above for \"cNNNN.paas1.tx.modxcloud.com\".  \n  - For the question: Sassify Me\n  - Details:  I'm ready to create a new Manager theme, and need Sass installed in cNNNN.paas1.tx.modxcloud.com\n4. Wait for your Ticket Reply confirming your Cloud is ready.\n\n---\n\n###2. Bootstrapping Manager Themes\n\nUse the following steps once your site is ready for Sass, to bootstrap your theme. \n\n1. SSH into your site using the credentials from your Dashboard. Change **cNNNN** to your cloud number\n   \n  ```\n  ssh cNNNN@paas1.tx.modxcloud.com\n  ```\n  - Say Yes to continue connecting (if prompted)\n  - Enter the cloud SSH password\n2. Clone the [baseline Manager theme repo](https://github.com/modxcms/baseline-mgr) into a new `baseline` directory inside your `manager/` directory. The baseline repo contains 3 versions for starting points on custom Manager themes.\n  - **baseline**—a clone of the MODX default theme\n  - **baseline-full-tree**—a version of the MODX default theme, but with a full-height left bar for the tree menus\n  - **baseline-full-tree-dark**—a dark version of full tree, inspired by [Sterc's original Manager redesign mockup](http://f.cl.ly/items/1P2Y3I2t3X1r3G1Y0l2D/modx-23-2II.png)\n   \n  ```\n  cd www/manager\n  git clone git://github.com/modxcms/baseline-mgr.git baseline\n  ```\n3. Duplicate your chosen starting point into a new theme name directory of your choosing. For example, to create a theme based on the dark full height leftbar called **mytheme** you would use a `mytheme` directory: \n   \n  ```\n  cp -r baseline/baseline-full-tree-dark templates/mytheme\n  ```\n4. Install Bourbon into the Sass folder; you can also optionally install Neat in the same way, too:\n  \n  ```\n  cd templates/mytheme/sass\n  bourbon intstall\n  ```\n\n---\n\n###3. Set Your Compass\n\nYou can now use Compass to automatically compile the chnages into new CSS files anytime the Sass files are updated.\n\n1. Set up Compass:\n   \n  ```\n  cd templates/mytheme\n  compass create --bare --sass-dir \"sass\" --css-dir \"css\" --images-dir \"images\"\n  ```\n2. Make sure you get \"Congratulations\"\n3. Type `compass watch`\n4. You should see it compile Sass and create **index.css** with the notification:\n  `Compass is polling for changes. Press Ctrl-C to Stop.`\n5. Compass will now update your theme's CSS files anytime you save a change to the Sass files.\n\n---\n\n###4. See Your New Theme in Action\n\n1. Login to the Manager for your theming project\n2. Go to System Settings\n3. \"Filter by Area\" -\u003e Back-end Manager\n4. Scroll Down to \"Manager Theme\" and choose your theme from the select list options\n\n---\n\n###Making Changes to the Sass Files\n\nIf you want to purely use MODX for editing your Manager Sass files, we'd suggest installing the  [Ace MODX Extra](http://modx.com/extras/package/ace), the same editor used by Github and self-proclaimed high performance code editor for the web. Find out more information about [how to work with Ace at its website](http://ace.c9.io/#nav=about), but definitely try it out. It even provides helpful hints about things that you might consider changing next to lin numbers, and a lot more.\n\n1. Install Ace like you would other Extras, using the Package Manager\n2. Move to the Files tab in the Manager Tree panel\n3. Navigate to the `manager/templates/mytheme/sass` directory\n4. Click the files you wish to load to make changes\n5. Edit the files using syntax-highlighted editing, optionally clicking the upper-right expand icons for a full-window editing experience.\n6. To save changes to the files, get out of fullscreen mode if you're in it and simply press the save button in the Manager. As long as you have not closed your terminal session that started `compass watch` it should see the changes and compile new login.css and/or index.css files for you.\n\nYou can also use tools like Transmit to mount your `www/manager/templates/mytheme/sass/` directory to your desktop to use your favorite text editor, or other FTP programs to edit the file remotely.\n\n###Returning to Existing Manage Theme Projects in Progress\n\nChances are, you'll work on your theme over a few sessions. If you've already installed everything, ssh into your project using the instructions above, then enter the following commands:\n\n```\ncd www/manager/templates/mytheme\ncompass watch\n```\n\n---\n\n###Installing Your Theme in Other Projects\n\nTo use your theme on another MODX instance, you download the `manager/templates/mytheme/` directory, and upload it to the new installation, inside its `manager/templates/` directory. Then follow the steps above in _See Your New Theme in Action_  to change the System Settings to use your custom theme. Please note that your final Manager theme should go through a proper build process, which involves some additional dependencies to properly optimize the theme for distribution, but that is outside the scope of this document.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodxcms%2Fbaseline-mgr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodxcms%2Fbaseline-mgr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodxcms%2Fbaseline-mgr/lists"}