Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

autoload.less

...

variables.less

...

phpFox 4.3+ provides support to develop your themes using LESS. This not only makes it easier on you as the designer, but also gives Admins the ability to change the color palette of your theme direct from their AdminCP.

 

Info

If you wish to continue reading on, make sure you have an IDE, Text Editor or Server that supports LESS compiling. phpFox only supports the LESS compiling from the AdminCP for when a client is designing your theme. Under development its best to do it via the .less files.

 

variables.less

To get this started we need to have a file in our themes assets/ folder called variables.less. You can place any of your custom less variables here. In this test, we will work with a simple example. In that file add

Code Block
@header_bg: #000;

With this in place, we can now start working with autoload.less.

autoload.less

The autoload.lessfile needs to also be placed in your themes assets/ folder. The first line of this file should be to include the variables.less file. In this working example let's add the following code 

Code Block

@import "variables";

.sticky-bar {
   background:@header_bg;
}