Loading...
 
Skip to main content

History: Add a Generic Bootstrap Stylesheet to the Themes Directory

Source of version: 4

Copy to clipboard
            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.
        

History

Advanced
Information Version
Sun 02 of Apr, 2023 10:38 GMT-0000 Gary Cunningham-Lee Page renamed from Add a Style Sheet to the Themes Directory to Add a Generic Bootstrap Stylesheet to the Themes Directory. Semantic alias redirect created 5
Sun 02 of Apr, 2023 10:37 GMT-0000 Gary Cunningham-Lee Updated information. 4
Tue 24 of Apr, 2018 20:03 GMT-0000 luciash d' being ?‍♂️ 3
Tue 26 of Jan, 2016 08:42 GMT-0000 Gary Cunningham-Lee Added tags. 2
Tue 26 of Jan, 2016 07:54 GMT-0000 Gary Cunningham-Lee Page created. 1