We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46886
    • 1,154 Posts
    So I set things up in Step 1, and almost everything seems to work, there are a few problems but I will clean those up later.

    Now I have to deal with the Sass for design, colors and style, to make the forums my own. Finally I want to customize a lot of things, but for now I just want to arrange the colors and effects a little bit.

    I am just a hacker with little real ability in coding, I just know how to handle html and a little css, and then where to put the metatags or javascript, that's about it. But Sass code is somewhat accessible to me, as it similar to CSS, so I can read it a bit. Most importantly, it lets us do all sorts of really cool things like gradients, hover effects, and shadows and so on. As my design evolves, Sass is going to be critical to maintaining a really outstanding look and feel.

    I wasn't comfortable editing the Sass files on the server, so I downloaded everything and set it up on my local machine. I arranged it just like on the server, with the main sass file and several partials in the first folder, and then the lib and partial and the other folders as well. The config.rb file isn't hard to edit at all, I put mine below.

    Now I have access to all the templates and style sheets, and can convert, make a new css file, and upload that to the server in modx to implement. Chromium has been great not to cache the page, and I always clear cache after changing the css file then over to Chromium to see the changes. Relative paths work and everything. There are a couple warnings and one error on one picture, but I haven't seen any effect from that at all.

    The default design code is really robust I would say, there are lots of different effects that I can eventually utilize freely as I learn more. There are also lots of sort of dead ends that I can pick up and utilize myself (gradients that are defined but not used or rarely used, stuff like this), resources in the code basically. This means I don't have to know how to build up a shading effect, but still use one at will. I could take that code and use different colors, attach it to whatever I wanted...

    Now I care most about colors, and I built up a rough guide to where stuff is. Generally, the files to edit are _theme-settings, but also _forums, I didn't touch _color-patterns actually, as that seemed too confusing. Header stuff is all in _masthead.sass, _shared has a couple things. Text on the right sidebar is all in the sidebar template, and there are some boxes in there that key off of the main light background color (yes its a very dark implementation of a very light color).

    Basically the color palette provided is good but they ended up linking most stuff up to two values, the background color and the header color. So I have been unlinking them and at least having more variables involved. I provide my colors at the moment with comments, below.

    Background: all shadings of some posts, the grey area with "Title" in it, search and view latest posts, the sidebar dark boxes, the locked button, breadcrumbs

    Header: header pick, horizontal bar with title content in it, reply bar, and title of post when its a link. I can't remember if the whole top is built off of this value, anyway it all can be changed in the masthead.sass file

    Anyway, at this point I have almost complete control over my colors! I broke up the bunches just a bit, and figured out where stuff was mostly. There are a few gaps but overall I get to do what I want to do now!

    CONFIG.RB
    # Require any additional compass plugins here.
    
    # Set this to the root of your project when deployed:
    http_path = "/"
    css_dir = "stylesheets"
    sass_dir = "/"
    images_dir = "images"
    javascripts_dir = "js/redo"
    
    output_style = :expanded
    
    # To enable relative paths to assets via compass helper functions. Uncomment:
    relative_assets = false
    
    # To disable debugging comments that display the original location of your selectors.
    line_comments = true
    color_output = true
    
    # If you prefer the indented syntax, you might want to regenerate this
    # project again passing --syntax sass, or you can uncomment this:
    # preferred_syntax = :sass
    # and then run:
    # sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass



    COLOR GRID
    $c-base: #fff                                // Background color. Many elements are built from this base - recent posts are in _shared
    $c-copy: #444                                   // Base copy color- original is dark purple - most text of topics in grid
    $c-copy-med: #444               // Secondary copy areas - used for dates and posts of user in thread
    $c-dark-bg: #0066cc                             // Intense Green - Main CTA buttons and glow on hover - hover seems to have two colors involved but this is main one
    $c-dark-cool-bg: #797BF7                        // Dark Blueish Green - this is the main strong dark color - masthead has all header stuff, other in in boards and posts
    $c-alt-1: #0066cc                               // Light blue - one place, button in header
    $c-tertiary: #f3ad3a                            // Orange - Not sure if used
    $c-tertiary-alt: saturate($c-tertiary, 10%)     // To be used with orange
    $txt-color-lightblue: #0066cc                    // all top header links except create one link and there is text there
    $txt-color-lightblue-over: #a3c94f            // nothing it seems...
    
    // GRADIENTS
    $g-low-contrast: darken($c-base, 9%), darken($c-base, 17%)// where is it not used at all or much
    $g-med-contrast:         // Not used...
    $g-high-contrast:             // Not used...
      • 46220
      • 66 Posts
      Hi Andrew,

      How on earth did you change the colors and all?! I've tried just about everything and it will not work. Even deleted all content in _theme-settings.sass just to see if it would go berserk.... but it didn't. Still nothing changed sad. I hoped my 3 week holiday would make me feel better and fresh.... but it didn't.
        • 46886
        • 1,154 Posts
        Hmmm, something is weird here. You can change the colors for sure.

        One issue, the reason I had to download everything to my local computer, is I didn't know how to make the compass notice that a change was made in the sass files, so it would make a new css. I just don't have the chops to do that.

        Everytime you make changes to the sass files, the compass should jump in and make a new css file. If that's not happening then you have the same problem I did. Compass isn't "watching" your files for changes.

        Again, what I did was download all files to my local comp. Make a folder called sass, and inside that put all the basic sass files like forum_styles and so on, and then the folders like images, css, lib, partials, shared, just like what you see in your installation.

        Then, use my ruby code for the config.rb, change one value in a sass file, and tell compass to watch the folder, it should produce your new css file. Then upload that to the installation.

        Once you have gotten Compass to watch for changes, that's half the battle. Then its just change, make the new css, upload the new css, check out the changes...that got a little boring after awhile though haha.

        Let me know if the above is clear.
          • 46220
          • 66 Posts
          Hmmm, ok. Will try that and I think I understand. If not, I will let you know smiley. Thanks!
            • 46886
            • 1,154 Posts
            Ok cool! If you can get compass and everything installed on your local machine, and get all the files in there (about 4-5 files in the main folder, and the folders, like css, images, lib, shared, partials...), AND get it to watch the folder, then you are almost there.

            Then the only trick left is to have the relative paths in the config.rb file (as above) AND in the top-level sass file (I think its forum-styles.sass, I forgot to mention that one before) so it can find everything. Config needs to know where the sass stuff is, and forum-styles.sass is pretty much just a list of the partials in needs to look for. If you need to see that I can look for it, I just had a drive failure and can't get access to anything right now, should be manageable though. I hope!

            Let me know how it goes! Good luck!
              • 46220
              • 66 Posts
              Quote from: nuan88 at Aug 12, 2014, 11:48 PM
              Then the only trick left is to have the relative paths in the config.rb file (as above) AND in the top-level sass file (I think its forum-styles.sass, I forgot to mention that one before) so it can find everything. Config needs to know where the sass stuff is, and forum-styles.sass is pretty much just a list of the partials in needs to look for. If you need to see that I can look for it, I just had a drive failure and can't get access to anything right now, should be manageable though. I hope!

              I think that is the whole problem in the first place: it can't find the config.rb file and/or forum-styles.sass or at least, these files can't find the other sass files. So I assume I have to make changes there. The standard forum-styles.sass looks like this:
              /*! MODX Forums Default Theme
               *  12/2012
               *  CSS Compiled using SASS and Compass
               */
              
              // load compass and other partials
              @import compass/css3
              @import compass/css3/inline-block
              @import compass/css3/border-radius
              @import compass/reset
              @import compass/css3/images
              @import compass/utilities/general/clearfix
              @import partials/_animate.sass
              
              // THEME SETTINGS
              // Contains design patterns, typography and variables for theme
              @import theme-settings.sass
              @import _grid.scss
              
              // jquery UI
              @import lib/_jquery-ui-1.8.16.custom.scss
              @import lib/_shared.sass
              @import lib/_layout.sass
              @import lib/_masthead.sass
              @import lib/_helpers.sass
              
              // forums
              @import _forums.sass
              @import forums/_grid-view.sass
              @import forums/_sidebar.sass
              @import forums/_profile.sass
              @import forums/_reply-editor.sass
              @import forums/_thread-answer-marker.sass
              @import forums/_shCore.sass
              
              // admin toolbar
              @import lib/_forums-toolbar.scss
              

              Should I make changes there? And what about the config.rb, which looks like this:
              # Require any additional compass plugins here.
              
              # Set this to the root of your project when deployed:
              http_path = "/"
              css_dir = "css/redo"
              sass_dir = "sass"
              images_dir = "images/redo"
              javascripts_dir = "js/redo"
              
              output_style = :expanded
              
              # To enable relative paths to assets via compass helper functions. Uncomment:
              relative_assets = true
              
              # To disable debugging comments that display the original location of your selectors. Uncomment:
              line_comments = true
              color_output = true
              
              
              # If you prefer the indented syntax, you might want to regenerate this
              # project again passing --syntax sass, or you can uncomment this:
              # preferred_syntax = :sass
              # and then run:
              # sass-convert -R --from scss --to sass assets/forums/sass scss && rm -rf sass && mv scss sass
              

              Does this need changes?

              Never thought it would be this complicated creating a forum haha.
                • 46886
                • 1,154 Posts
                Ok let me try, but unfortunately I don't have the files handy now, I can get them later.

                For config.rb, you make that file by copying the code I gave and pasting into a new file, and name it config.rb, and put it into the same folder with everything else.

                For the forum-styles.sass file, I wish i could just check mine but I can't, as I remember there were a few more files in the same folder, so this part of the file looks like it *might* be not complete:

                // THEME SETTINGS
                // Contains design patterns, typography and variables for theme
                @import theme-settings.sass
                @import _grid.scss


                Those are the files that are in the main file.

                Check the files in the install itself. Every single file in components/themes/default/sass should be in there, and should be referenced in forum-styles.sass, so it can see them and add to them.

                It should look like this:
                Sass folder
                - main sass file
                - several other sass files, I think its about 3-4
                - rb file, called config.rb
                - 4-6 folders such as css, images, forum, shared, lib, partials
                - each of these folders contain the items you can see in the install. I downloaded them all but i think the better way is download the Discuss from github to your comp.

                Then, the main sass file needs to include each sass file in the same folder, and each folder AND the path to each sass file in those folders. I took the original file and changed the paths to be relative. I think / is equal to the Sass folder, so /lib/somefile.sass should work.

                Hope someone else could chime in. I am really at a loss because of a drive failure, I don't have the files handy right now.
                  • 46886
                  • 1,154 Posts
                  And the compass imports, I am sorry i cant really remember anything. This may depend on whether you use linux, windows or apple. Sorry I can't help at the moment on this issue, I just have no recollection.

                  Again, if you can get the compass to load and watch the folder, and make a css file, that's the goal. If you got that, you are at least 90% there.
                    • 46220
                    • 66 Posts
                    No worries mate, you've been a great help already and will figure it out eventually. I'll post back later with the progress smiley.
                      • 46886
                      • 1,154 Posts
                      Ok cool, and I will get back my files soon too. I hope.