<body class="page">
<header class="header">
<img class="logo" src="./images/__logo.png">
<ul class="header__links">
<a class="russian__lang-link lang-link" href="#">Ru</a>
<a class="english__lang-link lang-link" href="#">En</a>
</ul>
</header>
<section class="menu">
<h2 class="menu__title">Редактировать профиль</h2>
<article class="menu__logs">
<p class="name"></p>
<p class="subname"></p>
<button class="menu__button"><h2 class="botton__text">Сохранить</h2></button>
</article>
</section>
<main class="content">
<section class="cover">
<a href="https://stampsy.com/na-elektrichkakh-do-baikala">
</a>
<h2 class="cover__title">До Байкала «на собаках»</h2>
<p class="cover__subtitle">По мотивам учебной темы о Транссибе — путешествие от столицы до Байкала на
электричках.</p>
</section>
</main>
<script src="/script.js"><script>
</body>
.menu {
display: none;
margin: 50px auto;
border-radius: 10px;
background: white;
width: 282px;
height: 322px;
}
let page = document.querySelector ('.page');
let header = page.querySelector ('.header');
let headerLinks = header.querySelector ('.header__links');
let menuButton = header.querySelector ('.russian__lang-link')
let menu = document.querySelector ('.menu')
function addMenu () {
menu.style.display = 'block'
}
menuButton.addEventListener ('click', addMenu)
<div class="overlay">
<div class="menu">
//code...
</div>
</div>
function addMenu () {
menu.style.display = 'block'
overlay.style.display = 'block'
overlay.addEventListener('click', closeMenu)
}
function closeMenu(e) {
if (e.target.classList.contains('overlay')) {
menu.style.display = 'none'
overlay.style.display = 'none'
overlay.removeEventListener('click')
}
}