Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
/ copenhagen_theme Public archive
forked from zendesk/copenhagen_theme

The default theme for Zendesk Guide

License

Notifications You must be signed in to change notification settings

pdq/copenhagen_theme

 
 

Repository files navigation

PDQ Developer notes

  • Make sure to use the ruby instructions for compilling the scss. Make changes in _pdq_main.scss. Don't edit style.css directly.
  • highlight.js is loaded into the assets folder for code highlighting pre code blocks. See usage instructions here: (https://highlightjs.org/usage/)
    • assets are loaded in document_head.hbs, and called in script.js

Copenhagen Theme by Zendesk

The Copenhagen theme is the default Zendesk Guide theme. It is designed to be responsive and accessible. Learn more about customizing Zendesk Guide here.

The Copenhagen theme for Help Center consists of a set of templates, styles, a Javascript file used mainly for interactions and an assets folder.

How to use

This is the latest version of the Copenhagen theme available for Guide. It is possible to use this repository as a starting point to build your own custom theme. You can fork this repository as you see fit. You can use your favorite IDE to develop themes and preview your changes locally in a web browser using the Zendesk Apps Tools (ZAT). For details, see Previewing theme changes locally.

Customizing your theme

Once you have forked this repository you can feel free to edit templates, CSS in style.css (if you would like to use SASS go to the Using SASS section), javascript and manage assets.

Manifest file

The manifest allows you to define a group of settings for your theme that can then be changed via the UI in Theming Center. You can read more about the manifest file here.

Settings folder

If you have a variable of type file, you need to provide a default file for that variable in the /settings folder. This file will be used on the settings panel by default and users can upload a different file if they like. Ex. If you would like to have a variable for the background image of a section, the variable in your manifest file would look something like this:

{
  ...
  "settings": [{
    "label": "Images",
    "variables": [{
      "identifier": "background_image",
      "type": "file",
      "description": "Background image for X section",
      "label": "Background image",
    }]
  }]
}

And this would look for a file inside the settings folder named: background_image

Adding assets

You can add assets to the asset folder and use them in your CSS, Javascript and templates. You can read more about assets here

Publishing your theme

After you have customized your theme you can download the repository as a zip file and import it into Theming Center.

You can follow the documentation for importing here.

You can also import directly from GitHub - learn more here.

Templates

The theme includes all the templates that are used for a Help Center that has all the features available. List of templates in the theme:

  • Article page
  • Category page
  • Community post list page
  • Community post page
  • Community topic list page
  • Community topic page
  • Contributions page
  • Document head
  • Error page
  • Footer
  • Header
  • Home page
  • New community post page
  • New request page
  • Requests page
  • Search results page
  • Section page
  • Subscriptions page
  • User profile page

You can add up to 10 optional templates for:

  • Article page
  • Category page
  • Section page

You do this by creating files under the folders templates/article_pages, templates/category_pages or templates/section_pages. Learn more here.

Styles

The styles that Theming Center needs to use in the theme are in the style.css file in the root folder.

The styles for the theme are split using Sass partials, all the partials are under styles/, they are all included in the "main" file index.scss and then compiled to CSS. If you wish to use SASS you can go to the using SASS section

Assets

These are the images that are needed for the theme. These include:

  • Loader
  • Dropdown arrow

Using SASS

In order to use SASS for development, you just need to compile it into the CSS that Zendesk Guide understands. Note: Zendesk App Tools theme preview currently does not support live SASS compilation.

Requirements

  • Install Ruby, we use sassc gem to compile our .scss files. You can see how to install Ruby here.
  • Install sassc gem. You can run:
    gem install sassc

Now you can compile your SASS files running:

./bin/compile.rb

Which will take all the scss files inside the styles/ folder and create the style.css file that is consumable by Zendesk Guide.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/zendesk/copenhagen_theme Please mention @zendesk/guide-growth when creating a bug report or a pull request.

About

The default theme for Zendesk Guide

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 31.9%
  • Handlebars 30.6%
  • SCSS 30.2%
  • JavaScript 5.6%
  • Ruby 1.7%