Jump to content

CentralNotice/BannerEditorUserGuide

From Meta, a Wikimedia project coordination wiki

Introduction

[edit]

The CentralNotice Banner Editor is a visual tool for creating and editing banners. It allows you to:

  • Create banners visually without writing code
  • Design responsive banners for mobile, tablet, and desktop
  • Use pre-built templates for quick banner creation
  • Export production-ready code for deployment to CentralNotice
  • Manage multiple banners with favorites

What you'll need

[edit]
  • A modern web browser
  • Basic understanding of banner design concepts
  • No coding experience required

Getting started

[edit]

Accessing the editor

[edit]

Open the CentralNotice Banner Editor in your web browser and you'll see a home page.

Home page overview

[edit]
A screenshot of the CentralNotice Banner Editor's homepage

The home page is your central hub for managing banners:

  • Navigation sidebar: Home, Favorites, Documentation links
  • Recent Edits: Shows your most recently edited banners
  • Banner Templates: Browse and select templates to start creating

Creating your first banner

[edit]

There are two ways to create a banner:

Method 1: Start from a template in the home page

[edit]
How to create a new banner with a template.
  1. On the home page, scroll to the templates section
  2. Click on a template that matches your design needs
  3. The editor will open with the template pre-loaded
  4. Customize the template (see Editing Banner Elements)
  5. Your changes are saved automatically

Method 2: Start from blank

[edit]
How to create a banner from blank.
  1. Click the "Create new banner" button in the navigation bar
  2. The editor opens with a blank canvas
  3. Open the templates sidebar (left panel)
  4. Select a template to start customizing

Understanding the editor

[edit]

Editor interface layout

[edit]
A brief overview of the editor.

The editor provides a visual interface with four main areas:

  1. Header: Navigation and export tools
  2. Templates sidebar: Browse and select starting designs
  3. Canvas: Live preview of your banner
  4. Inputs sidebar: Context-sensitive controls for selected elements

Working with templates

[edit]

Browsing templates

[edit]
How to select a template from the templates sidebar.
  1. Click the Templates button in the header
  2. Use the search bar to find templates by name or scroll to template
  3. Click a template to apply it to your banner

Understanding templates

[edit]

Templates provide:

  • Pre-designed layouts optimized for different screen sizes
  • Default content (text and images) that you can customize

Switching templates

[edit]

Warning: Switching templates will replace any existing banner design.

Tip: Create a new banner instead of switching templates if you want to keep your current work.

Editing banner elements

[edit]

Element types

[edit]

A banner contains four main types of elements:

  1. Banner container: The main banner box with an editable link
  2. Images: Logo, graphics, or decorative images
  3. Text: Headings, body text, or calls-to-action
  4. Close button: Allows users to dismiss the banner

Selecting banner elements to edit

[edit]
How to select banner elements.

To edit any element:

  1. Click the element in the canvas preview
  2. The inputs sidebar opens with editing options
  3. Make your changes
  4. Changes appear instantly in the preview
  5. Click elsewhere or close the sidebar when done

Visual indicator: Selected elements have an outline.


Positioning elements

[edit]

Elements can be positioned using two methods:

Alignment mode (Recommended)

[edit]
How to position banner elements using the editor's alignment buttons.

Alignment mode uses CSS grid to ensure banner responsiveness. Banner elements are aware of one another and text wraps or unwraps to fit the available space. To implement this:

  1. Select an element
  2. In the inputs sidebar, find the alignment property in the top section
  3. Set a Horizontal Alignment (Left, Center, Right) and a Vertical Alignment (Top, Middle, Bottom)

Examples:

Image aligned top left using alignment buttons.
Logo in top-left: Horizontal: Left, Vertical: Top
Text centered with alignment buttons.
Text in center: Horizontal: Center, Vertical: Middle

Advantages:

  • Simple to use
  • Works well with responsive design

Absolute position mode

[edit]

Absolute positioning gives precise pixel-perfect control. The elements are set to position absolute under the hood and are relative to the banner container.

  1. Select an element
  2. Locate the position form control in the top section of the inputs sidebar
  3. Set Horizontal (positions from the left of the banner) and Vertical (positions from the top of the banner) values

Note: Absolutely positioned elements are not aware of other elements and may overlap when banner shrinks or scales across viewports. Precise positioning is required at each breakpoint.

Example:

Image absolutely positioned 10px from the top and 20px from the left.

Spacing with margin and padding

[edit]

Each has four sides: Left, Right, Top, Bottom

