87 lines
1.6 KiB
Markdown
87 lines
1.6 KiB
Markdown
---
|
|
id: 5f35e5c4321f818cdc4bed30
|
|
title: Passo 30
|
|
challengeType: 0
|
|
dashedName: step-30
|
|
---
|
|
|
|
# --description--
|
|
|
|
A aparência é boa. É hora de começar a adicionar alguns itens de menu. Adicione um elemento vazio `article` abaixo do título `Coffee`. Ele conterá o sabor e o preço de cada café que você oferecer.
|
|
|
|
# --hints--
|
|
|
|
Você deve ter uma tag de abertura `<article>`.
|
|
|
|
```js
|
|
assert(code.match(/<article>/i));
|
|
```
|
|
|
|
Você deve ter uma tag de fechamento `</article>`.
|
|
|
|
```js
|
|
assert(code.match(/<\/article>/i));
|
|
```
|
|
|
|
O elemento preexistente `h2` deve permanecer o mesmo.
|
|
|
|
```js
|
|
assert($('h2').length === 1);
|
|
```
|
|
|
|
O elemento `article` deve vir depois do elemento `h2`.
|
|
|
|
```js
|
|
const article = $('article')[0];
|
|
assert(article.previousElementSibling.tagName === 'H2');
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```html
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Cafe Menu</title>
|
|
<link href="styles.css" rel="stylesheet"/>
|
|
</head>
|
|
<body>
|
|
<div class="menu">
|
|
<main>
|
|
<header>
|
|
<h1>CAMPER CAFE</h1>
|
|
<p>Est. 2020</p>
|
|
</header>
|
|
<section>
|
|
--fcc-editable-region--
|
|
<h2>Coffee</h2>
|
|
--fcc-editable-region--
|
|
</section>
|
|
</main>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
```
|
|
|
|
```css
|
|
body {
|
|
background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg);
|
|
}
|
|
|
|
h1, h2, p {
|
|
text-align: center;
|
|
}
|
|
|
|
.menu {
|
|
width: 80%;
|
|
background-color: burlywood;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
}
|
|
```
|
|
|