---
url: https://docs.artemsemkin.com/velum/html/content/menus.md
description: Add, rename or remove a menu item and keep its preview picture paired.
---

# Menus

The burger menu opens over the page with the site's whole menu, and shows a picture beside the item under the pointer. It is written into every page, so a change to it is one search and replace across the pages. Renaming, removing and adding an item are on [Edit every page at once](../get-started/edit-every-page-at-once); this page covers what an item is made of, its picture and the mark of the page being shown.

## How to access

**Any page → `<nav class="burger-menu__navigation js-burger-menu__navigation" aria-label="Overlay Menu">`**

![The burger menu: the item under the pointer shows its picture](https://docs.artemsemkin.com/velum/html/images/content/menus-1.png)

## An item's line

Each item is one `<li>`. Its label is the text in the `menu-overlay__text` span, and its type class sets its size: `menu-l` at the top level, `menu-m` in a sub-menu.

```html
<li class="menu-item" data-menu-item="24"><a href="journal.html"><span class="arts-dot-indicator__anchor" aria-hidden="true"></span><span class="menu-overlay__text js-menu-overlay__text menu-l">Journal</span></a></li>
```

An item with a sub-menu links to `#`, and its `<ul class="sub-menu">` follows on the next lines:

```html
<li class="menu-item" data-menu-item="6"><a href="#">…Works</span></a>
  <ul class="sub-menu">
    <li class="menu-item" data-menu-item="7"><a href="works.html">…All Works</span></a></li>
    …
  </ul>
</li>
```

## Giving an item its picture

An item and its picture carry the same `data-menu-item` number. The pictures are the `<img>` tags in `<div class="burger-menu__preview js-burger-menu__preview">`, at the top of the burger menu. A new item takes a number no other item has (the template's go up to 32), and its picture takes the same one; the others keep theirs.

Regex. Add the picture of the Studio item numbered `33` to every page:

| Search | Replace |
| --- | --- |
| `(<div class="burger-menu__preview js-burger-menu__preview" aria-hidden="true">)` | `$1<img width="1920" height="1280" src="assets/images/menu/velum-studio.jpg" alt="" loading="lazy" class="burger-menu__preview-image js-burger-menu__preview-image" decoding="async" data-menu-item="33" fetchpriority="low" />` |

There are 61 results, one per page.

## Marking the page being shown

Each page marks its own item, so the visitor sees where they are: `current-menu-item` on the item's `<li>`, `aria-current="page"` on its link, and `current-menu-ancestor` on the `<li>` of the item whose sub-menu holds it. In `studio.html`, the new Studio item reads:

```html
<li class="menu-item current-menu-item" data-menu-item="33"><a href="studio.html" aria-current="page">
```

A new item has no mark yet: add it in the one page it links to. Each page keeps its own mark, so never copy a whole menu from one page to another.

## Turning an item with a sub-menu into a link

Regex. This makes **Works** a link to `works.html` and removes its sub-menu from every page:

| Search | Replace |
| --- | --- |
| `(data-menu-item="6"><a href=")#("[^\n]*)\n\s*<ul class="sub-menu">[\s\S]*?</ul>\n\s*</li>` | `$1works.html$2</li>` |

There are 61 results. On the 12 Works pages, the item still carries `current-menu-ancestor` from the sub-menu it lost. Replace `class="menu-item current-menu-ancestor" data-menu-item="6"` with `class="menu-item" data-menu-item="6"` (12 results), then mark it current in `works.html`.

## The other menus

Some headers print a menu of their own in the bar: the work categories on Works and its category pages, the blog categories on the Journal and the posts, and the whole menu on the two Classic Menu pages. The footer has a Sitemap. Their labels are written the same way, so a rename across the pages reaches them too. Their current mark adds `dot-list__item_current` to the item's classes.

Next: [Header and footer](./header-and-footer).