The spacing controls (for both Margin and Padding) are currently collapsed/hidden.
The spacing controls (for both Margin and Padding) are currently expanded/visible.

Margin: Space outside the element (pushes other elements away)

Padding: Space inside the element (pushes content inward)


[edit]
How to update banner link.

To update the clickable banner link:

  1. Locate the banner link field in the inputs sidebar
  2. Enter your desired link

Styling the banner container

[edit]

The banner container is the main box that holds all elements. To edit the banner container click anywhere on the banner canvas outside other child elements.

Editable banner properties

[edit]

Background color:

  1. Click Background color picker
  2. Choose color or enter hex code
  3. Banner background updates

Background image:

How to add a background image to a banner.
  1. Find Background image field
  2. Enter image URL (e.g., //upload.wikimedia.org/...)
  3. Set Image size:
    1. Cover: Image fills banner, may be cropped
    2. Contain: Entire image visible
  4. Set Image position: Center, top, left, bottom, right, etc.
  5. Set Image repeat:
    1. No repeat: Image appears once
    2. Repeat: Repeats image both horizontally and vertically
    3. Repeat-x: Repeats horizontally only
    4. Repeat-y: Repeats vertically only
    5. Space: Adds gaps between repeated images (no clipping)
    6. Round: Scales repeated images to fill space (no gaps)
[edit]

Width: Banners automatically fill available width (100%)

Height: Set banner height in pixels

Border & effects

[edit]

Border:

  • Border width: Thickness on each side (Top, Right, Bottom, Left)
  • Border color: Border color
  • Border style: Solid, dashed, dotted, inset, none
  • Border radius: Round corners (px)

Box shadow:

  1. Enable Box shadow
  2. Set the horizontal offset (X): Shadow distance left/right
  3. Set the vertical offset (Y): Shadow distance up/down
  4. Set the blur radius (Blur): Shadow softness
  5. Choose color

Working with images

[edit]
How to edit images.

Changing image source

[edit]
  1. Select the image element
  2. In the inputs sidebar, find the image section below the margin control
  3. Choose image type by toggling the embed SVG code checkbox:
  1. For SVG: Check embed SVG code checkbox and upload your SVG image
  2. For URL: Uncheck the embed SVG code checkbox and enter the image source. For this, protocol relative URLs are preferred. See https://meta.wikimedia.org/wiki/Help:CentralNotice#Images for more details

Tip: Use Wikimedia Commons for hosted images.

Improving image accessibility

[edit]

Select the image and find:

  1. Alt text field for regular images
  2. Aria label text field for SVGs
  3. Enter descriptive text

Why this matters: See https://webaim.org/techniques/alttext/#intro for more details

Styling images

[edit]

Size controls: Adjust image dimensions (width, height) and constraints (min/max width, min/max height) using px or % values.

Fit & position: Control how images fill their container with Object Fit (Contain shows full image, Cover fills and may crop, Fill stretches) and alignment with Object Position.

Visual effects: Apply opacity, borders, rounded corners (border radius), and box shadows.


Editing text

[edit]
How to edit text.

Changing text content

[edit]
  1. Select the text element by clicking it
  2. In the inputs sidebar, find the Update text field
  3. Type your new text
  4. The preview updates immediately

Styling text

[edit]

Typography controls: Customize text appearance with standard options like font family, size, weight, style, color, alignment, line height, and letter spacing.

Text effects: Apply decorations (underline, strikethrough), transform case, add shadows, or adjust opacity.

Layout controls: Adjust size (width and height), spacing (padding/margin), and positioning.


Customizing the close button

[edit]

The close button allows users to dismiss the banner.

To edit close button:

[edit]
  1. Click the close button (X icon) in the banner preview
  2. The close button is split into two elements under the hood for editing purposes:
    1. Button box: Container around the icon
    2. Icon: The X icon itself

Button box styling

[edit]
  • Position: Where close button appears
  • Background: Button background color
  • Border: Border around button
  • Padding: Space around icon inside button
  • Opacity: Transparency
  • Box shadow: Drop shadow effect around button

Icon styling

[edit]
  • Size: Icon width/height
  • Color: Icon stroke color
  • Stroke Width: Thickness of X lines (1-2px)

Example (editor settings, not CSS):

Applying the styles below to the close button

Button box:

 Position: top right
 padding: 6px 8px
 Background: #000000
 Border Radius: 2px

Icon:

 Size: 12px
 Color: #ffffff
 Stroke Width: 2px

Note: The close button uses absolute positioning, so it doesn't affect other elements and may overlap with them if not positioned carefully.

Responsive design

[edit]

Responsive banners adapt their design for different screen sizes.

Viewport modes

[edit]
The editor supports four viewport modes:
Viewport Screen Width Typical Devices
Mobile < 640px Phones
Tablet 640px - 1024px Tablets, small laptops
Desktop ≥ 1024px Laptops, desktops
One size All sizes Same design for all devices

Switching viewports

[edit]
How to design a responsive banner.
  1. Click the Viewport menu button in the header
  2. Choose: Mobile, Tablet, Desktop, or One size
  3. Canvas preview updates to show that viewport
  4. Edit styles for the selected viewport

Responsive vs one size

[edit]

Responsive design (default)

[edit]
  • Different styles for mobile, tablet, desktop
  • More work to implement different styles for each screen size

One size design

[edit]
  • Single design for all screen sizes
  • Faster to create

Managing your banners

[edit]

Viewing your saved banners

[edit]
Saved banner management.

Your banners appear in two places:

  1. Home page > Recent Edits: Shows recently modified banners
  2. Favorites page: Shows banners you've marked as favorites

Favoriting banners

[edit]

Favorites help you quickly access important banners.

To favorite a banner:

[edit]
  1. On the home page or favorites page
  2. Find the banner card
  3. Hovering over a banner thumbnail reveals a star icon
  4. Click the star icon
  5. Star fills in to indicate it's favorited
  6. Banner now appears on the favorites page

To unfavorite:

[edit]
  1. Click the filled star icon
  2. Star becomes empty
  3. Banner removed from favorites page
  4. Banner still accessible from home page

Possible use cases for favorites:

  • Mark production banners
  • Save template variations you use frequently
  • Quick access to work-in-progress banners

Renaming banners

[edit]
How to rename banners.

From the editor:

[edit]
  1. Open your banner in the editor
  2. Click the banner name field in the header (top center)
  3. Type the new name
  4. Click outside the field
  5. Name is saved automatically

Default name: "Untitled Banner" when there is no name set.


Deleting banners

[edit]
How to delete a banner.

To delete a banner:

[edit]
  1. On the home page or favorites page
  2. Find the banner card, and hover over the thumbnail
  3. Click the delete icon

Warning: Deletion is permanent and cannot be undone. Export important banners before deleting.

Exporting to CentralNotice

[edit]
How to export designed banner code to the existing CentralNotice extension.

Generating banner code

[edit]
  1. Open your banner in the editor
  2. Make final adjustments and verify design
  3. Choose viewport mode:
    1. One size: Generates single design for all devices
    2. Responsive (Mobile, Tablet, and Desktop): Generates responsive CSS with media queries
  4. Click the "Generate Code" button in the header
  5. A dialog appears with the generated HTML/CSS code

Understanding the generated code

[edit]

The generated code typically contains two parts:

1. CSS styles

[edit]
<style>
  /* Banner-specific styles */
  #cn-banner-id.cnotice { ... }

  /* Element styles */
  #cn-banner-id .cnotice-text-1 { ... }

  /* Responsive (if not one-size) */
  @media screen and (min-width: 640px) { ... }
</style>

2. HTML structure

[edit]
<div class="cnotice" id="cn-banner-id">
  <a class="cnotice-full-banner-click" href="...">
    <img class="cnotice-image-1" src="..." alt="..." />
    <p class="cnotice-text-1">Your text</p>
  </a>
  <button class="cnotice-toggle-box" onclick="mw.centralNotice.hideBanner();">
    <svg class="cnotice-toggle-box-icon">...</svg>
  </button>
</div>

Copying the code

[edit]
  1. In the Generate Code dialog
  2. Click the "Copy" button
  3. The generated code is now in your clipboard

Deploying to CentralNotice

[edit]
  1. Go to the CentralNotice interface for creating banners (Special:CentralNoticebanners)
  2. Create a new banner or edit existing one
  3. Paste the code into the "Edit banner" textarea
  4. Preview the banner in CentralNotice

Accessibility considerations

[edit]

Color contrast:

[edit]

Alt text:

[edit]
  • Describe image content, not just "logo" or "image"
  • Be concise but descriptive
  • Skip decorative images or use empty alt=""

Close button:

[edit]
  • Keep close button visible and accessible
  • Meet the minimum touch target for devices

Additional resources

[edit]

CentralNotice documentation

[edit]

Design resources

[edit]

Getting help

[edit]