Loading...
 
Skip to main content

History: Add a Generic Bootstrap Stylesheet to the Themes Directory

Preview of version: 2

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.

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