History: Add a Generic Bootstrap Stylesheet to the Themes Directory
Preview of version: 1
- «
- »
Another way to make a new theme for a site is to add it to the themes directory in the file system. Create a new CSS file with the theme name you chose and place it (using a file transfer application, etc.) in its own subdirectory of the themes directory. The themes directory contains a subdirectory (folder) for each theme, which in turn contains at least a css directory (like themes/newtheme/css/newtheme.css). This is a good choice if the theme has images, icons or other components. (See CSS Overview for more details.) The hierarchy for this is like
-
tiki root/
-
themes/
-
newtheme/
- A new directory to contain the new theme (has the same name).-
css/
- A CSS directory is necessary, to contain the style sheet file.-
newtheme.css
- Place the new CSS file (style sheet) here.
-
-
fonts/
- Fonts can go here rather than being fetched from an online source. -
icons/
- For theme-specific icon sets. -
images/
- Any background or border images, etc. can go here.
-
-
-
The style sheet should be equivalent to a default bootstrap.css file (Bootstrap version 3 for Tiki 13 - 15). This style sheet could be made from scratch but that would be a daunting project due to all the CSS for responsive behavior, etc. Probably it would be better to use an automatic generator, etc. to produce at least the initial draft of the file.
Limitations
Because this style sheet is made outside of Tiki, it has no awareness of some Tiki page elements covered by the tiki_base.css file. (Themes made by compiling Less can easily override the CSS values in tiki_base.css so can style the site more completely.) So some adjustments will probably be needed after checking the appearance of the site using the theme.
Similarly, "Bootstrap" stylesheets made for other web applications such as WordPress may be able to be used with Tiki but the HTML they were written for is likely to be quite different from Tiki's, so some modification will be necessary. We plan to test and document this in the near future.