Extension Point: Surf Extension Modules
Description:
This tutorial demonstrates how the style used in the Share Header can be changed in an easy way. We will see how the background color, foreground color, and so on. can be customized for the main menu. This tutorial will also introduce you to the Aikau debug mode so you can find out what widgets are available, and the CSS files that they use. Which means you can find out what LESS variables are available to set custom values for.
The main takeaway from this tutorial is that you can easily customize an existing, or custom, theme by redefining LESS variables. And you can easily find out what Aikau widgets that are used for different components in the UI.
Implementation Steps:
A simple and effective way to customize the Share header, and other parts of the Share UI that uses Aikau widgets, is to follow these steps:
- Enable Aikau Debug mode so you can inspect Aikau pages and widgets
- Identify what Aikau widgets that are used to produce the content that should be customized (that is, the Share Header)
- Find out what CSS files that are used by the relevant widgets
- Inspect the CSS files and find out what LESS variables you can work with
- Override an out-of-the-box Theme, or create a custom Theme, by redefining one or more LESS variables
Related Information:
This tutorial assumes that you are familiar with the Share Header, which contains the main menu and the title. The Header is implemented with the new Aikau development framework and it is possible to customize the CSS files used by the Header widgets via LESS variables.
Source Code: Go to code
This tutorial assumes you have created a new SDK All-In-One project.
Tutorial implementation steps: