Skip to content

Theme component providing custom settings for the discourse category header

License

Notifications You must be signed in to change notification settings

simafri/discourse-category-headers

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discourse Category Header theme component

This theme component provides a number of enhancements and custom settings for the discourse category header.

The default core Discourse category header is displayed on the category page above the navigation links. It is ONLY visible if a category logo image is uploaded in the category settings. The settings also allow for upload a category background image, which is displayed as a background image over the whole page.

This theme component provides the following enhancements

This theme component provides the following enhancements

Theme settings

  • show category name: Show the category name in the header
  • show category description: Show the category description text (the first paragraph of the "About this category" topic)
  • description text size: Size of text within the category description
  • text align: Alignment of the text within the category header
  • show subcategory header: Show header for subcategories
  • show parent category name: Prefix the parent category name on the subcategory headers (this acts as a breadcrumb link to the parent category page)
  • show lock icon: Show the lock icon on categories protected by permissions
  • show category logo: Show the category logo image within the header
  • show parent category logo: Show the parent category logo when a subcategory logo is not set
  • show site logo: Show the small site logo if a category logo is not set
  • position logo: Position of the logo within the header.
    -- 'left' and 'right' display the logo inline with the text.
    -- 'top' displays the logo above aligned with the text
  • size logo: Position of the logo within the header.
    -- Small is 50px high similar to a subcategory box logo.
    -- Standard is 150px high.
    -- Original is the size of the image uploaded
  • header style: Set the header style to either:
    -- Box: the category header is displayed in the same style as the standard Discourse boxes
    -- Banner: set the header background to the category background color and text to the foreground color
    -- None: no styling
  • header background image: Applies if you have uploaded a category background image
    -- 'contain', 'cover' and 'resize' display the background within the header.
    -- 'outside' is the Discourse default displaying it outside the header, over the whole page.
  • show mobile: Show category header on mobile devices
  • force mobile alignment: Force mobile alignment of logo-text to the top-centre of the header
  • hide if no category description: Hide header if category description is not set
  • hide category exceptions: Headers will not show for these categories

For further information, please see the instructions and screenshots on Discourse Meta. https://meta.discourse.org/t/discourse-category-headers-theme-component/148682

About

Theme component providing custom settings for the discourse category header

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 62.4%
  • SCSS 37.6%