History: Add a Generic Bootstrap Stylesheet to the Themes Directory
Source of version: 6 (current)
Copy to clipboard
{syntax type="markdown" editor="wysiwyg"} Another way to make a new theme for a site, rather than linking to it from the Look and Feel admin page, is to add the theme's files to the *themes* directory in the file system. Create a new subdirectory in "themes" with the name of the new theme. The new theme's CSS file must havethis same name; 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. - `templates/` Any custom versions of Smarty template (.tpl) files needed for the theme. The stylesheet should be equivalent to a default bootstrap.css file appropriate for the Bootstrap version used by the site. This stylesheet 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. {include page="Custom Bootstrap stylesheet sources"} ## Limitations Because this generic Bootstrap stylesheet is made outside of Tiki, it has no awareness of some Tiki page elements, including those covered by the *tiki_base.css* file. 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.