diff --git a/curriculum/challenges/arabic/03-front-end-development-libraries/react/pass-an-array-as-props.md b/curriculum/challenges/arabic/03-front-end-development-libraries/react/pass-an-array-as-props.md index eb184c4f16c..541344014cc 100644 --- a/curriculum/challenges/arabic/03-front-end-development-libraries/react/pass-an-array-as-props.md +++ b/curriculum/challenges/arabic/03-front-end-development-libraries/react/pass-an-array-as-props.md @@ -20,7 +20,7 @@ dashedName: pass-an-array-as-props # --instructions-- -هناك `List` و `ToDo` في محرر التعليمات البرمجية. عند أنتاج كل `List` من المكون `ToDo`، مرر خاصية `tasks` تم تعيينها لقائمة من المهام للقيام بها، على سبيل المثال `["walk dog", "workout"]`. ثم أستخدم قائمة `tasks` في مكون القائمة `List`، تظهر قيمتها داخل عنصر `p`. استخدم `join(", ")` لعرض `props.tasks` في عنصر `p` كقائمة مفصولة بفواصل (comma). وينبغي لقائمة اليوم أن تتضمن مهمتين في الأقل، وينبغي أن يكون للغد 3 مهام في الأقل. +هناك `List` و `ToDo` في محرر التعليمات البرمجية. عند أنتاج كل `List` من المكون `ToDo`، مرر خاصية `tasks` تم تعيينها لقائمة من المهام للقيام بها، على سبيل المثال `["walk dog", "workout"]`. ثم أستخدم قائمة `tasks` في مكون القائمة `List`، تظهر قيمتها داخل عنصر `p`. Use `join(", ")` to display the `props.tasks` array in the `p` element as a comma separated list. وينبغي لقائمة اليوم أن تتضمن مهمتين في الأقل، وينبغي أن يكون للغد 3 مهام في الأقل. # --hints-- diff --git a/curriculum/challenges/arabic/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md b/curriculum/challenges/arabic/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md index 80f52e03146..687f13b2ef4 100644 --- a/curriculum/challenges/arabic/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md +++ b/curriculum/challenges/arabic/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md @@ -58,7 +58,7 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ``` # --solutions-- @@ -70,6 +70,6 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ReactDOM.render(JSX, document.getElementById('challenge-node')); ``` diff --git a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/react/pass-an-array-as-props.md b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/react/pass-an-array-as-props.md index a4333254a4a..71da243588b 100644 --- a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/react/pass-an-array-as-props.md +++ b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/react/pass-an-array-as-props.md @@ -20,7 +20,7 @@ dashedName: pass-an-array-as-props # --instructions-- -代碼編輯器中有 `List` 和 `ToDo` 組件。 在 `ToDo` 組件中渲染每個 `List` 時,傳入 `tasks` 屬性並將其分配給待辦任務數組,例如 `["walk dog", "workout"]`。 然後訪問 `List` 組件中的 `tasks` 數組,在`p`元素中顯示其值。 使用 `join(", ")` 把 `props.tasks` 數組作爲逗號分隔列表顯示在 `p` 元素中。 今天的列表應該至少有 2 個任務,明天的列表應該至少有 3 個任務。 +代碼編輯器中有 `List` 和 `ToDo` 組件。 在 `ToDo` 組件中渲染每個 `List` 時,傳入 `tasks` 屬性並將其分配給待辦任務數組,例如 `["walk dog", "workout"]`。 然後訪問 `List` 組件中的 `tasks` 數組,在`p`元素中顯示其值。 Use `join(", ")` to display the `props.tasks` array in the `p` element as a comma separated list. 今天的列表應該至少有 2 個任務,明天的列表應該至少有 3 個任務。 # --hints-- diff --git a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md index 4bfe98f2326..89d6f03b1cf 100644 --- a/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md +++ b/curriculum/challenges/chinese-traditional/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md @@ -58,7 +58,7 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ``` # --solutions-- @@ -70,6 +70,6 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ReactDOM.render(JSX, document.getElementById('challenge-node')); ``` diff --git a/curriculum/challenges/chinese/03-front-end-development-libraries/react/pass-an-array-as-props.md b/curriculum/challenges/chinese/03-front-end-development-libraries/react/pass-an-array-as-props.md index cc69338a391..80feac709da 100644 --- a/curriculum/challenges/chinese/03-front-end-development-libraries/react/pass-an-array-as-props.md +++ b/curriculum/challenges/chinese/03-front-end-development-libraries/react/pass-an-array-as-props.md @@ -20,7 +20,7 @@ dashedName: pass-an-array-as-props # --instructions-- -代码编辑器中有 `List` 和 `ToDo` 组件。 在 `ToDo` 组件中渲染每个 `List` 时,传入 `tasks` 属性并将其分配给待办任务数组,例如 `["walk dog", "workout"]`。 然后访问 `List` 组件中的 `tasks` 数组,在`p`元素中显示其值。 使用 `join(", ")` 把 `props.tasks` 数组作为逗号分隔列表显示在 `p` 元素中。 今天的列表应该至少有 2 个任务,明天的列表应该至少有 3 个任务。 +代码编辑器中有 `List` 和 `ToDo` 组件。 在 `ToDo` 组件中渲染每个 `List` 时,传入 `tasks` 属性并将其分配给待办任务数组,例如 `["walk dog", "workout"]`。 然后访问 `List` 组件中的 `tasks` 数组,在`p`元素中显示其值。 Use `join(", ")` to display the `props.tasks` array in the `p` element as a comma separated list. 今天的列表应该至少有 2 个任务,明天的列表应该至少有 3 个任务。 # --hints-- diff --git a/curriculum/challenges/chinese/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md b/curriculum/challenges/chinese/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md index 18f1c408ff2..4c196038544 100644 --- a/curriculum/challenges/chinese/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md +++ b/curriculum/challenges/chinese/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md @@ -58,7 +58,7 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ``` # --solutions-- @@ -70,6 +70,6 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ReactDOM.render(JSX, document.getElementById('challenge-node')); ``` diff --git a/curriculum/challenges/espanol/03-front-end-development-libraries/react/pass-an-array-as-props.md b/curriculum/challenges/espanol/03-front-end-development-libraries/react/pass-an-array-as-props.md index 2b72d1c970d..eaaf1e258ba 100644 --- a/curriculum/challenges/espanol/03-front-end-development-libraries/react/pass-an-array-as-props.md +++ b/curriculum/challenges/espanol/03-front-end-development-libraries/react/pass-an-array-as-props.md @@ -20,7 +20,7 @@ El componente hijo entonces tiene acceso a la propiedad del arreglo `colors`. Lo # --instructions-- -Están los componentes `List` y `ToDo` en el editor de código. Al renderizar cada `List` del componente `ToDo`, pasa una propiedad `tasks` asignada a un arreglo de tareas pendientes, por ejemplo `["walk dog", "workout"]`. Luego, accede a este arreglo de `tasks` en el componente `List`, mostrando su valor dentro del elemento `p`. Usa `join(", ")` para mostrar el arreglo `props.tasks` en el elemento `p` como una lista separada por comas. La lista de hoy debe tener al menos 2 tareas y la de mañana debe tener al menos 3 tareas. +Están los componentes `List` y `ToDo` en el editor de código. Al renderizar cada `List` del componente `ToDo`, pasa una propiedad `tasks` asignada a un arreglo de tareas pendientes, por ejemplo `["walk dog", "workout"]`. Luego, accede a este arreglo de `tasks` en el componente `List`, mostrando su valor dentro del elemento `p`. Use `join(", ")` to display the `props.tasks` array in the `p` element as a comma separated list. La lista de hoy debe tener al menos 2 tareas y la de mañana debe tener al menos 3 tareas. # --hints-- diff --git a/curriculum/challenges/espanol/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md b/curriculum/challenges/espanol/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md index 3ab79b44e4e..030155ce828 100644 --- a/curriculum/challenges/espanol/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md +++ b/curriculum/challenges/espanol/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md @@ -58,7 +58,7 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ``` # --solutions-- @@ -70,6 +70,6 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ReactDOM.render(JSX, document.getElementById('challenge-node')); ``` diff --git a/curriculum/challenges/german/03-front-end-development-libraries/react/pass-an-array-as-props.md b/curriculum/challenges/german/03-front-end-development-libraries/react/pass-an-array-as-props.md index adc4df58df5..32590f486b6 100644 --- a/curriculum/challenges/german/03-front-end-development-libraries/react/pass-an-array-as-props.md +++ b/curriculum/challenges/german/03-front-end-development-libraries/react/pass-an-array-as-props.md @@ -20,7 +20,7 @@ Die Kindkomponente hat dann Zugriff auf die Array-Eigenschaft `colors`. Array-Me # --instructions-- -Im Code-Editor gibt es die Komponenten `List` und `ToDo`. Beim Rendern jeder `List` der Komponente `ToDo` übergibst du eine `tasks`-Eigenschaft, die einem Array von To-Do-Aufgaben zugewiesen ist, zum Beispiel `["walk dog", "workout"]`. Dann greifst du auf dieses `tasks`-Array in der Komponente `List` zu und zeigst seinen Wert innerhalb des `p`-Elements an. Verwende `join(", ")`, um das `props.tasks`array im `p`-Element als kommagetrennte Liste anzuzeigen. Die Liste von heute sollte mindestens 2 Aufgaben und die von morgen mindestens 3 Aufgaben enthalten. +Im Code-Editor gibt es die Komponenten `List` und `ToDo`. Beim Rendern jeder `List` der Komponente `ToDo` übergibst du eine `tasks`-Eigenschaft, die einem Array von To-Do-Aufgaben zugewiesen ist, zum Beispiel `["walk dog", "workout"]`. Dann greifst du auf dieses `tasks`-Array in der Komponente `List` zu und zeigst seinen Wert innerhalb des `p`-Elements an. Use `join(", ")` to display the `props.tasks` array in the `p` element as a comma separated list. Die Liste von heute sollte mindestens 2 Aufgaben und die von morgen mindestens 3 Aufgaben enthalten. # --hints-- diff --git a/curriculum/challenges/german/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md b/curriculum/challenges/german/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md index e7e82de292d..48b1040c6de 100644 --- a/curriculum/challenges/german/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md +++ b/curriculum/challenges/german/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md @@ -58,7 +58,7 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ``` # --solutions-- @@ -70,6 +70,6 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ReactDOM.render(JSX, document.getElementById('challenge-node')); ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61764f23ea21477b76f3b80f.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61764f23ea21477b76f3b80f.md index abfc5b7def3..296798e1362 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61764f23ea21477b76f3b80f.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-colors-by-building-a-set-of-colored-markers/61764f23ea21477b76f3b80f.md @@ -7,7 +7,7 @@ dashedName: step-17 # --description-- -Next, remove the `background-color` property and its value from the `.marker` CSS rule. +Entferne als Nächstes aus der `.marker`-CSS-Regel die `background-color`-Eigenschaft und seinen Wert. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d213d99f16287bff22ae.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d213d99f16287bff22ae.md index ea0931b7fb5..ea1b872349d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d213d99f16287bff22ae.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d213d99f16287bff22ae.md @@ -11,7 +11,7 @@ Füge, um den Hintergrund fertigzustellen, eine Sonne hinzu, indem du ein neues # --hints-- -You should add a new `div` element to `body`. Es sind `--fcc-expected--` `div`-Elemente erwartet worden, aber es wurden `--fcc-actual--` gefunden. +Du solltest ein neues `div`-Element zum `body` hinzufügen. Es sind `--fcc-expected--` `div`-Elemente erwartet worden, aber es wurden `--fcc-actual--` gefunden. ```js assert.equal(document.querySelectorAll('body > div')?.length, 5); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d2c0f22ca0293107c048.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d2c0f22ca0293107c048.md index 56f0c1a8c35..9b8f797ad33 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d2c0f22ca0293107c048.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d2c0f22ca0293107c048.md @@ -11,19 +11,19 @@ Give the `.sun` element a `width` and `height` of `200px`, and a `background-col # --hints-- -You should use the `.sun` selector. +Du solltest den `.sun`-Selektor verwenden. ```js assert.match(code, /\.sun\s*\{/); ``` -You should give `.sun` a `width` of `200px`. +Du solltest `.sun` eine `width` von `200px` zuweisen. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.sun')?.width, '200px'); ``` -You should give `.sun` a `height` of `200px`. +Du solltest `.sun` eine `height` von `200px` zuweisen. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.sun')?.height, '200px'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d0b51ca42ed0d74582186.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d0b51ca42ed0d74582186.md index 4dd32f98489..b96129a220d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d0b51ca42ed0d74582186.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d0b51ca42ed0d74582186.md @@ -17,19 +17,19 @@ Du solltest den `.eye`-Selektor verwenden. assert.match(code, /\.eye\s*\{/); ``` -You should give `.eye` a `width` of `--fcc-expected--`, found `--fcc-actual--`. +Du solltest `.eye` eine `width` mit dem Wert `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.eye')?.width, '15%'); ``` -You should give `.eye` a `height` of `--fcc-expected--`, found `--fcc-actual--`. +Du solltest `.eye` eine `height` mit dem Wert `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.eye')?.height, '17%'); ``` -You should give `.eye` a `background-color` of `--fcc-expected--`, found `--fcc-actual--`. +Du solltest `.eye` eine `background-color` mit dem Wert `--fcc-expected--` zuweisen, aber es wurde `--fcc-actual--` gefunden. ```js assert.equal(new __helpers.CSSHelp(document).getStyle('.eye')?.backgroundColor, 'black'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d1340361095175f4b5115.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d1340361095175f4b5115.md index 493e1d10e76..36eeb4cb74d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d1340361095175f4b5115.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d1340361095175f4b5115.md @@ -23,7 +23,7 @@ You should give the new `div` a `class` of `shirt`. assert.exists(document.querySelector('.penguin > div.shirt')); ``` -You should place the new `div` before `.penguin-body`. +Du solltest das neue `div` vor dem `.penguin-body`-Element platzieren. ```js assert.exists(document.querySelector('.shirt + .penguin-body')); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ee.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ee.md index fbdc5b7d740..33334435661 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ee.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98ee.md @@ -7,7 +7,7 @@ dashedName: step-38 # --description-- -Dein Code wird langsam ziemlich lang. Add a comment above the `.fb1` class that says `FOREGROUND BUILDINGS - "fb" stands for "foreground building"` to help people understand your code. Above the `.bb1` class add another comment that says `BACKGROUND BUILDINGS - "bb" stands for "background building"`. If you don't remember, comments in CSS look like this: `/* Comment here */`. +Dein Code wird langsam ziemlich lang. Add a comment above the `.fb1` class that says `FOREGROUND BUILDINGS - "fb" stands for "foreground building"` to help people understand your code. Above the `.bb1` class add another comment that says `BACKGROUND BUILDINGS - "bb" stands for "background building"`. Wenn du dich nicht erinnerst: Kommentare in CSS sehen folgendermaßen aus: `/* Comment here */`. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md index 5840abf6109..23abd149135 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md @@ -7,7 +7,7 @@ dashedName: step-40 # --description-- -Gradients in CSS are a way to transition between colors across the distance of an element. Sie werden an der `background`-Eigenschaft angewendet und die Syntax sieht folgendermaßen aus: +Farbverläufe in CSS sind eine Möglichkeit, den Übergang zwischen Farben über den Abstand eines Elements zu gestalten. Sie werden an der `background`-Eigenschaft angewendet und die Syntax sieht folgendermaßen aus: ```css gradient-type( @@ -20,7 +20,7 @@ In diesem Beispiel ist `color1` oben fest, `color2` ist unten fest und dazwische # --hints-- -You should apply a `background` to `.bb1a` right after the `background-color`. +Du solltest einen `background` auf `.bb1a` genau nach der `background-color` anwenden. ```js assert(new __helpers.CSSHelp(document).getStyle('.bb1a')?.background); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f5.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f5.md index 043f536d35a..c23fc939152 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f5.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f5.md @@ -7,11 +7,11 @@ dashedName: step-45 # --description-- -Es ist ein wenig hinter den Vordergrundbauten versteckt, aber du kannst dort den dreifarbigen Verlauf sehen. Since you are using that now, remove the `background-color` property from `.bb1d`. +Es ist ein wenig hinter den Vordergrundbauten versteckt, aber du kannst dort den dreifarbigen Verlauf sehen. Da du dies jetzt verwendest, entferne die `background-color`-Eigenschaft aus `.bb1d`. # --hints-- -You should remove the `background-color` property and value from `.bb1d` +Du solltest die `background-color`-Eigenschaft und den dazugehörigen Wert aus `.bb1d` entfernen ```js assert.notMatch(code, /\.bb1d\s*\{\s*[^}]*?background-color[^}]*?\}/); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5efc575c8d6a74d05e68af77.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5efc575c8d6a74d05e68af77.md index 595a90459b5..4e7c6e4e0b0 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5efc575c8d6a74d05e68af77.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5efc575c8d6a74d05e68af77.md @@ -32,7 +32,7 @@ assert( ); ``` -Your new checkbox should be after the second one. You have them in the wrong order. +Your new checkbox should be after the second one. Sie sind in falscher Reihenfolge. ```js const checkboxes = [...$('input[type="checkbox"]')].map( @@ -51,7 +51,7 @@ assert( ); ``` -The new `label` should have a `for` attribute with the same value as the `id` attribute of the new checkbox. You have either omitted the value or have a typo. +The new `label` should have a `for` attribute with the same value as the `id` attribute of the new checkbox. Du hast entweder den Wert weggelassen oder einen Tippfehler gemacht. ```js assert( diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md index eec7c65f734..0a7fb3e2316 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md @@ -25,7 +25,7 @@ Dein `th`-Element sollte den Text `Total Liabilities` enthalten. assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText === 'Total Liabilities'); ``` -You should wrap the text `Liabilities` in a `span` element. +Du solltest den Text `Liabilities` mit einem `span`-Element umschließen. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.textContent === 'Liabilities'); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/62015d8942384c3aed48329e.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/62015d8942384c3aed48329e.md index e22239dc819..431cfdf7b7e 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/62015d8942384c3aed48329e.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/62015d8942384c3aed48329e.md @@ -7,7 +7,7 @@ dashedName: step-39 # --description-- -You wrapped your table in a section element - now you can style that to give your table a border. Erstelle einen `section`-Selektor und weise ihm eine `max-width`-Eigenschaft mit dem Wert `40rem` zu, um ein responsives Design zu erstellen. Setze die `margin`-Eigenschaft auf `0 auto`, um ihn zu zentrieren und setze die `border`-Eigenschaft auf `2px solid #d0d0d5`. +Du hast deine Tabelle mit einem Abschnittelement umschlossen - du kannst dieses jetzt gestalten, um deiner Tabelle einen Rand zu geben. Erstelle einen `section`-Selektor und weise ihm eine `max-width`-Eigenschaft mit dem Wert `40rem` zu, um ein responsives Design zu erstellen. Setze die `margin`-Eigenschaft auf `0 auto`, um ihn zu zentrieren und setze die `border`-Eigenschaft auf `2px solid #d0d0d5`. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/6201a5258af7b398b030bfaf.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/6201a5258af7b398b030bfaf.md index f3846ab9460..eb9e18f7296 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/6201a5258af7b398b030bfaf.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/6201a5258af7b398b030bfaf.md @@ -7,7 +7,7 @@ dashedName: step-65 # --description-- -Your dollar amounts are currently misaligned. Create a selector to target the `td` elements within your `tr.data` elements. Vertically align the text to the top, horizontally align the text to the right, and set the padding to `0.3rem 0.25rem 0`. +Deine Dollarbeträge sind derzeit falsch eingestellt. Create a selector to target the `td` elements within your `tr.data` elements. Vertically align the text to the top, horizontally align the text to the right, and set the padding to `0.3rem 0.25rem 0`. # --hints-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e77aba7ca691f598feb02.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e77aba7ca691f598feb02.md index e49750adcb8..2a95e942230 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e77aba7ca691f598feb02.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-responsive-web-design-by-building-a-piano/612e77aba7ca691f598feb02.md @@ -11,14 +11,14 @@ Add two `meta` tags, one to optimize your page for mobile devices, and one to sp # --hints-- -You should add two `meta` elements to your page. +Du solltest deiner Seite zwei `meta`-Elemente hinzufügen. ```js const meta = document.querySelector('meta'); assert.exists(meta); ``` -You should have two `meta` elements. +Du solltest zwei `meta`-Elemente haben. ```js const meta = document.querySelectorAll('meta'); @@ -33,7 +33,7 @@ const target = meta?.find(m => m?.getAttribute('name') === 'viewport' && m?.getA assert.exists(target); ``` -The other `meta` element should have the `charset` attribute set to `UTF-8`. +Das andere `meta`-Element sollte das `charset` auf `UTF-8` eingestellt haben. ```js const meta = [...document.querySelectorAll('meta')]; diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md index ae54c88e187..91cb9af5506 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md @@ -9,7 +9,7 @@ dashedName: step-28 Du wirst feststellen, dass am unteren Rand deines `.large`-Elements immer noch ein kleiner Rand zu sehen ist. Gib deinem `.large, .medium`-Selektor eine `border`-Eigenschaft von `0`, um dies zurückzusetzen. -Note: the `medium`(medium) class will be utilized later for the thinner bars of the nutrition label. +Hinweis: Die `medium`(medium)-Klasse wird später im Schritt für die schmaleren Balken der Nährwertkenntźeichnung verwendet. # --hints-- diff --git a/curriculum/challenges/italian/03-front-end-development-libraries/react/pass-an-array-as-props.md b/curriculum/challenges/italian/03-front-end-development-libraries/react/pass-an-array-as-props.md index 851b437c058..205c9399598 100644 --- a/curriculum/challenges/italian/03-front-end-development-libraries/react/pass-an-array-as-props.md +++ b/curriculum/challenges/italian/03-front-end-development-libraries/react/pass-an-array-as-props.md @@ -20,7 +20,7 @@ Il componente figlio ha quindi accesso alla proprietà array `colors`. I metodi # --instructions-- -Nell'editor di codice ci sono i componenti `List` e `ToDo`. Quando si esegue il rendering di ogni `List` dal componente `ToDo`, deve essere passata una proprietà `tasks` assegnata a un array di attività da fare, ad esempio `["walk dog", "workout"]`. Quindi accedi a questo array `tasks` nel componente `List`, mostrandone il valore all'interno dell'elemento `p`. Usa `join(", ")` per visualizzare l'array `props.tasks` nell'elemento `p` come lista separata da virgole. L'elenco di oggi (Today) dovrebbe avere almeno 2 task e quella di domani (Tomorrow) dovrebbe avere almeno 3 task. +Nell'editor di codice ci sono i componenti `List` e `ToDo`. Quando si esegue il rendering di ogni `List` dal componente `ToDo`, deve essere passata una proprietà `tasks` assegnata a un array di attività da fare, ad esempio `["walk dog", "workout"]`. Quindi accedi a questo array `tasks` nel componente `List`, mostrandone il valore all'interno dell'elemento `p`. Use `join(", ")` to display the `props.tasks` array in the `p` element as a comma separated list. L'elenco di oggi (Today) dovrebbe avere almeno 2 task e quella di domani (Tomorrow) dovrebbe avere almeno 3 task. # --hints-- diff --git a/curriculum/challenges/italian/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md b/curriculum/challenges/italian/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md index 087b68d746c..24b59f371e1 100644 --- a/curriculum/challenges/italian/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md +++ b/curriculum/challenges/italian/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md @@ -58,7 +58,7 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ``` # --solutions-- @@ -70,6 +70,6 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ReactDOM.render(JSX, document.getElementById('challenge-node')); ``` diff --git a/curriculum/challenges/japanese/03-front-end-development-libraries/react/pass-an-array-as-props.md b/curriculum/challenges/japanese/03-front-end-development-libraries/react/pass-an-array-as-props.md index b1ade39c51d..59056e43691 100644 --- a/curriculum/challenges/japanese/03-front-end-development-libraries/react/pass-an-array-as-props.md +++ b/curriculum/challenges/japanese/03-front-end-development-libraries/react/pass-an-array-as-props.md @@ -20,7 +20,7 @@ dashedName: pass-an-array-as-props # --instructions-- -コードエディターに `List` コンポーネントと `ToDo` コンポーネントがあります。 `ToDo` コンポーネントから各 `List` をレンダーするときに、to-do タスクの配列 (たとえば `["walk dog", "workout"]` など) が割り当てられた `tasks` プロパティを渡してください。 次に、`List` コンポーネントにあるこの `tasks` 配列にアクセスして、`p` 要素の中に値を表示してください。 `join(", ")` を使用し、`props.tasks` 配列をコンマ区切りリストとして `p` 要素に表示してください。 今日のリストには少なくとも 2 つのタスクを含め、明日のリストには少なくとも 3 つのタスクを含めてください。 +コードエディターに `List` コンポーネントと `ToDo` コンポーネントがあります。 `ToDo` コンポーネントから各 `List` をレンダーするときに、to-do タスクの配列 (たとえば `["walk dog", "workout"]` など) が割り当てられた `tasks` プロパティを渡してください。 次に、`List` コンポーネントにあるこの `tasks` 配列にアクセスして、`p` 要素の中に値を表示してください。 Use `join(", ")` to display the `props.tasks` array in the `p` element as a comma separated list. 今日のリストには少なくとも 2 つのタスクを含め、明日のリストには少なくとも 3 つのタスクを含めてください。 # --hints-- diff --git a/curriculum/challenges/japanese/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md b/curriculum/challenges/japanese/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md index 247e27118dc..a2166ccee0e 100644 --- a/curriculum/challenges/japanese/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md +++ b/curriculum/challenges/japanese/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md @@ -58,7 +58,7 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ``` # --solutions-- @@ -70,6 +70,6 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ReactDOM.render(JSX, document.getElementById('challenge-node')); ``` diff --git a/curriculum/challenges/portuguese/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md b/curriculum/challenges/portuguese/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md index 50ae9265dfb..1217067f79c 100644 --- a/curriculum/challenges/portuguese/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md +++ b/curriculum/challenges/portuguese/03-front-end-development-libraries/react/render-html-elements-to-the-dom.md @@ -58,7 +58,7 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ``` # --solutions-- @@ -70,6 +70,6 @@ const JSX = (

Lets render this to the DOM

); -// Change code below this line +// Add your code below this line ReactDOM.render(JSX, document.getElementById('challenge-node')); ``` diff --git a/curriculum/challenges/swahili/00-certifications/back-end-development-and-apis-certification/back-end-development-and-apis-certification.yml b/curriculum/challenges/swahili/00-certifications/back-end-development-and-apis-certification/back-end-development-and-apis-certification.yml new file mode 100644 index 00000000000..adcac2dc4da --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/back-end-development-and-apis-certification/back-end-development-and-apis-certification.yml @@ -0,0 +1,22 @@ +--- +id: 561add10cb82ac38a17523bc +title: Maendeleo ya nyuma na uthibitisho wa API +certification: back-end-development-and-apis +challengeType: 7 +isPrivate: true +tests: + - + id: bd7158d8c443edefaeb5bdef + title: Huduma ndogo ya muhuri wa wakati + - + id: bd7158d8c443edefaeb5bdff + title: Omba huduma ndogo ya uchanganuzi wa kichwa + - + id: bd7158d8c443edefaeb5bd0e + title: Huduma ndogo ya kifupisho cha URL + - + id: 5a8b073d06fa14fcfde687aa + title: Ufuatiliaji wa mazoezi + - + id: bd7158d8c443edefaeb5bd0f + title: Huduma ndogo ya Metadata ya faili diff --git a/curriculum/challenges/swahili/00-certifications/college-algebra-with-python-certification/college-algebra-with-python-certification.yml b/curriculum/challenges/swahili/00-certifications/college-algebra-with-python-certification/college-algebra-with-python-certification.yml new file mode 100644 index 00000000000..707d18c0493 --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/college-algebra-with-python-certification/college-algebra-with-python-certification.yml @@ -0,0 +1,22 @@ +--- +id: 61531b20cc9dfa2741a5b800 +title: College Algebra with Python Certification +certification: college-algebra-with-python +challengeType: 7 +isPrivate: true +tests: + - + id: 63d83ff239c73468b059cd3f + title: Build a Multi-Function Calculator + - + id: 63d83ffd39c73468b059cd40 + title: Build a Graphing Calculator + - + id: 63d8401039c73468b059cd41 + title: Build Three Math Games + - + id: 63d8401e39c73468b059cd42 + title: Build a Financial Calculator + - + id: 63d8402e39c73468b059cd43 + title: Build a Data Graph Explorer diff --git a/curriculum/challenges/swahili/00-certifications/data-analysis-with-python-certification/data-analysis-with-python-certification.yml b/curriculum/challenges/swahili/00-certifications/data-analysis-with-python-certification/data-analysis-with-python-certification.yml new file mode 100644 index 00000000000..7b7cb11eb0c --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/data-analysis-with-python-certification/data-analysis-with-python-certification.yml @@ -0,0 +1,23 @@ +--- +id: 5e46fc95ac417301a38fb934 +title: Uchambuzi wa Data na Uthibitisho wa Python +certification: data-analysis-with-python +challengeType: 7 +isPrivate: true +tests: + - + id: 5e46f7e5ac417301a38fb928 + title: Kikokotoo cha Mkengeuko wa Wastani wa Tofauti-Wastani + - + id: 5e46f7e5ac417301a38fb929 + title: Kichambuzi cha Takwimu za Idadi ya Watu + - + id: 5e46f7f8ac417301a38fb92a + title: Kitazamaji cha Data ya Matibabu + - + id: 5e46f802ac417301a38fb92b + title: Kitazamaji cha Msururu wa Muda wa Ukurasa + - + id: 5e4f5c4b570f7e3a4949899f + title: Utabiri wa Kiwango cha Bahari + diff --git a/curriculum/challenges/swahili/00-certifications/data-visualization-certification/data-visualization-certification.yml b/curriculum/challenges/swahili/00-certifications/data-visualization-certification/data-visualization-certification.yml new file mode 100644 index 00000000000..e6778c15571 --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/data-visualization-certification/data-visualization-certification.yml @@ -0,0 +1,22 @@ +--- +id: 5a553ca864b52e1d8bceea14 +title: Data Visualization Certification +certification: data-visualization +challengeType: 7 +isPrivate: true +tests: + - + id: bd7168d8c242eddfaeb5bd13 + title: Visualize Data with a Bar Chart + - + id: bd7178d8c242eddfaeb5bd13 + title: Visualize Data with a Scatterplot Graph + - + id: bd7188d8c242eddfaeb5bd13 + title: Visualize Data with a Heat Map + - + id: 587d7fa6367417b2b2512bbf + title: Visualize Data with a Choropleth Map + - + id: 587d7fa6367417b2b2512bc0 + title: Visualize Data with a Treemap Diagram diff --git a/curriculum/challenges/swahili/00-certifications/example-certification/example-certifcation.yml b/curriculum/challenges/swahili/00-certifications/example-certification/example-certifcation.yml new file mode 100644 index 00000000000..e887e489d8b --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/example-certification/example-certifcation.yml @@ -0,0 +1,10 @@ +--- +id: 64514fda6c245de4d11eb7bb +title: Example Certification +certification: example-certification +challengeType: 7 +isPrivate: true +tests: + - + id: 645147516c245de4d11eb7ba + title: Certification Exam diff --git a/curriculum/challenges/swahili/00-certifications/front-end-development-libraries-certification/front-end-development-libraries-certification.yml b/curriculum/challenges/swahili/00-certifications/front-end-development-libraries-certification/front-end-development-libraries-certification.yml new file mode 100644 index 00000000000..adacd42f16b --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/front-end-development-libraries-certification/front-end-development-libraries-certification.yml @@ -0,0 +1,22 @@ +--- +id: 561acd10cb82ac38a17513bc +title: Front End Development Libraries Certification +certification: front-end-development-libraries +challengeType: 7 +isPrivate: true +tests: + - + id: bd7158d8c442eddfaeb5bd13 + title: Build a Random Quote Machine + - + id: bd7157d8c242eddfaeb5bd13 + title: Build a Markdown Previewer + - + id: 587d7dbc367417b2b2512bae + title: Build a Drum Machine + - + id: bd7158d8c442eddfaeb5bd17 + title: Build a JavaScript Calculator + - + id: bd7158d8c442eddfaeb5bd0f + title: Build a 25 + 5 Clock diff --git a/curriculum/challenges/swahili/00-certifications/information-security-certification/information-security-certification.yml b/curriculum/challenges/swahili/00-certifications/information-security-certification/information-security-certification.yml new file mode 100644 index 00000000000..7511aa0f18c --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/information-security-certification/information-security-certification.yml @@ -0,0 +1,22 @@ +--- +id: 5e6021435ac9d0ecd8b94b00 +title: Information Security Certification +certification: information-security +challengeType: 7 +isPrivate: true +tests: + - + id: 587d824a367417b2b2512c44 + title: Stock Price Checker + - + id: 587d824a367417b2b2512c45 + title: Anonymous Message Board + - + id: 5e46f979ac417301a38fb932 + title: Port Scanner + - + id: 5e46f983ac417301a38fb933 + title: SHA-1 Password Cracker + - + id: 5e601c775ac9d0ecd8b94aff + title: Secure Real Time Multiplayer Game diff --git a/curriculum/challenges/swahili/00-certifications/javascript-algorithms-and-data-structures-certification/javascript-algorithms-and-data-structures-certification.yml b/curriculum/challenges/swahili/00-certifications/javascript-algorithms-and-data-structures-certification/javascript-algorithms-and-data-structures-certification.yml new file mode 100644 index 00000000000..1a59f5ddb70 --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/javascript-algorithms-and-data-structures-certification/javascript-algorithms-and-data-structures-certification.yml @@ -0,0 +1,22 @@ +--- +id: 561abd10cb81ac38a17513bc +title: JavaScript Algorithms and Data Structures Certification +certification: javascript-algorithms-and-data-structures +challengeType: 7 +isPrivate: true +tests: + - + id: aaa48de84e1ecc7c742e1124 + title: Palindrome Checker + - + id: a7f4d8f2483413a6ce226cac + title: Roman Numeral Converter + - + id: 56533eb9ac21ba0edf2244e2 + title: Caesars Cipher + - + id: aff0395860f5d3034dc0bfc9 + title: Telephone Number Validator + - + id: aa2e6f85cab2ab736c9a9b24 + title: Cash Register diff --git a/curriculum/challenges/swahili/00-certifications/legacy-back-end-certification/legacy-back-end-certification.yml b/curriculum/challenges/swahili/00-certifications/legacy-back-end-certification/legacy-back-end-certification.yml new file mode 100644 index 00000000000..74e0124d015 --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/legacy-back-end-certification/legacy-back-end-certification.yml @@ -0,0 +1,37 @@ +--- +id: 660add10cb82ac38a17513be +title: Legacy Back End Certification +certification: legacy-back-end +challengeType: 7 +isPrivate: true +tests: + - + id: bd7158d8c443edefaeb5bdef + title: Timestamp Microservice + - + id: bd7158d8c443edefaeb5bdff + title: Request Header Parser Microservice + - + id: bd7158d8c443edefaeb5bd0e + title: URL Shortener Microservice + - + id: bd7158d8c443edefaeb5bdee + title: Image Search Abstraction Layer + - + id: bd7158d8c443edefaeb5bd0f + title: File Metadata Microservice + - + id: bd7158d8c443eddfaeb5bdef + title: Build a Voting App + - + id: bd7158d8c443eddfaeb5bdff + title: Build a Nightlife Coordination App + - + id: bd7158d8c443eddfaeb5bd0e + title: Chart the Stock Market + - + id: bd7158d8c443eddfaeb5bd0f + title: Manage a Book Trading Club + - + id: bd7158d8c443eddfaeb5bdee + title: Build a Pinterest Clone diff --git a/curriculum/challenges/swahili/00-certifications/legacy-data-visualization-certification/legacy-data-visualization-certification.yml b/curriculum/challenges/swahili/00-certifications/legacy-data-visualization-certification/legacy-data-visualization-certification.yml new file mode 100644 index 00000000000..3d6f8df0618 --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/legacy-data-visualization-certification/legacy-data-visualization-certification.yml @@ -0,0 +1,37 @@ +--- +id: 561add10cb82ac39a17513bc +title: Legacy Data Visualization Certification +certification: legacy-data-visualization +challengeType: 7 +isPrivate: true +tests: + - + id: bd7157d8c242eddfaeb5bd13 + title: Build a Markdown Previewer + - + id: bd7156d8c242eddfaeb5bd13 + title: Build a Camper Leaderboard + - + id: bd7155d8c242eddfaeb5bd13 + title: Build a Recipe Box + - + id: bd7154d8c242eddfaeb5bd13 + title: Build the Game of Life + - + id: bd7153d8c242eddfaeb5bd13 + title: Build a Roguelike Dungeon Crawler Game + - + id: bd7168d8c242eddfaeb5bd13 + title: Visualize Data with a Bar Chart + - + id: bd7178d8c242eddfaeb5bd13 + title: Visualize Data with a Scatterplot Graph + - + id: bd7188d8c242eddfaeb5bd13 + title: Visualize Data with a Heat Map + - + id: bd7198d8c242eddfaeb5bd13 + title: Show National Contiguity with a Force Directed Graph + - + id: bd7108d8c242eddfaeb5bd13 + title: Map Data Across the Globe diff --git a/curriculum/challenges/swahili/00-certifications/legacy-front-end-certification/legacy-front-end-certification.yml b/curriculum/challenges/swahili/00-certifications/legacy-front-end-certification/legacy-front-end-certification.yml new file mode 100644 index 00000000000..398d00b1cc7 --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/legacy-front-end-certification/legacy-front-end-certification.yml @@ -0,0 +1,37 @@ +--- +id: 561add10cb82ac38a17513be +title: Legacy Front End Certification +certification: legacy-front-end +challengeType: 7 +isPrivate: true +tests: + - + id: bd7158d8c242eddfaeb5bd13 + title: Build a Personal Portfolio Webpage + - + id: bd7158d8c442eddfaeb5bd13 + title: Build a Random Quote Machine + - + id: bd7158d8c442eddfaeb5bd0f + title: Build a 25 + 5 Clock + - + id: bd7158d8c442eddfaeb5bd17 + title: Build a JavaScript Calculator + - + id: bd7158d8c442eddfaeb5bd10 + title: Show the Local Weather + - + id: bd7158d8c442eddfaeb5bd1f + title: Use the Twitch JSON API + - + id: bd7158d8c442eddfaeb5bd18 + title: Stylize Stories on Camper News + - + id: bd7158d8c442eddfaeb5bd19 + title: Build a Wikipedia Viewer + - + id: bd7158d8c442eedfaeb5bd1c + title: Build a Tic Tac Toe Game + - + id: bd7158d8c442eddfaeb5bd1c + title: Build a Simon Game diff --git a/curriculum/challenges/swahili/00-certifications/legacy-full-stack-certification/legacy-full-stack-certification.yml b/curriculum/challenges/swahili/00-certifications/legacy-full-stack-certification/legacy-full-stack-certification.yml new file mode 100644 index 00000000000..3cf64272774 --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/legacy-full-stack-certification/legacy-full-stack-certification.yml @@ -0,0 +1,25 @@ +--- +id: 561add10cb82ac38a17213bd +title: Legacy Full Stack Certification +certification: legacy-full-stack +challengeType: 7 +isPrivate: true +tests: + - + id: 561add10cb82ac38a17513bc + title: Responsive Web Design Certification + - + id: 561abd10cb81ac38a17513bc + title: JavaScript Algorithms and Data Structures Certification + - + id: 561acd10cb82ac38a17513bc + title: Front End Libraries Certification + - + id: 5a553ca864b52e1d8bceea14 + title: Data Visualization Certification + - + id: 561add10cb82ac38a17523bc + title: API's and Microservices Certification + - + id: 561add10cb82ac38a17213bc + title: Legacy Information Security and Quality Assurance Certification diff --git a/curriculum/challenges/swahili/00-certifications/legacy-information-security-and-quality-assurance-certification/legacy-information-security-and-quality-assurance-certification.yml b/curriculum/challenges/swahili/00-certifications/legacy-information-security-and-quality-assurance-certification/legacy-information-security-and-quality-assurance-certification.yml new file mode 100644 index 00000000000..34b1be5ffe6 --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/legacy-information-security-and-quality-assurance-certification/legacy-information-security-and-quality-assurance-certification.yml @@ -0,0 +1,22 @@ +--- +id: 561add10cb82ac38a17213bc +title: Legacy Information Security and Quality Assurance Certification +certification: legacy-information-security-and-quality-assurance +challengeType: 7 +isPrivate: true +tests: + - + id: 587d8249367417b2b2512c41 + title: Metric-Imperial Converter + - + id: 587d8249367417b2b2512c42 + title: Issue Tracker + - + id: 587d824a367417b2b2512c43 + title: Personal Library + - + id: 587d824a367417b2b2512c44 + title: Stock Price Checker + - + id: 587d824a367417b2b2512c45 + title: Anonymous Message Board diff --git a/curriculum/challenges/swahili/00-certifications/machine-learning-with-python-certification/machine-learning-with-python-certification.yml b/curriculum/challenges/swahili/00-certifications/machine-learning-with-python-certification/machine-learning-with-python-certification.yml new file mode 100644 index 00000000000..2980c220e15 --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/machine-learning-with-python-certification/machine-learning-with-python-certification.yml @@ -0,0 +1,23 @@ +--- +id: 5e46fc95ac417301a38fb935 +title: Machine Learning with Python Certification +certification: machine-learning-with-python +challengeType: 7 +isPrivate: true +tests: + - + id: 5e46f8d6ac417301a38fb92d + title: Rock Paper Scissors + - + id: 5e46f8dcac417301a38fb92e + title: Cat and Dog Image Classifier + - + id: 5e46f8e3ac417301a38fb92f + title: Book Recommendation Engine using KNN + - + id: 5e46f8edac417301a38fb930 + title: Linear Regression Health Costs Calculator + - + id: 5e46f8edac417301a38fb931 + title: Neural Network SMS Text Classifier + diff --git a/curriculum/challenges/swahili/00-certifications/quality-assurance-certification/quality-assurance-certification.yml b/curriculum/challenges/swahili/00-certifications/quality-assurance-certification/quality-assurance-certification.yml new file mode 100644 index 00000000000..3f7c0693f56 --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/quality-assurance-certification/quality-assurance-certification.yml @@ -0,0 +1,23 @@ +--- +id: 5e611829481575a52dc59c0e +title: Quality Assurance Certification +certification: quality-assurance +challengeType: 7 +isPrivate: true +tests: + - + id: 587d8249367417b2b2512c41 + title: Metric-Imperial Converter + - + id: 587d8249367417b2b2512c42 + title: Issue Tracker + - + id: 587d824a367417b2b2512c43 + title: Personal Library + - + id: 5e601bf95ac9d0ecd8b94afd + title: Sudoku Solver + - + id: 5e601c0d5ac9d0ecd8b94afe + title: American British Translator + diff --git a/curriculum/challenges/swahili/00-certifications/relational-database-certification/relational-database-certification.yml b/curriculum/challenges/swahili/00-certifications/relational-database-certification/relational-database-certification.yml new file mode 100644 index 00000000000..42d4d39de77 --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/relational-database-certification/relational-database-certification.yml @@ -0,0 +1,22 @@ +--- +id: 606243f50267e718b1e755f4 +title: Relational Database Certification +certification: relational-database +challengeType: 7 +isPrivate: true +tests: + - + id: 5f1a4ef5d5d6b5ab580fc6ae + title: Celestial Bodies Database + - + id: 5f9771307d4d22b9d2b75a94 + title: World Cup Database + - + id: 5f87ac112ae598023a42df1a + title: Salon Appointment Scheduler + - + id: 602d9ff222201c65d2a019f2 + title: Periodic Table Database + - + id: 602da04c22201c65d2a019f4 + title: Number Guessing Game diff --git a/curriculum/challenges/swahili/00-certifications/responsive-web-design-certification/responsive-web-design-certification.yml b/curriculum/challenges/swahili/00-certifications/responsive-web-design-certification/responsive-web-design-certification.yml new file mode 100644 index 00000000000..43f5bf365e7 --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/responsive-web-design-certification/responsive-web-design-certification.yml @@ -0,0 +1,22 @@ +--- +id: 561add10cb82ac38a17513bc +title: Responsive Web Design Certification +certification: responsive-web-design +challengeType: 7 +isPrivate: true +tests: + - + id: bd7158d8c442eddfaeb5bd18 + title: Build a Tribute Page + - + id: 587d78af367417b2b2512b03 + title: Build a Survey Form + - + id: 587d78af367417b2b2512b04 + title: Build a Product Landing Page + - + id: 587d78b0367417b2b2512b05 + title: Build a Technical Documentation Page + - + id: bd7158d8c242eddfaeb5bd13 + title: Build a Personal Portfolio Webpage diff --git a/curriculum/challenges/swahili/00-certifications/scientific-computing-with-python-certification/scientific-computing-with-python-certification.yml b/curriculum/challenges/swahili/00-certifications/scientific-computing-with-python-certification/scientific-computing-with-python-certification.yml new file mode 100644 index 00000000000..740fa1870dd --- /dev/null +++ b/curriculum/challenges/swahili/00-certifications/scientific-computing-with-python-certification/scientific-computing-with-python-certification.yml @@ -0,0 +1,22 @@ +--- +id: 5e44431b903586ffb414c951 +title: Scientific Computing with Python Certification +certification: scientific-computing-with-python +challengeType: 7 +isPrivate: true +tests: + - + id: 5e44412c903586ffb414c94c + title: Arithmetic Formatter + - + id: 5e444136903586ffb414c94d + title: Time Calculator + - + id: 5e44413e903586ffb414c94e + title: Budget App + - + id: 5e444147903586ffb414c94f + title: Polygon Area Calculator + - + id: 5e44414f903586ffb414c950 + title: Probability Calculator diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/add-a-text-alternative-to-images-for-visually-impaired-accessibility.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/add-a-text-alternative-to-images-for-visually-impaired-accessibility.md new file mode 100644 index 00000000000..7688867e31c --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/add-a-text-alternative-to-images-for-visually-impaired-accessibility.md @@ -0,0 +1,46 @@ +--- +id: 587d774c367417b2b2512a9c +title: Add a Text Alternative to Images for Visually Impaired Accessibility +challengeType: 0 +videoUrl: 'https://scrimba.com/c/cPp7VfD' +forumTopicId: 16628 +dashedName: add-a-text-alternative-to-images-for-visually-impaired-accessibility +--- + +# --description-- + +You've likely seen an `alt` attribute on an `img` tag in other challenges. `alt` text describes the image's content and provides a text-alternative for it. An `alt` attribute helps in cases where the image fails to load or can't be seen by a user. Search engines also use it to understand what an image contains to include it in search results. Here's an example: + +```html +Company logo +``` + +People with visual impairments rely on screen readers to convert web content to an audio interface. They won't get information if it's only presented visually. For images, screen readers can access the `alt` attribute and read its contents to deliver key information. + +Good `alt` text provides the reader a brief description of the image. You should always include an `alt` attribute on your image. Per HTML5 specification, this is now considered mandatory. + +# --instructions-- + +Camper Cat happens to be both a coding ninja and an actual ninja, who is building a website to share his knowledge. The profile picture he wants to use shows his skills and should be appreciated by all site visitors. Add an `alt` attribute in the `img` tag, that explains Camper Cat is doing karate. (The image `src` doesn't link to an actual file, so you should see the `alt` text in the display.) + +# --hints-- + +Your `img` tag should have an `alt` attribute and it should not be empty. + +```js +assert($('img').attr('alt')); +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +# --solutions-- + +```html +Someone doing karate +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/add-an-accessible-date-picker.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/add-an-accessible-date-picker.md new file mode 100644 index 00000000000..c85715a728e --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/add-an-accessible-date-picker.md @@ -0,0 +1,105 @@ +--- +id: 587d778b367417b2b2512aa8 +title: Add an Accessible Date Picker +challengeType: 0 +videoUrl: 'https://scrimba.com/c/cR3bRbCV' +forumTopicId: 301008 +dashedName: add-an-accessible-date-picker +--- + +# --description-- + +Forms often include the `input` field, which can be used to create several different form controls. The `type` attribute on this element indicates what kind of `input` element will be created. + +You may have noticed the `text` and `submit` input types in prior challenges, and HTML5 introduced an option to specify a `date` field. Depending on browser support, a date picker shows up in the `input` field when it's in focus, which makes filling in a form easier for all users. + +For older browsers, the type will default to `text`, so it helps to show users the expected date format in the `label` or `placeholder` text just in case. + +Here's an example: + +```html + + +``` + +# --instructions-- + +Camper Cat is setting up a Mortal Kombat tournament and wants to ask his competitors to see what date works best. Add an `input` tag with a `type` attribute of `date`, an `id` attribute of `pickdate`, and a `name` attribute of `date`. + +# --hints-- + +Your code should add one `input` tag for the date selector field. + +```js +assert($('input').length == 2); +``` + +Your `input` tag should have a `type` attribute with a value of `date`. + +```js +assert($('input').attr('type') == 'date'); +``` + +Your `input` tag should have an `id` attribute with a value of `pickdate`. + +```js +assert($('input').attr('id') == 'pickdate'); +``` + +Your `input` tag should have a `name` attribute with a value of `date`. + +```js +assert($('input').attr('name') == 'date'); +``` + +# --seed-- + +## --seed-contents-- + +```html + +
+

Tournaments

+
+
+
+

Mortal Kombat Tournament Survey

+
+

Tell us the best date for the competition

+ + + + + + + + + +
+
+
+ + +``` + +# --solutions-- + +```html + +
+

Tournaments

+
+
+
+

Mortal Kombat Tournament Survey

+
+

Tell us the best date for the competition

+ + + +
+
+
+ + +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-carefully-choosing-colors-that-convey-information.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-carefully-choosing-colors-that-convey-information.md new file mode 100644 index 00000000000..d86f46233eb --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-carefully-choosing-colors-that-convey-information.md @@ -0,0 +1,74 @@ +--- +id: 587d778f367417b2b2512aad +title: >- + Avoid Colorblindness Issues by Carefully Choosing Colors that Convey Information +challengeType: 0 +videoUrl: 'https://scrimba.com/c/c437as3' +forumTopicId: 301011 +dashedName: >- + avoid-colorblindness-issues-by-carefully-choosing-colors-that-convey-information +--- + +# --description-- + +There are various forms of colorblindness. These can range from a reduced sensitivity to a certain wavelength of light to the inability to see color at all. The most common form is a reduced sensitivity to detect greens. + +For example, if two similar green colors are the foreground and background color of your content, a colorblind user may not be able to distinguish them. Close colors can be thought of as neighbors on the color wheel, and those combinations should be avoided when conveying important information. + +**Note:** Some online color picking tools include visual simulations of how colors appear for different types of colorblindness. These are great resources in addition to online contrast checking calculators. + +# --instructions-- + +Camper Cat is testing different styles for an important button, but the yellow (`#FFFF33`) `background-color` and the green (`#33FF33`) text `color` are neighboring hues on the color wheel and virtually indistinguishable for some colorblind users. (Their similar lightness also fails the contrast ratio check). Change the text `color` to a dark blue (`#003366`) to solve both problems. + +# --hints-- + +Your code should change the text `color` for the `button` to the dark blue. + +```js +assert($('button').css('color') == 'rgb(0, 51, 102)'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + +
+

Danger!

+
+ + +``` + +# --solutions-- + +```html + + + + +
+

Danger!

+
+ + +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-using-sufficient-contrast.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-using-sufficient-contrast.md new file mode 100644 index 00000000000..f4369666a6b --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-using-sufficient-contrast.md @@ -0,0 +1,84 @@ +--- +id: 587d778f367417b2b2512aac +title: Avoid Colorblindness Issues by Using Sufficient Contrast +challengeType: 0 +videoUrl: 'https://scrimba.com/c/cmzMEUw' +forumTopicId: 301012 +dashedName: avoid-colorblindness-issues-by-using-sufficient-contrast +--- + +# --description-- + +Color is a large part of visual design, but its use introduces two accessibility issues. First, color alone should not be used as the only way to convey important information because screen reader users won't see it. Second, foreground and background colors need sufficient contrast so colorblind users can distinguish them. + +Previous challenges covered having text alternatives to address the first issue. The last challenge introduced contrast checking tools to help with the second. The WCAG-recommended contrast ratio of 4.5:1 applies for color use as well as gray-scale combinations. + +Colorblind users have trouble distinguishing some colors from others - usually in hue but sometimes lightness as well. You may recall the contrast ratio is calculated using the relative luminance (or lightness) values of the foreground and background colors. + +In practice, the 4.5:1 contrast ratio can be reached by shading (adding black to) the darker color and tinting (adding white to) the lighter color. Darker shades on the color wheel are considered to be shades of blues, violets, magentas, and reds, whereas lighter tinted colors are oranges, yellows, greens, and blue-greens. + +# --instructions-- + +Camper Cat is experimenting with using color for his blog text and background, but his current combination of a greenish `background-color` with maroon text `color` has a 2.5:1 contrast ratio. You can easily adjust the lightness of the colors since he declared them using the CSS `hsl()` property (which stands for hue, saturation, lightness) by changing the third argument. Increase the `background-color` lightness value from 35% to 55%, and decrease the `color` lightness value from 20% to 15%. This improves the contrast to 5.9:1. + +# --hints-- + +Your code should only change the lightness value for the text `color` property to a value of 15%. + +```js +assert(code.match(/color:\s*?hsl\(0,\s*?55%,\s*?15%\)/gi)); +``` + +Your code should only change the lightness value for the `background-color` property to a value of 55%. + +```js +assert(code.match(/background-color:\s*?hsl\(120,\s*?25%,\s*?55%\)/gi)); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + +
+

Deep Thoughts with Master Camper Cat

+
+
+

A Word on the Recent Catnip Doping Scandal

+

The influence that catnip has on feline behavior is well-documented, and its use as an herbal supplement in competitive ninja circles remains controversial. Once again, the debate to ban the substance is brought to the public's attention after the high-profile win of Kittytron, a long-time proponent and user of the green stuff, at the Claw of Fury tournament.

+

As I've stated in the past, I firmly believe a true ninja's skills must come from within, with no external influences. My own catnip use shall continue as purely recreational.

+
+ +``` + +# --solutions-- + +```html + + + + +
+

Deep Thoughts with Master Camper Cat

+
+
+

A Word on the Recent Catnip Doping Scandal

+

The influence that catnip has on feline behavior is well-documented, and its use as an herbal supplement in competitive ninja circles remains controversial. Once again, the debate to ban the substance is brought to the public's attention after the high-profile win of Kittytron, a long-time proponent and user of the green stuff, at the Claw of Fury tournament.

+

As I've stated in the past, I firmly believe a true ninja's skills must come from within, with no external influences. My own catnip use shall continue as purely recreational.

+
+ +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/give-links-meaning-by-using-descriptive-link-text.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/give-links-meaning-by-using-descriptive-link-text.md new file mode 100644 index 00000000000..91ab935f674 --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/give-links-meaning-by-using-descriptive-link-text.md @@ -0,0 +1,75 @@ +--- +id: 587d778f367417b2b2512aae +title: Give Links Meaning by Using Descriptive Link Text +challengeType: 0 +videoUrl: 'https://scrimba.com/c/c437DcV' +forumTopicId: 301013 +dashedName: give-links-meaning-by-using-descriptive-link-text +--- + +# --description-- + +Screen reader users have various options for what type of content their device reads. These options include skipping to (or over) landmark elements, jumping to the main content, or getting a page summary from the headings. Another option is to only hear the links available on a page. + +Screen readers do this by reading the link text, or what's between the anchor (`a`) tags. Having a list of "click here" or "read more" links isn't helpful. Instead, use brief but descriptive text within the `a` tags to provide more meaning for these users. + +# --instructions-- + +The link text that Camper Cat is using is not very descriptive without the surrounding context. Move the anchor (`a`) tags so they wrap around the text `information about batteries` instead of `Click here`. + +# --hints-- + +Your code should move the anchor `a` tags from around the words `Click here` to wrap around the words `information about batteries`. + +```js +assert( + $('a') + .text() + .match(/^(information about batteries)$/g) +); +``` + +The `a` element should have an `href` attribute with a value of an empty string `""`. + +```js +assert($('a').attr('href') === ''); +``` + +The `a` element should have a closing tag. + +```js +assert( + code.match(/<\/a>/g) && + code.match(/<\/a>/g).length === code.match(//g).length +); +``` + +# --seed-- + +## --seed-contents-- + +```html + +
+

Deep Thoughts with Master Camper Cat

+
+
+

Defeating your Foe: the Red Dot is Ours!

+

Felines the world over have been waging war on the most persistent of foes. This red nemesis combines both cunning stealth and lightning speed. But chin up, fellow fighters, our time for victory may soon be near. Click here for information about batteries

+
+ +``` + +# --solutions-- + +```html + +
+

Deep Thoughts with Master Camper Cat

+
+
+

Defeating your Foe: the Red Dot is Ours!

+

Felines the world over have been waging war on the most persistent of foes. This red nemesis combines both cunning stealth and lightning speed. But chin up, fellow fighters, our time for victory may soon be near. Click here for information about batteries

+
+ +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/improve-accessibility-of-audio-content-with-the-audio-element.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/improve-accessibility-of-audio-content-with-the-audio-element.md new file mode 100644 index 00000000000..fa69314f96f --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/improve-accessibility-of-audio-content-with-the-audio-element.md @@ -0,0 +1,115 @@ +--- +id: 587d7789367417b2b2512aa4 +title: Improve Accessibility of Audio Content with the audio Element +challengeType: 0 +videoUrl: 'https://scrimba.com/c/cVJVkcZ' +forumTopicId: 301014 +dashedName: improve-accessibility-of-audio-content-with-the-audio-element +--- + +# --description-- + +HTML5's `audio` element gives semantic meaning when it wraps sound or audio stream content in your markup. Audio content also needs a text alternative to be accessible to people who are deaf or hard of hearing. This can be done with nearby text on the page or a link to a transcript. + +The `audio` tag supports the `controls` attribute. This shows the browser default play, pause, and other controls, and supports keyboard functionality. This is a boolean attribute, meaning it doesn't need a value, its presence on the tag turns the setting on. + +Here's an example: + +```html + +``` + +**Note:** Multimedia content usually has both visual and auditory components. It needs synchronized captions and a transcript so users with visual and/or auditory impairments can access it. Generally, a web developer is not responsible for creating the captions or transcript, but needs to know to include them. + +# --instructions-- + +Time to take a break from Camper Cat and meet fellow camper Zersiax (@zersiax), a champion of accessibility and a screen reader user. To hear a clip of his screen reader in action, add an `audio` element after the `p` element. Include the `controls` attribute. Then place a `source` element inside the `audio` tags with the `src` attribute set to `https://s3.amazonaws.com/freecodecamp/screen-reader.mp3` and `type` attribute set to `"audio/mpeg"`. + +**Note:** The audio clip may sound fast and be difficult to understand, but that is a normal speed for screen reader users. + +# --hints-- + +Your code should have one `audio` tag. + +```js +assert($('audio').length === 1); +``` + +Your `audio` element should have a closing tag. + +```js +assert( + code.match(/<\/audio>/g).length === 1 && + code.match(/[\s\S]*<\/audio>/g) +); +``` + +The `audio` tag should have the `controls` attribute. + +```js +assert($('audio').attr('controls')); +``` + +Your code should have one `source` tag. + +```js +assert($('source').length === 1); +``` + +Your `source` tag should be inside the `audio` tags. + +```js +assert($('audio').children('source').length === 1); +``` + +The value for the `src` attribute on the `source` tag should match the link in the instructions exactly. + +```js +assert( + $('source').attr('src') === + 'https://s3.amazonaws.com/freecodecamp/screen-reader.mp3' +); +``` + +Your code should include a `type` attribute on the `source` tag with a value of audio/mpeg. + +```js +assert($('source').attr('type') === 'audio/mpeg'); +``` + +# --seed-- + +## --seed-contents-- + +```html + +
+

Real Coding Ninjas

+
+
+

A sound clip of Zersiax's screen reader in action.

+ + + +
+ +``` + +# --solutions-- + +```html + +
+

Real Coding Ninjas

+
+
+

A sound clip of Zersiax's screen reader in action.

+ +
+ +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/improve-chart-accessibility-with-the-figure-element.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/improve-chart-accessibility-with-the-figure-element.md new file mode 100644 index 00000000000..d677e66b940 --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/improve-chart-accessibility-with-the-figure-element.md @@ -0,0 +1,161 @@ +--- +id: 587d778a367417b2b2512aa5 +title: Improve Chart Accessibility with the figure Element +challengeType: 0 +videoUrl: 'https://scrimba.com/c/cGJMqtE' +forumTopicId: 301015 +dashedName: improve-chart-accessibility-with-the-figure-element +--- + +# --description-- + +HTML5 introduced the `figure` element and the related `figcaption`. Used together, these items wrap a visual representation (like an image, diagram, or chart) along with its caption. Wrapping these elements together gives a two-fold accessibility boost by semantically grouping related content and providing a text alternative explaining the `figure`. + +For data visualizations like charts, the caption can be used to briefly note the trends or conclusions for users with visual impairments. Another challenge covers how to move a table version of the chart's data off-screen (using CSS) for screen reader users. + +Here's an example - note that the `figcaption` goes inside the `figure` tags and can be combined with other elements: + +```html +
+ Photo of Camper Cat executing a roundhouse kick +
+
+ Master Camper Cat demonstrates proper form of a roundhouse kick. +
+
+``` + +# --instructions-- + +Camper Cat is hard at work creating a stacked bar chart showing the amount of time per week to spend training in stealth, combat, and weapons. Help him structure his page better by changing the `div` tag he used to a `figure` tag, and the `p` tag that surrounds the caption to a `figcaption` tag. + +# --hints-- + +Your code should have one `figure` tag. + +```js +assert($('figure').length == 1); +``` + +Your code should have one `figcaption` tag. + +```js +assert($('figcaption').length == 1); +``` + +Your code should not have any `div` tags. + +```js +assert($('div').length == 0); +``` + +Your code should not have any `p` tags. + +```js +assert($('p').length == 0); +``` + +The `figcaption` should be a child of the `figure` tag. + +```js +assert($('figure').children('figcaption').length == 1); +``` + +Your `figure` element should have a closing tag. + +```js +assert( + code.match(/<\/figure>/g) && + code.match(/<\/figure>/g).length === code.match(/
/g).length +); +``` + +# --seed-- + +## --seed-contents-- + +```html + +
+

Training

+ +
+
+
+ + +
+ +
+

Breakdown per week of time to spend training in stealth, combat, and weapons.

+
+ + +
+
+

Stealth & Agility Training

+

Climb foliage quickly using a minimum spanning tree approach

+

No training is NP-complete without parkour

+
+
+

Combat Training

+

Dispatch multiple enemies with multithreaded tactics

+

Goodbye world: 5 proven ways to knock out an opponent

+
+
+

Weapons Training

+

Swords: the best tool to literally divide and conquer

+

Breadth-first or depth-first in multi-weapon training?

+
+
+
© 2018 Camper Cat
+ +``` + +# --solutions-- + +```html + +
+

Training

+ +
+
+
+
+ +
+
Breakdown per week of time to spend training in stealth, combat, and weapons.
+
+
+
+

Stealth & Agility Training

+

Climb foliage quickly using a minimum spanning tree approach

+

No training is NP-complete without parkour

+
+
+

Combat Training

+

Dispatch multiple enemies with multithreaded tactics

+

Goodbye world: 5 proven ways to knock out an opponent

+
+
+

Weapons Training

+

Swords: the best tool to literally divide and conquer

+

Breadth-first or depth-first in multi-weapon training?

+
+
+
© 2018 Camper Cat
+ +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/improve-form-field-accessibility-with-the-label-element.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/improve-form-field-accessibility-with-the-label-element.md new file mode 100644 index 00000000000..55492a9a50e --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/improve-form-field-accessibility-with-the-label-element.md @@ -0,0 +1,119 @@ +--- +id: 587d778a367417b2b2512aa6 +title: Improve Form Field Accessibility with the label Element +challengeType: 0 +videoUrl: 'https://scrimba.com/c/cGJMMAN' +forumTopicId: 301016 +dashedName: improve-form-field-accessibility-with-the-label-element +--- + +# --description-- + +Improving accessibility with semantic HTML markup applies to using both appropriate tag names and attributes. The next several challenges cover some important scenarios using attributes in forms. + +The `label` tag wraps the text for a specific form control item, usually the name or label for a choice. This ties meaning to the item and makes the form more readable. The `for` attribute on a `label` tag explicitly associates that `label` with the form control and is used by screen readers. + +You learned about radio buttons and their labels in a lesson in the Basic HTML section. In that lesson, we wrapped the radio button input element inside a `label` element along with the label text in order to make the text clickable. Another way to achieve this is by using the `for` attribute, as explained in this lesson. + +The value of the `for` attribute must be the same as the value of the `id` attribute of the form control. Here's an example: + +```html +
+ + +
+``` + +# --instructions-- + +Camper Cat expects a lot of interest in his thoughtful blog posts and wants to include an email sign up form. Add a `for` attribute on the email `label` that matches the `id` on its `input` field. + +# --hints-- + +Your code should have a `for` attribute on the `label` tag that is not empty. + +```js +assert($('label').attr('for')); +``` + +Your `for` attribute value should match the `id` value on the email `input`. + +```js +assert($('label').attr('for') == 'email'); +``` + +# --seed-- + +## --seed-contents-- + +```html + +
+

Deep Thoughts with Master Camper Cat

+
+
+
+

Sign up to receive Camper Cat's blog posts by email here!

+ + + + + + + +
+
+
+

The Garfield Files: Lasagna as Training Fuel?

+

The internet is littered with varying opinions on nutritional paradigms, from catnip paleo to hairball cleanses. But let's turn our attention to an often overlooked fitness fuel, and examine the protein-carb-NOM trifecta that is lasagna...

+
+ +
+

Defeating your Foe: the Red Dot is Ours!

+

Felines the world over have been waging war on the most persistent of foes. This red nemesis combines both cunning stealth and lightning speed. But chin up, fellow fighters, our time for victory may soon be near...

+
+ +
+

Is Chuck Norris a Cat Person?

+

Chuck Norris is widely regarded as the premier martial artist on the planet, and it's a complete coincidence that anyone who disagrees with this fact mysteriously disappears soon after. But the real question is, is he a cat person?...

+
+
© 2018 Camper Cat
+ +``` + +# --solutions-- + +```html + +
+

Deep Thoughts with Master Camper Cat

+
+
+
+

Sign up to receive Camper Cat's blog posts by email here!

+ + + + + + + +
+
+
+

The Garfield Files: Lasagna as Training Fuel?

+

The internet is littered with varying opinions on nutritional paradigms, from catnip paleo to hairball cleanses. But let's turn our attention to an often overlooked fitness fuel, and examine the protein-carb-NOM trifecta that is lasagna...

+
+ +
+

Defeating your Foe: the Red Dot is Ours!

+

Felines the world over have been waging war on the most persistent of foes. This red nemesis combines both cunning stealth and lightning speed. But chin up, fellow fighters, our time for victory may soon be near...

+
+ +
+

Is Chuck Norris a Cat Person?

+

Chuck Norris is widely regarded as the premier martial artist on the planet, and it's a complete coincidence that anyone who disagrees with this fact mysteriously disappears soon after. But the real question is, is he a cat person?...

+
+
© 2018 Camper Cat
+ +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/improve-readability-with-high-contrast-text.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/improve-readability-with-high-contrast-text.md new file mode 100644 index 00000000000..8bf9b62cf57 --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/improve-readability-with-high-contrast-text.md @@ -0,0 +1,80 @@ +--- +id: 587d778e367417b2b2512aab +title: Improve Readability with High Contrast Text +challengeType: 0 +videoUrl: 'https://scrimba.com/c/cKb3nCq' +forumTopicId: 301017 +dashedName: improve-readability-with-high-contrast-text +--- + +# --description-- + +Low contrast between the foreground and background colors can make text difficult to read. Sufficient contrast improves your content's readability, but what exactly does "sufficient" mean? + +The Web Content Accessibility Guidelines (WCAG) recommend at least a 4.5 to 1 contrast ratio for normal text. The ratio is calculated by comparing the relative luminance values of two colors. This ranges from 1:1 for the same color, or no contrast, to 21:1 for white against black, the most substantial contrast. There are many contrast checking tools available online that calculate this ratio for you. + +# --instructions-- + +Camper Cat's choice of light gray text on a white background for his recent blog post has a 1.5:1 contrast ratio, making it hard to read. Change the `color` of the text from the current gray (`#D3D3D3`) to a darker gray (`#636363`) to improve the contrast ratio to 6:1. + +# --hints-- + +Your code should change the text `color` for the `body` to the darker gray. + +```js +assert($('body').css('color') == 'rgb(99, 99, 99)'); +``` + +Your code should not change the `background-color` for the `body`. + +```js +assert($('body').css('background-color') == 'rgb(255, 255, 255)'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + +
+

Deep Thoughts with Master Camper Cat

+
+
+

A Word on the Recent Catnip Doping Scandal

+

The influence that catnip has on feline behavior is well-documented, and its use as an herbal supplement in competitive ninja circles remains controversial. Once again, the debate to ban the substance is brought to the public's attention after the high-profile win of Kittytron, a long-time proponent and user of the green stuff, at the Claw of Fury tournament.

+

As I've stated in the past, I firmly believe a true ninja's skills must come from within, with no external influences. My own catnip use shall continue as purely recreational.

+
+ +``` + +# --solutions-- + +```html + + + + +
+

Deep Thoughts with Master Camper Cat

+
+
+

A Word on the Recent Catnip Doping Scandal

+

The influence that catnip has on feline behavior is well-documented, and its use as an herbal supplement in competitive ninja circles remains controversial. Once again, the debate to ban the substance is brought to the public's attention after the high-profile win of Kittytron, a long-time proponent and user of the green stuff, at the Claw of Fury tournament.

+

As I've stated in the past, I firmly believe a true ninja's skills must come from within, with no external influences. My own catnip use shall continue as purely recreational.

+
+ +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/jump-straight-to-the-content-using-the-main-element.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/jump-straight-to-the-content-using-the-main-element.md new file mode 100644 index 00000000000..83031edde59 --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/jump-straight-to-the-content-using-the-main-element.md @@ -0,0 +1,62 @@ +--- +id: 587d774e367417b2b2512a9f +title: Jump Straight to the Content Using the main Element +challengeType: 0 +videoUrl: 'https://scrimba.com/c/cPp7zuE' +forumTopicId: 301018 +dashedName: jump-straight-to-the-content-using-the-main-element +--- + +# --description-- + +HTML5 introduced several new elements that give developers more options while also incorporating accessibility features. These tags include `main`, `header`, `footer`, `nav`, `article`, and `section`, among others. + +By default, a browser renders these elements similar to the humble `div`. However, using them where appropriate gives additional meaning to your markup. The tag name alone can indicate the type of information it contains, which adds semantic meaning to that content. Assistive technologies can access this information to provide better page summary or navigation options to their users. + +The `main` element is used to wrap (you guessed it) the main content, and there should be only one per page. It's meant to surround the information related to your page's central topic. It's not meant to include items that repeat across pages, like navigation links or banners. + +The `main` tag also has an embedded landmark feature that assistive technology can use to navigate to the main content quickly. If you've ever seen a "Jump to Main Content" link at the top of a page, using the `main` tag automatically gives assistive devices that functionality. + +# --instructions-- + +Camper Cat has some big ideas for his ninja weapons page. Help him set up his markup by adding opening and closing `main` tags between the `header` and `footer` (covered in other challenges). Keep the `main` tags empty for now. + +# --hints-- + +Your code should have one `main` tag. + +```js +assert($('main').length == 1); +``` + +The `main` tags should be between the closing `header` tag and the opening `footer` tag. + +```js +assert(code.match(/<\/header>\s*?
\s*?<\/main>/gi)); +``` + +# --seed-- + +## --seed-contents-- + +```html +
+

Weapons of the Ninja

+
+ + + +
+``` + +# --solutions-- + +```html +
+

Weapons of the Ninja

+
+
+ +
+
+``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/know-when-alt-text-should-be-left-blank.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/know-when-alt-text-should-be-left-blank.md new file mode 100644 index 00000000000..695445ea37e --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/know-when-alt-text-should-be-left-blank.md @@ -0,0 +1,76 @@ +--- +id: 587d774c367417b2b2512a9d +title: Know When Alt Text Should be Left Blank +challengeType: 0 +videoUrl: 'https://scrimba.com/c/cM9P4t2' +forumTopicId: 301019 +dashedName: know-when-alt-text-should-be-left-blank +--- + +# --description-- + +In the last challenge, you learned that including an `alt` attribute when using `img` tags is mandatory. However, sometimes images are grouped with a caption already describing them, or are used for decoration only. In these cases, `alt` text may seem redundant or unnecessary. + +When an image is already explained with text content or does not add meaning to a page, the `img` still needs an `alt` attribute, but it can be set to an empty string. Here's an example: + +```html + +``` + +Background images usually fall under the 'decorative' label as well. However, they are typically applied with CSS rules, and therefore not part of the markup screen readers process. + +**Note:** For images with a caption, you may still want to include `alt` text since it helps search engines catalog the image's content. + +# --instructions-- + +Camper Cat has coded a skeleton page for the blog part of his website. He's planning to add a visual break between his two articles with a decorative image of a samurai sword. Add an `alt` attribute to the `img` tag and set it to an empty string. (Note that the image `src` doesn't link to an actual file - don't worry that there are no swords showing in the display.) + +# --hints-- + +Your `img` tag should have an `alt` attribute. + +```js +assert(!($('img').attr('alt') == undefined)); +``` + +The `alt` attribute should be set to an empty string. + +```js +assert($('img').attr('alt') == ''); +``` + +# --seed-- + +## --seed-contents-- + +```html +

Deep Thoughts with Master Camper Cat

+
+

Defeating your Foe: the Red Dot is Ours!

+

To Come...

+
+ + + +
+

Is Chuck Norris a Cat Person?

+

To Come...

+
+``` + +# --solutions-- + +```html +

Deep Thoughts with Master Camper Cat

+
+

Defeating your Foe: the Red Dot is Ours!

+

To Come...

+
+ + + +
+

Is Chuck Norris a Cat Person?

+

To Come...

+
+``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-elements-only-visible-to-a-screen-reader-by-using-custom-css.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-elements-only-visible-to-a-screen-reader-by-using-custom-css.md new file mode 100644 index 00000000000..63bfea4b75c --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-elements-only-visible-to-a-screen-reader-by-using-custom-css.md @@ -0,0 +1,244 @@ +--- +id: 587d778d367417b2b2512aaa +title: Make Elements Only Visible to a Screen Reader by Using Custom CSS +challengeType: 0 +videoUrl: 'https://scrimba.com/c/cJ8QGkhJ' +forumTopicId: 301020 +dashedName: make-elements-only-visible-to-a-screen-reader-by-using-custom-css +--- + +# --description-- + +Have you noticed that all of the applied accessibility challenges so far haven't used any CSS? This shows the importance of using a logical document outline and semantically meaningful tags around your content before introducing the visual design aspect. + +However, CSS's magic can also improve accessibility on your page when you want to visually hide content meant only for screen readers. This happens when information is in a visual format (like a chart), but screen reader users need an alternative presentation (like a table) to access the data. CSS is used to position the screen reader-only elements off the visual area of the browser window. + +Here's an example of the CSS rules that accomplish this: + +```css +.sr-only { + position: absolute; + left: -10000px; + width: 1px; + height: 1px; + top: auto; + overflow: hidden; +} +``` + +**Note:** The following CSS approaches will NOT do the same thing: + +
    +
  • display: none; or visibility: hidden; hides content for everyone, including screen reader users
  • +
  • Zero values for pixel sizes, such as width: 0px; height: 0px; removes that element from the flow of your document, meaning screen readers will ignore it
  • +
+ +# --instructions-- + +Camper Cat created a really cool stacked bar chart for his training page, and put the data into a table for his visually impaired users. The table already has an `sr-only` class, but the CSS rules aren't filled in yet. Give the `position` an `absolute` value, the `left` a `-10000px` value, and the `width` and `height` both `1px` values. + +# --hints-- + +Your code should set the `position` property of the `sr-only` class to a value of `absolute`. + +```js +assert($('.sr-only').css('position') == 'absolute'); +``` + +Your code should set the `left` property of the `sr-only` class to a value of `-10000px`. + +```js +assert($('.sr-only').css('left') == '-10000px'); +``` + +Your code should set the `width` property of the `sr-only` class to a value of `1` pixel. + +```js +assert(code.match(/width:\s*?1px/gi)); +``` + +Your code should set the `height` property of the `sr-only` class to a value of `1` pixel. + +```js +assert(code.match(/height:\s*?1px/gi)); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + +
+

Training

+ +
+
+

Master Camper Cat's Beginner Three Week Training Program

+
+ +

[Stacked bar chart]

+
+
Breakdown per week of time to spend training in stealth, combat, and weapons.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Hours of Weekly Training in Stealth, Combat, and Weapons
Stealth & AgilityCombatWeaponsTotal
Week One35210
Week Two45312
Week Three46313
+
+
+

Stealth & Agility Training

+

Climb foliage quickly using a minimum spanning tree approach

+

No training is NP-complete without parkour

+
+
+

Combat Training

+

Dispatch multiple enemies with multithreaded tactics

+

Goodbye, world: 5 proven ways to knock out an opponent

+
+
+

Weapons Training

+

Swords: the best tool to literally divide and conquer

+

Breadth-first or depth-first in multi-weapon training?

+
+
© 2018 Camper Cat
+ +``` + +# --solutions-- + +```html + + + + +
+

Training

+ +
+
+

Master Camper Cat's Beginner Three Week Training Program

+
+ +

[Stacked bar chart]

+
+
Breakdown per week of time to spend training in stealth, combat, and weapons.
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Hours of Weekly Training in Stealth, Combat, and Weapons
Stealth & AgilityCombatWeaponsTotal
Week One35210
Week Two45312
Week Three46313
+
+
+

Stealth & Agility Training

+

Climb foliage quickly using a minimum spanning tree approach

+

No training is NP-complete without parkour

+
+
+

Combat Training

+

Dispatch multiple enemies with multithreaded tactics

+

Goodbye, world: 5 proven ways to knock out an opponent

+
+
+

Weapons Training

+

Swords: the best tool to literally divide and conquer

+

Breadth-first or depth-first in multi-weapon training?

+
+
© 2018 Camper Cat
+ +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-links-navigable-with-html-access-keys.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-links-navigable-with-html-access-keys.md new file mode 100644 index 00000000000..ba72f6d7976 --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-links-navigable-with-html-access-keys.md @@ -0,0 +1,106 @@ +--- +id: 587d7790367417b2b2512aaf +title: Make Links Navigable with HTML Access Keys +challengeType: 0 +videoUrl: 'https://scrimba.com/c/cQvmaTp' +forumTopicId: 301021 +dashedName: make-links-navigable-with-html-access-keys +--- + +# --description-- + +HTML offers the `accesskey` attribute to specify a shortcut key to activate or bring focus to an element. Adding an `accesskey` attribute can make navigation more efficient for keyboard-only users. + +HTML5 allows this attribute to be used on any element, but it's particularly useful when it's used with interactive ones. This includes links, buttons, and form controls. + +Here's an example: + +```html + +``` + +# --instructions-- + +Camper Cat wants the links around the two blog article titles to have keyboard shortcuts so his site's users can quickly navigate to the full story. Add an `accesskey` attribute to both links and set the first one to `g` (for Garfield) and the second one to `c` (for Chuck Norris). + +# --hints-- + +Your code should add an `accesskey` attribute to the `a` tag with the `id` of `first`. + +```js +assert($('#first').attr('accesskey')); +``` + +Your code should add an `accesskey` attribute to the `a` tag with the `id` of `second`. + +```js +assert($('#second').attr('accesskey')); +``` + +Your code should set the `accesskey` attribute on the `a` tag with the `id` of `first` to `g`. Note that case matters. + +```js +assert($('#first').attr('accesskey') == 'g'); +``` + +Your code should set the `accesskey` attribute on the `a` tag with the `id` of `second` to `c`. Note that case matters. + +```js +assert($('#second').attr('accesskey') == 'c'); +``` + +# --seed-- + +## --seed-contents-- + +```html + +
+

Deep Thoughts with Master Camper Cat

+
+
+ + +

The Garfield Files: Lasagna as Training Fuel?

+ + +

The internet is littered with varying opinions on nutritional paradigms, from catnip paleo to hairball cleanses. But let's turn our attention to an often overlooked fitness fuel, and examine the protein-carb-NOM trifecta that is lasagna...

+
+
+ + +

Is Chuck Norris a Cat Person?

+ + +

Chuck Norris is widely regarded as the premier martial artist on the planet, and it's a complete coincidence that anyone who disagrees with this fact mysteriously disappears soon after. But the real question is, is he a cat person?...

+
+
© 2018 Camper Cat
+ +``` + +# --solutions-- + +```html + +
+

Deep Thoughts with Master Camper Cat

+
+
+ + +

The Garfield Files: Lasagna as Training Fuel?

+ + +

The internet is littered with varying opinions on nutritional paradigms, from catnip paleo to hairball cleanses. But let's turn our attention to an often overlooked fitness fuel, and examine the protein-carb-NOM trifecta that is lasagna...

+
+
+ + +

Is Chuck Norris a Cat Person?

+ + +

Chuck Norris is widely regarded as the premier martial artist on the planet, and it's a complete coincidence that anyone who disagrees with this fact mysteriously disappears soon after. But the real question is, is he a cat person?...

+
+
© 2018 Camper Cat
+ +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-footer-landmark.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-footer-landmark.md new file mode 100644 index 00000000000..3330ea186d7 --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-footer-landmark.md @@ -0,0 +1,116 @@ +--- +id: 587d7788367417b2b2512aa3 +title: Make Screen Reader Navigation Easier with the footer Landmark +challengeType: 0 +videoUrl: 'https://scrimba.com/c/crVrDh8' +forumTopicId: 301022 +dashedName: make-screen-reader-navigation-easier-with-the-footer-landmark +--- + +# --description-- + +Similar to `header` and `nav`, the `footer` element has a built-in landmark feature that allows assistive devices to quickly navigate to it. It's primarily used to contain copyright information or links to related documents that usually sit at the bottom of a page. + +# --instructions-- + +Camper Cat's training page is making good progress. Change the `div` he used to wrap his copyright information at the bottom of the page to a `footer` element. + +# --hints-- + +Your code should have one `footer` tag. + +```js +assert($('footer').length == 1); +``` + +Your code should not have any `div` tags. + +```js +assert($('div').length == 0); +``` + +Your code should have an opening and closing `footer` tag. + +```js +assert(code.match(/
\s*© 2018 Camper Cat\s*<\/footer>/g)); +``` + +# --seed-- + +## --seed-contents-- + +```html + +
+

Training

+ +
+
+
+

Stealth & Agility Training

+

Climb foliage quickly using a minimum spanning tree approach

+

No training is NP-complete without parkour

+
+
+

Combat Training

+

Dispatch multiple enemies with multithreaded tactics

+

Goodbye world: 5 proven ways to knock out an opponent

+
+
+

Weapons Training

+

Swords: the best tool to literally divide and conquer

+

Breadth-first or depth-first in multi-weapon training?

+
+
+ + +
© 2018 Camper Cat
+ + + +``` + +# --solutions-- + +```html + +
+

Training

+ +
+
+
+

Stealth & Agility Training

+

Climb foliage quickly using a minimum spanning tree approach

+

No training is NP-complete without parkour

+
+
+

Combat Training

+

Dispatch multiple enemies with multithreaded tactics

+

Goodbye world: 5 proven ways to knock out an opponent

+
+
+

Weapons Training

+

Swords: the best tool to literally divide and conquer

+

Breadth-first or depth-first in multi-weapon training?

+
+
+ + +
© 2018 Camper Cat
+ + + +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-header-landmark.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-header-landmark.md new file mode 100644 index 00000000000..f5a2d1d59ac --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-header-landmark.md @@ -0,0 +1,111 @@ +--- +id: 587d7787367417b2b2512aa1 +title: Rahisisha Uelekezaji wa Kisoma skrini kwa kutumia alama kuu ya kichwa +challengeType: 0 +videoUrl: 'https://scrimba.com/c/cB76vtv' +forumTopicId: 301023 +dashedName: make-screen-reader-navigation-easier-with-the-header-landmark +--- + +# --description-- + +Kipengele kinachofuata cha HTML5 kinachoongeza maana ya kisemantiki na kuboresha ufikivu ni lebo ya `header`. Hutumika kufunga maelezo ya utangulizi au viungo vya usogezaji kwa lebo yake kuu na hufanya kazi vyema katika maudhui ambayo yanarudiwa katika sehemu ya juu kwenye kurasa nyingi. + +`header` hushiriki kipengele muhimu kilichopachikwa ulichokiona na `main`, ikiruhusu teknolojia saidizi kuelekeza kwa maudhui hayo kwa haraka. + +**Kumbuka:** `header` inakusudiwa kutumika katika lebo ya `body` ya hati yako ya HTML. Ni tofauti na kipengele cha `head`, ambacho kina kichwa cha ukurasa, taarifa ya meta n.k. + +# --instructions-- + +Camper Cat anaandika baadhi ya nakala nzuri kuhusu mafunzo ya ninja, na anataka kuwaongezea ukurasa kwenye tovuti yake. Badilisha `div` ya juu ambayo kwa sasa ina `h1` kuwa `header` badala yake. + +# --hints-- + +Code yako unapaswa kuwa na lebo moja ya `header`. + +```js +assert($('header').length == 1); +``` + +Lebo zako za `header` zinapaswa kuzunguka `h1`. + +```js +assert($('header').children('h1').length == 1); +``` + +Code yako haipaswi kuwa na lebo zozote za `div`. + +```js +assert($('div').length == 0); +``` + +Kipengele chako cha `header` kinapaswa kuwa na lebo ya kufunga. + +```js +assert( + code.match(/<\/header>/g) && + code.match(/<\/header>/g).length === code.match(/
/g).length +); +``` + +# --seed-- + +## --seed-contents-- + +```html + + +
+

Training with Camper Cat

+
+ + +
+
+

Stealth & Agility Training

+

Climb foliage quickly using a minimum spanning tree approach

+

No training is NP-complete without parkour

+
+
+

Combat Training

+

Dispatch multiple enemies with multithreaded tactics

+

Goodbye world: 5 proven ways to knock out an opponent

+
+
+

Weapons Training

+

Swords: the best tool to literally divide and conquer

+

Breadth-first or depth-first in multi-weapon training?

+
+
+ +``` + +# --solutions-- + +```html + + +
+

Training with Camper Cat

+
+ + +
+
+

Stealth & Agility Training

+

Climb foliage quickly using a minimum spanning tree approach

+

No training is NP-complete without parkour

+
+
+

Combat Training

+

Dispatch multiple enemies with multithreaded tactics

+

Goodbye world: 5 proven ways to knock out an opponent

+
+
+

Weapons Training

+

Swords: the best tool to literally divide and conquer

+

Breadth-first or depth-first in multi-weapon training?

+
+
+ +``` diff --git a/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-nav-landmark.md b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-nav-landmark.md new file mode 100644 index 00000000000..906d7dd5c83 --- /dev/null +++ b/curriculum/challenges/swahili/01-responsive-web-design/applied-accessibility/make-screen-reader-navigation-easier-with-the-nav-landmark.md @@ -0,0 +1,121 @@ +--- +id: 587d7788367417b2b2512aa2 +title: Make Screen Reader Navigation Easier with the nav Landmark +challengeType: 0 +videoUrl: 'https://scrimba.com/c/czVwWSv' +forumTopicId: 301024 +dashedName: make-screen-reader-navigation-easier-with-the-nav-landmark +--- + +# --description-- + +The `nav` element is another HTML5 item with the embedded landmark feature for easy screen reader navigation. This tag is meant to wrap around the main navigation links in your page. + +If there are repeated site links at the bottom of the page, it isn't necessary to markup those with a `nav` tag as well. Using a `footer` (covered in the next challenge) is sufficient. + +# --instructions-- + +Camper Cat included navigation links at the top of his training page, but wrapped them in a `div`. Change the `div` to a `nav` tag to improve the accessibility on his page. + +# --hints-- + +Your code should have one `nav` tag. + +```js +assert($('nav').length == 1); +``` + +Your `nav` tags should wrap around the `ul` and its list items. + +```js +assert($('nav').children('ul').length == 1); +``` + +Your code should not have any `div` tags. + +```js +assert($('div').length == 0); +``` + +Your `nav` element should have a closing tag. + +```js +assert( + code.match(/<\/nav>/g) && + code.match(/<\/nav>/g).length === code.match(/
+ + + +``` + +```css +main { + text-align: center; + background-color: #92869c; + background-blend-mode: lighten; + max-width: 500px; + margin: 20px auto; + border-radius: 50px; + box-shadow: 10px 10px rgba(0, 0, 0, 0.5); + color: black; +} +body { + text-align: center; + background: #3a3240; + color: white; +} +input, textarea, select, button { + background: #3a3240; + color: white; +} +a { + color: white; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md b/curriculum/challenges/swahili/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md new file mode 100644 index 00000000000..c4245062ee3 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md @@ -0,0 +1,529 @@ +--- +id: 587d78b0367417b2b2512b05 +title: Tengeneza Ukurasa wa Hati za Kiufundi +challengeType: 14 +forumTopicId: 301146 +dashedName: build-a-technical-documentation-page +--- + +# --description-- + +**Lengo:** Unda programu ambayo inafanya kazi sawa na https://technical-documentation-page.freecodecamp.rocks + +**Maelekezo:** + +1. Unaweza kuona kipengele cha `main` chenye `id="main-doc"`, ambacho kina maudhui kuu ya ukurasa (hati za kiufundi) +1. Ndani ya kipengele cha `#main-doc`, unaweza kuona vipengele kadhaa vya `section`, kila kimoja kikiwa na class ya`main-section`. Kunapaswa kuwa na angalau tano +1. Kipengele cha kwanza ndani ya kila `.main-section` kinapaswa kuwa na kipengele cha `header`, ambacho kina maandishi yanayofafanua mada ya sehemu hiyo. +1. Kila kipengele cha `section` chenye class ya `main-section` lazima pia kiwe na `id` ambayo inalingana na maandishi ya kila `header` zilizomo ndani yake. Nafasi zozote zinapaswa kubadilishwa na mistari chini (k.m. Sehemu iliyo na kichwa "JavaScript na Java" inapaswa kuwa na `id="JavaScript_and_Java"` inayolingana) +1. Vipengele vya `.main-section` vinapaswa kuwa na angalau vipengele kumi vya `p` (si kila kimoja) +1. Vipengele vya `.main-section` vinapaswa kuwa na angalau vipengele vitano vya `code` (si kila kimoja) +1. Vipengele vya `.main-section` vinapaswa kuwa na angalau vipengele vitano vya `li` (si kila kimoja) +1. Unaweza kuona kipengele cha `nav` chenye `id="navbar"` +1. Kipengele cha navbari kinapaswa kuwa na kipengele kimoja cha `header` ambacho kina maandishi yanayoelezea mada ya hati za kiufundi +1. Zaidi ya hayo, navbar inapaswa kuwa na viungo (`a`) vipengele vilivyo na class ya `nav-link`. Lazima kuwe na moja kwa kila kipengele chenye class ya `main-section` +1. Kipengele cha `header` katika `#navbar` lazima kije kabla ya kiungo chochote (`a`) kwenye navbar +1. Kila kipengele kilicho na class ya `nav-link` kinapaswa kuwa na maandishi yanayolingana na maandishi ya `header` ndani ya kila `section` (k.m. ikiwa una sehemu/kichwa "Hello world", navbar yako inapaswa kuwa na kipengele ambacho kina maandishi "Hello world") +1. Unapobofya kipengele cha navbar, ukurasa unapaswa kuabiri hadi sehemu inayolingana ya kipengele cha `#main-doc` (k.m. Ukibofya kipengele cha `.nav-link` ambacho kina maandishi "Hello world", ukurasa husogea hadi kwenye kipengele cha `section` chenye kitambulisho hicho, na kina kichwa sambamba) +1. Kwenye vifaa vya ukubwa wa kawaida (laptop, kompyuta za mezani), kipengele chenye `id="navbar"` kinapaswa kuonyeshwa upande wa kushoto wa skrini na kinapaswa kuonekana kwa mtumiaji kila wakati +1. Hati zako za kiufundi zinapaswa kutumia angalau media query moja + +Timiza maelezo na upite majaribio yote hapa chini ili kukamilisha mradi huu. Ipe muundo wako wa kibinafsi. Happy Coding! + +**Kumbuka:** Hakikisha umeongeza `` katika HTML yako ili kuunganisha stylesheet yako na utumie CSS yako + +# --hints-- + +Unapaswa kuwa na kipengele cha `main` chenye `id` ya `main-doc`. + +```js +const el = document.getElementById('main-doc') +assert(!!el) +``` + +Unapaswa kuwa na angalau vipengele vitano vya `section` vyenye class ya `main-section`. + +```js +const els = document.querySelectorAll('#main-doc section') +assert(els.length >= 5) +``` + +Vipengele vyako vyote vya `.main-section` vinapaswa kuwa vipenegele vya `section`. + +```js +const els = document.querySelectorAll('.main-section') +els.forEach(el => { + if (el.tagName !== 'SECTION') assert(false) +}) +assert(els.length > 0) +``` + +Unapaswa kuwa na angalau vipengele vitano vya `.main-section` ambavyo ni vizazi vya `#main-doc`. + +```js +const els = document.querySelectorAll('#main-doc .main-section') +assert(els.length >= 5) +``` + +Mtoto wa kwanza wa `.main-section` inapaswa kuwa na kipengele cha `header`. + +```js +const els = document.querySelectorAll('.main-section') +els.forEach(el => { + if(el.firstElementChild?.tagName !== 'HEADER') assert(false) +}) +assert(els.length > 0) +``` + +Hakuna kati ya vipengele vyako vya `header` vinavyopaswa kuwa tupu. + +```js +const els = document.querySelectorAll('header') +els.forEach(el => { + if (el.innerText?.length <= 0) assert(false) +}) +assert(els.length > 0) +``` + +Vipengele vyako vyote vya `.main-section` vinapaswa kuwa na `id`. + +```js +const els = document.querySelectorAll('.main-section') +els.forEach(el => { + if (!el.id || el.id === '') assert(false) +}) +assert(els.length > 0) +``` + +Kila `.main-section` inapaswa kuwa na `id` inayolingana na maandishi ya mtoto wake wa kwanza, na nafasi yoyote katika maandishi ya mtoto ikibadilishwa na underscores (`_`) kwa id's. + +```js +const els = document.querySelectorAll('.main-section') +els.forEach(el => { + const text = el.firstElementChild?.innerText?.replaceAll(' ', '_') + if (el.id?.toUpperCase() !== text?.toUpperCase()) assert(false) +}) +assert(els.length > 0) +``` + +Unapaswa kuwa na angalau vipengele 10 vya `p` (jumla) ndani ya vipengee vyako vya `.main-section`. + +```js +const els = document.querySelectorAll('.main-section p') +assert(els.length >= 10) +``` + +Unapaswa kuwa na angalau vipengele vitano vya `code` ambavyo ni vizazi vya vipengele vya `.main-section`. + +```js +const els = document.querySelectorAll('.main-section code') +assert(els.length >= 5) +``` + +Unapaswa kuwa na angalau vipengele vitano vya `li` ambavyo ni vizazi vya vipengele vya `.main-section`. + +```js +const els = document.querySelectorAll('.main-section li') +assert(els.length >= 5) +``` + +Unapaswa kuwa na kipengele cha `nav` chenye `id` ya `navbar`. + +```js +const el = document.getElementById('navbar') +assert(!!el && el.tagName === 'NAV') +``` + +`#navbar` yako inapaswa kuwa na `header` kimoja ndani yake. + +```js +const els = document.querySelectorAll('#navbar header') +assert(els.length === 1) +``` + +Unapaswa kuwa na angalau kipengele kimoja cha `a` chenye class ya `nav-link`. + +```js +const els = document.querySelectorAll('a.nav-link') +assert(els.length >= 1) +``` + +Vipengele vyako vyote vya `.nav-link` vinapaswa kuwa na vipengee (`a`). + +```js +const els = document.querySelectorAll('.nav-link') +els.forEach(el => { + if (el.tagName !== 'A') assert(false) +}) +assert(els.length > 0) +``` + +Vipengele vyako vyote vya `.nav-link` vinapaswa kuwa katika `#navbar`. + +```js +const els1 = document.querySelectorAll('.nav-link') +const els2 = document.querySelectorAll('#navbar .nav-link') +assert(els2.length > 0 && els1.length === els2.length) +``` + +Unapaswa kuwa na nambari sawa ya vipengele vya `.nav-link` na `.main-section`. + +```js +const els1 = document.querySelectorAll('.main-section') +const els2 = document.querySelectorAll('.nav-link') +assert(els1.length > 0 && els2.length > 0 && els1.length === els2.length) +``` + +Kipengele cha `header` katika `#navbar` kinafaa kuja kabla ya vipengele vyovyote vya kiungo (`a`) katika `#navbar`. + +```js +const navLinks = document.querySelectorAll('#navbar a.nav-link'); +const header = document.querySelector('#navbar header'); +navLinks.forEach((navLink) => { + if ( + ( + header.compareDocumentPosition(navLink) & + Node.DOCUMENT_POSITION_PRECEDING + ) + ) assert(false) +}); +assert(!!header) +``` + +Kila `.nav-link` inapaswa kuwa na maandishi yanayolingana na `header` maandishi ya `section` yake inayohusiana (k.m. ikiwa una sehemu ya "Hello world", `#navbar` yako inapaswa kuwa na `.nav-link` ambayo ina maandishi "Hello world"). + +```js +const headerText = Array.from(document.querySelectorAll('.main-section')).map(el => + el.firstElementChild?.innerText?.trim().toUpperCase() +) +const linkText = Array.from(document.querySelectorAll('.nav-link')).map(el => + el.innerText?.trim().toUpperCase() +) +const remainder = headerText.filter(str => linkText.indexOf(str) === -1) +assert(headerText.length > 0 && headerText.length > 0 && remainder.length === 0) +``` + +Kila `.nav-link` inapaswa kuwa na sifa ya `href` inayounganishwa na `.main-section` inayolingana (k.m. Ukibofya kipengele cha `.nav-link` ambacho kina maandishi "Hello world", ukurasa husogea hadi kwenye kipengele cha `section` chenye kitambulisho hicho). + +```js +const hrefValues = Array.from(document.querySelectorAll('.nav-link')).map(el => el.getAttribute('href')) +const mainSectionIDs = Array.from(document.querySelectorAll('.main-section')).map(el => el.id) +const missingHrefValues = mainSectionIDs.filter(str => hrefValues.indexOf('#' + str) === -1) +assert(hrefValues.length > 0 && mainSectionIDs.length > 0 && missingHrefValues.length === 0) +``` + +`#navbar` inapaswa kuwa juu ya viewport kila wakati. + +```js +const el = document.getElementById('navbar') +const left1 = el?.offsetLeft +const left2 = el?.offsetLeft +assert(!!el && left1 >= -15 && left1 <= 15 && left2 >= -15 && left2 <= 15) +``` + +Hati zako za kiufundi zinapaswa kutumia angalau media query moja. + +```js +const htmlSourceAttr = Array.from(document.querySelectorAll('source')).map(el => el.getAttribute('media')) +const cssCheck = new __helpers.CSSHelp(document).getCSSRules('media') +assert(cssCheck.length > 0 || htmlSourceAttr.length > 0); +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +```css + +``` + +## --solutions-- + +```html + + + + + + Technical Documentation Page + + + +
+
+
Introduction
+

+ Welcome to a basic introduction of algebra. In this tutorial, we will + review some of the more common algebraic concepts. +

+
+
+
Definitions
+

+ To start with, let's define some of the more common terms used in + algebra: +

+
    +
  • + Variable: A variable is an unknown value, usually represented + by a letter. +
  • +
  • + Expression: Essentially a mathematical object. For the + purpose of this tutorial, an expression is one part of an equation. +
  • +
  • + Equation: An equation is a mathematical argument in which two + expressions result in the same value. +
  • +
+
+
+
Examples
+

+ Sometimes it is easier to understand the definitions when you have a + physical example to look at. Here is an example of the above terms.

+ x + 5 = 12

+ In this above example, we have: +

+
    +
  • Variable: The variable in the example is "x".
  • +
  • + Expression: There are two expressions in this example. They + are "x+5" and "12". +
  • +
  • + Equation: The entire example, "x+5=12", is an equation. +
  • +
+
+
+
Solving Equations
+

+ The primary use for algebra is to determine an unknown value, the + "variable", with the information provided. Continuing to use our + example from above, we can find the value of the variable "x".

+ x + 5 = 12

+ In an equation, both sides result in the same value. So you can + manipulate the two expressions however you need, as long as you + perform the same operation (or change) to each side. You do this + because the goal when solving an equation is to + get the variable into its own expression, or by itself on one side + of the = sign.
For this example, we want to remove the "+5" so the "x" is + alone. To do this, we can subtract 5, because subtraction is + the opposite operation to addition. But remember, we have to perform + the same operation to both sides of the equation. Now our equation + looks like this.

+ x + 5 - 5 = 12 - 5

+ The equation looks like a mess right now, because we haven't completed + the operations. We can simplify this equation to make it easier + to read by performing the operations "5-5" and "12-5". The result + is:

+ x = 7

+ We now have our solution to this equation! +

+
+
+
Solving Equations II
+

+ Let us look at a slightly more challenging equation.

+ 3x + 4 = 13

+ Again we can start with subtraction. In this case, we want to subtract + 4 from each side of the equation. We will also go ahead and simplify + with each step. So now we have:

+ 3x = 9

+ "3x" translates to "3*x", where the "*" symbol indicates + multiplication. We use the "*" to avoid confusion, as the "x" is now a + variable instead of a multiplication symbol. The opposite operation + for multiplication is division, so we need to + divide each expression by 3.

+ x = 3

+ And now we have our solution! +

+
+
+
Solving Equations III
+

+ Now we are getting in to more complex operations. Here is another + equation for us to look at:

+ x^2 - 8 = 8

+ Our very first step will be to add 8 to each side. This is + different from our previous examples, where we had to subtract. But + remember, our goal is to get the variable alone by performing opposite + operations.

+ x^2 = 16

+ But what does the "^2" mean? The "^" symbol is used to denote + exponents in situations where superscript is not available. When + superscript is available, you would see it as x2. + For the sake of this project, however, we will use the "^" symbol.
+ An exponent tells you how many times the base (in our case, "x") is + multiplied by itself. So, "x^2" would be the same as "x*x". Now the + opposite function of multiplication is division, but we would have to + divide both sides by "x". We do not want to do this, as that + would put an "x" on the other side of the equation. So instead, we + need to use the root operation! For an exponent of "2", we call this + the "square root" and denote it with "√". Our equation is now: +

+ x = √9

+ Performing a root operation by hand can be a tedious process, so we + recommend using a calculator when necessary. However, we are lucky in + that "9" is a + perfect square, so we do not need to calculate anything. Instead, we find our + answer to be:

+ x = 3 +

+
+
+
System of Equations
+

+ As you explore your algebra studies further, you may start to run + across equations with more than one variable. The first such equations + will likely look like:

+ y = 3x

+ An equation like this does not have one single solution. + Rather, there are a series of values for which the equation is true. + For example, if "x=3" and "y=9", the equation is true. These equations + are usually used to plot a graph.
+ Getting more complicated, though, you may be given a pair of + equations. This is called a "system of equations", and CAN be solved. + Let's look at how we do this! Consider the following system of + equations:

+ y = 3x | y - 6 = x + A system of equations IS solvable, but it is a multi-step process. To + get started, we need to choose a variable we are solving for. Let's + solve for "x" first. From the second equation, we know that "x" equals + "y - 6", but we cannot simplify that further because we do not have a + value for "y". Except, thanks to the system of equations, we DO have a + value for "y". We know that "y" equals "3x". So, looking at our second + equation, we can replace "y" with "3x" because they have the same + value. We then get:

+ 3x - 6 = x

+ Now we can solve for "x"! We start by adding 6 to each side.

+ 3x = x + 6

+ We still need to get "x" by itself, so we subtract "x" from both sides + and get:

+ 2x = 6

+ If this confuses you, remember that "3x" is the same as "x+x+x". + Subtract an "x" from that and you get "x+x", or "2x". Now we divide + both sides by 2 and have our value for x!

+ x = 3

+ However, our work is not done yet. We still need to find the value for + "y". Let's go back to our first equation:

+ y = 3x

+ We have a value for "x" now, so let's see what happens if we put that + value in.

+ y = 3*3

+ We perform the multiplication and discover that "y=9"! Our solution to + this system of equations then is:

+ x = 3 and y = 9

+

+
+
+
Try it Yourself!
+

Coming Soon!

+

Keep an eye out for new additions!

+
+
+
More Information
+

Check out the following links for more information!

+ +
+
+ + + +``` + +```css +* { + background-color: #3a3240; +} +a { + color: #92869c; +} +a:hover { + background-color: #92869c; + color: #3a3240; +} +#navbar { + border-style: solid; + border-width: 5px; + border-color: #92869c; + height: 100%; + top: -5px; + left: -5px; + padding: 5px; + text-align: center; + color: #92869c +} +@media (min-width: 480px) { + #navbar { + position: fixed; + } +} +main { + margin-left: 220px; + color: #92869c +} +header { + font-size: 20pt; +} +code { + background-color: #92869c; + border-style: dashed; + border-width: 2px; + border-color: #92869c; + padding: 5px; + color: black; +} +footer { + text-align: center; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/build-a-tribute-page-project/build-a-tribute-page.md b/curriculum/challenges/swahili/14-responsive-web-design-22/build-a-tribute-page-project/build-a-tribute-page.md new file mode 100644 index 00000000000..2219e3455ea --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/build-a-tribute-page-project/build-a-tribute-page.md @@ -0,0 +1,325 @@ +--- +id: bd7158d8c442eddfaeb5bd18 +title: Tengeneza Ukurasa wa Kushukuru +challengeType: 14 +forumTopicId: 301147 +dashedName: build-a-tribute-page +--- + +# --description-- + +**Lengo:** Unda programu ambayo inafanya kazi sawa na https://tribute-page.freecodecamp.rocks + +**Maelekezo:** + +1. Ukurasa wako wa heshima unapaswa kuwa na kipengele cha `main` chenye `id` inayolingana ya `main`, ambayo ina vipengele vingine vyote +1. Unapaswa kuona kipengele chenye `id` ya `title`, ambayo ina string (yaani maandishi), yanayofafanua mada ya ukurasa wa kushukuru (k.m. "Dr. Norman Borlaug") +1. Unapaswa kuona kipengele cha `figure` au `div` chenye `id` ya `img-div` +1. Ndani ya kipengele cha `#img-div` unapaswa kuona kipengele cha `img` chenye `id="image"` sambamba +1. Ndani ya kipengele cha `#img-div`, unapaswa kuona kipengele chenye `id="img-caption"` inayolingana ambayo ina maudhui ya maandishi yanayoelezea picha iliyoonyeshwa katika `#img-div` +1. Unapaswa kuona kipengele kilicho na `id="tribute-info"` inayolingana, ambayo ina maudhui ya maandishi yanayoelezea mada ya ukurasa wa kushukuru +1. Unapaswa kuona kipengele cha `a` chenye `id="tribute-link"` sambamba, ambacho kinaunganishwa na tovuti ya nje, ambacho kina maelezo ya ziada kuhusu mada ya ukurasa wa kushukuru. DOKEZO: Ni lazima ukipe kipengele chako sifa ya `target` na ukiweke kuwa `_blank` ili kiungo chako kifunguke kwenye kichupo kipya +1. `#image` yako inapaswa kutumia `max-width` na `height` ili kubadilisha ukubwa kwa kuwajibika, ikilinganishwa na upana wa kipengele kikuu, bila kuzidi ukubwa wake asili +1. Kipengele chako cha `img` kinapaswa kuwekwa katikati ndani ya kipengele kikuu + +Timiza maelezo na upite majaribio yote hapa chini ili kukamilisha mradi huu. Ipe muundo wako wa kibinafsi. Happy Coding! + +**Kumbuka:** Hakikisha umeongeza `` katika HTML yako ili kuunganisha stylesheet yako na utumie CSS yako + +# --hints-- + +Unapaswa kuwa na kipengele cha `main` chenye `id` ya `main`. + +```js +const el = document.getElementById('main') +assert(!!el && el.tagName === 'MAIN') +``` + +`#img-div`, `#image`, `#img-caption`, `#tribute-info`, na `#tribute-link` zinapaswa kuwa wazao wa `#main`. + +```js +const el1 = document.querySelector('#main #img-div') +const el2 = document.querySelector('#main #image') +const el3 = document.querySelector('#main #img-caption') +const el4 = document.querySelector('#main #tribute-info') +const el5 = document.querySelector('#main #tribute-link') +assert(!!el1 & !!el2 && !!el3 && !!el4 && !!el5) +``` + +Unapaswa kuwa na kipengele chenye `id` ya `title`. + +```js +const el = document.getElementById('title') +assert(!!el) +``` + +`#title` yako haipaswi kuwa tupu. + +```js +const el = document.getElementById('title') +assert(!!el && el.innerText.length > 0) + +``` + +Unapaswa kuwa na kipengele cha `figure` au `div` chenye `id` ya `img-div`. + +```js +const el = document.getElementById('img-div') +assert(!!el && (el.tagName === 'DIV' || el.tagName === 'FIGURE')) +``` + +Unapaswa kuwa na kipengele cha `img` chenye `id` ya `image`. + +```js +const el = document.getElementById('image') +assert(!!el && el.tagName === 'IMG') +``` + +`#image` yako inapaswa kuwa mzao wa `#img-div`. + +```js +const el = document.querySelector('#img-div #image') +assert(!!el) +``` + +Unapaswa kuwa na kipengele cha `figcaption` au `div` chenye `id` ya `img-caption`. + +```js +const el = document.getElementById('img-caption') +assert(!!el && (el.tagName === 'DIV' || el.tagName === 'FIGCAPTION')) +``` + +`#img-caption` yako inapaswa kuwa mzao wa `#img-div`. + +```js +const el = document.querySelector('#img-div #img-caption') +assert(!!el) +``` + +`#img-caption` yako haipaswi kuwa tupu. + +```js +const el = document.getElementById('img-caption') +assert(!!el && el.innerText.length > 0) +``` + +Unapaswa kuwa na kipengele chenye `id` ya `tribute-info`. + +```js +const el = document.getElementById('tribute-info') +assert(!!el) +``` + +`#tribute-info` yako haipaswi kuwa tupu. + +```js +const el = document.getElementById('tribute-info') +assert(!!el && el.innerText.length > 0) +``` + +Unapaswa kuwa na kipengele cha `a` chenye `id` ya `tribute-link`. + +```js +const el = document.getElementById('tribute-link') +assert(!!el && el.tagName === 'A') +``` + +`#tribute-link` yako inapaswa kuwa na sifa ya `href` yenye thamani. + +```js +const el = document.getElementById('tribute-link') +assert(!!el && !!el.href && el.href.length > 0) +``` + +`#tribute-link` inapaswa kuwa na sifa ya `target` iliyo `_blank`. + +```js +const el = document.getElementById('tribute-link') +assert(!!el && el.target === '_blank') +``` + +Kipengele chako cha `img` kinapaswa kuwa na `display` ya `block`. + +```js +const img = document.getElementById('image'); +const imgStyle = window.getComputedStyle(img); +const style = imgStyle?.getPropertyValue('display') +assert(style === 'block') +``` + +`#image` yako inapaswa kuwa na `max-width` ya `100%`. + +```js +const img = document.getElementById('image'); +const imgStyle = window.getComputedStyle(img); +const style = imgStyle?.getPropertyValue('max-width') +assert(style === '100%') +``` + +`#image` yako inapaswa kuwa na `height` ya `auto`. + +```js +// taken from the testable-projects repo +const img = document.getElementById('image'); +const imgStyle = window.getComputedStyle(img); +const oldDisplayValue = imgStyle.getPropertyValue('display'); +const oldDisplayPriority = imgStyle.getPropertyPriority('display'); +img?.style.setProperty('display', 'none', 'important'); +const heightValue = imgStyle?.getPropertyValue('height') +img?.style.setProperty('display', oldDisplayValue, oldDisplayPriority); +assert(heightValue === 'auto') +``` + +`#image` yako inapaswa kuwekwa katikati ya kipengele kikuu + +```js +// taken from the testable-projects repo +const img = document.getElementById('image'), + imgParent = img?.parentElement, + imgLeft = img?.getBoundingClientRect().left, + imgRight = img?.getBoundingClientRect().right, + parentLeft = imgParent?.getBoundingClientRect().left, + parentRight = imgParent?.getBoundingClientRect().right, + leftMargin = imgLeft - parentLeft, + rightMargin = parentRight - imgRight; +assert(leftMargin - rightMargin < 6 && rightMargin - leftMargin < 6) +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +```css + +``` + +## --solutions-- + +```html + + + + + + + + Tribute Page + + +

Tribute Page

+

The below card was designed as a tribute page for freeCodeCamp.

+
+
+ An image of Togepi +
Togepi, happy as always.
+
+

Togepi

+
+
+

+ Togepi was first discovered in the Johto region, when Ash Ketchum + discovered a mysterious egg. However, when the egg hatched, Togepi saw + Ash's friend Misty first and imprinted on her. Like many other + creatures, this imprinting process created a bond and Togepi views + Misty as his mother. +

+

+ Togepi is a very childlike Pokemon, and is very emotionally + expressive. He demonstrates extreme levels of joy and sadness. +

+
+

Battle Information

+
    +
  • Type: Fairy
  • +
  • Evolutions: Togepi -> Togetic -> Togekiss
  • +
  • Moves: Growl, Pound, Sweet Kiss, Charm
  • +
  • Weaknesses: Poison, Steel
  • +
  • Resistances: Dragon
  • +
+

+ Check out this + Bulbapedia article on Togepi + for more information on this great Pokemon. +

+
+
+ + + +``` + +```css +body { + background-color: #3a3240; + color: white; +} +main { + background-color: #92869c; + font-family: Lobster; + max-width: 500px; + margin: 20px auto; + color: black; + border-radius: 50px; + box-shadow: 10px 10px rgba(0, 0, 0, 0.5); +} +h2 { + text-align: center; + font-size: 20pt; + font-family: Pacifico; +} +body { + text-align: center; + font-size: 12pt; +} +footer { + text-align: center; + font-size: 10pt; +} +.border { + border-color: black; + border-width: 5px; + border-style: solid; +} +#image { + height: auto; + display: block; + margin: auto; + max-width: 100%; + border-radius: 50%; +} +#img-caption { + font-size: 10pt; +} +a:not(#tribute-link) { + color: white; +} +hr { + border-color: black; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613297a923965e0703b64796.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613297a923965e0703b64796.md new file mode 100644 index 00000000000..bcdc6f509f6 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613297a923965e0703b64796.md @@ -0,0 +1,56 @@ +--- +id: 613297a923965e0703b64796 +title: Hatua ya 2 +challengeType: 0 +dashedName: step-2 +--- + +# --description-- + +Huenda unafahamu kipengele cha `meta` tayari; kinatumika kubainisha habari kuhusu ukurasa, kama vile kichwa, maelezo, manenomsingi na mwandishi. + +Upe ukurasa wako kipengele cha `meta` chenye thamani inayofaa ya `charset`. + +Sifa ya `charset` inabainisha usimbaji wa herufi ya ukurasa, na, siku hizi, `UTF-8` ndio usimbaji pekee unaoauniwa na vivinjari vingi. + +# --hints-- + +Unapaswa kuunda kipengele cha `meta` ndani ya kipengele cha `head`. + +```js +assert.exists(document.querySelector('head > meta')); +``` + +Unapaswa kuipa tagi ya `meta` `charset` ya `UTF-8`. + +```js +assert.equal(document.querySelector('head > meta')?.getAttribute('charset')?.toLowerCase(), 'utf-8'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + +--fcc-editable-region-- + + + +--fcc-editable-region-- + + + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329b210dac0b08047fd6ab.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329b210dac0b08047fd6ab.md new file mode 100644 index 00000000000..281a9dfbd9a --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329b210dac0b08047fd6ab.md @@ -0,0 +1,61 @@ +--- +id: 61329b210dac0b08047fd6ab +title: Hatua ya 3 +challengeType: 0 +dashedName: step-3 +--- + +# --description-- + +Kuendelea na vipengele vya `meta`, ufafanuzi wa `viewport` huambia kivinjari jinsi ya kutoa ukurasa. Ikijumuisha ufikivu bora wa kuona kwenye simu ya mkononi, na inaboresha _SEO_ (search engine optimization). + +Ongeza ufafanuzi wa `viewport` na sifa ya `content` inayoelezea `width` na `initial-scale` ya ukurasa. + +# --hints-- + +Unapaswa kuunda kipengele kingine cha `meta` katika sehemu ya `head`. + +```js +assert.equal(document.querySelectorAll('head > meta')?.length, 2); +``` + +Unapaswa kuipa `meta` sifa ya `name` ya `viewport`. + +```js +assert.equal(document.querySelectorAll('head > meta[name="viewport"]')?.length, 1); +``` + +Unapaswa kuipa `meta` sifa ya `content` ya `width=device-width, initial-scale=1`. + +```js +assert.equal(document.querySelectorAll('head > meta[content="width=device-width, initial-scale=1.0"]')?.length || document.querySelectorAll('head > meta[content="width=device-width, initial-scale=1"]')?.length, 1); +``` + +# --seed-- + +## --seed-contents-- + +```html + + +--fcc-editable-region-- + + + + +--fcc-editable-region-- + + + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329d52e5010e08d9b9d66b.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329d52e5010e08d9b9d66b.md new file mode 100644 index 00000000000..8c6d6d90800 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61329d52e5010e08d9b9d66b.md @@ -0,0 +1,68 @@ +--- +id: 61329d52e5010e08d9b9d66b +title: Hatua ya 4 +challengeType: 0 +dashedName: step-4 +--- + +# --description-- + +Kipengele kingine muhimu cha `meta` kwa ufikivu na SEO ni ufafanuzi wa `description`. Thamani ya sifa ya `content` inatumiwa na injini tafuti kutoa maelezo ya ukurasa wako. + +Ongeza kipengele cha `meta` chenye sifa ya `name` iliyowekwa kwa `description`, na uipe sifa muhimu ya `content`. + +# --hints-- + +Unapaswa kuongeza kipengele kipya cha `meta` kwenye sehemu ya `head`. + +```js +assert.equal(document.querySelectorAll('meta').length, 3); +``` + +Unapaswa kuipa `meta` sifa ya `name` ya `description`. + +```js +assert.exists(document.querySelector('meta[name="description"]')); +``` + +Unapaswa kuipa `meta` sifa ya `content`. + +```js +assert.notEmpty(document.querySelector('meta[name="description"]')?.content); +``` + +Thamani ya sifa ya `content` haipaswi kuwa zaidi ya herufi 165. _Huu ndio upeo wa urefu wa maelezo wa Google._ + +```js +assert.isAtMost(document.querySelector('meta[name="description"]')?.content?.length, 165); +``` + +# --seed-- + +## --seed-contents-- + +```html + + +--fcc-editable-region-- + + + + + +--fcc-editable-region-- + + + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6133acc353338c0bba9cb553.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6133acc353338c0bba9cb553.md new file mode 100644 index 00000000000..b920ed1713e --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6133acc353338c0bba9cb553.md @@ -0,0 +1,63 @@ +--- +id: 6133acc353338c0bba9cb553 +title: Hatua ya 5 +challengeType: 0 +dashedName: step-5 +--- + +# --description-- + +Hatimaye katika sehemu ya `head`, kipengele cha `title` ni muhimu kwa visomaji skrini kuelewa maudhui ya ukurasa. Zaidi ya hayo, ni sehemu muhimu ya _SEO_. + +Upe ukurasa wako `title` yenye maelezo mafupi. + +# --hints-- + +Unapaswa kuongeza kipengele cha `title` kwenye sehemu ya `head`. + +```js +assert.exists(document.querySelector('head > title')); +``` + +Hupaswi kufanya `title` kuwa ndefu zaidi ya herufi 60. + +```js +assert.isAtMost(document.querySelector('head > title')?.textContent?.length, 60); +``` + +Jaribu kuwa na maelezo zaidi ukitumia kipengele chako cha `title`. _Kidokezo: Angalau herufi 15_ + +```js +assert.isAtLeast(document.querySelector('head > title')?.textContent?.length, 15); +``` + +# --seed-- + +## --seed-contents-- + +```html + + +--fcc-editable-region-- + + + + + + +--fcc-editable-region-- + + + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6133d11ef548f51f876149e3.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6133d11ef548f51f876149e3.md new file mode 100644 index 00000000000..02182afb086 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6133d11ef548f51f876149e3.md @@ -0,0 +1,68 @@ +--- +id: 6133d11ef548f51f876149e3 +title: Hatua ya 6 +challengeType: 0 +dashedName: step-6 +--- + +# --description-- + +Uongozaji ni sehemu kuu ya ufikivu, na visoma skrini vinakutegemea wewe kutoa muundo wa ukurasa wako. Hii inakamilishwa na vipengele vya HTML vya semantic. + +Ongeza `header` na kipengele kikuu cha `main` kwenye ukurasa wako. + +Kipengele cha `header` kitatumika kutambulisha ukurasa, na pia kutoa menyu ya mwongozo. + +Kipengele cha `main` kitakuwa na maudhui ya msingi ya ukurasa wako. + +# --hints-- + +Unapaswa kuongeza kipengele cha `header` kwenye `body`. + +```js +assert.exists(document.querySelector('body > header')); +``` + +Unapaswa kuongeza kipengele cha `main` kwenye `body`. + +```js +assert.exists(document.querySelector('body > main')); +``` + +Kipengele cha `header` kinafaa kuja kabla ya kipengele cha `main`. + +```js +assert.exists(document.querySelector('header + main')); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + +--fcc-editable-region-- + + + +--fcc-editable-region-- + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e2546d0594208229ada50.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e2546d0594208229ada50.md new file mode 100644 index 00000000000..da5bfa38a62 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e2546d0594208229ada50.md @@ -0,0 +1,93 @@ +--- +id: 613e2546d0594208229ada50 +title: Hatua ya 7 +challengeType: 0 +dashedName: step-7 +--- + +# --description-- + +Ndani ya `header`, toa muktadha kuhusu ukurasa kwa kuweka kipengee kimoja cha `img`, `h1` na `nav`. + +`img` inapaswa kuelekeza kwenye `https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg`, na iwe na `id` ya `logo`. + +`h1` inapaswa kuwa na maandishi `HTML/CSS Quiz`. + +# --hints-- + +Unapaswa kuongeza kipengele cha `img` kwenye kipengele cha `header`. + +```js +assert.exists(document.querySelector('header > img')); +``` + +Unapaswa kuongeza kipengele cha `h1` kwenye kipengele cha `header`. + +```js +assert.exists(document.querySelector('header > h1')); +``` + +Unapaswa kuongeza kipengele cha `nav` kwenye kipengele cha `header`. + +```js +assert.exists(document.querySelector('header > nav')); +``` + +Unapaswa kuweka vipengele vya `img`, `h1`, na `nav` kwa mpangilio huo. + +```js +assert.exists(document.querySelector('img + h1 + nav')); +``` + +Unapaswa kukipa kipengele cha `img` `src` sifa ya `https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg`. + +```js +assert.equal(document.querySelector('img')?.src, 'https://cdn.freecodecamp.org/platform/universal/fcc_primary.svg'); +``` + +Unapaswa kukipa kipengele cha `img` na `id` sifa ya `logo`. + +```js +assert.equal(document.querySelector('img')?.id, 'logo'); +``` + +Unapaswa kukipa kipengele cha `h1` maandishi `HTML/CSS Quiz`. + +```js +assert.include(document.querySelector('h1')?.innerText?.toLowerCase(), 'html/css quiz'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +--fcc-editable-region-- +
+ +
+--fcc-editable-region-- +
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e275749ebd008e74bb62e.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e275749ebd008e74bb62e.md new file mode 100644 index 00000000000..805d16ddc6b --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/613e275749ebd008e74bb62e.md @@ -0,0 +1,66 @@ +--- +id: 613e275749ebd008e74bb62e +title: Hatua ya 8 +challengeType: 0 +dashedName: step-8 +--- + +# --description-- + +Sifa muhimu ya _SVG_ (scalable vector graphics) ni kwamba ina sifa ya `path` ambayo inaruhusu picha kuongezwa bila kuathiri matokeo yake. + +Kwa sasa, `img` inachukua ukubwa wake wa chaguomsingi, ambao ni mkubwa sana. Kwa usahihi, kadiria picha ukitumia `id` yake kama kiteuzi, na uweke `width` hadi `max(100px, 18vw)`. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `#logo` ili kulenga kipengele cha `img`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('#logo')); +``` + +Unapaswa kuipa `img` `width` ya `max(100px, 18vw)`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('#logo')?.width, 'max(100px, 18vw)'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6140827cff96e906bd38fc2b.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6140827cff96e906bd38fc2b.md new file mode 100644 index 00000000000..9bf3726263a --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6140827cff96e906bd38fc2b.md @@ -0,0 +1,93 @@ +--- +id: 6140827cff96e906bd38fc2b +title: Hatua ya 9 +challengeType: 0 +dashedName: step-9 +--- + +# --description-- + +Kama ilivyoelezwa katika Mwongozo wa Mtindo wa freeCodeCamp, logo inapaswa kuhifadhi uwiano wa `35 / 4`, na iwe na pedi kwenye maandishi. + +Kwanza, badilisha `background-color` hadi `#0a0a23` ili uweze kuona logo. Kisha, tumia sifa ya `aspect-ratio` ili kuweka uwiano unaohitajika kuwa `35 / 4`. Hatimaye, ongeza `padding` ya `0.4rem` pande zote. + +# --hints-- + +Unapaswa kuipa `#logo` `background-color` ya `#0a0a23`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('#logo')?.backgroundColor, 'rgb(10, 10, 35)'); +``` + +Unapaswa kutumia sifa ya `aspect-ratio`. + +```js +assert.notEmpty(new __helpers.CSSHelp(document).getStyle('#logo')?.aspectRatio); +``` + +Hupaswi kutumia sifa ya `height`. + +```js +assert.isEmpty(new __helpers.CSSHelp(document).getStyle('#logo')?.height); +``` + +Haupaswi kubadilisha sifa ya `width`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('#logo')?.width, 'max(100px, 18vw)'); +``` + +Unapaswa kuipa `img` `aspect-ratio` ya `35 / 4`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('#logo')?.aspectRatio, '35 / 4'); +``` + +Unapaswa kuipa `img` `padding` ya `0.4rem`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('#logo')?.padding, '0.4rem'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +--fcc-editable-region-- +#logo { + width: max(100px, 18vw); + +} +--fcc-editable-region-- + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6140883f74224508174794c0.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6140883f74224508174794c0.md new file mode 100644 index 00000000000..d1923ddd115 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6140883f74224508174794c0.md @@ -0,0 +1,89 @@ +--- +id: 6140883f74224508174794c0 +title: Hatua ya 10 +challengeType: 0 +dashedName: step-10 +--- + +# --description-- + +Fanya `header` ichukue upana kamili wa kontena kuu, weka `height` kuwa `50px`, na uweke `background-color` kuwa `#1b1b32`. Kisha, weka `display` kutumia _Flexbox_. + +# --hints-- + +Unapaswa kutumia kipengele kichaguzi cha `header`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('header')); +``` + +Unapaswa kuipa `header` `width` ya `100%`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('header')?.width, '100%'); +``` + +Unapaswa kuipa `header` `height` ya `50px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('header')?.height, '50px'); +``` + +Unapaswa kuipa `header` `background-color` ya `#1b1b32`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('header')?.backgroundColor, 'rgb(27, 27, 50)'); +``` + +Unapaswa kuipa `header` `display` ya `flex`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('header')?.display, 'flex'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61408e4ae3e35d08feb260eb.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61408e4ae3e35d08feb260eb.md new file mode 100644 index 00000000000..e6506d31f50 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61408e4ae3e35d08feb260eb.md @@ -0,0 +1,83 @@ +--- +id: 61408e4ae3e35d08feb260eb +title: Hatua ya 11 +challengeType: 0 +dashedName: step-11 +--- + +# --description-- + +Badilisha rangi ya fonti ya `h1` iwe `#f1be32`, na uweke ukubwa wa fonti kuwa `min(5vw, 1.2em)`. + +# --hints-- + +Unapaswa kutumia kipengele kichaguzi cha `h1`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('h1')); +``` + +Unapaswa kuipa `h1` `color` ya `#f1be32`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('h1')?.color, 'rgb(241, 190, 50)'); +``` + +Unapaswa kuipa `h1` `font-size` ya `min(5vw, 1.2em)`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('h1')?.fontSize, 'min(5vw, 1.2em)'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61408f155e798909b6908712.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61408f155e798909b6908712.md new file mode 100644 index 00000000000..480a0967337 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61408f155e798909b6908712.md @@ -0,0 +1,112 @@ +--- +id: 61408f155e798909b6908712 +title: Hatua ya 12 +challengeType: 0 +dashedName: step-12 +--- + +# --description-- + +Ili kuwezesha ufikiaji kwenye ukurasa, ongeza orodha ambayo haijapangwa na vitu vitatu vifuatavyo: + +- `INFO` +- `HTML` +- `CSS` + +Maandishi ya vipengee vya orodha yanapaswa kufungwa kwa tagi za nanga (anchor tags). + +# --hints-- + +Unapaswa kuweka kipengee kimoja cha `ul` ndani ya `nav`. + +```js +assert.equal(document.querySelectorAll('nav > ul')?.length, 1); +``` + +Unapaswa kuweka vipengele vitatu vya `li` ndani ya kipengele cha `ul`. + +```js +assert.equal(document.querySelectorAll('nav > ul > li')?.length, 3); +``` + +Unapaswa kuweka kipengele kimoja cha `a` ndani ya kila kipengele cha `li`. + +```js +assert.equal(document.querySelectorAll('nav > ul > li > a')?.length, 3); +``` + +Unapaswa kukipa kipengele cha kwanza cha `a` maandishi `INFO`. + +```js +assert.equal(document.querySelectorAll('nav > ul > li > a')?.[0]?.textContent, 'INFO'); +``` + +Unapaswa kukipa kipengele cha pili cha `a` maandishi `HTML`. + +```js +assert.equal(document.querySelectorAll('nav > ul > li > a')?.[1]?.textContent, 'HTML'); +``` + +Unapaswa kukipa kipengele cha tatu cha `a` maandishi `CSS`. + +```js +assert.equal(document.querySelectorAll('nav > ul > li > a')?.[2]?.textContent, 'CSS'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+--fcc-editable-region-- + +--fcc-editable-region-- +
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614090d5a22b6f0a5a6b464c.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614090d5a22b6f0a5a6b464c.md new file mode 100644 index 00000000000..3d34b72616e --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614090d5a22b6f0a5a6b464c.md @@ -0,0 +1,102 @@ +--- +id: 614090d5a22b6f0a5a6b464c +title: Hatua ya 13 +challengeType: 0 +dashedName: step-13 +--- + + + +# --description-- + +Lenga vipengele vya orodha ambavyo havijapangwa ndani ya vipengee vya `nav` na utumie _Flexbox_ ili kuweka nafasi sawa. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `nav > ul`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('nav > ul')); +``` + +Unapaswa kuvipa vipengele vya `nav > ul` `display` ya `flex`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('nav > ul')?.display, 'flex'); +``` + +Unapaswa kuvipa vipengele vya `nav > ul` `justify-content` ya `space-evenly`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('nav > ul')?.justifyContent, 'space-evenly'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6141fabd6f75610664e908fd.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6141fabd6f75610664e908fd.md new file mode 100644 index 00000000000..53a2dab34cf --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6141fabd6f75610664e908fd.md @@ -0,0 +1,125 @@ +--- +id: 6141fabd6f75610664e908fd +title: Hatua ya 14 +challengeType: 0 +dashedName: step-14 +--- + +# --description-- + +Kwa vile hili ni swali, utahitaji fomu kwa watumiaji kuwasilisha majibu. Unaweza kutenganisha maudhui ndani ya fomu kimantiki kwa kutumia vipengele vya `section`. + +Ndani ya kipengele cha `main`, unda fomu yenye vipengele vitatu vya `section`. Kisha, fanya fomu iwasilishwe kwa `https://freecodecamp.org/practice-project/accessibility-quiz`, kwa kutumia mbinu sahihi. + +# --hints-- + +Unapaswa kuweka kipengele cha `form` ndani ya kipengele chako cha `main`. + +```js +assert.exists(document.querySelector('main > form')); +``` + +Unapaswa kuweka vipengele vitatu vya `section` ndani ya kipengele chako cha `form`. + +```js +assert.equal(document.querySelectorAll('main > form > section')?.length, 3); +``` + +Unapaswa kukipa kipengele cha `form` sifa ya `action`. + +```js +assert.notEmpty(document.querySelector('main > form')?.action); +``` + +Unapaswa kuipa sifa ya `action` thamani ya `https://freecodecamp.org/practice-project/accessibility-quiz`. + +```js +assert.equal(document.querySelector('main > form')?.action, 'https://freecodecamp.org/practice-project/accessibility-quiz'); +``` + +Unapaswa kukipa kipengele cha `form` sifa ya `method`. + +```js +assert.notEmpty(document.querySelector('main > form')?.method); +``` + +Unapaswa kukipa kipengele cha `form` sifa ya `method` yenye thamani ya `post`. + +```js +assert.equal(document.querySelector('main > form')?.method?.toLowerCase(), 'post'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+--fcc-editable-region-- +
+ +
+--fcc-editable-region-- + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6141fed65b61320743da5894.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6141fed65b61320743da5894.md new file mode 100644 index 00000000000..ef8cc7522e1 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6141fed65b61320743da5894.md @@ -0,0 +1,111 @@ +--- +id: 6141fed65b61320743da5894 +title: Hatua ya 15 +challengeType: 0 +dashedName: step-15 +--- + +# --description-- + +Ili kuongeza ufikiaji wa ukurasa, sifa ya `role` inaweza kutumika kuonyesha madhumuni ya kipengele kwenye ukurasa kwa teknolojia saidizi. Sifa ya `role` ni sehemu ya _Web Accessibility Initiative_ (WAI), na inakubali thamani zilizowekwa awali. + +Kipe kila kipengele cha `section` jukumu la `region`. + +# --hints-- + +Unapaswa kukipa kipengele cha kwanza cha `section` jukumu la `region`. + +```js +assert.equal(document.querySelectorAll('section')?.[0]?.getAttribute('role'), 'region'); +``` + +Unapaswa kukipa kipengele cha pili cha `section` jukumu la `region`. + +```js +assert.equal(document.querySelectorAll('section')?.[1]?.getAttribute('role'), 'region'); +``` + +Unapaswa kukipa kipengele cha tatu cha `section` jukumu la `region`. + +```js +assert.equal(document.querySelectorAll('section')?.[2]?.getAttribute('role'), 'region'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+--fcc-editable-region-- +
+
+
+
+
+--fcc-editable-region-- +
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614202874ca576084fca625f.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614202874ca576084fca625f.md new file mode 100644 index 00000000000..5732511bccb --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614202874ca576084fca625f.md @@ -0,0 +1,171 @@ +--- +id: 614202874ca576084fca625f +title: Hatua ya 16 +challengeType: 0 +dashedName: step-16 +--- + +# --description-- + +Kila `region` inahitaji lebo, ambayo husaidia watumiaji wa kisoma skrini kuelewa madhumuni ya eneo. Njia moja ya kuongeza lebo ni kuongeza kipengele cha kichwa ndani ya eneo na kisha kurejelea na sifa ya `aria-labelledby`. + +Ongeza sifa zifuatazo za `aria-labelledby` kwa vipengele vya `section`: + +- `student-info` +- `html-questions` +- `css-questions` + +Kisha, ndani ya kila kipengele cha `section`, weka kipengele kimoja cha `h2` chenye `id` inayolingana na sifa ya `aria-labelledby`. Ipe kila `h2` maudhui ya maandishi yanayofaa. + +# --hints-- + +Unapaswa kukipa kipengele cha kwanza cha `section` sifa ya `aria-labelledby` ya `student-info`. + +```js +assert.equal(document.querySelectorAll('section')?.[0]?.getAttribute('aria-labelledby'), 'student-info'); +``` + +Unapaswa kukipa kipengele cha pili cha `section` sifa ya `aria-labelledby` ya `html-questions`. + +```js +assert.equal(document.querySelectorAll('section')?.[1]?.getAttribute('aria-labelledby'), 'html-questions'); +``` + +Unapaswa kukipa kipengele cha tatu cha `section` sifa ya `aria-labelledby` ya `css-questions`. + +```js +assert.equal(document.querySelectorAll('section')?.[2]?.getAttribute('aria-labelledby'), 'css-questions'); +``` + +Unapaswa kuweka kipengee kimoja cha `h2` ndani ya kipengele cha kwanza cha `section`. + +```js +assert.equal(document.querySelectorAll('section')?.[0]?.querySelectorAll('h2')?.length, 1); +``` + +Unapaswa kuweka kipengee kimoja cha `h2` ndani ya kipengele cha pili cha `section`. + +```js +assert.equal(document.querySelectorAll('section')?.[1]?.querySelectorAll('h2')?.length, 1); +``` + +Unapaswa kuweka kipengee kimoja cha `h2` ndani ya kipengele cha tatu cha `section`. + +```js +assert.equal(document.querySelectorAll('section')?.[2]?.querySelectorAll('h2')?.length, 1); +``` + +Unapaswa kukipa kipengele cha kwanza cha `h2` sifa ya `id` ya `student-info`. + +```js +assert.equal(document.querySelectorAll('h2')?.[0]?.id, 'student-info'); +``` + +Unapaswa kukipa kipengele cha pili cha `h2` sifa ya `id` ya `html-questions`. + +```js +assert.equal(document.querySelectorAll('h2')?.[1]?.id, 'html-questions'); +``` + +Unapaswa kukipa kipengele cha tatu cha `h2` sifa ya `id` ya `css-questions`. + +```js +assert.equal(document.querySelectorAll('h2')?.[2]?.id, 'css-questions'); +``` + +Unapaswa kukipa kipengele cha kwanza cha `h2` maudhui ya maandishi yanayofaa. _Kidokezo: Ningechagua `Student Info`_ + +```js +assert.isAtLeast(document.querySelectorAll('h2')?.[0]?.textContent?.length, 1); +``` + +Unapaswa kukipa kipengele cha pili cha `h2` maudhui ya maandishi yanayofaa. _Kidokezo: Ningechagua `HTML`_ + +```js +assert.isAtLeast(document.querySelectorAll('h2')?.[1]?.textContent?.length, 1); +``` + +Unapaswa kukipa kipengele cha tatu cha `h2` maudhui ya maandishi yanayofaa. _Kidokezo: Ningechagua `CSS`_ + +```js +assert.isAtLeast(document.querySelectorAll('h2')?.[2]?.textContent?.length, 1); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+--fcc-editable-region-- +
+
+
+
+
+--fcc-editable-region-- +
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614206033d366c090ca7dd42.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614206033d366c090ca7dd42.md new file mode 100644 index 00000000000..3f9b5f6eb3d --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614206033d366c090ca7dd42.md @@ -0,0 +1,140 @@ +--- +id: 614206033d366c090ca7dd42 +title: Hatua ya 17 +challengeType: 0 +dashedName: step-17 +--- + +# --description-- + +Typeface ina jukumu muhimu katika ufikivu wa ukurasa. Baadhi ya fonti ni rahisi kusoma kuliko zingine, na hii ni kweli hasa kwenye skrini zenye mwonekano wa chini. + +Badilisha fonti ya vipengee vya `h1` na `h2` hadi `Verdana`, na utumie fonti nyingine iliyo salama kwenye mtandao katika familia ya sans-serif kama njia mbadala. + +Pia, ongeza `border-bottom` ya `4px solid #dfdfe2` kwa vipengele vya `h2` ili kufanya sehemu ziwe tofauti. + +# --hints-- + +Unapaswa kutumia kichaguzi cha vipengele vingi ili kulenga vipengele vya `h1` na `h2`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +assert.exists(gs('h1, h2') || gs('h2, h1')); +``` + +Unapaswa kuweka thamani ya kwanza ya `font-family` kuwa `Verdana`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +const style = gs('h1, h2') || gs('h2, h1'); +assert.include(style?.fontFamily, 'Verdana'); +``` + +Unapaswa kuweka thamani ya pili ya kipengele cha `font-family` kwa sans-serif nyingine, fonti salama ya wavuti. _Kidokezo: Ningechagua Tahoma_. + +```js +// Acceptable fonts: Arial, sans-serif, Helvetica, Tahoma, Trebuchet MS. +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +const style = gs('h1, h2') || gs('h2, h1'); +assert.match(style?.fontFamily, /(Tahoma)|(Arial)|(sans-serif)|(Helvetica)|(Trebuchet MS)/); +``` + +Unapaswa kutumia kichaguzi cha `h2` ili kulenga vipengele vya `h2`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('h2')); +``` + +Unapaswa kuipa`h2` `border-bottom` ya `4px solid #dfdfe2`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('h2')?.borderBottom, '4px solid rgb(223, 223, 226)'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+
+

HTML

+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61435e3c0679a306c20f1acc.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61435e3c0679a306c20f1acc.md new file mode 100644 index 00000000000..fba7609b1b1 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61435e3c0679a306c20f1acc.md @@ -0,0 +1,125 @@ +--- +id: 61435e3c0679a306c20f1acc +title: Hatua ya 18 +challengeType: 0 +dashedName: step-18 +--- + +# --description-- + +Ili kuweza kuvinjari ndani ya ukurasa, kipe kila kipengele cha nanga `href` inayolingana na `id` ya vipengele vya `h2`. + +# --hints-- + +Unapaswa kukipa kipengele cha kwanza cha `a` `href` ya `#student-info`. + +```js +assert.equal(document.querySelectorAll('a')?.[0]?.getAttribute('href'), '#student-info'); +``` + +Unapaswa kukipa kipengele cha pili cha `a` `href` ya `#html-questions`. + +```js +assert.equal(document.querySelectorAll('a')?.[1]?.getAttribute('href'), '#html-questions'); +``` + +Unapaswa kukipa kipengele cha tatu cha `a` `href` ya `#css-questions`. + +```js +assert.equal(document.querySelectorAll('a')?.[2]?.getAttribute('href'), '#css-questions'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+
+

HTML

+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143610161323a081b249c19.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143610161323a081b249c19.md new file mode 100644 index 00000000000..90374254dfe --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143610161323a081b249c19.md @@ -0,0 +1,173 @@ +--- +id: 6143610161323a081b249c19 +title: Hatua ya 19 +challengeType: 0 +dashedName: step-19 +--- + +# --description-- + +Kujaza maudhui ya maswali hapa chini `#student-info`, ongeza vipengele vitatu vya `div` kwa `class` ya `info`. + +Kisha, ndani ya kila `div` weka kipengele kimoja cha `label` na kipengele kimoja cha `input`. + +# --hints-- + +Unapaswa kuweka vipengele vitatu vya `div` chini ya kipengele cha `h2#student-info`. + +```js +assert.equal(document.querySelectorAll('h2#student-info ~ div')?.length, 3); +``` + +Unapaswa kuipa `div` ya kwanza `class` ya `info`. + +```js +assert.equal(document.querySelectorAll('h2#student-info ~ div')?.[0]?.className, 'info'); +``` + +Unapaswa kuipa `div` ya pili `class` ya `info`. + +```js +assert.equal(document.querySelectorAll('h2#student-info ~ div')?.[1]?.className, 'info'); +``` + +Unapaswa kuipa `div` ya tatu `class` ya `info`. + +```js +assert.equal(document.querySelectorAll('h2#student-info ~ div')?.[2]?.className, 'info'); +``` + +Unapaswa kuweka kipengee kimoja cha `label` ndani ya `div` ya kwanza. + +```js +assert.equal(document.querySelectorAll('h2#student-info ~ div')?.[0]?.querySelectorAll('label')?.length, 1); +``` + +Unapaswa kuweka kipengee kimoja cha `input` ndani ya `div` ya kwanza, baada ya `label`. + +```js +assert.equal(document.querySelectorAll('h2#student-info ~ div')?.[0]?.querySelectorAll('input')?.length, 1); +assert.exists(document.querySelectorAll('h2#student-info ~ div')?.[0]?.querySelector('label + input')); +``` + +Unapaswa kuweka kipengee kimoja cha `label` ndani ya `div` ya pili. + +```js +assert.equal(document.querySelectorAll('h2#student-info ~ div')?.[1]?.querySelectorAll('label')?.length, 1); +``` + +Unapaswa kuweka kipengee kimoja cha `input` ndani ya `div` ya pili, baada ya `label`. + +```js +assert.equal(document.querySelectorAll('h2#student-info ~ div')?.[1]?.querySelectorAll('input')?.length, 1); +assert.exists(document.querySelectorAll('h2#student-info ~ div')?.[1]?.querySelector('label + input')); +``` + +Unapaswa kuweka kipengee kimoja cha `label` ndani ya `div` ya tatu. + +```js +assert.equal(document.querySelectorAll('h2#student-info ~ div')?.[2]?.querySelectorAll('label')?.length, 1); +``` + +Unapaswa kuweka kipengee kimoja cha `input` ndani ya `div` ya tatu, baada ya `label`. + +```js +assert.equal(document.querySelectorAll('h2#student-info ~ div')?.[2]?.querySelectorAll('input')?.length, 1); +assert.exists(document.querySelectorAll('h2#student-info ~ div')?.[2]?.querySelector('label + input')); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+--fcc-editable-region-- +
+

Student Info

+ +
+--fcc-editable-region-- +
+

HTML

+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143639d5eddc7094161648c.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143639d5eddc7094161648c.md new file mode 100644 index 00000000000..72512121605 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143639d5eddc7094161648c.md @@ -0,0 +1,195 @@ +--- +id: 6143639d5eddc7094161648c +title: Hatua ya 20 +challengeType: 0 +dashedName: step-20 +--- + +# --description-- + +Ni muhimu kuunganisha kila `input` kwa `label` inayolingana. Hii huwapa watumiaji wa teknolojia ya usaidizi rejeleo la kuona kwa ingizo. + +Hii inafanywa kwa kuipa `label` sifa ya `for`, ambayo ina `id` ya `input`. + +Sehemu hii itachukua jina la mwanafunzi, anwani ya barua pepe na tarehe ya kuzaliwa. Vipe vipengele vya `label` sifa inayofaa ya `for`, pamoja na maudhui ya maandishi. Kisha, unganisha vipengele vya `input` kwa vipengele vinavyolingana vya `label`. + +# --hints-- + +Unapaswa kukipa kipengele cha `label` sifa ya `for` inayofaa. + +```js +assert.isAtLeast(document.querySelectorAll('label')?.[0]?.htmlFor?.length, 1); +``` + +Unapaswa kukipa kipengele cha pili cha `label` sifa inayofaa ya `for`. + +```js +assert.isAtLeast(document.querySelectorAll('label')?.[1]?.htmlFor?.length, 1); +``` + +Unapaswa kukipa kipengele cha tatu cha `label` sifa inayofaa ya `for`. + +```js +assert.isAtLeast(document.querySelectorAll('label')?.[2]?.htmlFor?.length, 1); +``` + +Unapaswa kukipa kipengele cha kwanza cha `label` maudhui ya maandishi yanayofaa. + +```js +assert.isAtLeast(document.querySelectorAll('label')?.[0]?.textContent?.length, 1); +``` + +Unapaswa kukipa kipengele cha pili cha `label` maudhui ya maandishi yanayofaa. + +```js +assert.isAtLeast(document.querySelectorAll('label')?.[1]?.textContent?.length, 1); +``` + +Unapaswa kukipa kipengele cha tatu cha `label` maudhui ya maandishi yanayofaa. + +```js +assert.isAtLeast(document.querySelectorAll('label')?.[2]?.textContent?.length, 1); +``` + +Unapaswa kukipa kipengele cha kwanza cha `input` sifa ya `id` inayolingana na sifa ya `for` ya `label` ya kwanza. + +```js +assert.equal(document.querySelectorAll('input')?.[0]?.id, document.querySelectorAll('label')?.[0]?.htmlFor); +``` + +Unapaswa kukipa kipengele cha pili cha `input` sifa ya `id` inayolingana na sifa ya `for` ya `label` ya pili. + +```js +assert.equal(document.querySelectorAll('input')?.[1]?.id, document.querySelectorAll('label')?.[1]?.htmlFor); +``` + +Unapaswa kukipa kipengele cha tatu cha `input` sifa ya `id` inayolingana na sifa ya `for` ya `label` ya tatu. + +```js +assert.equal(document.querySelectorAll('input')?.[2]?.id, document.querySelectorAll('label')?.[2]?.htmlFor); +``` + +Hupaswi kutumia sifa ya `id` kwa zaidi ya kipengele kimoja cha `input`. + +```js +const id = (n) => document.querySelectorAll('input')?.[n]?.id; +assert.notEqual(id(0), id(1)); +assert.notEqual(id(0), id(2)); +assert.notEqual(id(1), id(2)); +``` + +Hufai kutumia sifa sawa ya `for` kwa zaidi ya kipengele kimoja cha `label`. + +```js +const htmlFor = (n) => document.querySelectorAll('label')?.[n]?.htmlFor; +assert.notEqual(htmlFor(0), htmlFor(1)); +assert.notEqual(htmlFor(0), htmlFor(2)); +assert.notEqual(htmlFor(1), htmlFor(2)); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+--fcc-editable-region-- +
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+--fcc-editable-region-- +
+

HTML

+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143908b6aafb00a659ca189.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143908b6aafb00a659ca189.md new file mode 100644 index 00000000000..bec7f495c19 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143908b6aafb00a659ca189.md @@ -0,0 +1,161 @@ +--- +id: 6143908b6aafb00a659ca189 +title: Hatua ya 21 +challengeType: 0 +dashedName: step-21 +--- + +# --description-- + +Kwa kuzingatia mbinu bora za uingizaji wa fomu, ipe kila `input` sifa inayofaa ya `type` na `name`. Kisha, ipe kila `input` ya kwanza sifa ya `placeholder`. + +# --hints-- + +Unapaswa kuipa `input` ya kwanza `type` ya `text`. + +```js +assert.equal(document.querySelectorAll('input')?.[0]?.type, 'text'); +``` + +Unapaswa kuipa `input` ya pili `type` ya `email`. + +```js +assert.equal(document.querySelectorAll('input')?.[1]?.type, 'email'); +``` + +Unapaswa kuipa `input` ya tatu `type` ya `date`. + +```js +assert.equal(document.querySelectorAll('input')?.[2]?.type, 'date'); +``` + +Unapaswa kuipa `input` ya kwanza sifa ya `name` inayofaa. + +```js +assert.isAtLeast(document.querySelectorAll('input')?.[0]?.name?.length, 1); +``` + +Unapaswa kuipa `input` ya pili sifa ya `name` inayofaa. + +```js +assert.isAtLeast(document.querySelectorAll('input')?.[1]?.name?.length, 1); +``` + +Unapaswa kuipa `input` ya tatu sifa ya `name` inayofaa. + +```js +assert.isAtLeast(document.querySelectorAll('input')?.[2]?.name?.length, 1); +``` + +Unapaswa kuipa `input` ya kwanza sifa ya `placeholder`. + +```js +assert.notEmpty(document.querySelectorAll('input')?.[0]?.placeholder); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+--fcc-editable-region-- +
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+--fcc-editable-region-- +
+

HTML

+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143920c8eafb00b735746ce.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143920c8eafb00b735746ce.md new file mode 100644 index 00000000000..a7196f7617a --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143920c8eafb00b735746ce.md @@ -0,0 +1,127 @@ +--- +id: 6143920c8eafb00b735746ce +title: Hatua ya 22 +challengeType: 0 +dashedName: step-22 +--- + +# --description-- + +Ingawa umeongeza `placeholder` kwa kipengele cha kwanza cha `input` katika somo lililopita, hii si mbinu bora ya ufikivu; mara nyingi sana, watumiaji huchanganya maandishi ya kishika nafasi na thamani halisi ya ingizo - wanafikiri tayari kuna thamani katika ingizo. + +Ondoa maandishi ya kishika nafasi kutoka kwa kipengele cha kwanza cha `input`, ukitegemea `label` kuwa mbinu bora zaidi. + +# --hints-- + +Unapaswa kuondoa `placeholder` kutoka kwa kipengele cha kwanza cha `input`. + +```js +assert.isEmpty(document.querySelectorAll('input')?.[0]?.placeholder); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+--fcc-editable-region-- +
+ + +
+--fcc-editable-region-- +
+ + +
+
+ + +
+
+
+

HTML

+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143931a113bb80c45546287.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143931a113bb80c45546287.md new file mode 100644 index 00000000000..328a5d94f91 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143931a113bb80c45546287.md @@ -0,0 +1,139 @@ +--- +id: 6143931a113bb80c45546287 +title: Hatua ya 23 +challengeType: 0 +dashedName: step-23 +--- + +# --description-- + +Yawezekana, `D.O.B.` haifafanui vya kutosha. Hii ni kweli hasa kwa watumiaji wasioona. Njia moja ya kutatua suala kama hilo, bila kulazimika kuongeza maandishi yanayoonekana kwenye lebo, ni kuongeza maandishi ambayo kisoma skrini pekee kinaweza kusoma. + +Ongeza kipengele cha `span` chenye darasa la `sr-only` kwa maudhui ya maandishi ya sasa ya kipengele cha tatu cha `label`. + +# --hints-- + +Unapaswa kuongeza kipengele cha `span` ndani ya kipengele cha tatu cha `label`. + +```js +assert.exists(document.querySelector('.info:nth-of-type(3) > label > span')); +``` + +Unapaswa kukipa kipengele cha `span` darasa la `sr-only`. + +```js +assert.equal(document.querySelector('.info:nth-of-type(3) > label > span')?.className, 'sr-only'); +``` + +Unapaswa kuweka `span` baada ya maudhui ya maandishi `D.O.B.`. + +```js +assert.match(document.querySelector('.info:nth-of-type(3) > label')?.innerHTML, /D\.O\.B\. + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+--fcc-editable-region-- +
+ + +
+--fcc-editable-region-- +
+
+

HTML

+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614394fb41985e0d2012a93e.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614394fb41985e0d2012a93e.md new file mode 100644 index 00000000000..7febab2d67d --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614394fb41985e0d2012a93e.md @@ -0,0 +1,125 @@ +--- +id: 614394fb41985e0d2012a93e +title: Hatua ya 24 +challengeType: 0 +dashedName: step-24 +--- + +# --description-- + +Ndani ya kipengele cha `span`, ongeza maandishi `(Date of Birth)`. + +# --hints-- + +Unapaswa kukipa kipengele cha `span` maandishi `(Date of Birth)`. + +```js +assert.equal(document.querySelector('.info:nth-of-type(3) > label > span')?.textContent, '(Date of Birth)'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+--fcc-editable-region-- +
+ + +
+--fcc-editable-region-- +
+
+

HTML

+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143956ed76ed60e012faa51.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143956ed76ed60e012faa51.md new file mode 100644 index 00000000000..b7b81ff3e67 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143956ed76ed60e012faa51.md @@ -0,0 +1,197 @@ +--- +id: 6143956ed76ed60e012faa51 +title: Hatua ya 25 +challengeType: 0 +dashedName: step-25 +--- + +# --description-- + +Maandishi ya `.sr-only` bado yanaonekana. Kuna mtindo wa kawaida wa kuficha maandishi kwa macho ili wasomaji wa skrini pekee wasome. + +Mbinu hii ni ya kuweka sifa zifuatazo za CSS: + +```css +position: absolute; +width: 1px; +height: 1px; +padding: 0; +margin: -1px; +overflow: hidden; +clip: rect(0, 0, 0, 0); +white-space: nowrap; +border: 0; +``` + +Tumia yaliyo hapo juu kufafanua darasa la `sr-only`. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `.sr-only`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('.sr-only')); +``` + +Unapaswa kuipa `.sr-only` `position` ya `absolute`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.sr-only')?.position, 'absolute'); +``` + +Unapaswa kuipa `.sr-only` `width` ya `1px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.sr-only')?.width, '1px'); +``` + +Unapaswa kuipa `.sr-only` `height` ya `1px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.sr-only')?.height, '1px'); +``` + +Unapaswa kuipa `.sr-only` `padding` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.sr-only')?.padding, '0px'); +``` + +Unapaswa kuipa `.sr-only` `margin` ya `-1px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.sr-only')?.margin, '-1px'); +``` + +Unapaswa kuipa `.sr-only` `overflow` ya `hidden`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.sr-only')?.overflow, 'hidden'); +``` + +Unapaswa kuipa `.sr-only` `clip` ya `rect(0, 0, 0, 0)`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.sr-only')?.clip, 'rect(0px, 0px, 0px, 0px)'); +``` + +Unapaswa kuipa `.sr-only` `white-space` ya `nowrap`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.sr-only')?.whiteSpace, 'nowrap'); +``` + +Unapaswa kuipa `.sr-only` `border` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.sr-only')?.borderWidth, '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614396f7ae83f20ea6f9f4b3.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614396f7ae83f20ea6f9f4b3.md new file mode 100644 index 00000000000..7562e757dc3 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614396f7ae83f20ea6f9f4b3.md @@ -0,0 +1,200 @@ +--- +id: 614396f7ae83f20ea6f9f4b3 +title: Hatua ya 26 +challengeType: 0 +dashedName: step-26 +--- + +# --description-- + +Ndani ya kipengele cha pili cha `section`, ongeza vipengele viwili vya `div` vyenye class ya `question-block`. + +Kisha, ndani ya kila kipengele cha `div.question-block`, ongeza kipengele kimoja cha `p` chenye maandishi ya nambari zinazoongezeka, kuanzia `1` na kipengele kimoja cha `fieldset` chenye xlass ya `question`. + +# --hints-- + +Unapaswa kuweka vipengele viwili vya `div` ndani ya kipengele cha pili cha `section`. + +```js +assert.equal(document.querySelectorAll('section:nth-of-type(2) > div')?.length, 2); +``` + +Unapaswa kukipa kipengee kipya cha kwanza cha `div` darasa la `question-block`. + +```js +assert.equal(document.querySelectorAll('section:nth-of-type(2) > div')?.[0]?.className, 'question-block'); +``` + +Unapaswa kukipa kipengele kipya cha pili cha `div` darasa la `question-block`. + +```js +assert.equal(document.querySelectorAll('section:nth-of-type(2) > div')?.[1]?.className, 'question-block'); +``` + +Unapaswa kuweka kipengele kimoja cha `p` ndani ya kila kipengele cha `div.question-block`. + +```js +assert.equal(document.querySelectorAll('section:nth-of-type(2) > div.question-block > p')?.length, 2); +``` + +Unapaswa kukipa kipengele cha kwanza cha `p` maandishi ya `1`. + +```js +assert.equal(document.querySelectorAll('section:nth-of-type(2) > div.question-block > p')?.[0]?.textContent, '1'); +``` + +Unapaswa kukipa kipengele cha pili cha `p` maandishi ya `2`. + +```js +assert.equal(document.querySelectorAll('section:nth-of-type(2) > div.question-block > p')?.[1]?.textContent, '2'); +``` + +Unapaswa kuweka kipengele kimoja cha `fieldset` ndani ya kila kipengele cha `div.question-block`. + +```js +assert.equal(document.querySelectorAll('section:nth-of-type(2) > div.question-block > fieldset')?.length, 2); +``` + +Unapaswa kuweka kipengele cha kwanza cha `fieldset` baada ya kipengele cha kwanza cha `p`. + +```js +assert.exists(document.querySelector('section:nth-of-type(2) > div.question-block > p + fieldset')); +``` + +Unapaswa kuweka kipengele cha pili cha `fieldset` baada ya kipengele cha pili cha `p`. + +```js +assert.exists(document.querySelector('section:nth-of-type(2) > div.question-block:nth-of-type(2) > p + fieldset')); +``` + +Unapaswa kukipa kipengele cha kwanza cha `fieldset` darasa la `question`. + +```js +assert.equal(document.querySelectorAll('section:nth-of-type(2) > div.question-block > fieldset')?.[0]?.className, 'question'); +``` + +Unapaswa kukipa kipengele cha pili cha `fieldset`darasa la `question`. + +```js +assert.equal(document.querySelectorAll('section:nth-of-type(2) > div.question-block > fieldset')?.[1]?.className, 'question'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+--fcc-editable-region-- +
+

HTML

+ +
+--fcc-editable-region-- +
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143cb26f7edff2dc28f7da5.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143cb26f7edff2dc28f7da5.md new file mode 100644 index 00000000000..15c87c56bcb --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6143cb26f7edff2dc28f7da5.md @@ -0,0 +1,177 @@ +--- +id: 6143cb26f7edff2dc28f7da5 +title: Hatua ya 27 +challengeType: 0 +dashedName: step-27 +--- + +# --description-- + +Kila sehemu ya `fieldset` itakuwa na swali la true/false. + +Ndani ya kila sehemu ya `fieldset`, weka kipengee cha `legend` kimoja, na kipengele kimoja cha `ul` chenye chaguo mbili. + +# --hints-- + +Unapaswa kuweka kipengele kimoja cha `legend` ndani ya kipengele cha kwanza cha `fieldset`. + +```js +assert.equal(document.querySelectorAll('.question-block:nth-of-type(1) > fieldset > legend')?.length, 1); +``` + +Unapaswa kuweka kipengele kimoja cha `ul` ndani ya kipengele cha kwanza cha `fieldset`. + +```js +assert.equal(document.querySelectorAll('.question-block:nth-of-type(1) > fieldset > ul')?.length, 1); +``` + +Unapaswa kuweka vipengele viwili vya `li` ndani ya kipengele cha kwanza cha `ul`. + +```js +assert.equal(document.querySelectorAll('fieldset > ul')?.[0]?.querySelectorAll('li')?.length, 2); +``` + +Unapaswa kuweka kipengele kimoja cha `legend` ndani ya kipengele cha pili cha `fieldset`. + +```js +assert.equal(document.querySelectorAll('.question-block:nth-of-type(2) > fieldset > legend')?.length, 1); +``` + +Unapaswa kuweka kipengee kimoja cha `ul` ndani ya kipengele cha pili cha `fieldset`. + +```js +assert.equal(document.querySelectorAll('.question-block:nth-of-type(2) > fieldset > ul')?.length, 1); +``` + +Unapaswa kuweka vipengele viwili vya `li` ndani ya kipengele cha pili cha `ul`. + +```js +assert.equal(document.querySelectorAll('fieldset > ul')?.[1]?.querySelectorAll('li')?.length, 2); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+--fcc-editable-region-- +
+

HTML

+
+

1

+
+
+
+

2

+
+
+
+--fcc-editable-region-- +
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6144e818fd5ea704fe56081d.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6144e818fd5ea704fe56081d.md new file mode 100644 index 00000000000..ddec8e0086f --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6144e818fd5ea704fe56081d.md @@ -0,0 +1,195 @@ +--- +id: 6144e818fd5ea704fe56081d +title: Hatua ya 28 +challengeType: 0 +dashedName: step-28 +--- + +# --description-- + +Ipe kila `fieldset` sifa ya `name` inayoitosheleza. Kisha, zipe orodha zote mbili ambazo hazijapangwa `class` ya `answers-list`. + +Hatimaye, tumia `legend` kunukuu maudhui ya `fieldset` kwa kuuliza swali la true/false kama maudhui ya maandishi. + +# --hints-- + +Unapaswa kuipa `fieldset` ya kwanza sifa ya `name` inayoitosheleza. _Kidokezo: Ningetumia `html-question-one`_ + +```js +assert.notEmpty(document.querySelectorAll('fieldset')?.[0]?.name); +``` + +Unapaswa kuipa sehemu ya pili ya `fieldset` sifa ya `name` inayoitosheleza. _Kidokezo: Ningetumia `html-question-two`_ + +```js +assert.notEmpty(document.querySelectorAll('fieldset')?.[1]?.name); +``` + +Unapaswa kukipa kipengele cha kwanza cha `ul`, `class` ya `answers-list`. + +```js +assert.equal(document.querySelectorAll('fieldset > ul')?.[0]?.className, 'answers-list'); +``` + +Unapaswa kukipa kipengele cha pili cha `ul`, `class` ya `answers-list`. + +```js +assert.equal(document.querySelectorAll('fieldset > ul')?.[1]?.className, 'answers-list'); +``` + +Unapaswa kukipa kipengele cha kwanza cha `legend` maudhui ya maandishi. + +```js +assert.notEmpty(document.querySelectorAll('legend')?.[0]?.textContent); +``` + +Unapaswa kukipa kipengele cha pili cha `legend` maudhui ya maandishi. + +```js +assert.notEmpty(document.querySelectorAll('legend')?.[1]?.textContent); +``` + +Hupaswi kutumia maandishi sawa kwa vipengele vyote viwili vya `legend`. + +```js +assert.notEqual(document.querySelectorAll('legend')?.[0]?.textContent, document.querySelectorAll('legend')?.[1]?.textContent); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+--fcc-editable-region-- +
+

HTML

+
+

1

+
+ +
    +
  • +
  • +
+
+
+
+

2

+
+ +
    +
  • +
  • +
+
+
+
+--fcc-editable-region-- +
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6144f8dc6849e405dd8bb829.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6144f8dc6849e405dd8bb829.md new file mode 100644 index 00000000000..65a29abfda9 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6144f8dc6849e405dd8bb829.md @@ -0,0 +1,231 @@ +--- +id: 6144f8dc6849e405dd8bb829 +title: Hatua ya 29 +challengeType: 0 +dashedName: step-29 +--- + +# --description-- + +Ili kutoa utendakazi wa maswali ya true/false, tunahitaji seti ya ingizo ambazo haziruhusu zote mbili kuchaguliwa kwa wakati mmoja. + +Ndani ya kila kipengele cha orodha, weka kipengele kimoja cha `label`, na ndani ya kila kipengele cha `label`, weka kipengele kimoja cha `input` chenye `type` inayofaa. + +# --hints-- + +Unapaswa kuweka kipengee kimoja cha `label` ndani ya kipengele cha kwanza cha `li`. + +```js +assert.exists(document.querySelectorAll('ul.answers-list > li')?.[0]?.querySelector('label')); +``` + +Unapaswa kuweka kipengele kimoja cha `label` ndani ya kipengele cha pili cha `li`. + +```js +assert.exists(document.querySelectorAll('ul.answers-list > li')?.[1]?.querySelector('label')); +``` + +Unapaswa kuweka kipengele kimoja cha `label` ndani ya kipengele cha tatu cha `li`. + +```js +assert.exists(document.querySelectorAll('ul.answers-list > li')?.[2]?.querySelector('label')); +``` + +Unapaswa kuweka kipengele kimoja cha `label` ndani ya kipengele cha nne cha `li`. + +```js +assert.exists(document.querySelectorAll('ul.answers-list > li')?.[3]?.querySelector('label')); +``` + +Unapaswa kuweka kipengele kimoja cha `input` ndani ya kipengele cha kwanza cha `label`. + +```js +assert.exists(document.querySelectorAll('ul.answers-list > li')?.[0]?.querySelector('label')?.querySelector('input')); +``` + +Unapaswa kuweka kipengele kimoja cha `input` ndani ya kipengele cha pili cha `label`. + +```js +assert.exists(document.querySelectorAll('ul.answers-list > li')?.[1]?.querySelector('label')?.querySelector('input')); +``` + +Unapaswa kuweka kipengele kimoja cha `input` ndani ya kipengele cha tatu cha `label`. + +```js +assert.exists(document.querySelectorAll('ul.answers-list > li')?.[2]?.querySelector('label')?.querySelector('input')); +``` + +Unapaswa kuweka kipengele kimoja cha `input` ndani ya kipengele cha nne cha `label`. + +```js +assert.exists(document.querySelectorAll('ul.answers-list > li')?.[3]?.querySelector('label')?.querySelector('input')); +``` + +Unapaswa kuipa `input` ya kwanza `type` ya `radio`. + +```js +assert.equal(document.querySelectorAll('ul.answers-list > li > label > input')?.[0]?.type, 'radio'); +``` + +Unapaswa kuipa `input` ya pili `type` ya `radio`. + +```js +assert.equal(document.querySelectorAll('ul.answers-list > li > label > input')?.[1]?.type, 'radio'); +``` + +Unapaswa kuipa `input` ya tatu `type` ya `radio`. + +```js +assert.equal(document.querySelectorAll('ul.answers-list > li > label > input')?.[2]?.type, 'radio'); +``` + +Unapaswa kuipa `input` ya nne `type` ya `radio`. + +```js +assert.equal(document.querySelectorAll('ul.answers-list > li > label > input')?.[3]?.type, 'radio'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +--fcc-editable-region-- +
    +
  • +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • +
  • +
+--fcc-editable-region-- +
+
+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145e6eeaa66c605eb087fe9.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145e6eeaa66c605eb087fe9.md new file mode 100644 index 00000000000..cd60d080885 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145e6eeaa66c605eb087fe9.md @@ -0,0 +1,197 @@ +--- +id: 6145e6eeaa66c605eb087fe9 +title: Hatua ya 30 +challengeType: 0 +dashedName: step-30 +--- + +# --description-- + +Ongeza `id` kwenye `input` za radio zako zote ili uweze kuunganisha lebo zako nazo. Ipe ya kwanza `id` ya `q1-a1`. Zipe hizo zingine `id`s za `q1-a2`, `q2-a1` na `q2-a2`, mtawalia. + +# --hints-- + +Unapaswa kukipa kipengele cha kwanza cha `input` `id` ya `q1-a1`. + +```js +assert.equal(document.querySelectorAll('ul.answers-list > li > label > input')?.[0]?.id, "q1-a1"); +``` + +Unapaswa kukipa kipengele cha pili cha `input` `id` ya `q1-a2`. + +```js +assert.equal(document.querySelectorAll('ul.answers-list > li > label > input')?.[1]?.id, "q1-a2"); +``` + +Unapaswa kukipa kipengele cha tatu cha `input` `id` ya `q2-a1`. + +```js +assert.equal(document.querySelectorAll('ul.answers-list > li > label > input')?.[2]?.id, "q2-a1"); +``` + +Unapaswa kukipa kipengele cha nne cha `input` `id` ya `q2-a2`. + +```js +assert.equal(document.querySelectorAll('ul.answers-list > li > label > input')?.[3]?.id, "q2-a2"); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +--fcc-editable-region-- +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+--fcc-editable-region-- +
+
+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145e8b5080a5f06bb0223d0.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145e8b5080a5f06bb0223d0.md new file mode 100644 index 00000000000..8afd8eb8742 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145e8b5080a5f06bb0223d0.md @@ -0,0 +1,287 @@ +--- +id: 6145e8b5080a5f06bb0223d0 +title: Hatua ya 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +Vipe vipengele vya `label` maandishi ya hivi kwamba `input` huja kabla ya maandishi. Kisha, vipe vipengele vya `input` `value` inayolingana na maandishi. + +Maandishi yanapaswa kuwa `True` au `False`. + +# --hints-- + +Unapaswa kukipa kipengele cha kwanza cha `label` maudhui ya maandishi. + +```js +assert.notEmpty(document.querySelectorAll('ul.answers-list > li > label')?.[0]?.textContent?.trim()); +``` + +Unapaswa kukipa kipengele cha pili cha `label` maudhui ya maandishi. + +```js +assert.notEmpty(document.querySelectorAll('ul.answers-list > li > label')?.[1]?.textContent?.trim()); +``` + +Unapaswa kukipa kipengele cha tatu cha `label` maudhui ya maandishi. + +```js +assert.notEmpty(document.querySelectorAll('ul.answers-list > li > label')?.[2]?.textContent?.trim()); +``` + +Unapaswa kukipa kipengele cha nne cha `label` maudhui ya maandishi. + +```js +assert.notEmpty(document.querySelectorAll('ul.answers-list > li > label')?.[3]?.textContent?.trim()); +``` + +Unapaswa kuweka maandishi ya `label` ya kwanza baada ya kipengele cha `input`. + +```js +assert.match(document.querySelectorAll('ul.answers-list > li > label')?.[0]?.innerHTML, />[\s\S]+[a-zA-Z]/); +``` + +Unapaswa kuweka maandishi ya `label` ya pili baada ya kipengele cha `input`. + +```js +assert.match(document.querySelectorAll('ul.answers-list > li > label')?.[1]?.innerHTML, />[\s\S]+[a-zA-Z]/); +``` + +Unapaswa kuweka maandishi ya `label` ya tatu baada ya kipengele cha `input`. + +```js +assert.match(document.querySelectorAll('ul.answers-list > li > label')?.[2]?.innerHTML, />[\s\S]+[a-zA-Z]/); +``` + +Unapaswa kuweka maandishi ya `label` ya nne baada ya kipengele cha `input`. + +```js +assert.match(document.querySelectorAll('ul.answers-list > li > label')?.[3]?.innerHTML, />[\s\S]+[a-zA-Z]/); +``` + +Unapaswa kuipa `label` ya kwanza maandishi ya `True` au `False`. + +```js +assert.include(['True', 'False'], document.querySelectorAll('ul.answers-list > li > label')?.[0]?.textContent?.trim()); +``` + +Unapaswa kuipa `label` ya pili maandishi `True`. + +```js +const l = (n) => document.querySelectorAll('ul.answers-list > li > label')?.[n]?.textContent?.trim(); +assert(l(0) === 'False' ? l(1) === 'True' : true); +``` + +Unapaswa kuipa `label` ya pili maandishi `False`. + +```js +const l = (n) => document.querySelectorAll('ul.answers-list > li > label')?.[n]?.textContent?.trim(); +assert(l(0) === 'True' ? l(1) === 'False' : true); +``` + +Unapaswa kuipa `label` ya tatu maandishi ya `True` au `False`. + +```js +assert.include(['True', 'False'], document.querySelectorAll('ul.answers-list > li > label')?.[2]?.textContent?.trim()); +``` + +Unapaswa kuipa `label` ya nne maandishi ya `True`. + +```js +const l = (n) => document.querySelectorAll('ul.answers-list > li > label')?.[n]?.textContent?.trim(); +assert(l(2) === 'False' ? l(3) === 'True' : true); +``` + +Unapaswa kuipa `label` ya nne maandishi `False`. + +```js +const l = (n) => document.querySelectorAll('ul.answers-list > li > label')?.[n]?.textContent?.trim(); +assert(l(2) === 'True' ? l(3) === 'False' : true); +``` + +Unapaswa kuipa `input` ya kwanza `value` inayolingana na maudhui ya maandishi ya `label`. + +```js +assert.equal(document.querySelectorAll('ul.answers-list > li > label')?.[0]?.textContent?.trim()?.toLowerCase(), document.querySelectorAll('ul.answers-list > li > label > input')?.[0]?.value?.toLowerCase()); +``` + +Unapaswa kuipa `input` ya pili `value` inayolingana na maudhui ya maandishi ya `label`. + +```js +assert.equal(document.querySelectorAll('ul.answers-list > li > label')?.[1]?.textContent?.trim()?.toLowerCase(), document.querySelectorAll('ul.answers-list > li > label > input')?.[1]?.value?.toLowerCase()); +``` + +Unapaswa kuipa `input` ya tatu `value` inayolingana na maudhui ya maandishi ya `label`. + +```js +assert.equal(document.querySelectorAll('ul.answers-list > li > label')?.[2]?.textContent?.trim()?.toLowerCase(), document.querySelectorAll('ul.answers-list > li > label > input')?.[2]?.value?.toLowerCase()); +``` + +Unapaswa kuipa `input` ya nne `value` inayolingana na maudhui ya maandishi ya `label`. + +```js +assert.equal(document.querySelectorAll('ul.answers-list > li > label')?.[3]?.textContent?.trim()?.toLowerCase(), document.querySelectorAll('ul.answers-list > li > label > input')?.[3]?.value?.toLowerCase()); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +--fcc-editable-region-- +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+--fcc-editable-region-- +
+
+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145eb5f08a38a0786c7a80c.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145eb5f08a38a0786c7a80c.md new file mode 100644 index 00000000000..34dae5cf828 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145eb5f08a38a0786c7a80c.md @@ -0,0 +1,224 @@ +--- +id: 6145eb5f08a38a0786c7a80c +title: Hatua ya 33 +challengeType: 0 +dashedName: step-33 +--- + +# --description-- + +Ukibofya pembejeo za redio, unaweza kugundua ingizo zote mbili ndani ya uga sawa wa true/false zinaweza kuchaguliwa kwa wakati mmoja. + +Panga pembejeo husika pamoja ili kwamba ingizo moja tu kutoka kwa jozi linaweza kuchaguliwa kwa wakati mmoja. + +# --hints-- + +Unapaswa kuipa `input` ya kwanza sifa ya `name`. + +```js +assert.notEmpty(document.querySelectorAll('ul.answers-list > li > label > input')?.[0]?.name); +``` + +Unapaswa kuipa sehemu ya pili ya `input` sifa ya `name`. + +```js +assert.notEmpty(document.querySelectorAll('ul.answers-list > li > label > input')?.[1]?.name); +``` + +Unapaswa kuipa sehemu ya tatu ya `input` sifa ya `name`. + +```js +assert.notEmpty(document.querySelectorAll('ul.answers-list > li > label > input')?.[2]?.name); +``` + +Unapaswa kuipa sehemu ya nne ya `input` sifa ya `name`. + +```js +assert.notEmpty(document.querySelectorAll('ul.answers-list > li > label > input')?.[3]?.name); +``` + +Unapaswa kuipa sehemu ya pili ya `input` sifa ya `name` inayolingana na sifa ya `name` ya sehemu ya kwanza ya `input`. + +```js +const i = (n) => document.querySelectorAll('ul.answers-list > li > label > input')?.[n]?.name; +assert.equal(i(1), i(0)); +``` + +Unapaswa kuipa sehemu ya nne ya `input` sifa ya `name` inayolingana na sifa ya `name` ya sehemu ya tatu ya `input`. + +```js +const i = (n) => document.querySelectorAll('ul.answers-list > li > label > input')?.[n]?.name; +assert.equal(i(3), i(2)); +``` + +Unapaswa kuipa sifa tofauti ya `name` kwa sehemu ya kwanza ya `input` na sehemu ya tatu ya `input`. + +```js +const i = (n) => document.querySelectorAll('ul.answers-list > li > label > input')?.[n]?.name; +assert.notEqual(i(0), i(2)); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +--fcc-editable-region-- +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+--fcc-editable-region-- +
+
+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145ed1f22caab087630aaad.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145ed1f22caab087630aaad.md new file mode 100644 index 00000000000..1f678510b7a --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145ed1f22caab087630aaad.md @@ -0,0 +1,191 @@ +--- +id: 6145ed1f22caab087630aaad +title: Hatua ya 34 +challengeType: 0 +dashedName: step-34 +--- + +# --description-- + +Ili kuzuia marudio yasiyo ya lazima, lenga kipengele bandia cha `before` kipengele cha `p`, na ukipe sifa ya `content` ya `"Question #"`. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `p::before`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('p::before')); +``` + +Unapaswa kukipa kipengele cha `p::before` sifa ya `content` ya `"Question #"`. + +```js +assert.include(new __helpers.CSSHelp(document).getStyle('p::before')?.content, 'Question #'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145ee65e2e1530938cb594d.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145ee65e2e1530938cb594d.md new file mode 100644 index 00000000000..5318231ce5e --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145ee65e2e1530938cb594d.md @@ -0,0 +1,232 @@ +--- +id: 6145ee65e2e1530938cb594d +title: Hatua ya 35 +challengeType: 0 +dashedName: step-35 +--- + +# --description-- + +Sehemu ya mwisho ya swali hili itakuwa na menyu kunjuzi, na kisanduku cha maandishi. + +Anza kwa kuweka `div` yenye `class` ya `formrow`, na kuweka vipengele vinne vya `div` ndani yake, ukibadilisha sifa za `class` kua `question-block` na `answer`. + +# --hints-- + +Unapaswa kuongeza kipengele kimoja cha `div` ndani ya `section` ya mwisho. + +```js +assert.exists(document.querySelector('section:nth-of-type(3) > div')); +``` + +Unapaswa kuipa `div` ya kwanza `class` ya `formrow`. + +```js +assert.equal(document.querySelector('section:nth-of-type(3) > div')?.className, 'formrow'); +``` + +Unapaswa kuweka `div.formrow` baada ya kipengele cha `h2`. + +```js +assert.exists(document.querySelector('section:nth-of-type(3) > h2 + div.formrow')); +``` + +Unapaswa kuweka vipengele vinne vya `div` ndani ya `div.formrow`. + +```js +assert.equal(document.querySelectorAll('section:nth-of-type(3) > div.formrow > div')?.length, 4); +``` + +Unapaswa kuipa `div` iliyowekwa kwanza `class` ya `question-block`. + +```js +assert.equal(document.querySelector('section:nth-of-type(3) > div.formrow > div:nth-of-type(1)')?.className, 'question-block'); +``` + +Unapaswa kuipa `div` ya pili `class` ya `answer`. + +```js +assert.equal(document.querySelector('section:nth-of-type(3) > div.formrow > div:nth-of-type(2)')?.className, 'answer'); +``` + +Unapaswa kuipa `div` iliyowekwa kwenye sehemu ya tatu `class` ya `question-block`. + +```js +assert.equal(document.querySelector('section:nth-of-type(3) > div.formrow > div:nth-of-type(3)')?.className, 'question-block'); +``` + +Unapaswa kuipa `div` iliyo kwenye sehemu ya nne `class` ya `answer`. + +```js +assert.equal(document.querySelector('section:nth-of-type(3) > div.formrow > div:nth-of-type(4)')?.className, 'answer'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+--fcc-editable-region-- +
+

CSS

+ +
+--fcc-editable-region-- +
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f02240ff8f09f7ec913c.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f02240ff8f09f7ec913c.md new file mode 100644 index 00000000000..e874e474a5d --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f02240ff8f09f7ec913c.md @@ -0,0 +1,215 @@ +--- +id: 6145f02240ff8f09f7ec913c +title: Hatua ya 36 +challengeType: 0 +dashedName: step-36 +--- + +# --description-- + +Ndani ya vipengele vya `div.question-block`, weka kipengele kimoja cha `label`, na ukipe kipengele cha `label` maudhui ya maandishi + +# --hints-- + +Unapaswa kuweka kipengele kimoja cha `label` ndani ya kipengele cha kwanza cha `div.question-block`. + +```js +assert.exists(document.querySelectorAll('.formrow > .question-block')?.[0]?.querySelector('label')); +``` + +Unapaswa kuweka kipengele kimoja cha `label` ndani ya kipengele cha pili cha `div.question-block`. + +```js +assert.exists(document.querySelectorAll('.formrow > .question-block')?.[1]?.querySelector('label')); +``` + +Unapaswa kukipa kipengele cha kwanza cha `label` maudhui ya maandishi. + +```js +assert.isAtLeast(document.querySelectorAll('.formrow > .question-block')?.[0]?.querySelector('label')?.textContent?.length, 1); +``` + +Unapaswa kukipa kipengele cha pili cha `label` maudhui ya maandishi. + +```js +assert.isAtLeast(document.querySelectorAll('.formrow > .question-block')?.[1]?.querySelector('label')?.textContent?.length, 1); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+--fcc-editable-region-- +
+

CSS

+
+
+
+
+
+
+
+
+
+
+
+--fcc-editable-region-- +
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f14f019a4b0adb94b051.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f14f019a4b0adb94b051.md new file mode 100644 index 00000000000..14ce854a1fe --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f14f019a4b0adb94b051.md @@ -0,0 +1,250 @@ +--- +id: 6145f14f019a4b0adb94b051 +title: Hatua ya 37 +challengeType: 0 +dashedName: step-37 +--- + +# --description-- + +Ndani ya kipengele cha kwanza cha `div.answer`, kunahitajika kipengee cha `select` chenye vipengele vitatu vya `option`. + +Kipe kipengele cha kwanza cha `option` `value` ya `""` na maandishi `Select an option`. Kipe kipengele cha pili cha `option` `value` ya `yes` na maandishi `Yes`. Kipe kipengele cha tatu cha `option` `value` ya `no` na maandishi `No`. + +# --hints-- + +Unapaswa kuweka kipengele kimoja cha `select` ndani ya kipengele cha kwanza cha `div.answer`. + +```js +assert.exists(document.querySelector('div.answer > select')); +``` + +Unapaswa kuweka vipengele vitatu vya `option` ndani ya kipengele cha `select`. + +```js +assert.equal(document.querySelectorAll('div.answer > select > option')?.length, 3); +``` + +Unapaswa kukipa kipengele cha kwanza cha `option` `value` ya `""`. + +```js +assert.equal(document.querySelector('div.answer > select > option:nth-child(1)')?.value, ''); +``` + +Unapaswa kukipa kipengele cha kwanza cha `option` maudhui ya maandishi ya `Select an option`. + +```js +assert.equal(document.querySelector('div.answer > select > option:nth-child(1)')?.textContent, 'Select an option'); +``` + +Unapaswa kukipa kipengele cha pili cha `option` `value` ya `yes`. + +```js +assert.equal(document.querySelector('div.answer > select > option:nth-child(2)')?.value, 'yes'); +``` + +Unapaswa kukipa kipengele cha pili cha `option` maudhui ya maandishi ya `Yes`. + +```js +assert.equal(document.querySelector('div.answer > select > option:nth-child(2)')?.textContent, 'Yes'); +``` + +Unapaswa kukipa kipengele cha tatu cha `option` `value` ya `no`. + +```js +assert.equal(document.querySelector('div.answer > select > option:nth-child(3)')?.value, 'no'); +``` + +Unapaswa kukipa kipengele cha tatu cha `option` maudhui ya maandishi ya `No`. + +```js +assert.equal(document.querySelector('div.answer > select > option:nth-child(3)')?.textContent, 'No'); +``` + +Unapaswa kuipa `select` sifa ya `required`. + +```js +assert.isTrue(document.querySelector('div.answer > select')?.required); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+--fcc-editable-region-- +
+ +
+--fcc-editable-region-- +
+ +
+
+
+
+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f3a5cd9be60b9459cdd6.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f3a5cd9be60b9459cdd6.md new file mode 100644 index 00000000000..56944e60f7b --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f3a5cd9be60b9459cdd6.md @@ -0,0 +1,222 @@ +--- +id: 6145f3a5cd9be60b9459cdd6 +title: Hatua ya 38 +challengeType: 0 +dashedName: step-38 +--- + +# --description-- + +Unganisha kipengele cha kwanza cha `label` na kipengele cha `select`, na ukipe kipengele cha `select` sifa ya `name`. + +# --hints-- + +Unapaswa kukipa kipengele cha `label` sifa ya `for`. + +```js +assert.notEmpty(document.querySelector('.question-block > label')?.htmlFor); +``` + +Unapaswa kukipa kipengele cha `select` sifa ya `id`. + +```js +assert.notEmpty(document.querySelector('.answer > select')?.id); +``` + +Unapaswa kukipa kipengele cha `select` `id` inayolingana na sifa ya `for` ya kipengele cha `label`. + +```js +assert.equal(document.querySelector('.answer > select')?.id, document.querySelector('.question-block > label')?.htmlFor); +``` + +Unapaswa kukipa kipengele cha `select` sifa ya `name`. + +```js +assert.notEmpty(document.querySelector('.answer > select')?.name); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+--fcc-editable-region-- +
+ +
+
+ +
+--fcc-editable-region-- +
+ +
+
+
+
+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f47393fbe70c4d885f9c.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f47393fbe70c4d885f9c.md new file mode 100644 index 00000000000..7a6f959a4bb --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f47393fbe70c4d885f9c.md @@ -0,0 +1,229 @@ +--- +id: 6145f47393fbe70c4d885f9c +title: Hatua ya 39 +challengeType: 0 +dashedName: step-39 +--- + +# --description-- + +Weka kipengee kimoja cha `textarea` ndani ya kipengele cha pili cha `div.answer`, na uweke idadi ya safu mlalo na safu wima kilicho nacho. + +Kisha, ipe sehemu ya `textarea` maandishi yanayoelezea mfano wa jibu. + +# --hints-- + +Unapaswa kuweka kipengele kimoja cha `textarea` ndani ya kipengele cha pili cha `div.answer`. + +```js +assert.exists(document.querySelectorAll('div.answer')?.[1]?.querySelector('textarea')); +``` + +Unapaswa kuipa `textarea` sifa ya `rows` yenye nambari. + +```js +const rows = document.querySelectorAll('div.answer')?.[1]?.querySelector('textarea')?.getAttribute('rows'); +assert.notEmpty(rows); +assert.isNotNaN(Number(rows)); +``` + +Unapaswa kuipa `textarea` sifa ya `cols` yenye nambari. + +```js +const cols = document.querySelectorAll('div.answer')?.[1]?.querySelector('textarea')?.getAttribute('cols'); +assert.notEmpty(cols); +assert.isNotNaN(Number(cols)); +``` + +Unapaswa kuipa `textarea` sifa ya `placeholder` na maandishi yanayoelezea mfano wa jibu. + +```js +assert.notEmpty(document.querySelectorAll('div.answer')?.[1]?.querySelector('textarea')?.getAttribute('placeholder')); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+--fcc-editable-region-- +
+ +
+--fcc-editable-region-- +
+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f59029474c0d3dc1c8b8.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f59029474c0d3dc1c8b8.md new file mode 100644 index 00000000000..66983ab6aa7 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f59029474c0d3dc1c8b8.md @@ -0,0 +1,217 @@ +--- +id: 6145f59029474c0d3dc1c8b8 +title: Hatua ya 40 +challengeType: 0 +dashedName: step-40 +--- + +# --description-- + +Kama ilivyo kwa vipengele vingine vya `input` na `label`, unganisha `textarea` na kipengele chake cha `label`, na ukipe siaf ya `name`. + +# --hints-- + +Unapaswa kukipa kipengele cha `label` sifa ya `for`. + +```js +assert.notEmpty(document.querySelectorAll('.formrow > .question-block')?.[1]?.querySelector('label')?.htmlFor); +``` + +Unapaswa kukipa kipengele cha `textarea` `id` inayolingana na sifa ya `for` ya kipengele cha `label`. + +```js +assert.equal(document.querySelectorAll('.formrow > .question-block')?.[1]?.querySelector('label')?.htmlFor, document.querySelectorAll('.answer')?.[1]?.querySelector('textarea')?.id); +``` + +Unapaswa kukipa kipengele cha `textarea` sifa ya `name`. + +```js +assert.notEmpty(document.querySelectorAll('.answer')?.[1]?.querySelector('textarea')?.name); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+--fcc-editable-region-- +
+ +
+
+ +
+--fcc-editable-region-- +
+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f685797bd30df9784e8c.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f685797bd30df9784e8c.md new file mode 100644 index 00000000000..ecc76731943 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f685797bd30df9784e8c.md @@ -0,0 +1,230 @@ +--- +id: 6145f685797bd30df9784e8c +title: Hatua ya 41 +challengeType: 0 +dashedName: step-41 +--- + +# --description-- + +Usisahau kuipa `form` yako kitufe cha kuwasilisha na maandishi `Send`. + +# --hints-- + +Unapaswa kuongeza kipengele cha `button` au `input`. + +```js +assert.exists(document.querySelector('button') || document.querySelector('main > input') || document.querySelector('form > input')); +``` + +Unapaswa kuweka kitufe cha kuwasilisha ndani ya kipengele cha `form`. + +```js +assert.exists(document.querySelector('form > button') || document.querySelector('form > input')); +``` + +Unapaswa kuweka kitufe cha kuwasilisha baada ya kipengele cha mwisho cha `section`. + +```js +assert.exists(document.querySelector('section:last-of-type + button') || document.querySelector('section:last-of-type + input')); +``` + +Unapaswa kukipa kitufe cha kuwasilisha `type` ya `submit`. + +```js +assert.exists(document.querySelector('button[type="submit"]') || document.querySelector('form > input[type="submit"]')); +``` + +Kitufe cha kuwasilisha kinapaswa kuonyesha maandishi `Send`. + +```js +assert.equal(document.querySelector('button[type="submit"]')?.textContent ?? document.querySelector('input[type="submit"]')?.value, 'Send'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+--fcc-editable-region-- +
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+--fcc-editable-region-- +
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f829ac6a920ebf5797d7.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f829ac6a920ebf5797d7.md new file mode 100644 index 00000000000..502d8f8782a --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f829ac6a920ebf5797d7.md @@ -0,0 +1,215 @@ +--- +id: 6145f829ac6a920ebf5797d7 +title: Hatua ya 42 +challengeType: 0 +dashedName: step-42 +--- + +# --description-- + +Vipengele viwili vya mwisho vya HTML vya kisemantiki kwa mradi huu ni vipengele vya `footer` na `address`. Kipengele cha `footer` ni sehemu ya mkusanyiko wa maudhui ambayo yanahusiana na ukurasa, na kipengele cha `address` ni sehemu ya mawasiliano ya mwandishi wa ukurasa. + +Baada ya kipengele `main`, ongeza kipengele kimoja cha `footer`, na uweke kipengele kimoja cha `address` ndani yake. + +# --hints-- + +Unapaswa kuongeza kipengele kimoja cha `footer` baada ya kipengele cha `main`. + +```js +assert.exists(document.querySelector('main + footer')); +``` + +Unapaswa kuweka kipengee kimoja cha `address` ndani ya kipengele cha `footer`. + +```js +assert.exists(document.querySelector('footer > address')); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+--fcc-editable-region-- + +--fcc-editable-region-- + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f8f8bcd4370f6509078e.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f8f8bcd4370f6509078e.md new file mode 100644 index 00000000000..0ad84bdf9b7 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145f8f8bcd4370f6509078e.md @@ -0,0 +1,218 @@ +--- +id: 6145f8f8bcd4370f6509078e +title: Hatua ya 43 +challengeType: 0 +dashedName: step-43 +--- + +# --description-- + +Ndani ya kipengele cha `address`, ongeza yafuatayo: + +```html +freeCodeCamp
+San Francisco
+California
+USA +``` + +# --hints-- + +Unapaswa kuongeza maandishi yaliyo hapo juu ikijumuisha lebo za `
` kwenye kipengele cha `address`. + +```js +assert.equal(document.querySelector('address')?.innerText, 'freeCodeCamp\nSan Francisco\nCalifornia\nUSA'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+--fcc-editable-region-- +
+
+ +
+
+--fcc-editable-region-- + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145fb5018cb5b100cb2a88c.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145fb5018cb5b100cb2a88c.md new file mode 100644 index 00000000000..295c8c3f274 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145fb5018cb5b100cb2a88c.md @@ -0,0 +1,229 @@ +--- +id: 6145fb5018cb5b100cb2a88c +title: Hatua ya 44 +challengeType: 0 +dashedName: step-44 +--- + +# --description-- + +Kipengele cha `address` si lazima kiwe na eneo halisi la kijiografia. Inaweza kutumika kutoa kiungo kwa kitu chochote. + +Weka kiungo kwenye maandishi `freeCodeCamp`, na uweke eneo lake kuwa `https://freecodecamp.org`. + +# --hints-- + +Unapaswa kuongeza kipengele cha `a`. + +```js +assert.exists(document.querySelector('address > a')); +``` + +Unapaswa kukipa kipengele cha `a` sifa ya `href` ya `https://freecodecamp.org`. + +```js +assert.equal(document.querySelector('address > a')?.getAttribute('href'), 'https://freecodecamp.org'); +``` + +Unapaswa kukipa kipengele cha `a` maandishi yaliyopo ya `freeCodeCamp`. + +```js +assert.equal(document.querySelector('address > a')?.innerHTML, 'freeCodeCamp'); +assert.equal(document.querySelector('address')?.innerHTML?.match(/freeCodeCamp/g)?.length, 1); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+--fcc-editable-region-- +
+
+ freeCodeCamp
+ San Francisco
+ California
+ USA +
+
+--fcc-editable-region-- + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145fc3707fc3310c277f5c8.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145fc3707fc3310c277f5c8.md new file mode 100644 index 00000000000..f5bb4961e9f --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6145fc3707fc3310c277f5c8.md @@ -0,0 +1,256 @@ +--- +id: 6145fc3707fc3310c277f5c8 +title: Hatua ya 45 +challengeType: 0 +dashedName: step-45 +--- + +# --description-- + +Turudi kwenye ukurasa wa kuweka mtindo. Chagua vipengele vya orodha ndani ya upau wa kusogeza, na uvipe mitindo ifuatayo: + +```css +color: #dfdfe2; +margin: 0 0.2rem; +padding: 0.2rem; +display: block; +``` + +# --hints-- + +Unapaswa kutumia kichaguzi cha `nav li` au `nav > ul > li`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +assert.exists(gs('nav li') || gs('nav > ul > li')); +``` + +Unapaswa kuvipa vipengele vya `li` `color` ya `#dfdfe2`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +const color = gs('nav li')?.color ?? gs('nav > ul > li')?.color; +assert.equal(color, 'rgb(223, 223, 226)'); +``` + +Unapaswa kuvipa vipengele vya `li` `margin` ya `0 0.2rem`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +const margin = gs('nav li')?.margin ?? gs('nav > ul > li')?.margin; +assert.equal(margin, '0px 0.2rem'); +``` + +Unapaswa kuvipa vipengele vya `li` `padding` ya `0.2rem`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +const padding = gs('nav li')?.padding ?? gs('nav > ul > li')?.padding; +assert.equal(padding, '0.2rem'); +``` + +Unapaswa kuvipa vipengele vya `li` `display` ya `block`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +const display = gs('nav li')?.display ?? gs('nav > ul > li')?.display; +assert.equal(display, 'block'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614796cb8086be482d60e0ac.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614796cb8086be482d60e0ac.md new file mode 100644 index 00000000000..77ca3d09462 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614796cb8086be482d60e0ac.md @@ -0,0 +1,260 @@ +--- +id: 614796cb8086be482d60e0ac +title: Hatua ya 46 +challengeType: 0 +dashedName: step-46 +--- + +# --description-- + +Juu ya mada ya upatikanaji wa kuona, tofauti kati ya vipengele ni jambo kuu. Kwa mfano, tofauti kati ya maandishi na madharinyuma ya kichwa inapaswa kuwa angalau 4.5:1. + +Badilisha rangi ya fonti ya vipengee vyote vya nanga ndani ya vipengee vya orodha hadi kitu chenye uwiano wa utofautishaji wa angalau 7:1. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `li > a`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('li > a')); +``` + +Unapaswa kukipa kipengele cha `a` sifa ya `color`. + +```js +assert.notEmpty(new __helpers.CSSHelp(document).getStyle('li > a')?.color); +``` + +Unapaswa kuipa sifa ya `color` utofauti na mandarinyuma wa angalau 7:1. _Kidokezo: Ningetumia `#dfdfe2`_ + +```js +function luminance(r, g, b) { + const a = [r, g, b].map((v) => { + v /= 255; + return v <= 0.03928 ? v / 12.92 : Math.pow( (v + 0.055) / 1.055, 2.4 ); + }); + return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722; +} +function contrast(rgb1, rgb2) { + const lum1 = luminance(rgb1[0], rgb1[1], rgb1[2]); + const lum2 = luminance(rgb2[0], rgb2[1], rgb2[2]); + const brightest = Math.max(lum1, lum2); + const darkest = Math.min(lum1, lum2); + return (brightest + 0.05) + / (darkest + 0.05); +} +const backgroundColour = [27, 27, 50]; + +for (let elem of document.querySelectorAll('li > a')) { + const a = getComputedStyle(elem)?.color; + const rgbA = a?.match(/(\d+),\s(\d+),\s(\d+)/); + const aColour = [rgbA[1], rgbA[2], rgbA[3]]; + assert.isAtLeast(contrast(backgroundColour, aColour), 7); +} +``` + + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6147a14ef5668b5881ef2297.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6147a14ef5668b5881ef2297.md new file mode 100644 index 00000000000..ac52b18a497 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6147a14ef5668b5881ef2297.md @@ -0,0 +1,260 @@ +--- +id: 6147a14ef5668b5881ef2297 +title: Hatua ya 47 +challengeType: 0 +dashedName: step-47 +--- + +# --description-- + +Ili kufanya vitufe vya kusogeza vionekane zaidi kama vitufe vya kawaida, ondoa mstari wa chini kwenye tagi za nanga. + +Kisha, unda kichaguzi kipya kinacholenga vipengee vya orodha ya urambazaji ili mshale unapoelea juu yao, rangi ya mandharinyuma na rangi ya maandishi hubadilishwa, na kishale kiwe kielekezi. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `li > a` ili kuweka `text-decoration` kuwa `none`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('li > a')?.textDecoration, 'none'); +``` + +Unafaa kutumia kichaguzi cha `nav > ul > li:hover` au `nav li:hover` ili kuweka muundo wa vipengele kwenye kielelezo. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +assert.exists(gs('nav > ul > li:hover') || gs('nav li:hover')); +``` + +Unapaswa kuvipa vipengele vinavyoelea vya `li` `background-color` ya `#dfdfe2`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +const bgColor = gs('nav > ul > li:hover')?.backgroundColor ?? gs('nav li:hover')?.backgroundColor; +assert.equal(bgColor, 'rgb(223, 223, 226)'); +``` + +Unapaswa kuvipa vipengele vilivyoelea vya `li` `color` ya `#1b1b32`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +const color = gs('nav > ul > li:hover')?.color ?? gs('nav li:hover')?.color; +assert.equal(color, 'rgb(27, 27, 50)'); +``` + +Unapaswa kuvipa vipengele vilivyoelea vya `li` `cursor` ya `pointer`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +const cursor = gs('nav > ul > li:hover')?.cursor ?? gs('nav li:hover')?.cursor; +assert.equal(cursor, 'pointer'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +--fcc-editable-region-- + + +li > a { + color: inherit; +} +--fcc-editable-region-- + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614878f7a412310647873015.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614878f7a412310647873015.md new file mode 100644 index 00000000000..c11e2745f54 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614878f7a412310647873015.md @@ -0,0 +1,253 @@ +--- +id: 614878f7a412310647873015 +title: Hatua ya 48 +challengeType: 0 +dashedName: step-48 +--- + +# --description-- + +Panga `header`, kwa kutumia _Flexbox_ ili kuweka nafasi kati ya watoto, na kuwaweka katikati kiwima (vertically cente). + +Kisha, rekebisha `header` iwe juu ya kituo cha kutazama. + +# --hints-- + +Unapaswa kuipa `header` `justify-content` ya `space-between`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('header')?.justifyContent, 'space-between'); +``` + +Unapaswa kuipa `header` `align-items` ya `center`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('header')?.alignItems, 'center'); +``` + +Unapaswa kuipa `header` `position` ya `fixed`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('header')?.position, 'fixed'); +``` + +Unapaswa kuipa `header` `top` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('header')?.top, '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +--fcc-editable-region-- +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + +} +--fcc-editable-region-- + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61487b77d4a37707073a64e5.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61487b77d4a37707073a64e5.md new file mode 100644 index 00000000000..1d6b7f52bcd --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61487b77d4a37707073a64e5.md @@ -0,0 +1,261 @@ +--- +id: 61487b77d4a37707073a64e5 +title: Hatua ya 49 +challengeType: 0 +dashedName: step-49 +--- + +# --description-- + +Wakati upana wa skrini ni mdogo, `h1` haionyeshi maudhui yake jinsi inavyopaswa. Pangilia maandishi ya kipengele cha `h1` katikati. + +Kisha, ipe `main` padding ili kwamba sehemu ya kichwa ya `Student Info` iweze kuonekana kikamilifu. + +# --hints-- + +Unapaswa kuipa `h1` `text-align` ya `center`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('h1')?.textAlign, 'center'); +``` + +Unapaswa kuongeza kichaguzi kwa `main` ili kulenga kipengele cha `main`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('main')); +``` + +Unapaswa kuipa `main` `padding-top` ya angalau `25px`. + +```js +assert.isAtLeast(Number(new __helpers.CSSHelp(document).getStyle('main')?.paddingTop?.replace(/\D+/, '')), 25); +``` + +Unapaswa kubadilisha tu thamani ya `padding-top`. + +```js +assert.isEmpty(new __helpers.CSSHelp(document).getStyle('main')?.paddingBottom); +assert.isEmpty(new __helpers.CSSHelp(document).getStyle('main')?.paddingLeft); +assert.isEmpty(new __helpers.CSSHelp(document).getStyle('main')?.paddingRight); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +--fcc-editable-region-- +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + +} + + +--fcc-editable-region-- + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61487da611a65307e78d2c20.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61487da611a65307e78d2c20.md new file mode 100644 index 00000000000..15c96512b07 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61487da611a65307e78d2c20.md @@ -0,0 +1,275 @@ +--- +id: 61487da611a65307e78d2c20 +title: Hatua ya 50 +challengeType: 0 +dashedName: step-50 +--- + +# --description-- + +Kwenye skrini ndogo, orodha isiyopangwa katika upau wa kusogeza hufurika upande wa kulia wa skrini. + +Rekebisha hili kwa kutumia _Flexbox_ kufunga maudhui ya `ul`. Kisha, weka sifa zifuatazo za CSS ili kusawazisha maandishi kwa usahihi: + +```css +align-items: center; +padding-inline-start: 0; +margin-block: 0; +height: 100%; +``` + +# --hints-- + +Unapaswa kuipa `ul` `flex-wrap` ya `wrap`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('nav > ul')?.flexWrap, 'wrap'); +``` + +Unapaswa kuipa `ul` `align-items` ya `center`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('nav > ul')?.alignItems, 'center'); +``` + +Unapaswa kuipa `ul` `padding-inline-start` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('nav > ul')?.paddingInlineStart, '0px'); +``` + +Unapaswa kuipa `ul` `margin-block` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('nav > ul')?.marginBlock, '0px'); +``` + +Unapaswa kuipa `ul` `height` ya `100%`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('nav > ul')?.height, '100%'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +--fcc-editable-region-- +nav > ul { + display: flex; + justify-content: space-evenly; + +} +--fcc-editable-region-- + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61487f703571b60899055cf9.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61487f703571b60899055cf9.md new file mode 100644 index 00000000000..52637e21e01 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61487f703571b60899055cf9.md @@ -0,0 +1,287 @@ +--- +id: 61487f703571b60899055cf9 +title: Hatua ya 51 +challengeType: 0 +dashedName: step-51 +--- + +# --description-- + +Weka upana wa vipengele vya `section` kuwa `80%` ya kontena kuu. Kisha, tumia pambizo ili kuweka kipengee cha `section` katikati, ukiongeza `10px` kwenye ukingo wa chini. + +Pia, hakikisha vipengele vya `section` haviwezi kuwa kubwa kuliko `600px` kwa upana. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `section`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('section')); +``` + +Unapaswa kuipa `section` `width` ya `80%`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('section')?.width, '80%'); +``` + +Unapaswa kuipa `section` `margin-top` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('section')?.marginTop, '0px'); +``` + +Unapaswa kuipa `section` `margin-right` ya `auto`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('section')?.marginRight, 'auto'); +``` + +Unapaswa kuipa `section` `margin-bottom` ya `10px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('section')?.marginBottom, '10px'); +``` + +Unapaswa kuipa `section` `margin-left` ya `auto`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('section')?.marginLeft, 'auto'); +``` + +Unapaswa kuipa `section` `max-width` ya `600px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('section')?.maxWidth, '600px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +--fcc-editable-region-- + + +--fcc-editable-region-- + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614880dc16070e093e29bc56.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614880dc16070e093e29bc56.md new file mode 100644 index 00000000000..dabcf9891c0 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614880dc16070e093e29bc56.md @@ -0,0 +1,259 @@ +--- +id: 614880dc16070e093e29bc56 +title: Hatua ya 52 +challengeType: 0 +dashedName: step-52 +--- + +# --description-- + +Badilisha ukingo wa juu wa vipengee vya `h2` na `60px` ya padding ya juu. + +# --hints-- + +Unapaswa kuipa `h2` `margin-top` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('h2')?.marginTop, '0px'); +``` + +Unapaswa kuipa `h2` `padding-top` ya `60px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('h2')?.paddingTop, '60px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +--fcc-editable-region-- +h2 { + border-bottom: 4px solid #dfdfe2; + +} +--fcc-editable-region-- + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614883b6fa720e09fb167de9.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614883b6fa720e09fb167de9.md new file mode 100644 index 00000000000..31bdee043fc --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614883b6fa720e09fb167de9.md @@ -0,0 +1,280 @@ +--- +id: 614883b6fa720e09fb167de9 +title: Hatua ya 53 +challengeType: 0 +dashedName: step-53 +--- + +# --description-- + +Ongeza pedi juu na kushoto ya vipengee vya `.info` na uweke thamani zingine kuwa `0`. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `.info`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('.info')); +``` + +Unapaswa kuipa `.info` `padding-top` ya angalau `1px`. + +```js +assert.isAtLeast(Number(new __helpers.CSSHelp(document).getStyle('.info')?.paddingTop?.replace(/\D+/, '')), 1); +``` + +Unapaswa kuipa `.info` `padding-right` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.info')?.paddingRight, '0px'); +``` + +Unapaswa kuipa `.info` `padding-bottom` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.info')?.paddingBottom, '0px'); +``` + +Unapaswa kuipa `.info` `padding-left` ya angalau `1px`. + +```js +assert.isAtLeast(Number(new __helpers.CSSHelp(document).getStyle('.info')?.paddingLeft?.replace(/\D+/, '')), 1); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614884c1f5d6f30ab3d78cde.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614884c1f5d6f30ab3d78cde.md new file mode 100644 index 00000000000..c0a06abbdb5 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614884c1f5d6f30ab3d78cde.md @@ -0,0 +1,364 @@ +--- +id: 614884c1f5d6f30ab3d78cde +title: Hatua ya 54 +challengeType: 0 +dashedName: step-54 +--- + +# --description-- + +Vipe vipengele vya `.formrow` ukingo wa juu, na pedi za kushoto na kulia. Thamani zingine za kuweka pedi zinapaswa kuwa `0`. + +Kisha, ongeza ukubwa wa fonti kwa vipengele vyote vya `input`. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `.formrow` ili kulenga vipengele vya `.formrow`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('.formrow')); +``` + +Unapaswa kuipa `.formrow` `margin-top` ya angalau `1px`. + +```js +const val = new __helpers.CSSHelp(document).getStyle('.formrow')?.marginTop; +let valInPx = 0; +if (/^\d+rem$/.test(val)) { + valInPx = remToPx(Number(val.replace('rem', ''))); +} else if (/^\d+em$/.test(val)) { + valInPx = emToPx(Number(val.replace('em', ''))); +} else { + valInPx = Number(val?.replace('px', '')); +} +function emToPx(em) { + return em * parseFloat(getComputedStyle(document.querySelector('.formrow'))?.fontSize); +} +function remToPx(rem) { + return rem * parseFloat(getComputedStyle(document.documentElement)?.fontSize); +} +assert.isAtLeast(valInPx, 1); +``` + +Unapaswa kuipa `.formrow` `padding-top` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.formrow')?.paddingTop, '0px'); +``` + +Unapaswa kuipa `.formrow` `padding-right` ya angalau `1px`. + +```js +const val = new __helpers.CSSHelp(document).getStyle('.formrow')?.paddingRight; +let valInPx = 0; +if (/^\d+rem$/.test(val)) { + valInPx = remToPx(Number(val.replace('rem', ''))); +} else if (/^\d+em$/.test(val)) { + valInPx = emToPx(Number(val.replace('em', ''))); +} else { + valInPx = Number(val?.replace('px', '')); +} +function emToPx(em) { + return em * parseFloat(getComputedStyle(document.querySelector('.formrow'))?.fontSize); +} +function remToPx(rem) { + return rem * parseFloat(getComputedStyle(document.documentElement)?.fontSize); +} +assert.isAtLeast(valInPx, 1); +``` + +Unapaswa kuipa `.formrow` `padding-bottom` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.formrow')?.paddingBottom, '0px'); +``` + +Unapaswa kuipa `.formrow` `padding-left` ya angalau `1px`. + +```js +const val = new __helpers.CSSHelp(document).getStyle('.formrow')?.paddingLeft; +let valInPx = 0; +if (/^\d+rem$/.test(val)) { + valInPx = remToPx(Number(val.replace('rem', ''))); +} else if (/^\d+em$/.test(val)) { + valInPx = emToPx(Number(val.replace('em', ''))); +} else { + valInPx = Number(val?.replace('px', '')); +} +function emToPx(em) { + return em * parseFloat(getComputedStyle(document.querySelector('.formrow'))?.fontSize); +} +function remToPx(rem) { + return rem * parseFloat(getComputedStyle(document.documentElement)?.fontSize); +} +assert.isAtLeast(valInPx, 1); +``` + +Unapaswa kutumia kichaguzi cha `input` ili kulenga vipengele vya `input`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('input')); +``` + +Unapaswa kuipa `input` `font-size` zaidi ya `13px`. + +```js +const val = new __helpers.CSSHelp(document).getStyle('input')?.fontSize; +let valInPx = 0; +if (/^\d+rem$/.test(val)) { + valInPx = remToPx(Number(val.replace('rem', ''))); +} else if (/^\d+em$/.test(val)) { + valInPx = emToPx(Number(val.replace('em', ''))); +} else { + valInPx = Number(val?.replace('px', '')); +} +function emToPx(em) { + return em * parseFloat(getComputedStyle(document.querySelector('.formrow'))?.fontSize); +} +function remToPx(rem) { + return rem * parseFloat(getComputedStyle(document.documentElement)?.fontSize); +} +assert.isAtLeast(valInPx, 13); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61488ecfd05e290b5712e6da.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61488ecfd05e290b5712e6da.md new file mode 100644 index 00000000000..5f290a4b9ee --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/61488ecfd05e290b5712e6da.md @@ -0,0 +1,286 @@ +--- +id: 61488ecfd05e290b5712e6da +title: Hatua ya 55 +challengeType: 0 +dashedName: step-55 +--- + +# --description-- + +Ili kufanya sehemu ya kwanza ionekane vizuri zaidi, lenga tu vipengele vya `input` ndani ya vipengele vya `.info` na uweke `width` kuwa `50%`, na maandishi upande wa kushoto. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `.info input` au `.info > input`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +assert.exists(gs('.info input') || gs('.info > input')); +``` + +Unapaswa kuvipa vipengele vya `input` `width` ya `50%`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s)?.width; +const width = gs('.info input') ?? gs('.info > input'); +assert.equal(width, '50%'); +``` + +Unapaswa kukipa kipengele cha `input` `text-align` ya `left`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s)?.textAlign; +const textAlign = gs('.info input') ?? gs('.info > input'); +assert.equal(textAlign, 'left'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148d99cdc7acd0c519862cb.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148d99cdc7acd0c519862cb.md new file mode 100644 index 00000000000..062942a2f60 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148d99cdc7acd0c519862cb.md @@ -0,0 +1,291 @@ +--- +id: 6148d99cdc7acd0c519862cb +title: Hatua ya 56 +challengeType: 0 +dashedName: step-56 +--- + +# --description-- + +Lenga vipengele vyote vya `label` ndani ya vipengee vya `.info`, na uweke `width` kua `10%` na uifanye ili isiweze kuchukua chini ya `55px`. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `.info label` au `.info > label`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +assert.exists(gs('.info label') || gs('.info > label')); +``` + +Unapaswa kuvipa vipengele vya `label` `width` ya `10%`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s)?.width; +const width = gs('.info label') || gs('.info > label'); +assert.equal(width, '10%'); +``` + +Unapaswa kuvipa vipengele vya `label` `min-width` ya `55px`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s)?.minWidth; +const minWidth = gs('.info label') || gs('.info > label'); +assert.equal(minWidth, '55px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +--fcc-editable-region-- +.info input { + width: 50%; + text-align: left; +} + + +--fcc-editable-region-- + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148da157cc0bd0d06df5c0a.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148da157cc0bd0d06df5c0a.md new file mode 100644 index 00000000000..898623a8b12 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148da157cc0bd0d06df5c0a.md @@ -0,0 +1,299 @@ +--- +id: 6148da157cc0bd0d06df5c0a +title: Hatua ya 57 +challengeType: 0 +dashedName: step-57 +--- + +# --description-- + +Ili kupanga visanduku vya ingizo kwa kila kimoja, unda sheria mpya ambayo inalenga vipengele vyote vya `input` na `label` ndani ya kipengele cha `.info` na uweke sifa ya `display` kuwa `inline-block`. + +Pia, weka maandishi ya kipengele `label` upande kulia. + +# --hints-- + +Unapaswa kutumia aidha kichaguzi cha `.info > label, .info > input` au `.info label, .info input`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +assert.exists(gs('.info > label, .info > input') || gs('.info label, .info input') || gs('.info > input, .info > label') || gs('.info input, .info label')); +``` + +Unapaswa kuvipa vipengele vya `input` na `label` `display` ya `inline-block`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s)?.display; +const display = gs('.info > label, .info > input') ?? gs('.info label, .info input') ?? gs('.info > input, .info > label') ?? gs('.info input, .info label'); +assert.equal(display, 'inline-block'); +``` + +Unapaswa kukipa kipengele cha `label` `text-align` ya `right`. + +```js +const v = (el) => getComputedStyle(el).getPropertyValue('text-align'); +document.querySelectorAll('.info label').forEach(el => { + assert.equal(v(el), 'right'); +}); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +--fcc-editable-region-- + + +.info input { + width: 50%; + text-align: left; +} + +.info label { + width: 10%; + min-width: 55px; +} +--fcc-editable-region-- + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dc095264000dce348bf5.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dc095264000dce348bf5.md new file mode 100644 index 00000000000..8aab1ab9c52 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dc095264000dce348bf5.md @@ -0,0 +1,323 @@ +--- +id: 6148dc095264000dce348bf5 +title: Hatua ya 58 +challengeType: 0 +dashedName: step-58 +--- + +# --description-- + +Ili kuweka nadhifu vipengele vya `.question-block`, weka sifa zifuatazo za CSS: + +```css +text-align: left; +display: block; +width: 100%; +margin-top: 20px; +padding-top: 5px; +``` + +# --hints-- + +Unapaswa kutumia kichaguzi cha `.question-block`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('.question-block')); +``` + +Unapaswa kukipa kipengele cha `.question-block` `display` ya `block`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.question-block')?.display, 'block'); +``` + +Unapaswa kukipa kipengele cha `.question-block` `width` ya `100%`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.question-block')?.width, '100%'); +``` + +Unapaswa kukipa kipengele cha `.question-block` `margin-top` ya `20px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.question-block')?.marginTop, '20px'); +``` + +Unapaswa kukipa kipengele cha `.question-block` `padding-top` ya `5px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.question-block')?.paddingTop, '5px'); +``` + +Unapaswa kukipa kipengele cha `.question-block` `text-align` ya `left`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.question-block')?.textAlign, 'left'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +.info label, .info input { + display: inline-block; +} + +.info input { + width: 50%; + text-align: left; +} + +.info label { + width: 10%; + min-width: 55px; + text-align: right; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dcaaf2e8750e6cb4501a.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dcaaf2e8750e6cb4501a.md new file mode 100644 index 00000000000..c7fdaec3674 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dcaaf2e8750e6cb4501a.md @@ -0,0 +1,316 @@ +--- +id: 6148dcaaf2e8750e6cb4501a +title: Hatua ya 59 +challengeType: 0 +dashedName: step-59 +--- + +# --description-- + +Fanya vipengee vya aya vionekane kama kipaumbele cha juu, na sifa zifuatazo za CSS: + +```css +margin-top: 5px; +padding-left: 15px; +font-size: 20px; +``` + +# --hints-- + +Unapaswa kutumia kipengele kichaguzi cha `p`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('p')); +``` + +Unapaswa kukipa kipengele cha `p` `margin-top` ya `5px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('p')?.marginTop, '5px'); +``` + +Unapaswa kukipa kipengele cha `p` `padding-left` ya `15px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('p')?.paddingLeft, '15px'); +``` + +Unapaswa kukipa kipengele cha `p` `font-size` ya `20px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('p')?.fontSize, '20px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +.info label, .info input { + display: inline-block; +} + +.info input { + width: 50%; + text-align: left; +} + +.info label { + width: 10%; + min-width: 55px; + text-align: right; +} + +.question-block { + text-align: left; + display: block; + width: 100%; + margin-top: 20px; + padding-top: 5px; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +p::before { + content: "Question #"; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dd31d210990f0fb140f8.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dd31d210990f0fb140f8.md new file mode 100644 index 00000000000..fc6220d7821 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dd31d210990f0fb140f8.md @@ -0,0 +1,312 @@ +--- +id: 6148dd31d210990f0fb140f8 +title: Hatua ya 60 +challengeType: 0 +dashedName: step-60 +--- + +# --description-- + +Ni muhimu kuona mpaka chaguo-msingi karibu na vipengele vya `fieldset`, wakati wa uundaji. Walakini, inaweza kuwa sio mtindo unaotaka. + +Ondoa mpaka na sehemu ya chini kwenye vipengele vya `.question`. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `.question`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('.question')); +``` + +Unapaswa kuipa `.question` `border` ya `none`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.question')?.borderStyle, 'none'); +``` + +Unapaswa kuipa `.question` `padding-bottom` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.question')?.paddingBottom, '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +.info label, .info input { + display: inline-block; +} + +.info input { + width: 50%; + text-align: left; +} + +.info label { + width: 10%; + min-width: 55px; + text-align: right; +} + +.question-block { + text-align: left; + display: block; + width: 100%; + margin-top: 20px; + padding-top: 5px; +} + +p { + margin-top: 5px; + padding-left: 15px; + font-size: 20px; +} + +p::before { + content: "Question #"; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md new file mode 100644 index 00000000000..59696e54e28 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148defa9c01520fb9d178a0.md @@ -0,0 +1,315 @@ +--- +id: 6148defa9c01520fb9d178a0 +title: Hatua ya 61 +challengeType: 0 +dashedName: step-61 +--- + +# --description-- + +Ondoa mtindo chaguomsingi wa vipengee vya orodha ya `.answers-list`, na uondoe pedi za orodha zisizopangwa. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `.answers-list`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('.answers-list')); +``` + +Unapaswa kuipa `.answers-list` `list-style` ya `none`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.answers-list')?.listStyle, 'none'); +``` + +Unapaswa kuipa `.answers-list` `padding` ya `0`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('.answers-list')?.padding, '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +.info label, .info input { + display: inline-block; +} + +.info input { + width: 50%; + text-align: left; +} + +.info label { + width: 10%; + min-width: 55px; + text-align: right; +} + +.question-block { + text-align: left; + display: block; + width: 100%; + margin-top: 20px; + padding-top: 5px; +} + +p { + margin-top: 5px; + padding-left: 15px; + font-size: 20px; +} + +p::before { + content: "Question #"; +} + +.question { + border: none; + padding-bottom: 0; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dfab9b54c110577de165.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dfab9b54c110577de165.md new file mode 100644 index 00000000000..7a865fcb8bd --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148dfab9b54c110577de165.md @@ -0,0 +1,360 @@ +--- +id: 6148dfab9b54c110577de165 +title: Hatua ya 62 +challengeType: 0 +dashedName: step-62 +--- + +# --description-- + +Kipe kitufe cha kuwasilisha muundo wa mtindo wa freeCodeCamp, wenye sifa zifuatazo za CSS: + +```css +display: block; +margin: 40px auto; +width: 40%; +padding: 15px; +font-size: 23px; +background: #d0d0d5; +border: 3px solid #3b3b4f; +``` + +# --hints-- + +Unapaswa kutumia kipengele kichaguzi cha `button`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('button')); +``` + +Unapaswa kuipa `button` `display` ya `block`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('button')?.display, 'block'); +``` + +Unapaswa kuipa `button` `margin` ya `40px auto`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('button')?.margin, '40px auto'); +``` + +Unapaswa kuipa `button` `width` ya `40%`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('button')?.width, '40%'); +``` + +Unapaswa kuipa`button` `padding` ya `15px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('button')?.padding, '15px'); +``` + +Unapaswa kuipa`button` `font-size` ya `23px`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('button')?.fontSize, '23px'); +``` + +Unapaswa kuipa`button` `background` ya `#d0d0d5`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('button')?.backgroundColor, 'rgb(208, 208, 213)'); +``` + +Unapaswa kuipa`button` `border` ya `3px solid #3b3b4f`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('button')?.border, '3px solid rgb(59, 59, 79)'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +.info label, .info input { + display: inline-block; +} + +.info input { + width: 50%; + text-align: left; +} + +.info label { + width: 10%; + min-width: 55px; + text-align: right; +} + +.question-block { + text-align: left; + display: block; + width: 100%; + margin-top: 20px; + padding-top: 5px; +} + +p { + margin-top: 5px; + padding-left: 15px; + font-size: 20px; +} + +p::before { + content: "Question #"; +} + +.question { + border: none; + padding-bottom: 0; +} + +.answers-list { + list-style: none; + padding: 0; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e0bcc13efd10f7d7a6a9.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e0bcc13efd10f7d7a6a9.md new file mode 100644 index 00000000000..e88760cf413 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e0bcc13efd10f7d7a6a9.md @@ -0,0 +1,336 @@ +--- +id: 6148e0bcc13efd10f7d7a6a9 +title: Hatua ya 63 +challengeType: 0 +dashedName: step-63 +--- + +# --description-- + +Weka rangi ya mandharinyuma ya `footer` kuwa `#2a2a40`, na utumie _Flexbox_ ili kuweka maandishi katikati kwa mlalo (horizontally center). + +# --hints-- + +Unapaswa kutumia kipengele kichaguzi cha `footer`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('footer')); +``` + +Unapaswa kuipa `footer` `background-color` ya `#2a2a40`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('footer')?.backgroundColor, 'rgb(42, 42, 64)'); +``` + +Unapaswa kuipa`footer` `display` ya `flex`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('footer')?.display, 'flex'); +``` + +Unapaswa kuipa`footer` `justify-content` ya `center`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('footer')?.justifyContent, 'center'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +.info label, .info input { + display: inline-block; +} + +.info input { + width: 50%; + text-align: left; +} + +.info label { + width: 10%; + min-width: 55px; + text-align: right; +} + +.question-block { + text-align: left; + display: block; + width: 100%; + margin-top: 20px; + padding-top: 5px; +} + +p { + margin-top: 5px; + padding-left: 15px; + font-size: 20px; +} + +p::before { + content: "Question #"; +} + +.question { + border: none; + padding-bottom: 0; +} + +.answers-list { + list-style: none; + padding: 0; +} + +button { + display: block; + margin: 40px auto; + width: 40%; + padding: 15px; + font-size: 23px; + background: #d0d0d5; + border: 3px solid #3b3b4f; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e161ecec9511941f8833.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e161ecec9511941f8833.md new file mode 100644 index 00000000000..b79a891a676 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e161ecec9511941f8833.md @@ -0,0 +1,356 @@ +--- +id: 6148e161ecec9511941f8833 +title: Hatua ya 64 +challengeType: 0 +dashedName: step-64 +--- + +# --description-- + +Sasa, hatuwezi kusoma maandishi. Lenga `footer` na kipengele cha nanga ili kuweka rangi ya fonti kwa rangi ya uwiano wa utofautishaji wa kutosha. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `footer, footer a`. + +```js +const gs = (s) => new __helpers.CSSHelp(document).getStyle(s); +assert.exists(gs('footer, footer a') || gs('footer a, footer')); +``` + +Unapaswa kuweka `color` kwa thamani yenye uwiano wa utofautishaji wa angalau `7:1`. _Kidokezo: Ninapendekeza `#dfdfe2`_ + +```js +function luminance(r, g, b) { + const a = [r, g, b].map((v) => { + v /= 255; + return v <= 0.03928 ? v / 12.92 : Math.pow( (v + 0.055) / 1.055, 2.4 ); + }); + return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722; +} +function contrast(rgb1, rgb2) { + const lum1 = luminance(rgb1[0], rgb1[1], rgb1[2]); + const lum2 = luminance(rgb2[0], rgb2[1], rgb2[2]); + const brightest = Math.max(lum1, lum2); + const darkest = Math.min(lum1, lum2); + return (brightest + 0.05) + / (darkest + 0.05); +} +const backgroundColour = [42, 42, 64]; + +const foot = getComputedStyle(document.querySelector('footer'))?.color; +const a = getComputedStyle(document.querySelector('footer a'))?.color; + +const rgbFoot = foot?.match(/(\d+),\s(\d+),\s(\d+)/); +const rgbA = a?.match(/(\d+),\s(\d+),\s(\d+)/); +const footColour = [rgbFoot[1], rgbFoot[2], rgbFoot[3]]; +const aColour = [rgbA[1], rgbA[2], rgbA[3]]; +assert.isAtLeast(contrast(backgroundColour, footColour), 7); +assert.isAtLeast(contrast(backgroundColour, aColour), 7); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +.info label, .info input { + display: inline-block; +} + +.info input { + width: 50%; + text-align: left; +} + +.info label { + width: 10%; + min-width: 55px; + text-align: right; +} + +.question-block { + text-align: left; + display: block; + width: 100%; + margin-top: 20px; + padding-top: 5px; +} + +p { + margin-top: 5px; + padding-left: 15px; + font-size: 20px; +} + +p::before { + content: "Question #"; +} + +.question { + border: none; + padding-bottom: 0; +} + +.answers-list { + list-style: none; + padding: 0; +} + +button { + display: block; + margin: 40px auto; + width: 40%; + padding: 15px; + font-size: 23px; + background: #d0d0d5; + border: 3px solid #3b3b4f; +} + +footer { + background-color: #2a2a40; + display: flex; + justify-content: center; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e28706b34912340fd042.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e28706b34912340fd042.md new file mode 100644 index 00000000000..493d64efcaf --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e28706b34912340fd042.md @@ -0,0 +1,359 @@ +--- +id: 6148e28706b34912340fd042 +title: Hatua ya 65 +challengeType: 0 +dashedName: step-65 +--- + +# --description-- + +Weka katikati maandishi yote ndani ya kipengele cha `address`, na uongeze padding. + +# --hints-- + +Unapaswa kutumia kipengele kichaguzi cha `address`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('address')); +``` + +Unapaswa kuipa `address` `text-align` ya `center`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('address')?.textAlign, 'center'); +``` + +Unapaswa kuipa `address` `padding-top` ya angalau `1px`. + +```js +assert.isAtLeast(Number(window.getComputedStyle(document.querySelector('address'), null)?.getPropertyValue('padding-top')?.replace(/\D\D+/, '')), 1); +``` + +Unapaswa kuipa `address` `padding-right` ya angalau `1px`. + +```js +assert.isAtLeast(Number(window.getComputedStyle(document.querySelector('address'), null)?.getPropertyValue('padding-right')?.replace(/\D\D+/, '')), 1); +``` + +Unapaswa kuipa `address` `padding-bottom` ya angalau `1px`. + +```js +assert.isAtLeast(Number(window.getComputedStyle(document.querySelector('address'), null)?.getPropertyValue('padding-bottom')?.replace(/\D\D+/, '')), 1); +``` + +Unapaswa kuipa `address` `padding-left` ya angalau `1px`. + +```js +assert.isAtLeast(Number(window.getComputedStyle(document.querySelector('address'), null)?.getPropertyValue('padding-left')?.replace(/\D\D+/, '')), 1); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +.info label, .info input { + display: inline-block; +} + +.info input { + width: 50%; + text-align: left; +} + +.info label { + width: 10%; + min-width: 55px; + text-align: right; +} + +.question-block { + text-align: left; + display: block; + width: 100%; + margin-top: 20px; + padding-top: 5px; +} + +p { + margin-top: 5px; + padding-left: 15px; + font-size: 20px; +} + +p::before { + content: "Question #"; +} + +.question { + border: none; + padding-bottom: 0; +} + +.answers-list { + list-style: none; + padding: 0; +} + +button { + display: block; + margin: 40px auto; + width: 40%; + padding: 15px; + font-size: 23px; + background: #d0d0d5; + border: 3px solid #3b3b4f; +} + +footer { + background-color: #2a2a40; + display: flex; + justify-content: center; +} + +footer, +footer a { + color: #dfdfe2; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e335c1edd512d00e4691.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e335c1edd512d00e4691.md new file mode 100644 index 00000000000..1148009dd95 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e335c1edd512d00e4691.md @@ -0,0 +1,342 @@ +--- +id: 6148e335c1edd512d00e4691 +title: Hatua ya 66 +challengeType: 0 +dashedName: step-66 +--- + +# --description-- + +Kubofya viungo vya kusogeza kunapaswa kuruka hadi sehemu husika. Walakini, kuruka huku kunaweza kuwakatisha tamaa watumiaji wengine. + +Chagua vipengele vyote, na uweke `scroll-behavior` kuwa `smooth`. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `*`. + +```js +assert.exists(new __helpers.CSSHelp(document).getStyle('*')); +``` + +Unapaswa kuipa `*` `scroll-behavior` ya `smooth`. + +```js +assert.equal(new __helpers.CSSHelp(document).getStyle('*')?.scrollBehavior, 'smooth'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +--fcc-editable-region-- + +--fcc-editable-region-- + +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +.info label, .info input { + display: inline-block; +} + +.info input { + width: 50%; + text-align: left; +} + +.info label { + width: 10%; + min-width: 55px; + text-align: right; +} + +.question-block { + text-align: left; + display: block; + width: 100%; + margin-top: 20px; + padding-top: 5px; +} + +p { + margin-top: 5px; + padding-left: 15px; + font-size: 20px; +} + +p::before { + content: "Question #"; +} + +.question { + border: none; + padding-bottom: 0; +} + +.answers-list { + list-style: none; + padding: 0; +} + +button { + display: block; + margin: 40px auto; + width: 40%; + padding: 15px; + font-size: 23px; + background: #d0d0d5; + border: 3px solid #3b3b4f; +} + +footer { + background-color: #2a2a40; + display: flex; + justify-content: center; +} + +footer, +footer a { + color: #dfdfe2; +} + +address { + text-align: center; + padding: 0.3em; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e41c728f65138addf9cc.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e41c728f65138addf9cc.md new file mode 100644 index 00000000000..4f2e0ff0b67 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e41c728f65138addf9cc.md @@ -0,0 +1,360 @@ +--- +id: 6148e41c728f65138addf9cc +title: Hatua ya 67 +challengeType: 0 +dashedName: step-67 +--- + +# --description-- + +Aina fulani za uhuishaji unaotegemea mwendo zinaweza kusababisha usumbufu kwa baadhi ya watumiaji. Hasa, watu walio na matatizo ya vestibular wana usikivu kwa vichochezi fulani vya mwendo. + +Sheria ya `@media`, ina kipengele cha media kinachoitwa `prefers-reduced-motion` ili kuweka CSS kulingana na mapendeleo ya mtumiaji. Inaweza kuchukua moja ya mitindo ifuatayo: + +- `reduce` +- `no-preference` + +```CSS +@media (feature: value) { + selector { + styles + } +} +``` + +--- + +Funga kanuni ya mtindo inayoweka `scroll-behavior: smooth` ndani ya sheria ya `@media` kwa kipengele cha `prefers-reduced-motion` kikiwa na `no-preference` kama thamani. + +# --hints-- + +Unapaswa kuwa na sheria moja ya `@media (prefers-reduced-motion: no-preference)`. + +```js +assert.equal(new __helpers.CSSHelp(document).getRuleListsWithinMedia('(prefers-reduced-motion: no-preference)').length, 1); +``` + +Unapaswa kufunga sheria iliyopo ya `*` ndani ya sheria ya `@media`. + +```js +assert.equal(new __helpers.CSSHelp(document).getRuleListsWithinMedia('(prefers-reduced-motion: no-preference)')?.find(x => x.selectorText === '*')?.style?.scrollBehavior, 'smooth'); +assert.notExists(new __helpers.CSSHelp(document).getStyle('*')); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +--fcc-editable-region-- +* { + scroll-behavior: smooth; +} +--fcc-editable-region-- + +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +.info label, .info input { + display: inline-block; +} + +.info input { + width: 50%; + text-align: left; +} + +.info label { + width: 10%; + min-width: 55px; + text-align: right; +} + +.question-block { + text-align: left; + display: block; + width: 100%; + margin-top: 20px; + padding-top: 5px; +} + +p { + margin-top: 5px; + padding-left: 15px; + font-size: 20px; +} + +p::before { + content: "Question #"; +} + +.question { + border: none; + padding-bottom: 0; +} + +.answers-list { + list-style: none; + padding: 0; +} + +button { + display: block; + margin: 40px auto; + width: 40%; + padding: 15px; + font-size: 23px; + background: #d0d0d5; + border: 3px solid #3b3b4f; +} + +footer { + background-color: #2a2a40; + display: flex; + justify-content: center; +} + +footer, +footer a { + color: #dfdfe2; +} + +address { + text-align: center; + padding: 0.3em; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e5aeb102e3142de026a2.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e5aeb102e3142de026a2.md new file mode 100644 index 00000000000..67a13f79211 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6148e5aeb102e3142de026a2.md @@ -0,0 +1,685 @@ +--- +id: 6148e5aeb102e3142de026a2 +title: Hatua ya 68 +challengeType: 0 +dashedName: step-68 +--- + +# --description-- + +Hatimaye, ufikivu wa kusogeza unaweza kuboreshwa kwa kutoa mikato ya kibodi. + +Sifa ya `accesskey` inakubali orodha ya vitufe vya ufikiaji vilivyotenganishwa na nafasi. Kwa mfano: + +```html + +``` + +Vipe kila viungo vya kusogeza ufunguo wa ufikiaji wa herufi moja. + +_Kumbuka: Si mara zote inashauriwa kutumia funguo za kufikia, lakini zinaweza kuwa na manufaa_ + +Hongera. Umekamilisha mradi wa mazoezi wa _Accessibility Quiz_. + +# --hints-- + +Unapaswa kukipa kipengele cha kwanza cha `a` herufi moja ya `accesskey`. + +```js +assert.equal(document.querySelectorAll('a')?.[0]?.getAttribute('accesskey')?.length, 1); +``` + +Unapaswa kukipa kipengele cha pili cha `a` herufi moja ya `accesskey`. + +```js +assert.equal(document.querySelectorAll('a')?.[1]?.getAttribute('accesskey')?.length, 1); +``` + +Unapaswa kukipa kipengele cha tatu cha `a` herufi moja ya `accesskey`. + +```js +assert.equal(document.querySelectorAll('a')?.[2]?.getAttribute('accesskey')?.length, 1); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +@media (prefers-reduced-motion: no-preference) { + * { + scroll-behavior: smooth; + } +} + +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; + justify-content: space-between; + align-items: center; + position: fixed; + top: 0; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); + text-align: center; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; + flex-wrap: wrap; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + color: #dfdfe2; + margin: 0 0.2rem; + padding: 0.2rem; + display: block; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0 auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + +.info { + padding: 10px 0 0 5px; +} + +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +.info label, .info input { + display: inline-block; +} + +.info input { + width: 50%; + text-align: left; +} + +.info label { + width: 10%; + min-width: 55px; + text-align: right; +} + +.question-block { + text-align: left; + display: block; + width: 100%; + margin-top: 20px; + padding-top: 5px; +} + +p { + margin-top: 5px; + padding-left: 15px; + font-size: 20px; +} + +p::before { + content: "Question #"; +} + +.question { + border: none; + padding-bottom: 0; +} + +.answers-list { + list-style: none; + padding: 0; +} + +button { + display: block; + margin: 40px auto; + width: 40%; + padding: 15px; + font-size: 23px; + background: #d0d0d5; + border: 3px solid #3b3b4f; +} + +footer { + background-color: #2a2a40; + display: flex; + justify-content: center; +} + +footer, +footer a { + color: #dfdfe2; +} + +address { + text-align: center; + padding: 0.3em; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` + +## --solutions-- + +```html + + + + + + + + Accessibility Quiz + + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+ +
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+
+

CSS

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ + + + +``` + +```css +@media (prefers-reduced-motion: no-preference) { + * { + scroll-behavior: smooth; + } +} + +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + position: fixed; + background-color: #1b1b32; + top: 0; +} + +#logo { + width: max(100px, 18vw); + aspect-ratio: 35 / 4; + max-height: 100%; + background-color: #0a0a23; + padding: 0.4rem; +} + +h1 { + text-align: center; + font-size: min(5vw, 1.2em); + color: #f1be32; +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + flex-wrap: wrap; + justify-content: space-evenly; + align-items: center; + padding-inline-start: 0; + margin-block: 0; + height: 100%; +} + +nav > ul > li { + display: block; + margin: 0 0.2rem; + color: #dfdfe2; + padding: 0.2rem; +} + +nav > ul > li:hover { + background-color: #dfdfe2; + color: #1b1b32; + cursor: pointer; +} + +li > a { + color: inherit; + text-decoration: none; +} + +main { + padding-top: 50px; +} + +section { + width: 80%; + margin: 0px auto 10px auto; + max-width: 600px; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; + margin-top: 0px; + padding-top: 60px; +} + + +.info { + margin: 0 auto; + padding: 10px 0 0 5px; +} +.formrow { + margin-top: 30px; + padding: 0px 15px; +} + +input { + font-size: 16px; +} + +.info label, +.info input { + display: inline-block; +} + +.info label { + width: 10%; + min-width: 55px; + text-align: right; +} + +.info input { + width: 50%; + text-align: left; +} + +.question-block { + text-align: left; + display: block; + width: 100%; + margin-top: 20px; + padding-top: 5px; +} + +p { + margin-top: 5px; + padding-left: 15px; + font-size: 20px; +} + +p::before { + content: "Question #"; +} + +.question { + border: none; + padding-bottom: 0; +} + +.answers-list { + list-style: none; + padding: 0; +} + +button { + display: block; + margin: 40px auto; + width: 40%; + padding: 15px; + font-size: 23px; + background: #d0d0d5; + border: 3px solid #3b3b4f; +} + +footer { + background-color: #2a2a40; + display: flex; + justify-content: center; +} + +footer, +footer a { + color: #dfdfe2; +} + +address { + text-align: center; + padding: 0.3em; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614ccc21ea91ef1736b9b578.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614ccc21ea91ef1736b9b578.md new file mode 100644 index 00000000000..a03a84be490 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/614ccc21ea91ef1736b9b578.md @@ -0,0 +1,50 @@ +--- +id: 614ccc21ea91ef1736b9b578 +title: Hatua ya 1 +challengeType: 0 +dashedName: step-1 +--- + +# --description-- + +Karibu kwenye sehemu ya kwanza ya Maswali ya Ufikiaji (Accessibility Quiz). Unapoendelea kuwa msanidi wa HTML na CSS aliyeboreshwa, tumekuanzisha na mpangilio wa msingi. + +Anza safari hii ya ufikivu kwa kutoa sifa ya `lang` kwa kipengele chako cha `html`. Hii itasaidia visoma skrini katika kutambua lugha ya ukurasa. + +# --hints-- + +Unapaswa kukipa kipengele cha `html` sifa ya `lang`. _Kidokezo: Unaweza kutumia thamani `en` kwa Kiingereza._ + +```js +assert.match(code, //i); +// TODO: This should/could be fixed in the builder.js +// assert.notThrow(Intl.getCanonicalLocales(document.querySelector('html').lang)); +``` + +# --seed-- + +## --seed-contents-- + +```html + +--fcc-editable-region-- + + + + + + + + +--fcc-editable-region-- + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6351e7a8684bf5377c4ee7f7.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6351e7a8684bf5377c4ee7f7.md new file mode 100644 index 00000000000..c74b89da0ac --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-accessibility-by-building-a-quiz/6351e7a8684bf5377c4ee7f7.md @@ -0,0 +1,227 @@ +--- +id: 6351e7a8684bf5377c4ee7f7 +title: Hatua ya 31 +challengeType: 0 +dashedName: step-31 +--- + +# --description-- + +Ingawa haihitajiki kwa vipengee vya `label` vilivyo `input`, bado ni njia bora ya kuunganisha kwa uwazi `label` na kipengele kinacholingana cha `input`. + +Sasa, ongeza sifa ya `for` kwa kila moja ya `label` zako nne zinazounganisha `label` na `input` inayolingana. + +# --hints-- + +Unapaswa kuipa `label` ya kwanza sifa ya `for`. + +```js +assert.notEmpty(document.querySelectorAll('ul.answers-list > li > label')?.[0]?.htmlFor); +``` + +Unapaswa kuipa `label` ya kwanza sifa ya `for` inayolingana na `id` ya kipengele chake cha `input`. + +```js +const htmlFor = document.querySelectorAll('ul.answers-list > li > label')?.[0]?.htmlFor; +assert.equal(htmlFor, document.querySelectorAll('ul.answers-list > li > label > input')?.[0]?.id); +``` + +Unapaswa kuipa `label` ya pili sifa ya `for`. + +```js +assert.notEmpty(document.querySelectorAll('ul.answers-list > li > label')?.[1]?.htmlFor); +``` + +Unapaswa kuipa `label` ya pili sifa ya `for` inayolingana na `id` ya kipengele chake cha `input`. + +```js +const htmlFor = document.querySelectorAll('ul.answers-list > li > label')?.[1]?.htmlFor; +assert.equal(htmlFor, document.querySelectorAll('ul.answers-list > li > label > input')?.[1]?.id); +``` + +Unapaswa kuipa `label` ya tatu sifa ya `for`. + +```js +assert.notEmpty(document.querySelectorAll('ul.answers-list > li > label')?.[2]?.htmlFor); +``` + +Unapaswa kuipa `label` ya tatu sifa ya `for` inayolingana na `id` ya kipengele chake cha `input`. + +```js +const htmlFor = document.querySelectorAll('ul.answers-list > li > label')?.[2]?.htmlFor; +assert.equal(htmlFor, document.querySelectorAll('ul.answers-list > li > label > input')?.[2]?.id); +``` + +Unapaswa kuipa `label` ya nne sifa ya `for`. + +```js +assert.notEmpty(document.querySelectorAll('ul.answers-list > li > label')?.[3]?.htmlFor); +``` + +Unapaswa kuipa `label` ya nne sifa ya `for` inayolingana na `id` ya kipengele chake cha `input`. + +```js +const htmlFor = document.querySelectorAll('ul.answers-list > li > label')?.[3]?.htmlFor; +assert.equal(htmlFor, document.querySelectorAll('ul.answers-list > li > label > input')?.[3]?.id); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + + Accessibility Quiz + + + +
+ +

HTML/CSS Quiz

+ +
+
+
+
+

Student Info

+
+ + +
+
+ + +
+
+ + +
+
+
+

HTML

+
+

1

+
+ + The legend element represents a caption for the content of its + parent fieldset element + +--fcc-editable-region-- +
    +
  • + +
  • +
  • + +
  • +
+
+
+
+

2

+
+ + A label element nesting an input element is required to have a + for attribute with the same value as the input's id + +
    +
  • + +
  • +
  • + +
  • +
+--fcc-editable-region-- +
+
+
+
+

CSS

+
+
+
+ + + +``` + +```css +body { + background: #f5f6f7; + color: #1b1b32; + font-family: Helvetica; + margin: 0; +} + +header { + width: 100%; + height: 50px; + background-color: #1b1b32; + display: flex; +} + +#logo { + width: max(100px, 18vw); + background-color: #0a0a23; + aspect-ratio: 35 / 4; + padding: 0.4rem; +} + +h1 { + color: #f1be32; + font-size: min(5vw, 1.2em); +} + +nav { + width: 50%; + max-width: 300px; + height: 50px; +} + +nav > ul { + display: flex; + justify-content: space-evenly; +} + +h1, +h2 { + font-family: Verdana, Tahoma; +} + +h2 { + border-bottom: 4px solid #dfdfe2; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f33071498eb2472b87ddee4.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f33071498eb2472b87ddee4.md new file mode 100644 index 00000000000..1251c760116 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f33071498eb2472b87ddee4.md @@ -0,0 +1,43 @@ +--- +id: 5f33071498eb2472b87ddee4 +title: Hatua ya 1 +challengeType: 0 +dashedName: step-1 +--- + +# --description-- + +Kama ulivyojifunza katika hatua chache zilizopita za Programu ya Cat Photo, kuna muundo msingi unaohitajika ili kuanza kuunda ukurasa wako wa wavuti. + +Ongeza tagi ya ``, na kipengele cha `html` chenye sifa ya `lang` ya `en`. + +# --hints-- + +Unapaswa kuwa na tamko la `DOCTYPE`. + +```js +assert(code.match(//i)); +``` + +Unapaswa kuwa na tagi ya ufunguzi ya `` yenye sifa ya `lang` ya `en`. + +```js +assert(code.match(//gi)); +``` + +Unapaswa kuwa na tagi ya kufunga ya ``. Kumbuka kwamba tagi za kufunga zina `/` inayofuata `<` mabano ya ufunguzi. + +```js +assert(code.match(/<\/html>/i)); +``` + +# --seed-- + +## --seed-contents-- + +```html +--fcc-editable-region-- + +--fcc-editable-region-- + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3313e74582ad9d063e3a38.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3313e74582ad9d063e3a38.md new file mode 100644 index 00000000000..0dfefe15543 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3313e74582ad9d063e3a38.md @@ -0,0 +1,61 @@ +--- +id: 5f3313e74582ad9d063e3a38 +title: Hatua ya 2 +challengeType: 0 +dashedName: step-2 +--- + +# --description-- + +Ongeza kipengele cha `head` ndani ya kipengele cha `html`, ili uweze kuongeza kipengele cha `title`. Maandishi ya kipengele cha `title` yanapaswa kuwa `Cafe Menu`. + +# --hints-- + +Unapaswa kuwa na tagi ya kufungua ya ``. + +```js +assert(code.match(//i)); +``` + +Unapaswa kuwa na tagi ya kufunga ya ``. + +```js +assert(code.match(//i)); +``` + +Unapaswa kuwa na tagi ya kufungua ya ``. + +```js +assert(code.match(/<title>/i)); +``` + +Unapaswa kuwa na tagi ya kufungua ya ``. + +```js +assert(code.match(/<\/title>/i)); +``` + +Kipengee chako cha `title` kinapaswa kuwekwa kwenye kipengee chako cha `head`. + +```js +assert(code.match(/\s*.*<\/title>\s*<\/head>/si)); +``` + +Kipengele chako cha `title` kinapaswa kuwa na maandishi `Cafe Menu`. Huenda ukahitaji kuangalia tahajia yako. + +```js +assert.match(document.querySelector('title')?.innerText, /Cafe Menu/i); +``` + +# --seed-- + +## --seed-contents-- + +```html +<!DOCTYPE html> +<html lang="en"> +--fcc-editable-region-- + +--fcc-editable-region-- +</html> +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f331e55dfab7a896e53c3a1.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f331e55dfab7a896e53c3a1.md new file mode 100644 index 00000000000..89989f33dcf --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f331e55dfab7a896e53c3a1.md @@ -0,0 +1,47 @@ +--- +id: 5f331e55dfab7a896e53c3a1 +title: Hatua ya 3 +challengeType: 0 +dashedName: step-3 +--- + +# --description-- + +`title` ni mojawapo ya vipengele kadhaa vinavyotoa maelezo ya ziada yasiyoonekana kwenye ukurasa wa wavuti, lakini ni muhimu kwa injini za utafutaji au jinsi ukurasa unavyoonyeshwa. + +Ndani ya kipengele cha `head`, weka kipengele cha `meta` chenye sifa inayoitwa `charset` iliyowekwa kwa thamani `utf-8` ili kuambia kivinjari jinsi ya kusimba herufi za ukurasa. Kumbuka kuwa vipengele vya `meta` vinajifunga. + +# --hints-- + +Unapaswa kuwa na tagi ya `meta`. + +```js +assert(code.match(/<meta.*?\/?>/is)); +``` + +Tagi yako ya `meta` inapaswa kuwa na sifa ya `charset`. + +```js +assert(code.match(/<meta charset=/i)); +``` + +Sifa ya `charset` inapaswa kuwa na thamani ya `utf-8`. + +```js +assert(code.match(/charset=('|")utf-8\1/i)); +``` + +# --seed-- + +## --seed-contents-- + +```html +<!DOCTYPE html> +<html lang="en"> +--fcc-editable-region-- + <head> + <title>Cafe Menu + +--fcc-editable-region-- + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3326b143638ee1a09ff1e3.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3326b143638ee1a09ff1e3.md new file mode 100644 index 00000000000..abe3ad9c478 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3326b143638ee1a09ff1e3.md @@ -0,0 +1,54 @@ +--- +id: 5f3326b143638ee1a09ff1e3 +title: Hatua ya 4 +challengeType: 0 +dashedName: step-4 +--- + +# --description-- + +Ili kujiandaa kuunda baadhi ya maudhui halisi, ongeza kipengele cha `body` chini ya kipengele cha `head`. + +# --hints-- + +Unapaswa kuwa na tagi ya kufungua ya ``. + +```js +assert(code.match(//i)); +``` + +Unapaswa kuwa na tagi ya kufunga ya ``. + +```js +assert(code.match(/<\/body>/i)); +``` + +Hupaswi kubadilisha kipengele chako cha `head` kilichopo. Hakikisha kuwa hukufuta tagi ya kufunga. + +```js +assert(code.match(//i)); +assert(code.match(/<\/head>/i)); +``` + +Kipengele chako cha `body` kinapaswa kuja baada ya kipengele chako cha `head`. + +```js +assert(code.match(/<\/head>[.\n\s]*/im)); +``` + +# --seed-- + +## --seed-contents-- + +```html + + +--fcc-editable-region-- + + + Cafe Menu + +--fcc-editable-region-- + +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f33294a6af5e9188dbdb8f3.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f33294a6af5e9188dbdb8f3.md new file mode 100644 index 00000000000..55530446214 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f33294a6af5e9188dbdb8f3.md @@ -0,0 +1,55 @@ +--- +id: 5f33294a6af5e9188dbdb8f3 +title: Hatua ya 5 +challengeType: 0 +dashedName: step-5 +--- + +# --description-- + +Ni wakati wa kuongeza baadhi ya maudhui ya menyu. Ongeza kipengele cha `main` ndani ya kipengele cha `body` kilichopo. Hatimaye itakuwa na maelezo ya bei kuhusu kahawa na desserts zinazotolewa na mkahawa. + +# --hints-- + +Msimbo wako unapaswa kuwa na tagi ya kufungua ya `
`. + +```js +assert(code.match(/
/i)); +``` + +Msimbo wako unapaswa kuwa na tagi ya kufunga ya `
`. + +```js +assert(code.match(/<\/main>/i)); +``` + +Hupaswi kubadilisha kipengele chako cha `body` kilichopo. Hakikisha kuwa hukufuta tagi ya kufunga. + +```js +assert($('body').length === 1); +``` + +Tagi yako ya `main` inapaswa kuwa ndani ya tagi yako ya `body`. + +```js +const main = document.querySelector('main'); +assert(main.parentElement.tagName === 'BODY'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Cafe Menu + +--fcc-editable-region-- + + +--fcc-editable-region-- + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f332a88dc25a0fd25c7687a.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f332a88dc25a0fd25c7687a.md new file mode 100644 index 00000000000..9311dbe6804 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f332a88dc25a0fd25c7687a.md @@ -0,0 +1,63 @@ +--- +id: 5f332a88dc25a0fd25c7687a +title: Hatua ya 6 +challengeType: 0 +dashedName: step-6 +--- + +# --description-- + +Jina la mkahawa ni `CAMPER CAFE`. Ongeza kipengele cha `h1` ndani ya kipengele chako cha `main`. Lipe jina la mkahawa kuwa herufi kubwa ili kuifanya ionekane vyema. + +# --hints-- + +Unapaswa kuwa na tagi ya kufungua ya `

`. + +```js +assert(code.match(/

/i)); +``` + +Unapaswa kuwa na tagi ya kufunga ya `

`. + +```js +assert(code.match(/<\/h1>/i)); +``` + +Hupaswi kubadilisha kipengele chako cha `main` kilichopo. + +```js +assert($('main').length === 1); +``` + +Kipengee chako cha `h1` kinapaswa kuwekwa kwenye kipengee chako cha `main`. + +```js +assert($('h1')[0].parentElement.tagName === "MAIN"); +``` + +Kipengele chako cha `h1` kinapaswa kuwa na maandishi `CAMPER CAFE`. + +```js +assert(code.match(/

CAMPER CAFE<\/h1>/)); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Cafe Menu + + +--fcc-editable-region-- +
+
+--fcc-editable-region-- + + +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f332b23c2045fb843337579.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f332b23c2045fb843337579.md new file mode 100644 index 00000000000..aeb29425383 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f332b23c2045fb843337579.md @@ -0,0 +1,64 @@ +--- +id: 5f332b23c2045fb843337579 +title: Hatua ya 7 +challengeType: 0 +dashedName: step-7 +--- + +# --description-- + +Ili kuwafahamisha wageni kuwa mkahawa huo ulianzishwa mwaka wa 2020, ongeza kipengele cha `p` chini ya kipengele cha `h1` chenye maandishi `Est. 2020`. + +# --hints-- + +Unapaswa kuwa na tagi ya kufungua ya `

`. + +```js +assert(code.match(/

/i)); +``` + +Unapaswa kuwa na tagi ya kufunga ya `

`. + +```js +assert(code.match(/<\/p>/i)); +``` + +Hupaswi kubadilisha kipengele chako cha `h1` kilichopo. Hakikisha kuwa hukufuta tagi ya kufunga. + +```js +assert($('h1').length === 1); +``` + +Kipengele chako cha `p` kinapaswa kuwa chini ya kipengele chako cha `h1`. + +```js +assert($('p')[0].previousElementSibling.tagName === 'H1'); +``` + +Kipengele chako cha `p` kinapaswa kuwa na maandishi `Est. 2020`. + +```js +assert(document.querySelector("p").innerText === "Est. 2020"); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Cafe Menu + + +
+--fcc-editable-region-- +

CAMPER CAFE

+--fcc-editable-region-- +
+ + +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344f9c805cd193c33d829c.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344f9c805cd193c33d829c.md new file mode 100644 index 00000000000..2a488932fa3 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344f9c805cd193c33d829c.md @@ -0,0 +1,69 @@ +--- +id: 5f344f9c805cd193c33d829c +title: Hatua ya 11 +challengeType: 0 +dashedName: step-11 +--- + +# --description-- + +Unaweza kuongeza mtindo kwa kipengee kwa kukibainisha katika kipengele cha `style` na kukiwekea sifa kama hii: + +```css +element { + property: value; +} +``` + +Weka kipengee chako cha `h1` kati kwa kuweka sifa ya `text-align` kuwa na thamani ya `center`. + +# --hints-- + +Unapaswa kuwa na kichaguzi cha `h1` katika kipengele chako cha `style`. + +```js +const hasSelector = new __helpers.CSSHelp(document).getStyle('h1'); +assert(hasSelector); +``` + +Sifa ya `text-align` inapaswa kuwa na thamani ya `center`. + +```js +const hasTextAlign = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['text-align'] === 'center'); +assert(hasTextAlign); +``` + +Kichaguzi chako cha `h1` kinapaswa kuweka sifa ya `text-align` kuwa `center`. + +```js +const h1TextAlign = new __helpers.CSSHelp(document).getStyle('h1')?.getPropertyValue('text-align'); +assert(h1TextAlign === 'center'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Cafe Menu +--fcc-editable-region-- + +--fcc-editable-region-- + + +
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+ + +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fad8bf01691e71a30eb.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fad8bf01691e71a30eb.md new file mode 100644 index 00000000000..d47e04a66e1 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fad8bf01691e71a30eb.md @@ -0,0 +1,55 @@ +--- +id: 5f344fad8bf01691e71a30eb +title: Hatua ya 10 +challengeType: 0 +dashedName: step-10 +--- + +# --description-- + +Hadi sasa, umewekewa vikwazo kuhusu uwasilishaji na mwonekano wa maudhui unayounda. Ili kuanza kudhibiti, ongeza kipengele cha `style` ndani ya kipengele cha `head`. + +# --hints-- + +Msimbo wako unapaswa kuwa na tagi ya ufunguzi ya ``. + +```js +assert(code.match(/<\/style\s*>/)); +``` + +Kipengee chako cha `style` kinapaswa kuwekwa kwenye kipengee chako cha `head`. + +```js +assert(code.match(/[\w\W\s]*[\w\W\s]*<\/style\s*>[\w\W\s]*<\/head\s*>/i)) +``` + +# --seed-- + +## --seed-contents-- + +```html + + +--fcc-editable-region-- + + + Cafe Menu + + +
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+ +--fcc-editable-region-- + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fbc22624a2976425065.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fbc22624a2976425065.md new file mode 100644 index 00000000000..d62a81b233a --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fbc22624a2976425065.md @@ -0,0 +1,68 @@ +--- +id: 5f344fbc22624a2976425065 +title: Hatua ya 9 +challengeType: 0 +dashedName: step-9 +--- + +# --description-- + +Unda kipengele cha `h2` katika kipengele `section` na ukipe maandishi `Coffee`. + +# --hints-- + +Unapaswa kuwa na tagi ya kufungua ya `

`. + +```js +assert(code.match(//i)); +``` + +Unapaswa kuwa na tagi ya kufunga ya `

`. + +```js +assert(code.match(/<\/h2\s*>/i)); +``` + +Hupaswi kubadilisha kipengele chako cha `section` kilichopo. Hakikisha kuwa hukufuta tagi ya kufunga. + +```js +assert($('section').length === 1); +``` + +Kipengele chako cha `h2` kinapaswa kuwa ndani ya kipengele chako cha `section`. + +```js +const h2 = document.querySelector('h2'); +assert(h2.parentElement.tagName === 'SECTION'); +``` + +Kipengele chako cha `h2` kinapaswa kuwa na maandishi `Coffee`. + +```js +const h2 = document.querySelector('h2'); +assert(h2.innerText === 'Coffee'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Cafe Menu + + +
+

CAMPER CAFE

+

Est. 2020

+--fcc-editable-region-- +
+
+--fcc-editable-region-- +
+ + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fc1520b6719f2e35605.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fc1520b6719f2e35605.md new file mode 100644 index 00000000000..33458451a27 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f344fc1520b6719f2e35605.md @@ -0,0 +1,60 @@ +--- +id: 5f344fc1520b6719f2e35605 +title: Hatua ya 8 +challengeType: 0 +dashedName: step-8 +--- + +# --description-- + +Kutakuwa na sehemu mbili kwenye menyu, moja ya kahawa na moja ya desserts. Ongeza kipengele cha `section` ndani ya kipengele cha `main` ili upate mahali pa kuweka kahawa zote zinazopatikana. + +# --hints-- + +Unapaswa kuwa na tagi ya kufungua ya `
`. + +```js +assert(code.match(//i)); +``` + +Unapaswa kuwa na tagi ya kufunga ya `
`. + +```js +assert(code.match(/<\/section\s*>/i)); +``` + +Hupaswi kubadilisha kipengele chako cha `main` kilichopo. Hakikisha kuwa hukufuta tagi ya kufunga. + +```js +assert($('main').length === 1); +``` + +Kipengele chako cha `section` kinapaswa kuwa ndani ya kipengele chako cha `main`. + +```js +const main = document.querySelector('main'); +const section = document.querySelector('section'); +assert(section.parentElement === main); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Cafe Menu + + +--fcc-editable-region-- +
+

CAMPER CAFE

+

Est. 2020

+
+--fcc-editable-region-- + + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477ae34c1239cafe128be.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477ae34c1239cafe128be.md new file mode 100644 index 00000000000..95707ab18f9 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477ae34c1239cafe128be.md @@ -0,0 +1,71 @@ +--- +id: 5f3477ae34c1239cafe128be +title: Hatua ya 13 +challengeType: 0 +dashedName: step-13 +--- + +# --description-- + +Sasa una viteuzi vya aina tatu vilivyo na mtindo sawa. Unaweza kuongeza kikundi sawa cha mitindo kwa vipengele vingi kwa kuunda orodha ya viteuzi. Kila kichaguzi kimetenganishwa na koma kama hii: + +```css +selector1, selector2 { + property: value; +} +``` + +Futa vichaguzi vitatu vya aina vilivyopo na ubadilishe na orodha moja ya kiteuzi ambayo huweka maandishi kati kwa vipengee vya `h1`, `h2` na `p`. + +# --hints-- + +Unapaswa kutumia kichaguzi cha aina moja kwa vipengele vyote vitatu, `h1, h2, p`. Hakikisha kutumia orodha hiyo. + +```js +const hasSelector = new __helpers.CSSHelp(document).getStyle('h1, h2, p'); +assert(hasSelector); +``` + +Unapaswa kuwa na kichaguzi kimoja pekee katika kipengele chako cha `style`. + +```js +const selectors = new __helpers.CSSHelp(document).getCSSRules().filter(x => x.selectorText) +assert(selectors.length === 1); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Cafe Menu +--fcc-editable-region-- + +--fcc-editable-region-- + + +
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+ + +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477ae8466a9a3d2cc953c.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477ae8466a9a3d2cc953c.md new file mode 100644 index 00000000000..585d3bcc908 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477ae8466a9a3d2cc953c.md @@ -0,0 +1,65 @@ +--- +id: 5f3477ae8466a9a3d2cc953c +title: Hatua ya 15 +challengeType: 0 +dashedName: step-15 +--- + +# --description-- + +Kwa kuwa sasa una CSS katika faili ya `styles.css`, endelea na uondoe kipengele cha `style` na maudhui yake yote. Mara tu inapoondolewa, maandishi yaliyokuwa katikati yatarudishwa kushoto. + +# --hints-- + +Hupaswi kuwa na tagi zozote za `style` katika code yako. + +```js +assert(!code.match(/style/i)); +``` + +Hupaswi kuwa na vichaguzi vyovyote vya CSS katika faili yako ya HTML. + +```js +(getUserInput) => { + const html = getUserInput('editableContents'); + assert(!html.includes('style')); + assert(!html.includes('text-align')); +} +``` + +# --seed-- + +## --seed-contents-- + +```html + + +--fcc-editable-region-- + + + Cafe Menu + + +--fcc-editable-region-- + +
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+ + +``` + +```css +h1, h2, p { + text-align: center; +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477ae9675db8bb7655b30.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477ae9675db8bb7655b30.md new file mode 100644 index 00000000000..9871c3b531d --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477ae9675db8bb7655b30.md @@ -0,0 +1,92 @@ +--- +id: 5f3477ae9675db8bb7655b30 +title: Hatua ya 12 +challengeType: 0 +dashedName: step-12 +--- + +# --description-- + +Katika hatua iliyotangulia, ulitumia type selector kuweka mtindo wa kipengele cha `h1`. Weka kati vipengee vya `h2` na `p` kwa kuongeza kiteuzi cha aina mpya kwa kila kimoja kwenye kipengele cha `style` kilichopo. + +# --hints-- + +Hupaswi kubadilisha kichaguzi cha `h1` kilichopo. + +```js +const hasH1 = new __helpers.CSSHelp(document).getStyle('h1'); +assert(hasH1); +``` + +Hupaswi kuongeza tagi mpya ya `style`. Ongeza sheria mpya za CSS kwenye tagi iliyopo ya `style`. + +```js +const hasManyStyleTags = document.querySelectorAll('style').length > 1; +assert(!hasManyStyleTags); +``` + +Unapaswa kuongeza kichaguzi kipya cha `h2`. + +```js +const hasH2 = new __helpers.CSSHelp(document).getStyle('h2'); +assert(hasH2); +``` + +Unapaswa kuongeza kichaguzi kipya cha `p`. + +```js +const hasP = new __helpers.CSSHelp(document).getStyle('p'); +assert(hasP); +``` + +Kipengee chako cha `h1` kinapaswa kuwa na `text-align` ya `center`. + +```js +const h1TextAlign = new __helpers.CSSHelp(document).getStyle('h1')?.getPropertyValue('text-align'); +assert(h1TextAlign === 'center'); +``` + +Kipengee chako cha `h2` kinapaswa kuwa na `text-align` ya `center`. + +```js +const h2TextAlign = new __helpers.CSSHelp(document).getStyle('h2')?.getPropertyValue('text-align'); +assert(h2TextAlign === 'center'); +``` + +Kipengee chako cha `p` kinapaswa kuwa na `text-align` ya `center`. + +```js +const pTextAlign = new __helpers.CSSHelp(document).getStyle('p')?.getPropertyValue('text-align'); +assert(pTextAlign === 'center'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + Cafe Menu +--fcc-editable-region-- + +--fcc-editable-region-- + + +
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+ + +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477aefa51bfc29327200b.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477aefa51bfc29327200b.md new file mode 100644 index 00000000000..c7460e438ab --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477aefa51bfc29327200b.md @@ -0,0 +1,73 @@ +--- +id: 5f3477aefa51bfc29327200b +title: Hatua ya 14 +challengeType: 0 +dashedName: step-14 +--- + +# --description-- + +Umeweka mtindo kwa vipengele vitatu kwa kuandika CSS ndani ya tagi ya `style`. Hii inafanya kazi, lakini kwa kuwa kutakuwa na mitindo mingi zaidi, ni bora kuweka mitindo yote kwenye faili tofauti na kuiunganisha. + +Tumekuundia faili tofauti ya `styles.css` na kubadilisha mwonekano wa kihariri hadi faili hiyo. Unaweza kubadilisha kati ya faili na vichupo vilivyo juu ya kihariri. + +Anza kwa kuandika upya mitindo uliyounda kwenye faili ya `styles.css`. Hakikisha kuwa haujumuishi tagi za kufungua na kufunga za `style`. + +# --hints-- + +Faili yako ya `styles.css` inapaswa kuwa na kiteuzi cha aina ya `h1, h2, p`. + +```js +(getUserInput) => { + assert(getUserInput('editableContents').replace(/[\s\n]*/g, "").match(/(h1|h2|p),(h1|h2|p),(h1|h2|p){/)); +} +``` + +Kichaguzi chako kinapaswa kuweka sifa ya `text-align` kuwa `center`. + +```js +(getUserInput) => { + assert(getUserInput('editableContents').match(/text-align:\s*center;?/)); +} +``` + +Msimbo wako haipaswi kuwa na tagi zozote za ` + + +
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+ + +``` + +```css +--fcc-editable-region-- + +--fcc-editable-region-- + +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477cb2e27333b1ab2b955.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477cb2e27333b1ab2b955.md new file mode 100644 index 00000000000..81a8506905d --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477cb2e27333b1ab2b955.md @@ -0,0 +1,86 @@ +--- +id: 5f3477cb2e27333b1ab2b955 +title: Hatua ya 16 +challengeType: 0 +dashedName: step-16 +--- + +# --description-- + +Sasa unahitaji kuunganisha faili ya `styles.css` ili mitindo itumike tena. Weka kipengele cha kujifunga cha `link` katika kipengele cha `head`. Ipe `rel` thamani ya sifa `stylesheet` na `href` thamani ya `styles.css`. + +# --hints-- + +Msimbo wako unapaswa kuwa na kipengele cha `link`. + +```js +const link = document.querySelector('link'); +assert(link); +``` + +Hupaswi kubadilisha kipengele chako cha `head` kilichopo. Hakikisha kuwa hukufuta tagi ya kufunga. + +```js +assert($('head').length === 1); +``` + +Unapaswa kuwa na kipengele kimoja cha kujifunga cha `link`. + +```js +const link = document.querySelectorAll('link'); +assert(link.length === 1); +``` + +Kipengele chako cha `link` kinapaswa kuwa ndani ya kipengele chako cha `head`. + +```js +const link = document.querySelector('head > link'); +assert(link); +``` + +Kipengele chako cha `link` kinafaa kuwa na sifa ya `rel` yenye thamani `stylesheet`. + +```js +const link = document.querySelector('link') +const rel = link.getAttribute('rel') +assert(rel == `stylesheet`) +``` + +Kipengele chako cha `link` kinafaa kuwa na sifa ya `href` yenye thamani `styles.css`. + +```js +const link = document.querySelector('link') +assert(link.dataset.href == 'styles.css') + +``` + +# --seed-- + +## --seed-contents-- + +```html + + +--fcc-editable-region-- + + + Cafe Menu + +--fcc-editable-region-- + +
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+ + +``` + +```css +h1, h2, p { + text-align: center; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477cb303c5cb61b43aa9b.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477cb303c5cb61b43aa9b.md new file mode 100644 index 00000000000..a11967d2e2c --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477cb303c5cb61b43aa9b.md @@ -0,0 +1,68 @@ +--- +id: 5f3477cb303c5cb61b43aa9b +title: Hatua ya 18 +challengeType: 0 +dashedName: step-18 +--- + +# --description-- + +Maandishi yamewekwa katikati tena kwa hivyo kiungo kwa faili ya CSS kinafanya kazi. Ongeza mtindo mwingine kwenye faili unaobadilisha sifa ya `background-color` kuwa `brown` kwa kipengele cha `body`. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `body`. + +```js +const hasBody = new __helpers.CSSHelp(document).getStyle('body'); +assert(hasBody); +``` + +Unapaswa kuweka sifa a `background-color` kuwa `brown`. + +```js +const hasBackground = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['background-color'] === 'brown'); +assert(hasBackground); +``` + +Kipengele chako cha `body` kinapaswa kuwa na mandharinyuma ya `brown`. + +```js +const bodyBackground = new __helpers.CSSHelp(document).getStyle('body')?.getPropertyValue('background-color'); +assert(bodyBackground === 'brown'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + +
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+ + +``` + +```css +--fcc-editable-region-- +h1, h2, p { + text-align: center; +} +--fcc-editable-region-- + +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477cbcb6ba47918c1da92.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477cbcb6ba47918c1da92.md new file mode 100644 index 00000000000..06a3ca5bc8f --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3477cbcb6ba47918c1da92.md @@ -0,0 +1,70 @@ +--- +id: 5f3477cbcb6ba47918c1da92 +title: Hatua ya 17 +challengeType: 0 +dashedName: step-17 +--- + +# --description-- + +Ili muundo wa ukurasa uonekane sawa kwenye simu ya mkononi kama unavyofanya kwenye kompyuta ya mezani au kompyuta ya mkononi, unahitaji kuongeza kipengele cha `meta` chenye sifa maalum ya `content`. + +Ongeza yafuatayo ndani ya kipengele cha `head`: + +```html + +``` + +# --hints-- + +Msimbo wako unapaswa kuwa na vipengele viwili vya `meta`. + +```js +assert(code.match(//g).length === 2); +``` + +Kipengele chako cha `meta` kinapaswa kuwa na sifa ya `name` yenye thamani ya `viewport`. + +```js +const meta = $('meta'); +assert(meta[0].outerHTML.match(/name=('|")viewport\1/) || meta[1].outerHTML.match(/name=('|")viewport\1/)); +``` + +Kipengele chako cha `meta` kinapaswa kuwa na sifa ya `content` yenye thamani ya `width=device-width, initial-scale=1.0`. + +```js +const meta = $('meta'); +assert(meta[0].outerHTML.match(/content=('|")width=device-width, initial-scale=1.0\1/) || meta[1].outerHTML.match(/content=('|")width=device-width, initial-scale=1.0\1/)); +``` + +# --seed-- + +## --seed-contents-- + +```html + + +--fcc-editable-region-- + + + Cafe Menu + + +--fcc-editable-region-- + +
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+ + +``` + +```css +h1, h2, p { + text-align: center; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f34a1fd611d003edeafd681.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f34a1fd611d003edeafd681.md new file mode 100644 index 00000000000..338e073ee26 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f34a1fd611d003edeafd681.md @@ -0,0 +1,62 @@ +--- +id: 5f34a1fd611d003edeafd681 +title: Hatua ya 19 +challengeType: 0 +dashedName: step-19 +--- + +# --description-- + +Mandharinyuma hayo ya kahawia hufanya iwe vigumu kusoma maandishi. Badilisha rangi ya mandharinyuma ya `body` kuwa `burlywood` ili iwe na rangi fulani lakini bado unaweza kusoma maandishi. + +# --hints-- + +Unapaswa kuweka kipengele cha `background-color` kuwa `burlywood`. + +```js +const hasBackground = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['background-color'] === 'burlywood'); +assert(hasBackground); +``` + +Kipengele chako cha `body` kinapaswa kuwa na mandharinyuma ya `burlywood`. + +```js +const bodyBackground = new __helpers.CSSHelp(document).getStyle('body')?.getPropertyValue('background-color'); +assert(bodyBackground === 'burlywood'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + +
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+ + +``` + +```css +--fcc-editable-region-- +body { + background-color: brown; +} +--fcc-editable-region-- +h1, h2, p { + text-align: center; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed60785e1f3e9850b6e.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed60785e1f3e9850b6e.md new file mode 100644 index 00000000000..d2713bd7c27 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed60785e1f3e9850b6e.md @@ -0,0 +1,72 @@ +--- +id: 5f356ed60785e1f3e9850b6e +title: Hatua ya 24 +challengeType: 0 +dashedName: step-24 +--- + +# --description-- + +Sasa ni rahisi kuona kwamba maandishi yamewekwa katikati ya kipengele cha `div`. Kwa sasa, upana wa kipengele cha `div` umebainishwa katika pikseli (`px`). Badilisha thamani ya sifa ya `width` kuwa `80%`, ili kuifanya 80% ya upana wa kipengele kikuu chake (`body`). + +# --hints-- + +Unapaswa kuweka sifa ya `width` kuwa `80%`. + +```js +const hasWidth = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style.width === '80%'); +assert(hasWidth); +``` + +Hupaswi kuwa na sifa ya `width` ya `300px`. + +```js +const hasWidth = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style.width === '300px'); +assert(!hasWidth); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + +
+
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+
+ + +``` + +```css +body { + /* + background-color: burlywood; + */ +} + +h1, h2, p { + text-align: center; +} +--fcc-editable-region-- +div { + width: 300px; + background-color: burlywood; +} +--fcc-editable-region-- +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed60a5decd94ab66986.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed60a5decd94ab66986.md new file mode 100644 index 00000000000..a1b962658f1 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed60a5decd94ab66986.md @@ -0,0 +1,77 @@ +--- +id: 5f356ed60a5decd94ab66986 +title: Hatua ya 22 +challengeType: 0 +removeComments: false +dashedName: step-22 +--- + +# --description-- + +Maoni katika CSS yanaonekana hivi: + +```css +/* comment here */ +``` + +Katika laha lako la mtindo, toa maoni kwenye mstari ulio na kipengele na thamani ya `background-color`, ili uweze kuona athari ya kipengele cha kuweka `div` pekee. Hii itafanya mandharinyuma kuwa nyeupe tena. + +# --hints-- + +Unapaswa kutoa maoni kwenye mstari wa `background-color: burlywood;` katika CSS yako. + +```js +assert(code.match(/\/\*\s*background-color:\s*burlywood;?\s*\*\//i)); +``` + + +`body` yako inapaswa kuwa na usuli mweupe. + +```js +const bodyCSS = $('body').css('background-color'); +assert(bodyCSS === "rgba(0, 0, 0, 0)") +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + +
+
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+
+ + +``` + +```css +body { +--fcc-editable-region-- + background-color: burlywood; +--fcc-editable-region-- +} + +h1, h2, p { + text-align: center; +} + +div { + width: 300px; +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed6199b0cdef1d2be8f.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed6199b0cdef1d2be8f.md new file mode 100644 index 00000000000..8600fbbabf8 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed6199b0cdef1d2be8f.md @@ -0,0 +1,83 @@ +--- +id: 5f356ed6199b0cdef1d2be8f +title: Hatua ya 26 +challengeType: 0 +dashedName: step-26 +--- + +# --description-- + +Kufikia sasa umekuwa ukitumia vichaguzi vya aina kuweka mtindo kwa vipengee. class selecto inafafanuliwa kwa jina lililo na nukta moja kwa moja mbele yake, kama hii: + +```css +.class-name { + styles +} +``` + +Badilisha kichaguzi kilichopo cha `div` kuwa kiteuzi cha darasa kwa kubadilisha `div` na class inayoitwa `menu`. + +# --hints-- + +Unapaswa kuwa na kichaguzi cha `.menu`. + +```js +const hasMenu = new __helpers.CSSHelp(document).getStyle('.menu'); +assert(hasMenu); +``` + +Hupaswi kuwa na kichaguzi cha `div`. + +```js +const hasDiv = new __helpers.CSSHelp(document).getStyle('div'); +assert(!hasDiv); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + +
+
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+
+ + +``` + +```css +body { + /* + background-color: burlywood; + */ +} + +h1, h2, p { + text-align: center; +} + +--fcc-editable-region-- +div { + width: 80%; + background-color: burlywood; + margin-left: auto; + margin-right: auto; +} +--fcc-editable-region-- +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed63c7807a4f1e6d054.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed63c7807a4f1e6d054.md new file mode 100644 index 00000000000..a31469cbe8d --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed63c7807a4f1e6d054.md @@ -0,0 +1,74 @@ +--- +id: 5f356ed63c7807a4f1e6d054 +title: Hatua ya 21 +challengeType: 0 +dashedName: step-21 +--- + +# --description-- + +Lengo sasa ni kufanya `div` isichukue upana mzima wa ukurasa. Sifa ya CSS `width` inafaa kwa hili. Unda kichaguzi kipya cha aina katika laha ya mtindo inayoipa kipengele chako cha `div` upana wa `300px`. + +# --hints-- + +Unapaswa kuwa na kichaguzi cha `div`. + +```js +const hasDiv = new __helpers.CSSHelp(document).getStyle('div'); +assert(hasDiv); +``` + +Unapaswa kuweka sifa ya `width` kuwa `300px`. + +```js +const hasWidth = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style.width === '300px'); +assert(hasWidth); +``` + +`div` yako inapaswa kuwa na upana wa 300px. + +```js +const divWidth = new __helpers.CSSHelp(document).getStyle('div')?.getPropertyValue('width'); +assert(divWidth === '300px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + +
+
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+
+ + +``` + +```css +--fcc-editable-region-- +body { + background-color: burlywood; +} + +h1, h2, p { + text-align: center; +} +--fcc-editable-region-- + +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed63e0fa262326eef05.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed63e0fa262326eef05.md new file mode 100644 index 00000000000..80c9b5ddc2d --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed63e0fa262326eef05.md @@ -0,0 +1,72 @@ +--- +id: 5f356ed63e0fa262326eef05 +title: Hatua ya 23 +challengeType: 0 +dashedName: step-23 +--- + +# --description-- + +Sasa tumia kichaguzi cha `div` kilichopo ili kuweka rangi ya usuli ya kipengele cha `div` kuwa `burlywood`. + +# --hints-- + +Unapaswa kuweka kipengele cha `background-color` kuwa `burlywood`. + +```js +const hasBackgroundColor = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['background-color'] === 'burlywood'); +assert(hasBackgroundColor); +``` + +`div` yako inapaswa kuwa na usuli wa burlywood. + +```js +const divBackground = new __helpers.CSSHelp(document).getStyle('div')?.getPropertyValue('background-color'); +assert(divBackground === 'burlywood'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + +
+
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+
+ + +``` + +```css +body { + /* + background-color: burlywood; + */ +} + +h1, h2, p { + text-align: center; +} + +--fcc-editable-region-- +div { + width: 300px; +} +--fcc-editable-region-- +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed656a336993abd9f7c.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed656a336993abd9f7c.md new file mode 100644 index 00000000000..f88d2670565 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed656a336993abd9f7c.md @@ -0,0 +1,81 @@ +--- +id: 5f356ed656a336993abd9f7c +title: Hatua ya 25 +challengeType: 0 +dashedName: step-25 +--- + +# --description-- + +Kisha, ungependa kuweka `div` katikati kwa mlalo. Unaweza kufanya hivi kwa kuweka sifa za `margin-left` na `margin-right` kuwa `auto`. Fikiria ukingo kama nafasi isiyoonekana karibu na kipengele. Kwa kutumia sifa hizi mbili za ukingo, weka katikati ya kipengele cha `div` ndani ya kipengele cha `body`. + +# --hints-- + +Unapaswa kuweka sifa ya `margin-left` kuwa `auto`. + +```js +const hasMargin = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['margin-left'] === 'auto'); +assert(hasMargin); +``` + +Unapaswa kuweka sifa ya `margin-right` kuwa `auto`. + +```js +const hasMargin = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['margin-right'] === 'auto'); +assert(hasMargin); +``` + +Unapaswa kuweka sifa za `margin-left` na `margin-right` za `div` yako kuwa `auto`. + +```js +const divMarginRight = new __helpers.CSSHelp(document).getStyle('div')?.getPropertyValue('margin-right'); +const divMarginLeft = new __helpers.CSSHelp(document).getStyle('div')?.getPropertyValue('margin-left'); +assert(divMarginRight === 'auto'); +assert(divMarginLeft === 'auto'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + +
+
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+
+ + +``` + +```css +body { + /* + background-color: burlywood; + */ +} + +h1, h2, p { + text-align: center; +} + +--fcc-editable-region-- +div { + width: 80%; + background-color: burlywood; +} +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed69db0a491745e2bb6.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed69db0a491745e2bb6.md new file mode 100644 index 00000000000..d5ee9c3ef67 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed69db0a491745e2bb6.md @@ -0,0 +1,73 @@ +--- +id: 5f356ed69db0a491745e2bb6 +title: Hatua ya 27 +challengeType: 0 +dashedName: step-27 +--- + +# --description-- + +Ili kutumia mtindo wa class kwenye kipengele cha `div`, ongeza sifa ya `class` kwenye tagi ya ufunguzi ya kipengele cha `div` na uweke thamani yake kuwa `menu`. + +# --hints-- + +`div` yako bado inapaswa kutoa majibu. Hakikisha kuwa hujaharibu tagi ya `
`. + +```js +assert($('div').length === 1); +``` + +Kipengele chako cha `div` kinapaswa kuwa na class ya `menu`. + +```js +assert($('div').attr('class').includes('menu')); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + +--fcc-editable-region-- +
+--fcc-editable-region-- +
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+
+ + +``` + +```css +body { + /* + background-color: burlywood; + */ +} + +h1, h2, p { + text-align: center; +} + +.menu { + width: 80%; + background-color: burlywood; + margin-left: auto; + margin-right: auto; +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed6cf6eab5f15f5cfe6.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed6cf6eab5f15f5cfe6.md new file mode 100644 index 00000000000..8ff18a66d89 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f356ed6cf6eab5f15f5cfe6.md @@ -0,0 +1,75 @@ +--- +id: 5f356ed6cf6eab5f15f5cfe6 +title: Hatua ya 20 +challengeType: 0 +dashedName: step-20 +--- + +# --description-- + +Kipengele cha `div` hutumiwa hasa kwa madhumuni ya muundo, tofauti na vipengele vingine vya maudhui ambavyo umetumia kufikia sasa. Ongeza kipengele cha `div` ndani ya kipengele cha `body` kisha usogeze vipengele vingine vyote ndani ya `div` mpya. + +# --hints-- + +Unapaswa kuwa na tagi ya kufungua ya `
`. + +```js +assert(code.match(/
/i)); +``` + +Unapaswa kuwa na tagi ya kufunga ya `
`. + +```js +assert(code.match(/<\/div>/i)); +``` + +Hupaswi kubadilisha kipengele chako cha `body` kilichopo. Hakikisha kuwa hukufuta tagi ya kufunga. + +```js +assert($('body').length === 1); +``` + +Tagi yako ya `div` inapaswa kuwa ndani ya `body`. + +```js +const div = $('div')[0]; +assert(div.parentElement.tagName === 'BODY'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + +--fcc-editable-region-- + +
+

CAMPER CAFE

+

Est. 2020

+
+

Coffee

+
+
+ +--fcc-editable-region-- + +``` + +```css +body { + background-color: burlywood; +} + +h1, h2, p { + text-align: center; +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f35e5c4321f818cdc4bed30.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f35e5c4321f818cdc4bed30.md new file mode 100644 index 00000000000..a69fc6623ed --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f35e5c4321f818cdc4bed30.md @@ -0,0 +1,84 @@ +--- +id: 5f35e5c4321f818cdc4bed30 +title: Hatua ya 29 +challengeType: 0 +dashedName: step-29 +--- + +# --description-- + +Inaonekana vizuri. Ni wakati wa kuanza kuongeza baadhi ya vipengee vya menyu. Ongeza kipengele tupu cha `article` chini ya kichwa cha `Coffee`. Itakuwa na ladha na bei ya kila kahawa unayotoa kwa sasa. + +# --hints-- + +Unapaswa kuwa na tagi ya `
` ya kufungua. + +```js +assert(code.match(/
/i)); +``` + +Unapaswa kuwa na tagi ya kufunga ya `
`. + +```js +assert(code.match(/<\/article>/i)); +``` + +Hupaswi kubadilisha kipengele cha `h2` kilichopo. + +```js +assert($('h2').length === 1); +``` + +Kipengele chako cha `article` kinapaswa kuja baada ya kipengele chako cha `h2`. + +```js +const article = $('article')[0]; +assert(article.previousElementSibling.tagName === 'H2'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```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; +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f35e5c44359872a137bd98f.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f35e5c44359872a137bd98f.md new file mode 100644 index 00000000000..119835b06f7 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f35e5c44359872a137bd98f.md @@ -0,0 +1,90 @@ +--- +id: 5f35e5c44359872a137bd98f +title: Hatua ya 28 +challengeType: 0 +dashedName: step-28 +--- + +# --description-- + +Kwa kuwa bidhaa kuu ya mkahawa inyouzwa ni kahawa, unaweza kutumia picha ya kahawa kwa mandharinyuma ya ukurasa. + +Futa maoni na yaliyomo ndani ya kiteuzi cha aina ya `body`. Sasa ongeza kipengele cha `background-image` na uweke thamani yake kuwa `url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg)`. + +# --hints-- + +Unapaswa kuondoa sifa ya `background-color` iliyowekewa maoni. + +```js +assert(!code.match(/\/\*\s*background-color:\s*burlywood;?\s*\*\//i)) +``` + +Kichaguzi chako cha `body` hakifai kuwa na maoni yoyote. + +```js +assert(!code.match(/body\s*{\s*\/\*/i)); +``` + +Unapaswa kuweka `background-image` kuwa `url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg)`. + +```js +const hasBackground = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['background-image'] === `url("https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg")`) +assert(hasBackground) +``` + +Kipengele chako cha `body` kinapaswa kuwa na picha ya mandharinyuma ya kahawa. + +```js +const bodyBackground = new __helpers.CSSHelp(document).getStyle('body')?.getPropertyValue('background-image'); +console.log(bodyBackground); +assert(bodyBackground === `url("https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg")`); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```css +--fcc-editable-region-- +body { + /* + background-color: burlywood; + */ +} +--fcc-editable-region-- + +h1, h2, p { + text-align: center; +} + +.menu { + width: 80%; + background-color: burlywood; + margin-left: auto; + margin-right: auto; +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866d0fc037f7311b4ac8.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866d0fc037f7311b4ac8.md new file mode 100644 index 00000000000..abcad0314a9 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866d0fc037f7311b4ac8.md @@ -0,0 +1,105 @@ +--- +id: 5f3c866d0fc037f7311b4ac8 +title: Hatua ya 38 +challengeType: 0 +dashedName: step-38 +--- + +# --description-- + +Hiyo ni karibu, lakini bei haikukaa upande wa kulia. Hii ni kwa sababu vipengele vya `inline-block` huchukua tu upana wa maudhui yake. Ili kuzieneza, ongeza kipengele cha `width` kwa viteuzi vya darasa vya `flavor` na `price` ambavyo vina thamani ya `50%` kila moja. + +# --hints-- + +Unapaswa kuweka sifa ya `width` kuwa `50%` katika kiteuzi chako cha `.flavor`. + +```js +const flavorWidth = new __helpers.CSSHelp(document).getStyle('.flavor')?.getPropertyValue('width'); +assert(flavorWidth === '50%'); +``` + +Unapaswa kuweka sifa ya `width` kuwa `50%` katika kiteuzi chako cha `.price`. + +```js +const priceWidth = new __helpers.CSSHelp(document).getStyle('.price')?.getPropertyValue('width'); +assert(priceWidth === '50%'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```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; +} + +.item p { + display: inline-block; +} + +--fcc-editable-region-- +.flavor { + text-align: left; +} + +.price { + text-align: right; +} +--fcc-editable-region-- +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866d28d7ad0de6470505.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866d28d7ad0de6470505.md new file mode 100644 index 00000000000..d3b8e3351fc --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866d28d7ad0de6470505.md @@ -0,0 +1,98 @@ +--- +id: 5f3c866d28d7ad0de6470505 +title: Hatua ya 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +Flavor na prices kwa sasa zimepangwa juu ya nyingine na kuzingatia vipengele vyake husika vya `p`. Itakuwa nzuri ikiwa flavor itakuwa upande wa kushoto na price upande wa kulia. + +Ongeza jina la darasa `flavor` kwenye kipengele cha `p` cha`French Vanilla`. + +# --hints-- + +Unapaswa kuongeza class ya `flavor` kwenye kipengele chako `p`. + +```js +assert(code.match(//i)); +``` + +Unapaswa kuwa na kipengele kimoja pekee chenye class ya `flavor`. + +```js +assert($('.flavor').length === 1); +``` + +Class yako ya `flavor` inapaswa kuwa kwenye kipengele cha `p` chenye maandishi `French Vanilla`. + +```js +assert($('.flavor')[0].innerText.match(/French Vanilla/i)); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```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; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866d5414453fc2d7b480.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866d5414453fc2d7b480.md new file mode 100644 index 00000000000..a91135a96db --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866d5414453fc2d7b480.md @@ -0,0 +1,126 @@ +--- +id: 5f3c866d5414453fc2d7b480 +title: Hatua ya 31 +challengeType: 0 +dashedName: step-31 +--- + +# --description-- + +Kuanzia chini ya jozi iliyopo ya kahawa/bei, ongeza kahawa na bei zifuatazo kwa kutumia vipengele vya `article` vyenye vipengee viwili vya `p` vilivyowekwa ndani ya kila moja. Kama hapo awali, maandishi ya kipengele cha kwanza cha `p` yanapaswa kuwa na ladha ya kahawa na maandishi ya `p` ya pili yanapaswa kuwa na bei. + +```bash +Caramel Macchiato 3.75 +Pumpkin Spice 3.50 +Hazelnut 4.00 +Mocha 4.50 +``` + +# --hints-- + +Unapaswa kuwa na vipengele vitano vya `article`. + +```js +assert($('article').length === 5); +``` + +Kila kipengele cha `article` kinafaa kuwa na vipengele viwili vya `p`. + +```js +const articles = $('article'); +assert(articles[0].children.length === 2); +assert(articles[1].children.length === 2); +assert(articles[2].children.length === 2); +assert(articles[3].children.length === 2); +assert(articles[4].children.length === 2); +``` + +Kipengele chako cha kwanza cha `article` kinapaswa kuwa na vipengele vya `p` vyenye maandishi `French Vanilla` na `3.00`. + +```js +const children = $('article')[0].children; +assert(children[0].innerText.match(/French Vanilla/i)); +assert(children[1].innerText.match(/3\.00/i)); +``` + +Kipengele chako cha pili cha `article` kinapaswa kuwa na vipengele vya `p` vyenye maandishi `Caramel Macchiato` na `3.75`. + +```js +const children = $('article')[1].children; +assert(children[0].innerText.match(/Caramel Macchiato/i)); +assert(children[1].innerText.match(/3\.75/i)); +``` + +Kipengele chako cha tatu cha `article` kinapaswa kuwa na vipengele vya `p` vyenye maandishi `Pumpkin Spice` na `3.50`. + +```js +const children = $('article')[2].children; +assert(children[0].innerText.match(/Pumpkin Spice/i)); +assert(children[1].innerText.match(/3\.50/i)); +``` + +Kipengele chako cha nne cha `article` kinapaswa kuwa na vipengele vya `p` vyenye maandishi `Hazelnut` na `4.00`. + +```js +const children = $('article')[3].children; +assert(children[0].innerText.match(/Hazelnut/i)); +assert(children[1].innerText.match(/4\.00/i)); +``` + +Kipengele chako cha tano cha `article` kinapaswa kuwa na vipengele vya `p` vyenye maandishi `Mocha` na `4.50`. + +```js +const children = $('article')[4].children; +assert(children[0].innerText.match(/Mocha/i)); +assert(children[1].innerText.match(/4\.50/i)); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```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; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866daec9a49519871816.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866daec9a49519871816.md new file mode 100644 index 00000000000..d882e939570 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866daec9a49519871816.md @@ -0,0 +1,86 @@ +--- +id: 5f3c866daec9a49519871816 +title: Hatua ya 30 +challengeType: 0 +dashedName: step-30 +--- + +# --description-- + +Vipengele vya `article` kwa kawaida huwa na vipengele vingi ambavyo vina taarifa zinazohusiana. Katika kesi hii, itakuwa na ladha ya kahawa na bei ya ladha hiyo. Ongeza vipengele viwili vya `p` ndani ya kipengele chako `article`. Maandishi ya wa kwanza yanapaswa kuwa `French Vanilla`, na ya pili `3.00`. + +# --hints-- + +Hupaswi kubadilisha kipengele cha kilichopo cha `article`. + +```js +assert($('article').length === 1); +``` + +Kipengele chako cha `article` kinapaswa kuwa na vipengele viwili vya `p`. + +```js +assert($('article').children('p').length === 2); +``` + +Kipengele chako cha kwanza cha `p` kinapaswa kuwa na maandishi `French Vanilla`. + +```js +const firstP = $('article').children('p')[0]; +assert(firstP.innerText.match(/French Vanilla/i)); +``` + +Kipengele chako cha pili cha `p` kinapaswa kuwa na maandishi `3.00`. + +```js +const secondP = $('article').children('p')[1]; +assert(secondP.innerText.match(/3\.00/i)); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```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; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866dbf362f99b9a0c6d0.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866dbf362f99b9a0c6d0.md new file mode 100644 index 00000000000..13582e5c920 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866dbf362f99b9a0c6d0.md @@ -0,0 +1,115 @@ +--- +id: 5f3c866dbf362f99b9a0c6d0 +title: Hatua ya 37 +challengeType: 0 +dashedName: step-37 +--- + +# --description-- + +Vipengele vya `p` vimewekwa katika kipengele cha `article` chenye sifa ya darasa ya `item`. Unaweza kuweka mtindo kwa vipengele vyote vya `p` vilivyowekwa mahali popote katika vipengele kwa darasa linaloitwa `item` kama hii: + +```css +.item p { } +``` + +Kwa kutumia kichaguzi kilicho hapo juu, ongeza kipengele cha `display` chenye thamani `inline-block` ili vipengele vya `p` viwe zaidi kama vipengele vya ndani. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `.item p`. + +```js +const hasItemP = new __helpers.CSSHelp(document).getStyle('.item p'); +assert(hasItemP); +``` + +Unapaswa kuweka sifa ya `display` kuwa `inline-block`. + +```js +const hasDisplay = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style.display === 'inline-block'); +assert(hasDisplay); +``` + +Kichaguzi chako cha `.item p` kinapaswa kuweka sifa ya `display` kuwa `inline-block`. + +```js +const itemPDisplay = new __helpers.CSSHelp(document).getStyle('.item p')?.getPropertyValue('display'); +assert(itemPDisplay === 'inline-block'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```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; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.flavor { + text-align: left; +} + +.price { + text-align: right; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866dd0d0275f01d4d847.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866dd0d0275f01d4d847.md new file mode 100644 index 00000000000..01f7c77686b --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866dd0d0275f01d4d847.md @@ -0,0 +1,109 @@ +--- +id: 5f3c866dd0d0275f01d4d847 +title: Hatua ya 39 +challengeType: 0 +dashedName: step-39 +--- + +# --description-- + +Naam, hiyo haikufanya kazi. Kuweka vipengele vya `p` kama `inline-block` na kuviweka kwenye mistari tofauti katika msimbo huunda nafasi ya ziada upande wa kulia wa kipengele cha kwanza cha `p`, na kusababisha ya pili kuhama hadi mstari unaofuata. Njia moja ya kurekebisha hili ni kufanya kila kipengele cha `p` kuwa na upana kidogo chini ya `50%`. + +Badilisha thamani ya `width` iwe `49%` kwa kila darasa ili kuona kitakachotokea. + +# --hints-- + +Unapaswa kuweka sifa ya `width` kuwa `49%` katika kiteuzi chako cha `.flavor`. + +```js +const flavorWidth = new __helpers.CSSHelp(document).getStyle('.flavor')?.getPropertyValue('width'); +assert(flavorWidth === '49%'); +``` + +Unapaswa kuweka sifa ya `width` kuwa `49%` katika kiteuzi chako cha `.price`. + +```js +const priceWidth = new __helpers.CSSHelp(document).getStyle('.price')?.getPropertyValue('width'); +assert(priceWidth === '49%'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```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; +} + +.item p { + display: inline-block; +} + +--fcc-editable-region-- +.flavor { + text-align: left; + width: 50%; +} + +.price { + text-align: right; + width: 50%; +} +--fcc-editable-region-- +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866de7a5b784048f94b1.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866de7a5b784048f94b1.md new file mode 100644 index 00000000000..406b529a8eb --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3c866de7a5b784048f94b1.md @@ -0,0 +1,106 @@ +--- +id: 5f3c866de7a5b784048f94b1 +title: Hatua ya 36 +challengeType: 0 +dashedName: step-36 +--- + +# --description-- + +Hiyo ni aina ya kile unachotaka, lakini sasa itakuwa vyema ikiwa flavor na price zingekuwa kwenye mstari mmoja. Vipengele vya `p` ni vipengee vya block-level, kwa hivyo huchukua upana mzima wa kipengele chao kikuu. + +Ili kuziweka kwenye mstari sawa, unahitaji kutumia mtindo fulani kwenye vipengele vya `p` ili vifanye kama vipengele vya inline. Ili kufanya hivyo, anza kwa kuongeza sifa ya `class` yenye thamani `item` kwa kipengele cha kwanza cha `article` chini ya kichwa `Coffee`. + +# --hints-- + +Unapaswa kutumia class ya `item` kwenye kipengele chako `article`. + +```js +assert(code.match(//i)) +``` + +Unapaswa kuwa na kipengele kimoja pekee chenye class ya `item`. + +```js +assert($('.item').length === 1); +``` + +Kipengele chako cha kwanza cha `article` kinapaswa kuwa na class ya `item`. + +```js +assert($('article')[0].className === 'item'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```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; +} + +.flavor { + text-align: left; +} + +.price { + text-align: right; +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade94c6576e7f7b7953f.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade94c6576e7f7b7953f.md new file mode 100644 index 00000000000..c081f69dec7 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade94c6576e7f7b7953f.md @@ -0,0 +1,106 @@ +--- +id: 5f3cade94c6576e7f7b7953f +title: Hatua ya 41 +challengeType: 0 +dashedName: step-41 +--- + +# --description-- + +Sasa endelea na ubadilishe upana wa class yla `flavor` na `price` hadi `50%` tena. + +# --hints-- + +Unapaswa kuweka sifa ya `width` kuwa `50%` katika kiteuzi chako cha `.flavor`. + +```js +const flavorWidth = new __helpers.CSSHelp(document).getStyle('.flavor')?.getPropertyValue('width'); +assert(flavorWidth === '50%'); +``` + +Unapaswa kuweka sifa ya `width` kuwa `50%` katika kiteuzi chako cha `.price`. + +```js +const priceWidth = new __helpers.CSSHelp(document).getStyle('.price')?.getPropertyValue('width'); +assert(priceWidth === '50%'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```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; +} + +.item p { + display: inline-block; +} + +--fcc-editable-region-- +.flavor { + text-align: left; + width: 49%; +} + +.price { + text-align: right; + width: 49%; +} +--fcc-editable-region-- +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade9993019e26313fa8e.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade9993019e26313fa8e.md new file mode 100644 index 00000000000..b4189cd94c2 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade9993019e26313fa8e.md @@ -0,0 +1,117 @@ +--- +id: 5f3cade9993019e26313fa8e +title: Hatua ya 42 +challengeType: 0 +dashedName: step-42 +--- + +# --description-- + +Kwa kuwa sasa unajua inafanya kazi, unaweza kubadilisha vipengee vilivyosalia vya `article` na `p` ili kuendana na seti ya kwanza. Anza kwa kuongeza class `item` kwa vipengele vingine vya `article`. + +# --hints-- + +Unapaswa kuwa na vipengele vitano vya `article`. + +```js +assert($('article').length === 5); +``` + +Unapaswa kuwa na vipengele vitano pekee vya `.item`. + +```js +assert($('.item').length === 5); +``` + +Vipengele vyako vya `.item` vinapaswa kuwa vipengele vyako vya `article`. + + +```js +const articles = $('article'); +const items = $('.item'); +assert(articles[0] === items[0]); +assert(articles[1] === items[1]); +assert(articles[2] === items[2]); +assert(articles[3] === items[3]); +assert(articles[4] === items[4]); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```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; +} + +.item p { + display: inline-block; +} + +.flavor { + text-align: left; + width: 50%; +} + +.price { + text-align: right; + width: 50%; +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade99dda4e6071a85dfd.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade99dda4e6071a85dfd.md new file mode 100644 index 00000000000..16057b9ddef --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade99dda4e6071a85dfd.md @@ -0,0 +1,112 @@ +--- +id: 5f3cade99dda4e6071a85dfd +title: Hatua ya 46 +challengeType: 0 +dashedName: step-46 +--- + +# --description-- + +Utarudi kutengeneza menyu katika hatua chache, lakini kwa sasa, endelea na uongeze kipengele cha pili cha `section` chini ya cha kwanza kwa ajili ya kuonyesha vitandamra vinavyotolewa na mkahawa. + +# --hints-- + +Unapaswa kuwa na tagi ya kufungua `section`. + +```js +assert(code.match(/
/ig).length === 2); +``` + +Unapaswa kuwa na tagi ya kufunga ya `section`. + +```js +assert(code.match(/<\/section>/ig).length === 2); +``` + +Hupaswi kubadilisha kipengele cha `main` kilichopo. + +```js +assert($('main').length === 1); +``` + +Kipengee chako kipya cha `section` kinapaswa kuwekwa katika kipengele cha `main`. + +```js +assert($('main').children('section').length === 2); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```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; +} + +.item p { + display: inline-block; +} + +.flavor { + text-align: left; + width: 75%; +} + +.price { + text-align: right; + width: 25% +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade9fa77275d9f4efe62.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade9fa77275d9f4efe62.md new file mode 100644 index 00000000000..0e58f6cac6b --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3cade9fa77275d9f4efe62.md @@ -0,0 +1,101 @@ +--- +id: 5f3cade9fa77275d9f4efe62 +title: Hatua ya 40 +challengeType: 0 +dashedName: step-40 +--- + +# --description-- + +Hiyo ilifanya kazi, lakini bado kuna nafasi kidogo upande wa kulia wa price. + +Unaweza kuendelea kujaribu asilimia tofauti kwa upana. Badala yake, tumia kitufe cha nafasi ya nyuma kwenye kibodi yako ili kusogeza kipengele cha `p` chenye class ya `price` karibu na kipengele cha `p` chenye class ya `flavor` ili ziwe kwenye mstari mmoja katika kihariri. Hakikisha hakuna nafasi kati yao. + +# --hints-- + +Vipengele vyako vya `p` havipaswi kuwa na nafasi kati yao. + +```js +assert(code.match(/Vanilla<\/p>

+ + + + + Cafe Menu + + + +

+ + +``` + +```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; +} + +.item p { + display: inline-block; +} + +.flavor { + text-align: left; + width: 49%; +} + +.price { + text-align: right; + width: 49%; +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e01f288a026d709587.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e01f288a026d709587.md new file mode 100644 index 00000000000..3d796edefad --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e01f288a026d709587.md @@ -0,0 +1,156 @@ +--- +id: 5f3ef6e01f288a026d709587 +title: Hatua ya 66 +challengeType: 0 +dashedName: step-66 +--- + +# --description-- + +Unaweza kutumia kipengele cha `hr` ili kuonyesha kigawanyaji kati ya sehemu za maudhui tofauti. + +Kwanza, ongeza kipengele cha `hr` kati ya kipengele cha `p` chenye class ya `established` na `section` ya kwanza. Kumbuka kuwa vipengele vya `hr` vinajifunga. + +# --hints-- + +Unapaswa kuongeza kipengele cha `hr`. Vipengele vya `hr` vinajifunga. + +```js +assert(code.match(//i)); +assert(!code.match(/<\/hr>/i)); +``` + +Hupaswi kubadilisha kipengele chako cha `p` kilicho na class ya `established`. + +```js +assert($('p.established').length === 1); +``` + +Hupaswi kubadilisha kipengele chako cha `main` kilichopo. + +```js +assert($('main').length === 1); +``` + +Kipengele chako cha `hr` kinapaswa kuwa kati ya kipengele chako cha `p` na kipengele chako cha `section`. + +```js +assert($('hr')[0].previousElementSibling.tagName === 'P'); +assert($('hr')[0].nextElementSibling.tagName === 'SECTION'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```css +body { + background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg); + font-family: sans-serif; +} + +h1 { + font-size: 40px; +} + +h2 { + font-size: 30px; +} + +.established { + font-style: italic; +} + +h1, h2, p { + text-align: center; +} + +.menu { + width: 80%; + background-color: burlywood; + margin-left: auto; + margin-right: auto; + padding: 20px; + max-width: 500px; +} + +h1, h2 { + font-family: Impact, serif; +} + +.item p { + display: inline-block; +} + +.flavor, .dessert { + text-align: left; + width: 75%; +} + +.price { + text-align: right; + width: 25% +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e03d719d5ac4738993.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e03d719d5ac4738993.md new file mode 100644 index 00000000000..a4707a0cc92 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e03d719d5ac4738993.md @@ -0,0 +1,120 @@ +--- +id: 5f3ef6e03d719d5ac4738993 +title: Hatua ya 56 +challengeType: 0 +dashedName: step-56 +--- + +# --description-- + +Upana wa sasa wa menyu daima utachukua 80% ya upana wa kipengele cha `body`. Kwenye skrini pana sana, kahawa na dessert huonekana mbali sana na bei zao. + +Ongeza kipengele cha `max-width` kwenye class ya `menu` yenye thamani ya `500px` ili kukizuia kukua zaidi. + +# --hints-- + +Unapaswa kuweka sifa ya `max-width` kuwa `500px`. + +```js +const hasMaxWidth = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['max-width'] === '500px'); +assert(hasMaxWidth); +``` + +Kipengele chako cha `.menu` kinapaswa kuwa na `max-width` ya `500px`. + +```js +const menuMaxWidth = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('max-width'); +assert(menuMaxWidth === '500px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```css +body { + background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg); +} + +h1, h2, p { + text-align: center; +} + +--fcc-editable-region-- +.menu { + width: 80%; + background-color: burlywood; + margin-left: auto; + margin-right: auto; + padding: 20px; +} +--fcc-editable-region-- + +.item p { + display: inline-block; +} + +.flavor, .dessert { + text-align: left; + width: 75%; +} + +.price { + text-align: right; + width: 25% +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e04559b939080db057.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e04559b939080db057.md new file mode 100644 index 00000000000..94c98dc40cb --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e04559b939080db057.md @@ -0,0 +1,145 @@ +--- +id: 5f3ef6e04559b939080db057 +title: Hatua ya 55 +challengeType: 0 +dashedName: step-55 +--- + +# --description-- + +Kwa kuwa pande zote 4 za menyu zina nafasi sawa ya ndani, endelea na ufute sifa nne na utumie kipengele kimoja cha `padding` chenye thamani `20px`. + +# --hints-- + +Unapaswa kuondoa kipengele cha `padding-left`. + +```js +assert(!code.match(/padding-left/i)); +``` + +Unapaswa kuondoa kipengele cha `padding-right`. + +```js +assert(!code.match(/padding-right/i)); +``` + +Unapaswa kuondoa kipengele cha `padding-top`. + +```js +assert(!code.match(/padding-top/i)); +``` + +Unapaswa kuondoa kipengele cha `padding-bottom`. + +```js +assert(!code.match(/padding-bottom/i)); +``` + +Unapaswa kuweka kipengele cha `padding` kuwa `20px`. + +```js +const hasPadding = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['padding'] === '20px'); +assert(hasPadding); +``` + +Kipengele chako cha `.menu` kinapaswa kuwa na thamani ya `padding` ya `20px`. + +```js +const menuPadding = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding'); +assert(menuPadding === '20px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```css +body { + background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg); +} + +h1, h2, p { + text-align: center; +} + +--fcc-editable-region-- +.menu { + width: 80%; + background-color: burlywood; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; + padding-top: 20px; + padding-bottom: 20px; +} +--fcc-editable-region-- + +.item p { + display: inline-block; +} + +.flavor, .dessert { + text-align: left; + width: 75%; +} + +.price { + text-align: right; + width: 25% +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e050279c7a4a7101d3.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e050279c7a4a7101d3.md new file mode 100644 index 00000000000..8cabc566f2f --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e050279c7a4a7101d3.md @@ -0,0 +1,142 @@ +--- +id: 5f3ef6e050279c7a4a7101d3 +title: Hatua ya 54 +challengeType: 0 +dashedName: step-54 +--- + +# --description-- + +Hiyo inaonekana bora zaidi. Sasa jaribu kuongeza padding sawa ya `20px` juu na chini ya menyu. + +# --hints-- + +Hupaswi kuondoa sifa za `padding-left` au `padding-right`. + +```js +const paddingLeft = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding-left'); +assert(paddingLeft === '20px'); +const paddingRight = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding-right'); +assert(paddingRight === '20px'); +``` + +Unapaswa kuweka kipengele cha `padding-top` kuwa `20px`. + +```js +const hasPaddingTop = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['padding-top'] === '20px'); +assert(hasPaddingTop); +``` + +Unapaswa kuweka kipengele cha `padding-bottom` kuwa `20px`. + +```js +const hasPaddingBottom = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['padding-top'] === '20px'); +assert(hasPaddingBottom); +``` + +Kipengele chako cha `.menu` kinapaswa kuwa na `padding-top` ya `20px`. + +```js +const menuPaddingTop = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding-top'); +assert(menuPaddingTop === '20px'); +``` + +Kipengele chako cha `.menu` kinapaswa kuwa na `padding-bottom` ya `20px`. + +```js +const menuPaddingBottom = new __helpers.CSSHelp(document).getStyle('.menu')?.getPropertyValue('padding-bottom'); +assert(menuPaddingBottom === '20px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```css +body { + background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg); +} + +h1, h2, p { + text-align: center; +} + +--fcc-editable-region-- +.menu { + width: 80%; + background-color: burlywood; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; +} +--fcc-editable-region-- + +.item p { + display: inline-block; +} + +.flavor, .dessert { + text-align: left; + width: 75%; +} + +.price { + text-align: right; + width: 25% +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e05473f91f948724ab.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e05473f91f948724ab.md new file mode 100644 index 00000000000..e8aca4fb2aa --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e05473f91f948724ab.md @@ -0,0 +1,119 @@ +--- +id: 5f3ef6e05473f91f948724ab +title: Hatua ya 57 +challengeType: 0 +dashedName: step-57 +--- + +# --description-- + +Unaweza kubadilisha `font-family` ya maandishi, ili kuifanya ionekane tofauti na fonti chaguomsingi ya kivinjari chako. Kila kivinjari kina fonti za kawaida zinazopatikana kwake. + +Badilisha maandishi yote katika `body` yako, kwa kuongeza kipengele cha `font-family` chenye thamani `sans-serif`. Hii ni fonti ya kawaida ambayo inasomeka kwa urahisi. + +# --hints-- + +Unapaswa kuweka sifa ya `font-family` kuwa `sans-serif`. + +```js +const hasFontFamily = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['font-family'] === 'sans-serif'); +``` + +`body` yako inapaswa kuwa na `font-family` ya `sans-serif`. + +```js +const bodyFontFamily = new __helpers.CSSHelp(document).getStyle('body')?.getPropertyValue('font-family'); +assert(bodyFontFamily === 'sans-serif'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```css +--fcc-editable-region-- +body { + background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg); +} +--fcc-editable-region-- + +h1, h2, p { + text-align: center; +} + +.menu { + width: 80%; + background-color: burlywood; + margin-left: auto; + margin-right: auto; + padding: 20px; + max-width: 500px; +} + +.item p { + display: inline-block; +} + +.flavor, .dessert { + text-align: left; + width: 75%; +} + +.price { + text-align: right; + width: 25% +} +``` diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e056bdde6ae6892ba2.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e056bdde6ae6892ba2.md new file mode 100644 index 00000000000..b6afab593d0 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e056bdde6ae6892ba2.md @@ -0,0 +1,136 @@ +--- +id: 5f3ef6e056bdde6ae6892ba2 +title: Hatua ya 58 +challengeType: 0 +dashedName: step-58 +--- + +# --description-- + +Inachosha kidogo kwa maandishi yote kuwa na `font-family` sawa. Bado unaweza kuwa na maandishi mengi `sans-serif` na kufanya tu vipengele vya `h1` na `h2` kuwa tofauti kwa kutumia kiteuzi tofauti. + +Weka mtindo kwa vipengele vya `h1` na `h2` ili maandishi ya vipengele hivi pekee yatumie fonti ya `Impact`. + +# --hints-- + +Unapaswa kutumia kichaguzi cha `h1, h2`. + +```js +const h1h2Selector = new __helpers.CSSHelp(document).getStyle('h1, h2'); +assert(h1h2Selector); +``` + +Unapaswa kuweka `font-family` kuwa `Impact`. + +```js +const hasFontFamily = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['font-family'] === 'Impact'); +assert(hasFontFamily); +``` + +Kipengele chako cha `h1` kinapaswa kuwa na `font-family` ya `Impact`. + +```js +assert($('h1').css('font-family').match(/impact/i)); +``` + +Kipengele chako cha `h2` kinapaswa kuwa na `font-family` ya `Impact`. + +```js +assert($('h2').css('font-family').match(/impact/i)); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```css +body { + background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg); + font-family: sans-serif; +} + +h1, h2, p { + text-align: center; +} + +.menu { + width: 80%; + background-color: burlywood; + margin-left: auto; + margin-right: auto; + padding: 20px; + max-width: 500px; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.item p { + display: inline-block; +} + +.flavor, .dessert { + text-align: left; + width: 75%; +} + +.price { + text-align: right; + width: 25% +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e06d34faac0447fc44.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e06d34faac0447fc44.md new file mode 100644 index 00000000000..3739588a07f --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e06d34faac0447fc44.md @@ -0,0 +1,133 @@ +--- +id: 5f3ef6e06d34faac0447fc44 +title: Hatua ya 60 +challengeType: 0 +dashedName: step-60 +--- + +# --description-- + +Fanya maandishi ya `Est. 2020` kuwa na muundo wa italiki kwa kuunda kiteuzi cha class ya `established` na kuipa `font-style` yenye thamani ya `italic`. + +# --hints-- + +Unapaswa kuwa na kichaguzi cha `.established`. + +```js +const hasEstablished = new __helpers.CSSHelp(document).getStyle('.established'); +assert(hasEstablished); +``` + +Unapaswa kuweka `font-style` kuwa `italic`. + +```js +const hasFontStyle = new __helpers.CSSHelp(document).getCSSRules().some(x => x.style['font-style'] === 'italic'); +assert(hasFontStyle); +``` + +Kichaguzi chako cha `.established` kinafaa kuweka `font-style` kuwa `italic`. + +```js +const establishedFontStyle = new __helpers.CSSHelp(document).getStyle('.established')?.getPropertyValue('font-style'); +assert(establishedFontStyle === 'italic'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Cafe Menu + + + + + + +``` + +```css +body { + background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg); + font-family: sans-serif; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +h1, h2, p { + text-align: center; +} + +.menu { + width: 80%; + background-color: burlywood; + margin-left: auto; + margin-right: auto; + padding: 20px; + max-width: 500px; +} + +h1, h2 { + font-family: Impact, serif; +} + +.item p { + display: inline-block; +} + +.flavor, .dessert { + text-align: left; + width: 75%; +} + +.price { + text-align: right; + width: 25% +} +``` + diff --git a/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e07276f782bb46b93d.md b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e07276f782bb46b93d.md new file mode 100644 index 00000000000..0746bc11f07 --- /dev/null +++ b/curriculum/challenges/swahili/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e07276f782bb46b93d.md @@ -0,0 +1,147 @@ +--- +id: 5f3ef6e07276f782bb46b93d +title: Hatua ya 63 +challengeType: 0 +dashedName: step-63 +--- + +# --description-- + +Ongeza kipengele cha `footer` chini ya kipengele cha `main`, ambapo unaweza kuongeza maelezo ya ziada. + +# --hints-- + +Unapaswa kuwa na tagi ya `