* feat: use legacy flag chore: reorder challenges fix: linter revert: server change feat: unblock new editor fix: proper order fix: 0-based order fix: broke the order feat: move tribute certification to its own block feat: split the old projects block into 4 fix: put all blocks in order chore: add intro text refactor: use block, not blockName in query fix: project progress indicator * fix: reorder new challenges/certs * fix: reorder legacy challenges * fix: reintroduce legacy certs * feat: add showNewCurriculum flag to env * chore: forgot sample.env * feat: use feature flag for display * fix: rename meta + dirs to match new blocks * fix: add new blocks to help-category-map * fix: update completion-modal for new GQL schema * test: duplicate title/id errors -> warnings * fix: update completion-modal to new GQL schema Mk2 * chore: re-order metas (again) * fix: revert super-block-intro changes The intro needs to show both legacy and new content. We need to decide which pages are created, rather than than what a page shows when rendered. * feat: move upcoming curriculum into own superblock * fix: handle one certification with two superBlocks * fix: remove duplicated intros * fix: remove duplicate projects from /settings * fix: drop 'two' from Responsive Web Design Two * chore: rename slug suffix from two to v2 * feat: control display of new curriculum * feat: control project paths shown on /settings * fix: use new project order for /settings This does mean that /settings will change before the release, but I don't think it's serious. All the projects are there, just not in the legacy order. * fix: claim/show cert button * chore: remove isLegacy Since we have legacy superblocks, we don't currently need individual blocks to be legacy * test: fix utils.test * fix: verifyCanClaim needs certification If Shaun removes the cert claim cards, maybe we can remove this entirely * fix: add hasEditableBoundaries flags where needed * chore: remove isUpcomingChange * chore: v2 -> 22 Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
126 lines
2.9 KiB
Markdown
126 lines
2.9 KiB
Markdown
---
|
|
id: 619665c9abd72906f3ad30f9
|
|
title: Step 1
|
|
challengeType: 0
|
|
dashedName: step-1
|
|
---
|
|
|
|
# --description--
|
|
|
|
You will be building a happy Flappy Penguin, and further exploring CSS transforms and animations in the process.
|
|
|
|
Begin with your basic HTML boilerplate. Include the `DOCTYPE` declaration, `html` element, the appropriate `meta` tags, a `head`, `body`, and `title` element. Also, link your stylesheet to the page.
|
|
|
|
# --hints--
|
|
|
|
Your code should have a `<!DOCTYPE html>` declaration.
|
|
|
|
```js
|
|
assert(code.match(/<!DOCTYPE html>/i));
|
|
```
|
|
|
|
Your code should have an `html` element.
|
|
|
|
```js
|
|
assert.equal(document.querySelectorAll('html')?.length, 1);
|
|
```
|
|
|
|
Your code should have a `head` element within the `html` element.
|
|
|
|
```js
|
|
assert.equal(document.querySelectorAll('head')?.length, 1);
|
|
```
|
|
|
|
Your code should have a `body` element within the `html` element.
|
|
|
|
```js
|
|
assert.equal(document.querySelectorAll('body')?.length, 1);
|
|
```
|
|
|
|
Your `head` element should come before your `body` element.
|
|
|
|
```js
|
|
assert.equal(document.querySelector('body')?.previousElementSibling?.tagName, 'HEAD');
|
|
```
|
|
|
|
You should have two `meta` elements.
|
|
|
|
```js
|
|
const meta = document.querySelectorAll('meta');
|
|
assert.equal(meta?.length, 2);
|
|
```
|
|
|
|
One `meta` element should have a `name` set to `viewport`, and `content` set to `width=device-width, initial-scale=1.0`.
|
|
|
|
```js
|
|
const meta = [...document.querySelectorAll('meta')];
|
|
const target = meta?.find(m => m?.getAttribute('name') === 'viewport' && m?.getAttribute('content') === 'width=device-width, initial-scale=1.0' && !m?.getAttribute('charset'));
|
|
assert.exists(target);
|
|
```
|
|
|
|
The other `meta` element should have the `charset` attribute set to `UTF-8`.
|
|
|
|
```js
|
|
const meta = [...document.querySelectorAll('meta')];
|
|
const target = meta?.find(m => !m?.getAttribute('name') && !m?.getAttribute('content') && m?.getAttribute('charset')?.toLowerCase() === 'utf-8');
|
|
assert.exists(target);
|
|
```
|
|
|
|
Your code should have a `title` element.
|
|
|
|
```js
|
|
const title = document.querySelector('title');
|
|
assert.exists(title);
|
|
```
|
|
|
|
Your `title` should have some text.
|
|
|
|
```js
|
|
const title = document.querySelector('title');
|
|
assert.isAtLeast(title?.textContent?.length, 1);
|
|
```
|
|
|
|
Your code should have a `link` element.
|
|
|
|
```js
|
|
assert(/<link/.test(code))
|
|
```
|
|
|
|
Your `link` element should be within your `head` element.
|
|
|
|
```js
|
|
assert(code.match(/<head>[\w\W\s]*<link[\w\W\s]*\/>[\w\W\s]*<\/head>/i))
|
|
```
|
|
|
|
Your `link` element should have a `rel` attribute with the value `stylesheet`.
|
|
|
|
```js
|
|
assert.match(code, /<link[\s\S]*?rel=('|"|`)stylesheet\1/)
|
|
```
|
|
|
|
Your `link` element should have a `type` attribute with the value `text/css`.
|
|
|
|
```js
|
|
assert.match(code, /<link[\s\S]*?type=('|"|`)text\/css\1/)
|
|
```
|
|
|
|
Your `link` element should have an `href` attribute with the value `styles.css`.
|
|
|
|
```js
|
|
assert.match(code, /<link[\s\S]*?href=('|"|`)(\.\/)?styles\.css\1/)
|
|
```
|
|
|
|
# --seed--
|
|
|
|
## --seed-contents--
|
|
|
|
```html
|
|
--fcc-editable-region--
|
|
|
|
--fcc-editable-region--
|
|
```
|
|
|
|
```css
|
|
|
|
```
|