Tailwind Logo

Building a Demo Site with Headless SXA - Part 2 Creating a Partial Design - Creating Headers Part 1

Headless SXAXM Cloud

Published: 2023-02-08

As the first step in creating a demo site, we will design a header partial. We'll use standard components with slight visual modifications. The process involves running the XM Cloud container locally as the working environment.

Creating Headers

To create a partial design for use in the header area, add a partial design. To do so, first launch the Experience Editor, click on the Partial Designs item in the Experience Accelerator menu, and select Insert Partial Design to add a new design.

header01.png

A dialog box will open. Here we will add a partial design called Demo Header.

header02.png

The screen switches to a screen where you can place components.

header03.png

Set Container

The first step is to place the containers. In this case, we will place three in the Header area.

header04.gif

Confirm that the three containers have been placed. This confirmation does not need to be done every time. This is just a step to show you that this is where you have changed as a blog. Open the Content Editor and find the Partial Design folder for the appropriate site.

header05.png

Select this item and click on Presentation - Details in the menu to open it, select the Final Layout tab, and click on the Edit button to see where the components are placed. Clicking on the control, you can see that three containers have been placed as shown below.

header06.gif

Setting background color

In this case, we would like to add a background color to the container to differentiate its use. To do so, select a container and click on the second icon from the left when the screen looks like the one below.

header07.png

After making your selections, change the colors in the Style section. Select Dark Background for the top container and Gray Background for the second container.

header08.gif

Add a style

The situation is that there is a blank space on the left side for the container placement. For this reason, we need to add a style. For example, in the standard state, there are two styles to choose from

header09.png
  • Centered
  • Bordered

Add styles for wider widths.

  1. Open the content editor
  2. Select the tree of styles managed by the container
  3. Add full width to the Container style list
  4. Value に fullwidth-container を設定します
  5. Add a Container to the rendering to make this style available.
header10.gif

Full width can now be selected as the style. Check this.

header11.png

cThe specified style is applied and the background color is applied to the full width.

header12.png

Set the above style for container 2 as well.

Summary

In this article, I showed you the procedure for adding a style with three containers in a row. Although the actual work will be completed quickly, we proceeded to show you where you can see the containers when they are placed (presentation) and where you should work if you want to add a style, which is something you should know the first time around.

In the next article, we will place another component in the container to make it look more like a header.

Tags